From 69bcb7ccca4360309ef677995f0290c5b6f9fb15 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 6 Nov 2026 00:43:08 +0000 Subject: [PATCH] Regenerate client from commit f6d7885 of spec repo --- .generator/schemas/v2/openapi.yaml | 870 ++++++++- .../CreateOIDCCloudAuthPersonaMapping.java | 67 + .../CreateOIDCCloudAuthProvider.java | 45 + .../DeleteOIDCCloudAuthPersonaMapping.java | 35 + .../DeleteOIDCCloudAuthProvider.java | 35 + .../GetOIDCCloudAuthPersonaMapping.java | 38 + .../GetOIDCCloudAuthProvider.java | 37 + .../ListOIDCCloudAuthPersonaMappings.java | 27 + .../ListOIDCCloudAuthProviders.java | 27 + .../com/datadog/api/client/ApiClient.java | 8 + .../client/v2/api/CloudAuthenticationApi.java | 1579 +++++++++++++-- .../v2/model/OIDCCloudAuthClaimMatchMode.java | 61 + .../v2/model/OIDCCloudAuthClaimMatcher.java | 214 ++ .../OIDCCloudAuthClaimMatcherCreate.java | 219 +++ .../v2/model/OIDCCloudAuthDiscoveryType.java | 59 + .../v2/model/OIDCCloudAuthOrgUUIDSource.java | 61 + ...dAuthPersonaMappingAttributesResponse.java | 314 +++ ...oudAuthPersonaMappingCreateAttributes.java | 260 +++ ...OIDCCloudAuthPersonaMappingCreateData.java | 189 ++ ...CCloudAuthPersonaMappingCreateRequest.java | 152 ++ ...DCCloudAuthPersonaMappingDataResponse.java | 219 +++ .../OIDCCloudAuthPersonaMappingResponse.java | 151 ++ .../OIDCCloudAuthPersonaMappingType.java | 58 + .../OIDCCloudAuthPersonaMappingsResponse.java | 167 ++ ...DCCloudAuthProviderAttributesResponse.java | 455 +++++ ...OIDCCloudAuthProviderCreateAttributes.java | 423 ++++ .../OIDCCloudAuthProviderCreateData.java | 187 ++ .../OIDCCloudAuthProviderCreateRequest.java | 151 ++ .../OIDCCloudAuthProviderDataResponse.java | 216 +++ .../model/OIDCCloudAuthProviderResponse.java | 150 ++ .../v2/model/OIDCCloudAuthProviderType.java | 57 + .../model/OIDCCloudAuthProvidersResponse.java | 165 ++ .../v2/api/cloud_authentication.feature | 288 ++- .../com/datadog/api/client/v2/api/given.json | 36 + .../com/datadog/api/client/v2/api/undo.json | 62 + .../test-runner-data/manifest.json | 56 + ...sona-mapping-returns-created-response.json | 43 + ...idc-provider-returns-created-response.json | 38 + ...a-mapping-returns-no-content-response.json | 35 + ...-provider-returns-no-content-response.json | 35 + ...c-persona-mapping-returns-ok-response.json | 35 + ...tom-oidc-provider-returns-ok-response.json | 35 + ...-persona-mappings-returns-ok-response.json | 18 + ...om-oidc-providers-returns-ok-response.json | 18 + .../v2/cloud-authentication.json | 1722 +++++++++++++++-- 45 files changed, 8717 insertions(+), 400 deletions(-) create mode 100644 examples/v2/cloud-authentication/CreateOIDCCloudAuthPersonaMapping.java create mode 100644 examples/v2/cloud-authentication/CreateOIDCCloudAuthProvider.java create mode 100644 examples/v2/cloud-authentication/DeleteOIDCCloudAuthPersonaMapping.java create mode 100644 examples/v2/cloud-authentication/DeleteOIDCCloudAuthProvider.java create mode 100644 examples/v2/cloud-authentication/GetOIDCCloudAuthPersonaMapping.java create mode 100644 examples/v2/cloud-authentication/GetOIDCCloudAuthProvider.java create mode 100644 examples/v2/cloud-authentication/ListOIDCCloudAuthPersonaMappings.java create mode 100644 examples/v2/cloud-authentication/ListOIDCCloudAuthProviders.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatchMode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcher.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcherCreate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthDiscoveryType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthOrgUUIDSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProvidersResponse.java create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-persona-mapping-returns-created-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-provider-returns-created-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-persona-mapping-returns-no-content-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-provider-returns-no-content-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-persona-mapping-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-provider-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-persona-mappings-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-providers-returns-ok-response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0b9bd93706f..a61935969bd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -90334,6 +90334,370 @@ components: required: - data type: object + OIDCCloudAuthClaimMatchMode: + default: exact + description: "Case-sensitive matching mode. Exact compares strings. Glob matches the entire value: * matches any number of characters, including /, and ? matches one character. Other characters are literal; escaping is not supported." + enum: + - exact + - glob + example: exact + type: string + x-enum-varnames: + - EXACT + - GLOB + OIDCCloudAuthClaimMatcher: + description: A token claim must match at least one of the configured values. + properties: + claim: + description: Name of the token claim. + example: sub + type: string + mode: + $ref: "#/components/schemas/OIDCCloudAuthClaimMatchMode" + values: + description: Accepted values for this claim. + example: + - system:serviceaccount:controllers:example-controller + items: + type: string + minItems: 1 + type: array + required: + - claim + - values + type: object + OIDCCloudAuthClaimMatcherCreate: + description: Claim condition for creating a provider or persona mapping. A token claim must match at least one configured value. + properties: + claim: + description: Name of the token claim. + example: sub + type: string + mode: + $ref: "#/components/schemas/OIDCCloudAuthClaimMatchMode" + values: + description: Accepted values for this claim. Each value is limited to 500 UTF-8 bytes when creating the resource. + example: + - system:serviceaccount:controllers:example-controller + items: + maxLength: 500 + type: string + minItems: 1 + type: array + required: + - claim + - values + type: object + OIDCCloudAuthDiscoveryType: + description: How the signing keys are discovered. + enum: + - oidc_discovery + - direct_jwks + example: oidc_discovery + type: string + x-enum-varnames: + - OIDC_DISCOVERY + - DIRECT_JWKS + OIDCCloudAuthOrgUUIDSource: + default: dd_org_uuid + description: Source of the organization UUID in the signed token. The `aud` source accepts a datadog/{org_uuid} audience. + enum: + - dd_org_uuid + - aud + example: dd_org_uuid + type: string + x-enum-varnames: + - DD_ORG_UUID + - AUD + OIDCCloudAuthPersonaMappingAttributesResponse: + description: Stored Custom OIDC persona mapping attributes. + properties: + account_identifier: + description: Handle resolved when the mapping was created; not updated if the account handle changes. + readOnly: true + type: string + account_uuid: + description: UUID of the Datadog user or service account to authenticate as. + example: 00000000-0000-0000-0000-000000000003 + type: string + claim_matchers: + description: Every claim condition must match. Supply claim_matchers or identity_pattern, but not both. + items: + $ref: "#/components/schemas/OIDCCloudAuthClaimMatcher" + type: array + created_at: + description: Time the configuration was created. + format: date-time + readOnly: true + type: string + created_by: + description: UUID of the user who created the configuration. + format: uuid + readOnly: true + type: string + identity_pattern: + description: Legacy glob pattern matched against the provider identity claim. Supply this or claim_matchers, but not both. Prefer claim_matchers with exact mode for a single Kubernetes service account. + example: system:serviceaccount:controllers:example-controller + type: string + provider_id: + description: UUID of the registered Custom OIDC provider. + example: 00000000-0000-0000-0000-000000000002 + format: uuid + type: string + type: object + OIDCCloudAuthPersonaMappingCreateAttributes: + description: Attributes for creating a Custom OIDC persona mapping. + properties: + account_uuid: + description: UUID of the Datadog user or service account to authenticate as. + example: 00000000-0000-0000-0000-000000000003 + type: string + claim_matchers: + description: Every claim condition must match. Supply claim_matchers or identity_pattern, but not both. + items: + $ref: "#/components/schemas/OIDCCloudAuthClaimMatcherCreate" + type: array + identity_pattern: + description: Legacy glob pattern, limited to 500 UTF-8 bytes when creating a mapping, matched against the provider identity claim. Supply this or claim_matchers, but not both. Prefer claim_matchers with exact mode for a single Kubernetes service account. + example: system:serviceaccount:controllers:example-controller + maxLength: 500 + type: string + provider_id: + description: UUID of the registered Custom OIDC provider. + example: 00000000-0000-0000-0000-000000000002 + format: uuid + type: string + required: + - provider_id + - account_uuid + type: object + OIDCCloudAuthPersonaMappingCreateData: + description: Custom OIDC persona mapping creation data. + properties: + attributes: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingCreateAttributes" + type: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingType" + required: + - type + - attributes + type: object + OIDCCloudAuthPersonaMappingCreateRequest: + description: Request to create a Custom OIDC persona mapping. + properties: + data: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingCreateData" + required: + - data + type: object + OIDCCloudAuthPersonaMappingDataResponse: + description: Custom OIDC persona mapping resource. + properties: + attributes: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingAttributesResponse" + id: + description: Unique resource identifier. + example: 00000000-0000-0000-0000-000000000004 + format: uuid + type: string + type: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingType" + required: + - id + - type + - attributes + type: object + OIDCCloudAuthPersonaMappingResponse: + description: Custom OIDC persona mapping response. + properties: + data: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingDataResponse" + required: + - data + type: object + OIDCCloudAuthPersonaMappingType: + default: custom_oidc_identity_mapping + description: Resource type returned by the existing Custom OIDC persona mapping API. + enum: + - custom_oidc_identity_mapping + example: custom_oidc_identity_mapping + type: string + x-enum-varnames: + - CUSTOM_OIDC_IDENTITY_MAPPING + OIDCCloudAuthPersonaMappingsResponse: + description: List of Custom OIDC persona mapping resources. + properties: + data: + description: Configured resources. + items: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingDataResponse" + type: array + required: + - data + type: object + OIDCCloudAuthProviderAttributesResponse: + description: Stored Custom OIDC provider attributes. + properties: + audiences: + description: Expected token audiences. At least one audience is required. When `org_uuid_source` is `aud`, include datadog/{org_uuid} for the organization creating the provider. + example: + - datadog/00000000-0000-0000-0000-000000000001 + items: + type: string + minItems: 1 + type: array + created_at: + description: Time the configuration was created. + format: date-time + readOnly: true + type: string + created_by: + description: UUID of the user who created the configuration. + format: uuid + readOnly: true + type: string + discovery_type: + $ref: "#/components/schemas/OIDCCloudAuthDiscoveryType" + identity_claim_name: + default: sub + description: Claim used by legacy identity_pattern mappings and in identity logs. + example: sub + type: string + issuer_url: + description: HTTPS issuer URL that must match the token issuer. For oidc_discovery, signing keys are located through the issuer discovery document. + example: https://issuer.example.com + type: string + jwks_url: + description: HTTPS JSON Web Key Set URL. Required when `discovery_type` is `direct_jwks`. + example: https://issuer.example.com/keys + type: string + org_uuid_claim_name: + description: Optional name of the token claim containing the Datadog organization UUID. + example: dd_org_uuid + type: string + org_uuid_source: + $ref: "#/components/schemas/OIDCCloudAuthOrgUUIDSource" + provider_name: + description: Name identifying the provider within the organization. + example: example-cluster + type: string + required_claims: + description: Claim matchers required for every token from this provider, in addition to the persona mapping matchers. Shared issuers can require an exact tenant claim. + items: + $ref: "#/components/schemas/OIDCCloudAuthClaimMatcher" + type: array + type: object + OIDCCloudAuthProviderCreateAttributes: + description: Attributes for creating a Custom OIDC provider. + properties: + audiences: + description: Expected token audiences. At least one audience is required. When `org_uuid_source` is `aud`, include datadog/{org_uuid} for the organization creating the provider. + example: + - datadog/00000000-0000-0000-0000-000000000001 + items: + type: string + minItems: 1 + type: array + discovery_type: + $ref: "#/components/schemas/OIDCCloudAuthDiscoveryType" + identity_claim_name: + default: sub + description: Claim used by legacy identity_pattern mappings and in identity logs. + example: sub + type: string + issuer_url: + description: HTTPS issuer URL that must match the token issuer. For oidc_discovery, signing keys are located through the issuer discovery document. + example: https://issuer.example.com + type: string + jwks_url: + description: HTTPS JSON Web Key Set URL. Required when `discovery_type` is `direct_jwks`. + example: https://issuer.example.com/keys + type: string + org_uuid_claim_name: + description: Optional name of the token claim containing the Datadog organization UUID. + example: dd_org_uuid + type: string + org_uuid_source: + $ref: "#/components/schemas/OIDCCloudAuthOrgUUIDSource" + provider_name: + description: Name identifying the provider within the organization. + example: example-cluster + type: string + required_claims: + description: Claim matchers required for every token from this provider, in addition to the persona mapping matchers. Shared issuers can require an exact tenant claim. + items: + $ref: "#/components/schemas/OIDCCloudAuthClaimMatcherCreate" + type: array + required: + - provider_name + - discovery_type + - issuer_url + - audiences + type: object + OIDCCloudAuthProviderCreateData: + description: Custom OIDC provider creation data. + properties: + attributes: + $ref: "#/components/schemas/OIDCCloudAuthProviderCreateAttributes" + type: + $ref: "#/components/schemas/OIDCCloudAuthProviderType" + required: + - type + - attributes + type: object + OIDCCloudAuthProviderCreateRequest: + description: Request to create a Custom OIDC provider. + properties: + data: + $ref: "#/components/schemas/OIDCCloudAuthProviderCreateData" + required: + - data + type: object + OIDCCloudAuthProviderDataResponse: + description: Custom OIDC provider resource. + properties: + attributes: + $ref: "#/components/schemas/OIDCCloudAuthProviderAttributesResponse" + id: + description: Unique resource identifier. + example: 00000000-0000-0000-0000-000000000004 + format: uuid + type: string + type: + $ref: "#/components/schemas/OIDCCloudAuthProviderType" + required: + - id + - type + - attributes + type: object + OIDCCloudAuthProviderResponse: + description: Custom OIDC provider response. + properties: + data: + $ref: "#/components/schemas/OIDCCloudAuthProviderDataResponse" + required: + - data + type: object + OIDCCloudAuthProviderType: + default: custom_oidc_provider_config + description: Resource type. + enum: + - custom_oidc_provider_config + example: custom_oidc_provider_config + type: string + x-enum-varnames: + - CUSTOM_OIDC_PROVIDER_CONFIG + OIDCCloudAuthProvidersResponse: + description: List of Custom OIDC provider resources. + properties: + data: + description: Configured resources. + items: + $ref: "#/components/schemas/OIDCCloudAuthProviderDataResponse" + type: array + required: + - data + type: object OIDCDiscoveryDocument: description: OpenID Connect provider metadata. properties: @@ -152062,6 +152426,8 @@ components: workflows_read: View workflows. workflows_run: Run workflows. workflows_write: Create, edit, and delete workflows. + workload_identity_federation_read: View workload identity federation providers and mappings. + workload_identity_federation_write: Create, update, and delete workload identity federation providers and mappings. tokenUrl: /oauth2/v1/token type: oauth2 x-env-name: DD_BEARER_TOKEN @@ -266690,6 +267056,508 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/wif/oidc/persona_mapping: + get: + description: List all Custom OIDC persona mappings in the organization. + operationId: ListOIDCCloudAuthPersonaMappings + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + account_uuid: 00000000-0000-0000-0000-000000000003 + claim_matchers: + - claim: sub + mode: exact + values: + - system:serviceaccount:controllers:example-controller + provider_id: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000004 + type: custom_oidc_identity_mapping + schema: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_read + summary: List all Custom OIDC persona mappings + tags: + - Cloud Authentication + x-permission: + operator: OR + permissions: + - workload_identity_federation_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Map token claims from a registered Custom OIDC provider to a Datadog user or service account. The caller must be authorized to map to the target account. + operationId: CreateOIDCCloudAuthPersonaMapping + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_uuid: 00000000-0000-0000-0000-000000000003 + claim_matchers: + - claim: sub + mode: exact + values: + - system:serviceaccount:controllers:example-controller + provider_id: 00000000-0000-0000-0000-000000000002 + type: custom_oidc_identity_mapping + schema: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_uuid: 00000000-0000-0000-0000-000000000003 + claim_matchers: + - claim: sub + mode: exact + values: + - system:serviceaccount:controllers:example-controller + provider_id: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000004 + type: custom_oidc_identity_mapping + schema: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_write + summary: Create a Custom OIDC persona mapping + tags: + - Cloud Authentication + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - workload_identity_federation_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/wif/oidc/persona_mapping/{persona_mapping_id}: + delete: + description: Delete a Custom OIDC persona mapping. + operationId: DeleteOIDCCloudAuthPersonaMapping + parameters: + - description: UUID of the Custom OIDC persona mapping. + in: path + name: persona_mapping_id + required: true + schema: + format: uuid + type: string + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_write + summary: Delete a Custom OIDC persona mapping + tags: + - Cloud Authentication + x-permission: + operator: OR + permissions: + - workload_identity_federation_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a Custom OIDC persona mapping by UUID. + operationId: GetOIDCCloudAuthPersonaMapping + parameters: + - description: UUID of the Custom OIDC persona mapping. + in: path + name: persona_mapping_id + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_uuid: 00000000-0000-0000-0000-000000000003 + claim_matchers: + - claim: sub + mode: exact + values: + - system:serviceaccount:controllers:example-controller + provider_id: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000004 + type: custom_oidc_identity_mapping + schema: + $ref: "#/components/schemas/OIDCCloudAuthPersonaMappingResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_read + summary: Get a Custom OIDC persona mapping + tags: + - Cloud Authentication + x-permission: + operator: OR + permissions: + - workload_identity_federation_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/wif/oidc/provider: + get: + description: List all Custom OIDC providers in the organization. + operationId: ListOIDCCloudAuthProviders + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + audiences: + - datadog/00000000-0000-0000-0000-000000000001 + discovery_type: oidc_discovery + issuer_url: https://issuer.example.com + org_uuid_source: aud + provider_name: example-cluster + id: 00000000-0000-0000-0000-000000000004 + type: custom_oidc_provider_config + schema: + $ref: "#/components/schemas/OIDCCloudAuthProvidersResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_read + summary: List all Custom OIDC providers + tags: + - Cloud Authentication + x-permission: + operator: OR + permissions: + - workload_identity_federation_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Register an OIDC issuer, signing-key discovery configuration, and accepted audiences. Provider names and issuer URLs must be unique within the organization. + operationId: CreateOIDCCloudAuthProvider + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + audiences: + - datadog/00000000-0000-0000-0000-000000000001 + discovery_type: oidc_discovery + issuer_url: https://issuer.example.com + org_uuid_source: aud + provider_name: example-cluster + type: custom_oidc_provider_config + schema: + $ref: "#/components/schemas/OIDCCloudAuthProviderCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + audiences: + - datadog/00000000-0000-0000-0000-000000000001 + discovery_type: oidc_discovery + issuer_url: https://issuer.example.com + org_uuid_source: aud + provider_name: example-cluster + id: 00000000-0000-0000-0000-000000000004 + type: custom_oidc_provider_config + schema: + $ref: "#/components/schemas/OIDCCloudAuthProviderResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_write + summary: Create a Custom OIDC provider + tags: + - Cloud Authentication + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - workload_identity_federation_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/wif/oidc/provider/{provider_id}: + delete: + description: Delete a Custom OIDC provider. Delete all persona and intake mappings referencing it first; otherwise the request returns a conflict. + operationId: DeleteOIDCCloudAuthProvider + parameters: + - description: UUID of the Custom OIDC provider. + in: path + name: provider_id + required: true + schema: + format: uuid + type: string + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_write + summary: Delete a Custom OIDC provider + tags: + - Cloud Authentication + x-permission: + operator: OR + permissions: + - workload_identity_federation_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a Custom OIDC provider by UUID. + operationId: GetOIDCCloudAuthProvider + parameters: + - description: UUID of the Custom OIDC provider. + in: path + name: provider_id + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + audiences: + - datadog/00000000-0000-0000-0000-000000000001 + discovery_type: oidc_discovery + issuer_url: https://issuer.example.com + org_uuid_source: aud + provider_name: example-cluster + id: 00000000-0000-0000-0000-000000000004 + type: custom_oidc_provider_config + schema: + $ref: "#/components/schemas/OIDCCloudAuthProviderResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - workload_identity_federation_read + summary: Get a Custom OIDC provider + tags: + - Cloud Authentication + x-permission: + operator: OR + permissions: + - workload_identity_federation_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. Custom OIDC authentication must be enabled for your organization. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/workflows: get: description: List all workflows in your organization. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). @@ -267493,7 +268361,7 @@ tags: View and manage change requests within Change Management. See the [Case Management page](https://docs.datadoghq.com/service_management/case_management/) for more information. name: Change Management - description: |- - Configure AWS and GitHub cloud authentication mappings for persona and intake authentication through the Datadog API. + Configure AWS, GitHub, and Custom OIDC cloud authentication for persona and intake authentication through the Datadog API. name: Cloud Authentication - description: |- The Cloud Cost Management API allows you to set up, edit, and delete Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products) and the `cloud_cost` data source. For more information, see the [Cloud Cost Management documentation](https://docs.datadoghq.com/cloud_cost_management/). diff --git a/examples/v2/cloud-authentication/CreateOIDCCloudAuthPersonaMapping.java b/examples/v2/cloud-authentication/CreateOIDCCloudAuthPersonaMapping.java new file mode 100644 index 00000000000..ed3db79961f --- /dev/null +++ b/examples/v2/cloud-authentication/CreateOIDCCloudAuthPersonaMapping.java @@ -0,0 +1,67 @@ +// Create a Custom OIDC persona mapping returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import com.datadog.api.client.v2.model.OIDCCloudAuthClaimMatchMode; +import com.datadog.api.client.v2.model.OIDCCloudAuthClaimMatcherCreate; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingCreateAttributes; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingCreateData; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingCreateRequest; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingResponse; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createOIDCCloudAuthPersonaMapping", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + // there is a valid "oidc_cloud_auth_provider" in the system + UUID OIDC_CLOUD_AUTH_PROVIDER_DATA_ID = null; + try { + OIDC_CLOUD_AUTH_PROVIDER_DATA_ID = + UUID.fromString(System.getenv("OIDC_CLOUD_AUTH_PROVIDER_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + // there is a valid "service_account_user_with_role" in the system + String SERVICE_ACCOUNT_USER_WITH_ROLE_DATA_ID = + System.getenv("SERVICE_ACCOUNT_USER_WITH_ROLE_DATA_ID"); + + OIDCCloudAuthPersonaMappingCreateRequest body = + new OIDCCloudAuthPersonaMappingCreateRequest() + .data( + new OIDCCloudAuthPersonaMappingCreateData() + .type(OIDCCloudAuthPersonaMappingType.CUSTOM_OIDC_IDENTITY_MAPPING) + .attributes( + new OIDCCloudAuthPersonaMappingCreateAttributes() + .providerId(OIDC_CLOUD_AUTH_PROVIDER_DATA_ID) + .accountUuid(SERVICE_ACCOUNT_USER_WITH_ROLE_DATA_ID) + .claimMatchers( + Collections.singletonList( + new OIDCCloudAuthClaimMatcherCreate() + .claim("sub") + .mode(OIDCCloudAuthClaimMatchMode.EXACT) + .values( + Collections.singletonList( + "system:serviceaccount:controllers:example-controller")))))); + + try { + OIDCCloudAuthPersonaMappingResponse result = + apiInstance.createOIDCCloudAuthPersonaMapping(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#createOIDCCloudAuthPersonaMapping"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/CreateOIDCCloudAuthProvider.java b/examples/v2/cloud-authentication/CreateOIDCCloudAuthProvider.java new file mode 100644 index 00000000000..610476b3aca --- /dev/null +++ b/examples/v2/cloud-authentication/CreateOIDCCloudAuthProvider.java @@ -0,0 +1,45 @@ +// Create a Custom OIDC provider returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import com.datadog.api.client.v2.model.OIDCCloudAuthDiscoveryType; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderCreateAttributes; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderCreateData; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderCreateRequest; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderResponse; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createOIDCCloudAuthProvider", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + OIDCCloudAuthProviderCreateRequest body = + new OIDCCloudAuthProviderCreateRequest() + .data( + new OIDCCloudAuthProviderCreateData() + .type(OIDCCloudAuthProviderType.CUSTOM_OIDC_PROVIDER_CONFIG) + .attributes( + new OIDCCloudAuthProviderCreateAttributes() + .providerName("oidc-de20b7e944abfac3") + .issuerUrl("https://oidc-de20b7e944abfac3.example.com") + .discoveryType(OIDCCloudAuthDiscoveryType.OIDC_DISCOVERY) + .audiences(Collections.singletonList("sdk-test")))); + + try { + OIDCCloudAuthProviderResponse result = apiInstance.createOIDCCloudAuthProvider(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#createOIDCCloudAuthProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/DeleteOIDCCloudAuthPersonaMapping.java b/examples/v2/cloud-authentication/DeleteOIDCCloudAuthPersonaMapping.java new file mode 100644 index 00000000000..7668ed6d3d2 --- /dev/null +++ b/examples/v2/cloud-authentication/DeleteOIDCCloudAuthPersonaMapping.java @@ -0,0 +1,35 @@ +// Delete a Custom OIDC persona mapping returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteOIDCCloudAuthPersonaMapping", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + // there is a valid "oidc_cloud_auth_persona_mapping" in the system + UUID OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID = null; + try { + OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID = + UUID.fromString(System.getenv("OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + apiInstance.deleteOIDCCloudAuthPersonaMapping(OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#deleteOIDCCloudAuthPersonaMapping"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/DeleteOIDCCloudAuthProvider.java b/examples/v2/cloud-authentication/DeleteOIDCCloudAuthProvider.java new file mode 100644 index 00000000000..b30dd6748d4 --- /dev/null +++ b/examples/v2/cloud-authentication/DeleteOIDCCloudAuthProvider.java @@ -0,0 +1,35 @@ +// Delete a Custom OIDC provider returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteOIDCCloudAuthProvider", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + // there is a valid "oidc_cloud_auth_provider" in the system + UUID OIDC_CLOUD_AUTH_PROVIDER_DATA_ID = null; + try { + OIDC_CLOUD_AUTH_PROVIDER_DATA_ID = + UUID.fromString(System.getenv("OIDC_CLOUD_AUTH_PROVIDER_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + apiInstance.deleteOIDCCloudAuthProvider(OIDC_CLOUD_AUTH_PROVIDER_DATA_ID); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#deleteOIDCCloudAuthProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/GetOIDCCloudAuthPersonaMapping.java b/examples/v2/cloud-authentication/GetOIDCCloudAuthPersonaMapping.java new file mode 100644 index 00000000000..dac84e6ba42 --- /dev/null +++ b/examples/v2/cloud-authentication/GetOIDCCloudAuthPersonaMapping.java @@ -0,0 +1,38 @@ +// Get a Custom OIDC persona mapping returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getOIDCCloudAuthPersonaMapping", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + // there is a valid "oidc_cloud_auth_persona_mapping" in the system + UUID OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID = null; + try { + OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID = + UUID.fromString(System.getenv("OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + OIDCCloudAuthPersonaMappingResponse result = + apiInstance.getOIDCCloudAuthPersonaMapping(OIDC_CLOUD_AUTH_PERSONA_MAPPING_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#getOIDCCloudAuthPersonaMapping"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/GetOIDCCloudAuthProvider.java b/examples/v2/cloud-authentication/GetOIDCCloudAuthProvider.java new file mode 100644 index 00000000000..ef1cf3d0372 --- /dev/null +++ b/examples/v2/cloud-authentication/GetOIDCCloudAuthProvider.java @@ -0,0 +1,37 @@ +// Get a Custom OIDC provider returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getOIDCCloudAuthProvider", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + // there is a valid "oidc_cloud_auth_provider" in the system + UUID OIDC_CLOUD_AUTH_PROVIDER_DATA_ID = null; + try { + OIDC_CLOUD_AUTH_PROVIDER_DATA_ID = + UUID.fromString(System.getenv("OIDC_CLOUD_AUTH_PROVIDER_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + OIDCCloudAuthProviderResponse result = + apiInstance.getOIDCCloudAuthProvider(OIDC_CLOUD_AUTH_PROVIDER_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudAuthenticationApi#getOIDCCloudAuthProvider"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/ListOIDCCloudAuthPersonaMappings.java b/examples/v2/cloud-authentication/ListOIDCCloudAuthPersonaMappings.java new file mode 100644 index 00000000000..1f5ee431795 --- /dev/null +++ b/examples/v2/cloud-authentication/ListOIDCCloudAuthPersonaMappings.java @@ -0,0 +1,27 @@ +// List all Custom OIDC persona mappings returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listOIDCCloudAuthPersonaMappings", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + try { + OIDCCloudAuthPersonaMappingsResponse result = apiInstance.listOIDCCloudAuthPersonaMappings(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#listOIDCCloudAuthPersonaMappings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-authentication/ListOIDCCloudAuthProviders.java b/examples/v2/cloud-authentication/ListOIDCCloudAuthProviders.java new file mode 100644 index 00000000000..0bbf6adfdb8 --- /dev/null +++ b/examples/v2/cloud-authentication/ListOIDCCloudAuthProviders.java @@ -0,0 +1,27 @@ +// List all Custom OIDC providers returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudAuthenticationApi; +import com.datadog.api.client.v2.model.OIDCCloudAuthProvidersResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listOIDCCloudAuthProviders", true); + CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient); + + try { + OIDCCloudAuthProvidersResponse result = apiInstance.listOIDCCloudAuthProviders(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudAuthenticationApi#listOIDCCloudAuthProviders"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index d7613ee3a45..7bfdde2a800 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1749,18 +1749,26 @@ public class ApiClient { put("v2.createAWSCloudAuthPersonaMapping", false); put("v2.createGitHubCloudAuthIntakeMapping", false); put("v2.createGitHubCloudAuthPersonaMapping", false); + put("v2.createOIDCCloudAuthPersonaMapping", false); + put("v2.createOIDCCloudAuthProvider", false); put("v2.deleteAWSCloudAuthIntakeMapping", false); put("v2.deleteAWSCloudAuthPersonaMapping", false); put("v2.deleteGitHubCloudAuthIntakeMapping", false); put("v2.deleteGitHubCloudAuthPersonaMapping", false); + put("v2.deleteOIDCCloudAuthPersonaMapping", false); + put("v2.deleteOIDCCloudAuthProvider", false); put("v2.getAWSCloudAuthIntakeMapping", false); put("v2.getAWSCloudAuthPersonaMapping", false); put("v2.getGitHubCloudAuthIntakeMapping", false); put("v2.getGitHubCloudAuthPersonaMapping", false); + put("v2.getOIDCCloudAuthPersonaMapping", false); + put("v2.getOIDCCloudAuthProvider", false); put("v2.listAWSCloudAuthIntakeMappings", false); put("v2.listAWSCloudAuthPersonaMappings", false); put("v2.listGitHubCloudAuthIntakeMappings", false); put("v2.listGitHubCloudAuthPersonaMappings", false); + put("v2.listOIDCCloudAuthPersonaMappings", false); + put("v2.listOIDCCloudAuthProviders", false); } }; protected static final java.util.logging.Logger logger = diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java index e2b79a97ae3..61a6bf4ad22 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java @@ -16,11 +16,18 @@ import com.datadog.api.client.v2.model.GitHubCloudAuthPersonaMappingCreateRequest; import com.datadog.api.client.v2.model.GitHubCloudAuthPersonaMappingResponse; import com.datadog.api.client.v2.model.GitHubCloudAuthPersonaMappingsResponse; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingCreateRequest; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingResponse; +import com.datadog.api.client.v2.model.OIDCCloudAuthPersonaMappingsResponse; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderCreateRequest; +import com.datadog.api.client.v2.model.OIDCCloudAuthProviderResponse; +import com.datadog.api.client.v2.model.OIDCCloudAuthProvidersResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; +import java.util.UUID; import java.util.concurrent.CompletableFuture; @jakarta.annotation.Generated( @@ -695,6 +702,322 @@ public GitHubCloudAuthPersonaMappingResponse createGitHubCloudAuthPersonaMapping new GenericType() {}); } + /** + * Create a Custom OIDC persona mapping. + * + *

See {@link #createOIDCCloudAuthPersonaMappingWithHttpInfo}. + * + * @param body (required) + * @return OIDCCloudAuthPersonaMappingResponse + * @throws ApiException if fails to make API call + */ + public OIDCCloudAuthPersonaMappingResponse createOIDCCloudAuthPersonaMapping( + OIDCCloudAuthPersonaMappingCreateRequest body) throws ApiException { + return createOIDCCloudAuthPersonaMappingWithHttpInfo(body).getData(); + } + + /** + * Create a Custom OIDC persona mapping. + * + *

See {@link #createOIDCCloudAuthPersonaMappingWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<OIDCCloudAuthPersonaMappingResponse> + */ + public CompletableFuture + createOIDCCloudAuthPersonaMappingAsync(OIDCCloudAuthPersonaMappingCreateRequest body) { + return createOIDCCloudAuthPersonaMappingWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Map token claims from a registered Custom OIDC provider to a Datadog user or service account. + * The caller must be authorized to map to the target account. + * + * @param body (required) + * @return ApiResponse<OIDCCloudAuthPersonaMappingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse + createOIDCCloudAuthPersonaMappingWithHttpInfo(OIDCCloudAuthPersonaMappingCreateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createOIDCCloudAuthPersonaMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createOIDCCloudAuthPersonaMapping"); + } + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/persona_mapping"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.createOIDCCloudAuthPersonaMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a Custom OIDC persona mapping. + * + *

See {@link #createOIDCCloudAuthPersonaMappingWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<OIDCCloudAuthPersonaMappingResponse>> + */ + public CompletableFuture> + createOIDCCloudAuthPersonaMappingWithHttpInfoAsync( + OIDCCloudAuthPersonaMappingCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createOIDCCloudAuthPersonaMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " createOIDCCloudAuthPersonaMapping")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/persona_mapping"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.createOIDCCloudAuthPersonaMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a Custom OIDC provider. + * + *

See {@link #createOIDCCloudAuthProviderWithHttpInfo}. + * + * @param body (required) + * @return OIDCCloudAuthProviderResponse + * @throws ApiException if fails to make API call + */ + public OIDCCloudAuthProviderResponse createOIDCCloudAuthProvider( + OIDCCloudAuthProviderCreateRequest body) throws ApiException { + return createOIDCCloudAuthProviderWithHttpInfo(body).getData(); + } + + /** + * Create a Custom OIDC provider. + * + *

See {@link #createOIDCCloudAuthProviderWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<OIDCCloudAuthProviderResponse> + */ + public CompletableFuture createOIDCCloudAuthProviderAsync( + OIDCCloudAuthProviderCreateRequest body) { + return createOIDCCloudAuthProviderWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Register an OIDC issuer, signing-key discovery configuration, and accepted audiences. Provider + * names and issuer URLs must be unique within the organization. + * + * @param body (required) + * @return ApiResponse<OIDCCloudAuthProviderResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createOIDCCloudAuthProviderWithHttpInfo( + OIDCCloudAuthProviderCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createOIDCCloudAuthProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createOIDCCloudAuthProvider"); + } + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/provider"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.createOIDCCloudAuthProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a Custom OIDC provider. + * + *

See {@link #createOIDCCloudAuthProviderWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<OIDCCloudAuthProviderResponse>> + */ + public CompletableFuture> + createOIDCCloudAuthProviderWithHttpInfoAsync(OIDCCloudAuthProviderCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createOIDCCloudAuthProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling createOIDCCloudAuthProvider")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/provider"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.createOIDCCloudAuthProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete an AWS cloud authentication intake mapping. * @@ -1335,30 +1658,680 @@ public CompletableFuture> deleteGitHubCloudAuthPersonaMappingW } /** - * Get an AWS cloud authentication intake mapping. + * Delete a Custom OIDC persona mapping. * - *

See {@link #getAWSCloudAuthIntakeMappingWithHttpInfo}. + *

See {@link #deleteOIDCCloudAuthPersonaMappingWithHttpInfo}. * - * @param intakeMappingId The ID of the intake mapping (required) - * @return AWSCloudAuthIntakeMappingResponse + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) * @throws ApiException if fails to make API call */ - public AWSCloudAuthIntakeMappingResponse getAWSCloudAuthIntakeMapping(String intakeMappingId) - throws ApiException { - return getAWSCloudAuthIntakeMappingWithHttpInfo(intakeMappingId).getData(); + public void deleteOIDCCloudAuthPersonaMapping(UUID personaMappingId) throws ApiException { + deleteOIDCCloudAuthPersonaMappingWithHttpInfo(personaMappingId); } /** - * Get an AWS cloud authentication intake mapping. + * Delete a Custom OIDC persona mapping. * - *

See {@link #getAWSCloudAuthIntakeMappingWithHttpInfoAsync}. + *

See {@link #deleteOIDCCloudAuthPersonaMappingWithHttpInfoAsync}. * - * @param intakeMappingId The ID of the intake mapping (required) - * @return CompletableFuture<AWSCloudAuthIntakeMappingResponse> + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteOIDCCloudAuthPersonaMappingAsync(UUID personaMappingId) { + return deleteOIDCCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a Custom OIDC persona mapping. + * + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteOIDCCloudAuthPersonaMappingWithHttpInfo(UUID personaMappingId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteOIDCCloudAuthPersonaMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'personaMappingId' is set + if (personaMappingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'personaMappingId' when calling" + + " deleteOIDCCloudAuthPersonaMapping"); + } + // create path and map variables + String localVarPath = + "/api/v2/wif/oidc/persona_mapping/{persona_mapping_id}" + .replaceAll( + "\\{" + "persona_mapping_id" + "\\}", + apiClient.escapeString(personaMappingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.deleteOIDCCloudAuthPersonaMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a Custom OIDC persona mapping. + * + *

See {@link #deleteOIDCCloudAuthPersonaMappingWithHttpInfo}. + * + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteOIDCCloudAuthPersonaMappingWithHttpInfoAsync( + UUID personaMappingId) { + // Check if unstable operation is enabled + String operationId = "deleteOIDCCloudAuthPersonaMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'personaMappingId' is set + if (personaMappingId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'personaMappingId' when calling" + + " deleteOIDCCloudAuthPersonaMapping")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/wif/oidc/persona_mapping/{persona_mapping_id}" + .replaceAll( + "\\{" + "persona_mapping_id" + "\\}", + apiClient.escapeString(personaMappingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.deleteOIDCCloudAuthPersonaMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a Custom OIDC provider. + * + *

See {@link #deleteOIDCCloudAuthProviderWithHttpInfo}. + * + * @param providerId UUID of the Custom OIDC provider. (required) + * @throws ApiException if fails to make API call + */ + public void deleteOIDCCloudAuthProvider(UUID providerId) throws ApiException { + deleteOIDCCloudAuthProviderWithHttpInfo(providerId); + } + + /** + * Delete a Custom OIDC provider. + * + *

See {@link #deleteOIDCCloudAuthProviderWithHttpInfoAsync}. + * + * @param providerId UUID of the Custom OIDC provider. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteOIDCCloudAuthProviderAsync(UUID providerId) { + return deleteOIDCCloudAuthProviderWithHttpInfoAsync(providerId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a Custom OIDC provider. Delete all persona and intake mappings referencing it first; + * otherwise the request returns a conflict. + * + * @param providerId UUID of the Custom OIDC provider. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse deleteOIDCCloudAuthProviderWithHttpInfo(UUID providerId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteOIDCCloudAuthProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'providerId' when calling deleteOIDCCloudAuthProvider"); + } + // create path and map variables + String localVarPath = + "/api/v2/wif/oidc/provider/{provider_id}" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.deleteOIDCCloudAuthProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a Custom OIDC provider. + * + *

See {@link #deleteOIDCCloudAuthProviderWithHttpInfo}. + * + * @param providerId UUID of the Custom OIDC provider. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteOIDCCloudAuthProviderWithHttpInfoAsync( + UUID providerId) { + // Check if unstable operation is enabled + String operationId = "deleteOIDCCloudAuthProvider"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " deleteOIDCCloudAuthProvider")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/wif/oidc/provider/{provider_id}" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.deleteOIDCCloudAuthProvider", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get an AWS cloud authentication intake mapping. + * + *

See {@link #getAWSCloudAuthIntakeMappingWithHttpInfo}. + * + * @param intakeMappingId The ID of the intake mapping (required) + * @return AWSCloudAuthIntakeMappingResponse + * @throws ApiException if fails to make API call + */ + public AWSCloudAuthIntakeMappingResponse getAWSCloudAuthIntakeMapping(String intakeMappingId) + throws ApiException { + return getAWSCloudAuthIntakeMappingWithHttpInfo(intakeMappingId).getData(); + } + + /** + * Get an AWS cloud authentication intake mapping. + * + *

See {@link #getAWSCloudAuthIntakeMappingWithHttpInfoAsync}. + * + * @param intakeMappingId The ID of the intake mapping (required) + * @return CompletableFuture<AWSCloudAuthIntakeMappingResponse> + */ + public CompletableFuture getAWSCloudAuthIntakeMappingAsync( + String intakeMappingId) { + return getAWSCloudAuthIntakeMappingWithHttpInfoAsync(intakeMappingId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an AWS cloud authentication intake mapping by ID. + * + * @param intakeMappingId The ID of the intake mapping (required) + * @return ApiResponse<AWSCloudAuthIntakeMappingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAWSCloudAuthIntakeMappingWithHttpInfo( + String intakeMappingId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAWSCloudAuthIntakeMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'intakeMappingId' is set + if (intakeMappingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'intakeMappingId' when calling" + + " getAWSCloudAuthIntakeMapping"); + } + // create path and map variables + String localVarPath = + "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + .replaceAll( + "\\{" + "intake_mapping_id" + "\\}", + apiClient.escapeString(intakeMappingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.getAWSCloudAuthIntakeMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AWS cloud authentication intake mapping. + * + *

See {@link #getAWSCloudAuthIntakeMappingWithHttpInfo}. + * + * @param intakeMappingId The ID of the intake mapping (required) + * @return CompletableFuture<ApiResponse<AWSCloudAuthIntakeMappingResponse>> + */ + public CompletableFuture> + getAWSCloudAuthIntakeMappingWithHttpInfoAsync(String intakeMappingId) { + // Check if unstable operation is enabled + String operationId = "getAWSCloudAuthIntakeMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'intakeMappingId' is set + if (intakeMappingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'intakeMappingId' when calling" + + " getAWSCloudAuthIntakeMapping")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + .replaceAll( + "\\{" + "intake_mapping_id" + "\\}", + apiClient.escapeString(intakeMappingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.getAWSCloudAuthIntakeMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AWS cloud authentication persona mapping. + * + *

See {@link #getAWSCloudAuthPersonaMappingWithHttpInfo}. + * + * @param personaMappingId The ID of the persona mapping (required) + * @return AWSCloudAuthPersonaMappingResponse + * @throws ApiException if fails to make API call + */ + public AWSCloudAuthPersonaMappingResponse getAWSCloudAuthPersonaMapping(String personaMappingId) + throws ApiException { + return getAWSCloudAuthPersonaMappingWithHttpInfo(personaMappingId).getData(); + } + + /** + * Get an AWS cloud authentication persona mapping. + * + *

See {@link #getAWSCloudAuthPersonaMappingWithHttpInfoAsync}. + * + * @param personaMappingId The ID of the persona mapping (required) + * @return CompletableFuture<AWSCloudAuthPersonaMappingResponse> + */ + public CompletableFuture getAWSCloudAuthPersonaMappingAsync( + String personaMappingId) { + return getAWSCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific AWS cloud authentication persona mapping by ID. This endpoint retrieves a single + * configured persona mapping that associates an AWS IAM principal with a Datadog user. + * + * @param personaMappingId The ID of the persona mapping (required) + * @return ApiResponse<AWSCloudAuthPersonaMappingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAWSCloudAuthPersonaMappingWithHttpInfo( + String personaMappingId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAWSCloudAuthPersonaMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'personaMappingId' is set + if (personaMappingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'personaMappingId' when calling" + + " getAWSCloudAuthPersonaMapping"); + } + // create path and map variables + String localVarPath = + "/api/v2/wif/aws/persona_mapping/{persona_mapping_id}" + .replaceAll( + "\\{" + "persona_mapping_id" + "\\}", + apiClient.escapeString(personaMappingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.getAWSCloudAuthPersonaMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an AWS cloud authentication persona mapping. + * + *

See {@link #getAWSCloudAuthPersonaMappingWithHttpInfo}. + * + * @param personaMappingId The ID of the persona mapping (required) + * @return CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingResponse>> + */ + public CompletableFuture> + getAWSCloudAuthPersonaMappingWithHttpInfoAsync(String personaMappingId) { + // Check if unstable operation is enabled + String operationId = "getAWSCloudAuthPersonaMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'personaMappingId' is set + if (personaMappingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'personaMappingId' when calling" + + " getAWSCloudAuthPersonaMapping")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/wif/aws/persona_mapping/{persona_mapping_id}" + .replaceAll( + "\\{" + "persona_mapping_id" + "\\}", + apiClient.escapeString(personaMappingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.getAWSCloudAuthPersonaMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a GitHub cloud authentication intake mapping. + * + *

See {@link #getGitHubCloudAuthIntakeMappingWithHttpInfo}. + * + * @param intakeMappingId The ID of the intake mapping (required) + * @return GitHubCloudAuthIntakeMappingResponse + * @throws ApiException if fails to make API call */ - public CompletableFuture getAWSCloudAuthIntakeMappingAsync( - String intakeMappingId) { - return getAWSCloudAuthIntakeMappingWithHttpInfoAsync(intakeMappingId) + public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( + String intakeMappingId) throws ApiException { + return getGitHubCloudAuthIntakeMappingWithHttpInfo(intakeMappingId).getData(); + } + + /** + * Get a GitHub cloud authentication intake mapping. + * + *

See {@link #getGitHubCloudAuthIntakeMappingWithHttpInfoAsync}. + * + * @param intakeMappingId The ID of the intake mapping (required) + * @return CompletableFuture<GitHubCloudAuthIntakeMappingResponse> + */ + public CompletableFuture + getGitHubCloudAuthIntakeMappingAsync(String intakeMappingId) { + return getGitHubCloudAuthIntakeMappingWithHttpInfoAsync(intakeMappingId) .thenApply( response -> { return response.getData(); @@ -1366,10 +2339,12 @@ public CompletableFuture getAWSCloudAuthIntak } /** - * Get an AWS cloud authentication intake mapping by ID. + * Get a specific GitHub cloud authentication intake mapping by ID. This endpoint retrieves a + * single configured intake mapping that entitles a matching GitHub Actions OIDC principal to + * request Datadog API keys. * * @param intakeMappingId The ID of the intake mapping (required) - * @return ApiResponse<AWSCloudAuthIntakeMappingResponse> + * @return ApiResponse<GitHubCloudAuthIntakeMappingResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1381,10 +2356,10 @@ public CompletableFuture getAWSCloudAuthIntak * *
429 Too many requests -
*/ - public ApiResponse getAWSCloudAuthIntakeMappingWithHttpInfo( - String intakeMappingId) throws ApiException { + public ApiResponse + getGitHubCloudAuthIntakeMappingWithHttpInfo(String intakeMappingId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getAWSCloudAuthIntakeMapping"; + String operationId = "getGitHubCloudAuthIntakeMapping"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1397,11 +2372,11 @@ public ApiResponse getAWSCloudAuthIntakeMappi throw new ApiException( 400, "Missing the required parameter 'intakeMappingId' when calling" - + " getAWSCloudAuthIntakeMapping"); + + " getGitHubCloudAuthIntakeMapping"); } // create path and map variables String localVarPath = - "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + "/api/v2/wif/github/intake_mapping/{intake_mapping_id}" .replaceAll( "\\{" + "intake_mapping_id" + "\\}", apiClient.escapeString(intakeMappingId.toString())); @@ -1410,7 +2385,7 @@ public ApiResponse getAWSCloudAuthIntakeMappi Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getAWSCloudAuthIntakeMapping", + "v2.CloudAuthenticationApi.getGitHubCloudAuthIntakeMapping", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1425,25 +2400,25 @@ public ApiResponse getAWSCloudAuthIntakeMappi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an AWS cloud authentication intake mapping. + * Get a GitHub cloud authentication intake mapping. * - *

See {@link #getAWSCloudAuthIntakeMappingWithHttpInfo}. + *

See {@link #getGitHubCloudAuthIntakeMappingWithHttpInfo}. * * @param intakeMappingId The ID of the intake mapping (required) - * @return CompletableFuture<ApiResponse<AWSCloudAuthIntakeMappingResponse>> + * @return CompletableFuture<ApiResponse<GitHubCloudAuthIntakeMappingResponse>> */ - public CompletableFuture> - getAWSCloudAuthIntakeMappingWithHttpInfoAsync(String intakeMappingId) { + public CompletableFuture> + getGitHubCloudAuthIntakeMappingWithHttpInfoAsync(String intakeMappingId) { // Check if unstable operation is enabled - String operationId = "getAWSCloudAuthIntakeMapping"; + String operationId = "getGitHubCloudAuthIntakeMapping"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -1453,18 +2428,18 @@ public ApiResponse getAWSCloudAuthIntakeMappi // verify the required parameter 'intakeMappingId' is set if (intakeMappingId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'intakeMappingId' when calling" - + " getAWSCloudAuthIntakeMapping")); + + " getGitHubCloudAuthIntakeMapping")); return result; } // create path and map variables String localVarPath = - "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + "/api/v2/wif/github/intake_mapping/{intake_mapping_id}" .replaceAll( "\\{" + "intake_mapping_id" + "\\}", apiClient.escapeString(intakeMappingId.toString())); @@ -1475,7 +2450,7 @@ public ApiResponse getAWSCloudAuthIntakeMappi try { builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getAWSCloudAuthIntakeMapping", + "v2.CloudAuthenticationApi.getGitHubCloudAuthIntakeMapping", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1483,7 +2458,7 @@ public ApiResponse getAWSCloudAuthIntakeMappi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -1496,34 +2471,34 @@ public ApiResponse getAWSCloudAuthIntakeMappi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an AWS cloud authentication persona mapping. + * Get a GitHub cloud authentication persona mapping. * - *

See {@link #getAWSCloudAuthPersonaMappingWithHttpInfo}. + *

See {@link #getGitHubCloudAuthPersonaMappingWithHttpInfo}. * * @param personaMappingId The ID of the persona mapping (required) - * @return AWSCloudAuthPersonaMappingResponse + * @return GitHubCloudAuthPersonaMappingResponse * @throws ApiException if fails to make API call */ - public AWSCloudAuthPersonaMappingResponse getAWSCloudAuthPersonaMapping(String personaMappingId) - throws ApiException { - return getAWSCloudAuthPersonaMappingWithHttpInfo(personaMappingId).getData(); + public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( + String personaMappingId) throws ApiException { + return getGitHubCloudAuthPersonaMappingWithHttpInfo(personaMappingId).getData(); } /** - * Get an AWS cloud authentication persona mapping. + * Get a GitHub cloud authentication persona mapping. * - *

See {@link #getAWSCloudAuthPersonaMappingWithHttpInfoAsync}. + *

See {@link #getGitHubCloudAuthPersonaMappingWithHttpInfoAsync}. * * @param personaMappingId The ID of the persona mapping (required) - * @return CompletableFuture<AWSCloudAuthPersonaMappingResponse> + * @return CompletableFuture<GitHubCloudAuthPersonaMappingResponse> */ - public CompletableFuture getAWSCloudAuthPersonaMappingAsync( - String personaMappingId) { - return getAWSCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId) + public CompletableFuture + getGitHubCloudAuthPersonaMappingAsync(String personaMappingId) { + return getGitHubCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId) .thenApply( response -> { return response.getData(); @@ -1531,11 +2506,12 @@ public CompletableFuture getAWSCloudAuthPers } /** - * Get a specific AWS cloud authentication persona mapping by ID. This endpoint retrieves a single - * configured persona mapping that associates an AWS IAM principal with a Datadog user. + * Get a specific GitHub cloud authentication persona mapping by ID. This endpoint retrieves a + * single configured persona mapping that associates a GitHub Actions OIDC principal with a + * Datadog user. The mapped principal can request an impersonation token. * * @param personaMappingId The ID of the persona mapping (required) - * @return ApiResponse<AWSCloudAuthPersonaMappingResponse> + * @return ApiResponse<GitHubCloudAuthPersonaMappingResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1547,10 +2523,10 @@ public CompletableFuture getAWSCloudAuthPers * *
429 Too many requests -
*/ - public ApiResponse getAWSCloudAuthPersonaMappingWithHttpInfo( - String personaMappingId) throws ApiException { + public ApiResponse + getGitHubCloudAuthPersonaMappingWithHttpInfo(String personaMappingId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getAWSCloudAuthPersonaMapping"; + String operationId = "getGitHubCloudAuthPersonaMapping"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1563,11 +2539,11 @@ public ApiResponse getAWSCloudAuthPersonaMap throw new ApiException( 400, "Missing the required parameter 'personaMappingId' when calling" - + " getAWSCloudAuthPersonaMapping"); + + " getGitHubCloudAuthPersonaMapping"); } // create path and map variables String localVarPath = - "/api/v2/wif/aws/persona_mapping/{persona_mapping_id}" + "/api/v2/wif/github/persona_mapping/{persona_mapping_id}" .replaceAll( "\\{" + "persona_mapping_id" + "\\}", apiClient.escapeString(personaMappingId.toString())); @@ -1576,7 +2552,7 @@ public ApiResponse getAWSCloudAuthPersonaMap Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getAWSCloudAuthPersonaMapping", + "v2.CloudAuthenticationApi.getGitHubCloudAuthPersonaMapping", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1591,25 +2567,25 @@ public ApiResponse getAWSCloudAuthPersonaMap localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an AWS cloud authentication persona mapping. + * Get a GitHub cloud authentication persona mapping. * - *

See {@link #getAWSCloudAuthPersonaMappingWithHttpInfo}. + *

See {@link #getGitHubCloudAuthPersonaMappingWithHttpInfo}. * * @param personaMappingId The ID of the persona mapping (required) - * @return CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingResponse>> + * @return CompletableFuture<ApiResponse<GitHubCloudAuthPersonaMappingResponse>> */ - public CompletableFuture> - getAWSCloudAuthPersonaMappingWithHttpInfoAsync(String personaMappingId) { + public CompletableFuture> + getGitHubCloudAuthPersonaMappingWithHttpInfoAsync(String personaMappingId) { // Check if unstable operation is enabled - String operationId = "getAWSCloudAuthPersonaMapping"; + String operationId = "getGitHubCloudAuthPersonaMapping"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -1619,18 +2595,18 @@ public ApiResponse getAWSCloudAuthPersonaMap // verify the required parameter 'personaMappingId' is set if (personaMappingId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'personaMappingId' when calling" - + " getAWSCloudAuthPersonaMapping")); + + " getGitHubCloudAuthPersonaMapping")); return result; } // create path and map variables String localVarPath = - "/api/v2/wif/aws/persona_mapping/{persona_mapping_id}" + "/api/v2/wif/github/persona_mapping/{persona_mapping_id}" .replaceAll( "\\{" + "persona_mapping_id" + "\\}", apiClient.escapeString(personaMappingId.toString())); @@ -1641,7 +2617,7 @@ public ApiResponse getAWSCloudAuthPersonaMap try { builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getAWSCloudAuthPersonaMapping", + "v2.CloudAuthenticationApi.getGitHubCloudAuthPersonaMapping", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1649,7 +2625,7 @@ public ApiResponse getAWSCloudAuthPersonaMap new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -1662,34 +2638,34 @@ public ApiResponse getAWSCloudAuthPersonaMap localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a GitHub cloud authentication intake mapping. + * Get a Custom OIDC persona mapping. * - *

See {@link #getGitHubCloudAuthIntakeMappingWithHttpInfo}. + *

See {@link #getOIDCCloudAuthPersonaMappingWithHttpInfo}. * - * @param intakeMappingId The ID of the intake mapping (required) - * @return GitHubCloudAuthIntakeMappingResponse + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return OIDCCloudAuthPersonaMappingResponse * @throws ApiException if fails to make API call */ - public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( - String intakeMappingId) throws ApiException { - return getGitHubCloudAuthIntakeMappingWithHttpInfo(intakeMappingId).getData(); + public OIDCCloudAuthPersonaMappingResponse getOIDCCloudAuthPersonaMapping(UUID personaMappingId) + throws ApiException { + return getOIDCCloudAuthPersonaMappingWithHttpInfo(personaMappingId).getData(); } /** - * Get a GitHub cloud authentication intake mapping. + * Get a Custom OIDC persona mapping. * - *

See {@link #getGitHubCloudAuthIntakeMappingWithHttpInfoAsync}. + *

See {@link #getOIDCCloudAuthPersonaMappingWithHttpInfoAsync}. * - * @param intakeMappingId The ID of the intake mapping (required) - * @return CompletableFuture<GitHubCloudAuthIntakeMappingResponse> + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return CompletableFuture<OIDCCloudAuthPersonaMappingResponse> */ - public CompletableFuture - getGitHubCloudAuthIntakeMappingAsync(String intakeMappingId) { - return getGitHubCloudAuthIntakeMappingWithHttpInfoAsync(intakeMappingId) + public CompletableFuture getOIDCCloudAuthPersonaMappingAsync( + UUID personaMappingId) { + return getOIDCCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId) .thenApply( response -> { return response.getData(); @@ -1697,27 +2673,26 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( } /** - * Get a specific GitHub cloud authentication intake mapping by ID. This endpoint retrieves a - * single configured intake mapping that entitles a matching GitHub Actions OIDC principal to - * request Datadog API keys. + * Get a Custom OIDC persona mapping by UUID. * - * @param intakeMappingId The ID of the intake mapping (required) - * @return ApiResponse<GitHubCloudAuthIntakeMappingResponse> + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return ApiResponse<OIDCCloudAuthPersonaMappingResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getGitHubCloudAuthIntakeMappingWithHttpInfo(String intakeMappingId) throws ApiException { + public ApiResponse + getOIDCCloudAuthPersonaMappingWithHttpInfo(UUID personaMappingId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getGitHubCloudAuthIntakeMapping"; + String operationId = "getOIDCCloudAuthPersonaMapping"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1725,25 +2700,25 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( } Object localVarPostBody = null; - // verify the required parameter 'intakeMappingId' is set - if (intakeMappingId == null) { + // verify the required parameter 'personaMappingId' is set + if (personaMappingId == null) { throw new ApiException( 400, - "Missing the required parameter 'intakeMappingId' when calling" - + " getGitHubCloudAuthIntakeMapping"); + "Missing the required parameter 'personaMappingId' when calling" + + " getOIDCCloudAuthPersonaMapping"); } // create path and map variables String localVarPath = - "/api/v2/wif/github/intake_mapping/{intake_mapping_id}" + "/api/v2/wif/oidc/persona_mapping/{persona_mapping_id}" .replaceAll( - "\\{" + "intake_mapping_id" + "\\}", - apiClient.escapeString(intakeMappingId.toString())); + "\\{" + "persona_mapping_id" + "\\}", + apiClient.escapeString(personaMappingId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getGitHubCloudAuthIntakeMapping", + "v2.CloudAuthenticationApi.getOIDCCloudAuthPersonaMapping", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1758,25 +2733,25 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a GitHub cloud authentication intake mapping. + * Get a Custom OIDC persona mapping. * - *

See {@link #getGitHubCloudAuthIntakeMappingWithHttpInfo}. + *

See {@link #getOIDCCloudAuthPersonaMappingWithHttpInfo}. * - * @param intakeMappingId The ID of the intake mapping (required) - * @return CompletableFuture<ApiResponse<GitHubCloudAuthIntakeMappingResponse>> + * @param personaMappingId UUID of the Custom OIDC persona mapping. (required) + * @return CompletableFuture<ApiResponse<OIDCCloudAuthPersonaMappingResponse>> */ - public CompletableFuture> - getGitHubCloudAuthIntakeMappingWithHttpInfoAsync(String intakeMappingId) { + public CompletableFuture> + getOIDCCloudAuthPersonaMappingWithHttpInfoAsync(UUID personaMappingId) { // Check if unstable operation is enabled - String operationId = "getGitHubCloudAuthIntakeMapping"; + String operationId = "getOIDCCloudAuthPersonaMapping"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -1784,23 +2759,23 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( } Object localVarPostBody = null; - // verify the required parameter 'intakeMappingId' is set - if (intakeMappingId == null) { - CompletableFuture> result = + // verify the required parameter 'personaMappingId' is set + if (personaMappingId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'intakeMappingId' when calling" - + " getGitHubCloudAuthIntakeMapping")); + "Missing the required parameter 'personaMappingId' when calling" + + " getOIDCCloudAuthPersonaMapping")); return result; } // create path and map variables String localVarPath = - "/api/v2/wif/github/intake_mapping/{intake_mapping_id}" + "/api/v2/wif/oidc/persona_mapping/{persona_mapping_id}" .replaceAll( - "\\{" + "intake_mapping_id" + "\\}", - apiClient.escapeString(intakeMappingId.toString())); + "\\{" + "persona_mapping_id" + "\\}", + apiClient.escapeString(personaMappingId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1808,7 +2783,7 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( try { builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getGitHubCloudAuthIntakeMapping", + "v2.CloudAuthenticationApi.getOIDCCloudAuthPersonaMapping", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1816,7 +2791,7 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -1829,34 +2804,34 @@ public GitHubCloudAuthIntakeMappingResponse getGitHubCloudAuthIntakeMapping( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a GitHub cloud authentication persona mapping. + * Get a Custom OIDC provider. * - *

See {@link #getGitHubCloudAuthPersonaMappingWithHttpInfo}. - * - * @param personaMappingId The ID of the persona mapping (required) - * @return GitHubCloudAuthPersonaMappingResponse + *

See {@link #getOIDCCloudAuthProviderWithHttpInfo}. + * + * @param providerId UUID of the Custom OIDC provider. (required) + * @return OIDCCloudAuthProviderResponse * @throws ApiException if fails to make API call */ - public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( - String personaMappingId) throws ApiException { - return getGitHubCloudAuthPersonaMappingWithHttpInfo(personaMappingId).getData(); + public OIDCCloudAuthProviderResponse getOIDCCloudAuthProvider(UUID providerId) + throws ApiException { + return getOIDCCloudAuthProviderWithHttpInfo(providerId).getData(); } /** - * Get a GitHub cloud authentication persona mapping. + * Get a Custom OIDC provider. * - *

See {@link #getGitHubCloudAuthPersonaMappingWithHttpInfoAsync}. + *

See {@link #getOIDCCloudAuthProviderWithHttpInfoAsync}. * - * @param personaMappingId The ID of the persona mapping (required) - * @return CompletableFuture<GitHubCloudAuthPersonaMappingResponse> + * @param providerId UUID of the Custom OIDC provider. (required) + * @return CompletableFuture<OIDCCloudAuthProviderResponse> */ - public CompletableFuture - getGitHubCloudAuthPersonaMappingAsync(String personaMappingId) { - return getGitHubCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId) + public CompletableFuture getOIDCCloudAuthProviderAsync( + UUID providerId) { + return getOIDCCloudAuthProviderWithHttpInfoAsync(providerId) .thenApply( response -> { return response.getData(); @@ -1864,27 +2839,26 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( } /** - * Get a specific GitHub cloud authentication persona mapping by ID. This endpoint retrieves a - * single configured persona mapping that associates a GitHub Actions OIDC principal with a - * Datadog user. The mapped principal can request an impersonation token. + * Get a Custom OIDC provider by UUID. * - * @param personaMappingId The ID of the persona mapping (required) - * @return ApiResponse<GitHubCloudAuthPersonaMappingResponse> + * @param providerId UUID of the Custom OIDC provider. (required) + * @return ApiResponse<OIDCCloudAuthProviderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getGitHubCloudAuthPersonaMappingWithHttpInfo(String personaMappingId) throws ApiException { + public ApiResponse getOIDCCloudAuthProviderWithHttpInfo( + UUID providerId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getGitHubCloudAuthPersonaMapping"; + String operationId = "getOIDCCloudAuthProvider"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -1892,25 +2866,22 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( } Object localVarPostBody = null; - // verify the required parameter 'personaMappingId' is set - if (personaMappingId == null) { + // verify the required parameter 'providerId' is set + if (providerId == null) { throw new ApiException( - 400, - "Missing the required parameter 'personaMappingId' when calling" - + " getGitHubCloudAuthPersonaMapping"); + 400, "Missing the required parameter 'providerId' when calling getOIDCCloudAuthProvider"); } // create path and map variables String localVarPath = - "/api/v2/wif/github/persona_mapping/{persona_mapping_id}" + "/api/v2/wif/oidc/provider/{provider_id}" .replaceAll( - "\\{" + "persona_mapping_id" + "\\}", - apiClient.escapeString(personaMappingId.toString())); + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getGitHubCloudAuthPersonaMapping", + "v2.CloudAuthenticationApi.getOIDCCloudAuthProvider", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1925,25 +2896,25 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a GitHub cloud authentication persona mapping. + * Get a Custom OIDC provider. * - *

See {@link #getGitHubCloudAuthPersonaMappingWithHttpInfo}. + *

See {@link #getOIDCCloudAuthProviderWithHttpInfo}. * - * @param personaMappingId The ID of the persona mapping (required) - * @return CompletableFuture<ApiResponse<GitHubCloudAuthPersonaMappingResponse>> + * @param providerId UUID of the Custom OIDC provider. (required) + * @return CompletableFuture<ApiResponse<OIDCCloudAuthProviderResponse>> */ - public CompletableFuture> - getGitHubCloudAuthPersonaMappingWithHttpInfoAsync(String personaMappingId) { + public CompletableFuture> + getOIDCCloudAuthProviderWithHttpInfoAsync(UUID providerId) { // Check if unstable operation is enabled - String operationId = "getGitHubCloudAuthPersonaMapping"; + String operationId = "getOIDCCloudAuthProvider"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -1951,23 +2922,21 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( } Object localVarPostBody = null; - // verify the required parameter 'personaMappingId' is set - if (personaMappingId == null) { - CompletableFuture> result = + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'personaMappingId' when calling" - + " getGitHubCloudAuthPersonaMapping")); + "Missing the required parameter 'providerId' when calling getOIDCCloudAuthProvider")); return result; } // create path and map variables String localVarPath = - "/api/v2/wif/github/persona_mapping/{persona_mapping_id}" + "/api/v2/wif/oidc/provider/{provider_id}" .replaceAll( - "\\{" + "persona_mapping_id" + "\\}", - apiClient.escapeString(personaMappingId.toString())); + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1975,7 +2944,7 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( try { builder = apiClient.createBuilder( - "v2.CloudAuthenticationApi.getGitHubCloudAuthPersonaMapping", + "v2.CloudAuthenticationApi.getOIDCCloudAuthProvider", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1983,7 +2952,7 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -1996,7 +2965,7 @@ public GitHubCloudAuthPersonaMappingResponse getGitHubCloudAuthPersonaMapping( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -2533,4 +3502,268 @@ public GitHubCloudAuthPersonaMappingsResponse listGitHubCloudAuthPersonaMappings false, new GenericType() {}); } + + /** + * List all Custom OIDC persona mappings. + * + *

See {@link #listOIDCCloudAuthPersonaMappingsWithHttpInfo}. + * + * @return OIDCCloudAuthPersonaMappingsResponse + * @throws ApiException if fails to make API call + */ + public OIDCCloudAuthPersonaMappingsResponse listOIDCCloudAuthPersonaMappings() + throws ApiException { + return listOIDCCloudAuthPersonaMappingsWithHttpInfo().getData(); + } + + /** + * List all Custom OIDC persona mappings. + * + *

See {@link #listOIDCCloudAuthPersonaMappingsWithHttpInfoAsync}. + * + * @return CompletableFuture<OIDCCloudAuthPersonaMappingsResponse> + */ + public CompletableFuture + listOIDCCloudAuthPersonaMappingsAsync() { + return listOIDCCloudAuthPersonaMappingsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all Custom OIDC persona mappings in the organization. + * + * @return ApiResponse<OIDCCloudAuthPersonaMappingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse + listOIDCCloudAuthPersonaMappingsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOIDCCloudAuthPersonaMappings"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/persona_mapping"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.listOIDCCloudAuthPersonaMappings", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List all Custom OIDC persona mappings. + * + *

See {@link #listOIDCCloudAuthPersonaMappingsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<OIDCCloudAuthPersonaMappingsResponse>> + */ + public CompletableFuture> + listOIDCCloudAuthPersonaMappingsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listOIDCCloudAuthPersonaMappings"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/persona_mapping"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.listOIDCCloudAuthPersonaMappings", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List all Custom OIDC providers. + * + *

See {@link #listOIDCCloudAuthProvidersWithHttpInfo}. + * + * @return OIDCCloudAuthProvidersResponse + * @throws ApiException if fails to make API call + */ + public OIDCCloudAuthProvidersResponse listOIDCCloudAuthProviders() throws ApiException { + return listOIDCCloudAuthProvidersWithHttpInfo().getData(); + } + + /** + * List all Custom OIDC providers. + * + *

See {@link #listOIDCCloudAuthProvidersWithHttpInfoAsync}. + * + * @return CompletableFuture<OIDCCloudAuthProvidersResponse> + */ + public CompletableFuture listOIDCCloudAuthProvidersAsync() { + return listOIDCCloudAuthProvidersWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all Custom OIDC providers in the organization. + * + * @return ApiResponse<OIDCCloudAuthProvidersResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listOIDCCloudAuthProvidersWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOIDCCloudAuthProviders"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/provider"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.listOIDCCloudAuthProviders", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List all Custom OIDC providers. + * + *

See {@link #listOIDCCloudAuthProvidersWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<OIDCCloudAuthProvidersResponse>> + */ + public CompletableFuture> + listOIDCCloudAuthProvidersWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listOIDCCloudAuthProviders"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/wif/oidc/provider"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudAuthenticationApi.listOIDCCloudAuthProviders", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatchMode.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatchMode.java new file mode 100644 index 00000000000..ea5715c4339 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatchMode.java @@ -0,0 +1,61 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Case-sensitive matching mode. Exact compares strings. Glob matches the entire value: * matches + * any number of characters, including /, and ? matches one character. Other characters are literal; + * escaping is not supported. + */ +@JsonSerialize(using = OIDCCloudAuthClaimMatchMode.OIDCCloudAuthClaimMatchModeSerializer.class) +public class OIDCCloudAuthClaimMatchMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("exact", "glob")); + + public static final OIDCCloudAuthClaimMatchMode EXACT = new OIDCCloudAuthClaimMatchMode("exact"); + public static final OIDCCloudAuthClaimMatchMode GLOB = new OIDCCloudAuthClaimMatchMode("glob"); + + OIDCCloudAuthClaimMatchMode(String value) { + super(value, allowedValues); + } + + public static class OIDCCloudAuthClaimMatchModeSerializer + extends StdSerializer { + public OIDCCloudAuthClaimMatchModeSerializer(Class t) { + super(t); + } + + public OIDCCloudAuthClaimMatchModeSerializer() { + this(null); + } + + @Override + public void serialize( + OIDCCloudAuthClaimMatchMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OIDCCloudAuthClaimMatchMode fromValue(String value) { + return new OIDCCloudAuthClaimMatchMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcher.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcher.java new file mode 100644 index 00000000000..acd97b298eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcher.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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; + +/** A token claim must match at least one of the configured values. */ +@JsonPropertyOrder({ + OIDCCloudAuthClaimMatcher.JSON_PROPERTY_CLAIM, + OIDCCloudAuthClaimMatcher.JSON_PROPERTY_MODE, + OIDCCloudAuthClaimMatcher.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthClaimMatcher { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLAIM = "claim"; + private String claim; + + public static final String JSON_PROPERTY_MODE = "mode"; + private OIDCCloudAuthClaimMatchMode mode = OIDCCloudAuthClaimMatchMode.EXACT; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public OIDCCloudAuthClaimMatcher() {} + + @JsonCreator + public OIDCCloudAuthClaimMatcher( + @JsonProperty(required = true, value = JSON_PROPERTY_CLAIM) String claim, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { + this.claim = claim; + this.values = values; + } + + public OIDCCloudAuthClaimMatcher claim(String claim) { + this.claim = claim; + return this; + } + + /** + * Name of the token claim. + * + * @return claim + */ + @JsonProperty(JSON_PROPERTY_CLAIM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClaim() { + return claim; + } + + public void setClaim(String claim) { + this.claim = claim; + } + + public OIDCCloudAuthClaimMatcher mode(OIDCCloudAuthClaimMatchMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Case-sensitive matching mode. Exact compares strings. Glob matches the entire value: * matches + * any number of characters, including /, and ? matches one character. Other characters are + * literal; escaping is not supported. + * + * @return mode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OIDCCloudAuthClaimMatchMode getMode() { + return mode; + } + + public void setMode(OIDCCloudAuthClaimMatchMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public OIDCCloudAuthClaimMatcher values(List values) { + this.values = values; + return this; + } + + public OIDCCloudAuthClaimMatcher addValuesItem(String valuesItem) { + this.values.add(valuesItem); + return this; + } + + /** + * Accepted values for this claim. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthClaimMatcher + */ + @JsonAnySetter + public OIDCCloudAuthClaimMatcher putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthClaimMatcher object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthClaimMatcher oidcCloudAuthClaimMatcher = (OIDCCloudAuthClaimMatcher) o; + return Objects.equals(this.claim, oidcCloudAuthClaimMatcher.claim) + && Objects.equals(this.mode, oidcCloudAuthClaimMatcher.mode) + && Objects.equals(this.values, oidcCloudAuthClaimMatcher.values) + && Objects.equals( + this.additionalProperties, oidcCloudAuthClaimMatcher.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(claim, mode, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthClaimMatcher {\n"); + sb.append(" claim: ").append(toIndentedString(claim)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcherCreate.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcherCreate.java new file mode 100644 index 00000000000..0aae08a774d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthClaimMatcherCreate.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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; + +/** + * Claim condition for creating a provider or persona mapping. A token claim must match at least one + * configured value. + */ +@JsonPropertyOrder({ + OIDCCloudAuthClaimMatcherCreate.JSON_PROPERTY_CLAIM, + OIDCCloudAuthClaimMatcherCreate.JSON_PROPERTY_MODE, + OIDCCloudAuthClaimMatcherCreate.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthClaimMatcherCreate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLAIM = "claim"; + private String claim; + + public static final String JSON_PROPERTY_MODE = "mode"; + private OIDCCloudAuthClaimMatchMode mode = OIDCCloudAuthClaimMatchMode.EXACT; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public OIDCCloudAuthClaimMatcherCreate() {} + + @JsonCreator + public OIDCCloudAuthClaimMatcherCreate( + @JsonProperty(required = true, value = JSON_PROPERTY_CLAIM) String claim, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { + this.claim = claim; + this.values = values; + } + + public OIDCCloudAuthClaimMatcherCreate claim(String claim) { + this.claim = claim; + return this; + } + + /** + * Name of the token claim. + * + * @return claim + */ + @JsonProperty(JSON_PROPERTY_CLAIM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClaim() { + return claim; + } + + public void setClaim(String claim) { + this.claim = claim; + } + + public OIDCCloudAuthClaimMatcherCreate mode(OIDCCloudAuthClaimMatchMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Case-sensitive matching mode. Exact compares strings. Glob matches the entire value: * matches + * any number of characters, including /, and ? matches one character. Other characters are + * literal; escaping is not supported. + * + * @return mode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OIDCCloudAuthClaimMatchMode getMode() { + return mode; + } + + public void setMode(OIDCCloudAuthClaimMatchMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public OIDCCloudAuthClaimMatcherCreate values(List values) { + this.values = values; + return this; + } + + public OIDCCloudAuthClaimMatcherCreate addValuesItem(String valuesItem) { + this.values.add(valuesItem); + return this; + } + + /** + * Accepted values for this claim. Each value is limited to 500 UTF-8 bytes when creating the + * resource. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthClaimMatcherCreate + */ + @JsonAnySetter + public OIDCCloudAuthClaimMatcherCreate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthClaimMatcherCreate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthClaimMatcherCreate oidcCloudAuthClaimMatcherCreate = + (OIDCCloudAuthClaimMatcherCreate) o; + return Objects.equals(this.claim, oidcCloudAuthClaimMatcherCreate.claim) + && Objects.equals(this.mode, oidcCloudAuthClaimMatcherCreate.mode) + && Objects.equals(this.values, oidcCloudAuthClaimMatcherCreate.values) + && Objects.equals( + this.additionalProperties, oidcCloudAuthClaimMatcherCreate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(claim, mode, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthClaimMatcherCreate {\n"); + sb.append(" claim: ").append(toIndentedString(claim)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthDiscoveryType.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthDiscoveryType.java new file mode 100644 index 00000000000..94def1e4412 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthDiscoveryType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** How the signing keys are discovered. */ +@JsonSerialize(using = OIDCCloudAuthDiscoveryType.OIDCCloudAuthDiscoveryTypeSerializer.class) +public class OIDCCloudAuthDiscoveryType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("oidc_discovery", "direct_jwks")); + + public static final OIDCCloudAuthDiscoveryType OIDC_DISCOVERY = + new OIDCCloudAuthDiscoveryType("oidc_discovery"); + public static final OIDCCloudAuthDiscoveryType DIRECT_JWKS = + new OIDCCloudAuthDiscoveryType("direct_jwks"); + + OIDCCloudAuthDiscoveryType(String value) { + super(value, allowedValues); + } + + public static class OIDCCloudAuthDiscoveryTypeSerializer + extends StdSerializer { + public OIDCCloudAuthDiscoveryTypeSerializer(Class t) { + super(t); + } + + public OIDCCloudAuthDiscoveryTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OIDCCloudAuthDiscoveryType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OIDCCloudAuthDiscoveryType fromValue(String value) { + return new OIDCCloudAuthDiscoveryType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthOrgUUIDSource.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthOrgUUIDSource.java new file mode 100644 index 00000000000..c899af418f2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthOrgUUIDSource.java @@ -0,0 +1,61 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Source of the organization UUID in the signed token. The aud source accepts a + * datadog/{org_uuid} audience. + */ +@JsonSerialize(using = OIDCCloudAuthOrgUUIDSource.OIDCCloudAuthOrgUUIDSourceSerializer.class) +public class OIDCCloudAuthOrgUUIDSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("dd_org_uuid", "aud")); + + public static final OIDCCloudAuthOrgUUIDSource DD_ORG_UUID = + new OIDCCloudAuthOrgUUIDSource("dd_org_uuid"); + public static final OIDCCloudAuthOrgUUIDSource AUD = new OIDCCloudAuthOrgUUIDSource("aud"); + + OIDCCloudAuthOrgUUIDSource(String value) { + super(value, allowedValues); + } + + public static class OIDCCloudAuthOrgUUIDSourceSerializer + extends StdSerializer { + public OIDCCloudAuthOrgUUIDSourceSerializer(Class t) { + super(t); + } + + public OIDCCloudAuthOrgUUIDSourceSerializer() { + this(null); + } + + @Override + public void serialize( + OIDCCloudAuthOrgUUIDSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OIDCCloudAuthOrgUUIDSource fromValue(String value) { + return new OIDCCloudAuthOrgUUIDSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingAttributesResponse.java new file mode 100644 index 00000000000..9223050c94e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingAttributesResponse.java @@ -0,0 +1,314 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +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; +import java.util.UUID; + +/** Stored Custom OIDC persona mapping attributes. */ +@JsonPropertyOrder({ + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_ACCOUNT_IDENTIFIER, + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_ACCOUNT_UUID, + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_CLAIM_MATCHERS, + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_CREATED_AT, + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_CREATED_BY, + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_IDENTITY_PATTERN, + OIDCCloudAuthPersonaMappingAttributesResponse.JSON_PROPERTY_PROVIDER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_IDENTIFIER = "account_identifier"; + private String accountIdentifier; + + public static final String JSON_PROPERTY_ACCOUNT_UUID = "account_uuid"; + private String accountUuid; + + public static final String JSON_PROPERTY_CLAIM_MATCHERS = "claim_matchers"; + private List claimMatchers = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private UUID createdBy; + + public static final String JSON_PROPERTY_IDENTITY_PATTERN = "identity_pattern"; + private String identityPattern; + + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private UUID providerId; + + /** + * Handle resolved when the mapping was created; not updated if the account handle changes. + * + * @return accountIdentifier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountIdentifier() { + return accountIdentifier; + } + + public OIDCCloudAuthPersonaMappingAttributesResponse accountUuid(String accountUuid) { + this.accountUuid = accountUuid; + return this; + } + + /** + * UUID of the Datadog user or service account to authenticate as. + * + * @return accountUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountUuid() { + return accountUuid; + } + + public void setAccountUuid(String accountUuid) { + this.accountUuid = accountUuid; + } + + public OIDCCloudAuthPersonaMappingAttributesResponse claimMatchers( + List claimMatchers) { + this.claimMatchers = claimMatchers; + if (claimMatchers != null) { + for (OIDCCloudAuthClaimMatcher item : claimMatchers) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public OIDCCloudAuthPersonaMappingAttributesResponse addClaimMatchersItem( + OIDCCloudAuthClaimMatcher claimMatchersItem) { + if (this.claimMatchers == null) { + this.claimMatchers = new ArrayList<>(); + } + this.claimMatchers.add(claimMatchersItem); + this.unparsed |= claimMatchersItem.unparsed; + return this; + } + + /** + * Every claim condition must match. Supply claim_matchers or identity_pattern, but not both. + * + * @return claimMatchers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLAIM_MATCHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getClaimMatchers() { + return claimMatchers; + } + + public void setClaimMatchers(List claimMatchers) { + this.claimMatchers = claimMatchers; + if (claimMatchers != null) { + for (OIDCCloudAuthClaimMatcher item : claimMatchers) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * Time the configuration was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * UUID of the user who created the configuration. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCreatedBy() { + return createdBy; + } + + public OIDCCloudAuthPersonaMappingAttributesResponse identityPattern(String identityPattern) { + this.identityPattern = identityPattern; + return this; + } + + /** + * Legacy glob pattern matched against the provider identity claim. Supply this or claim_matchers, + * but not both. Prefer claim_matchers with exact mode for a single Kubernetes service account. + * + * @return identityPattern + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDENTITY_PATTERN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIdentityPattern() { + return identityPattern; + } + + public void setIdentityPattern(String identityPattern) { + this.identityPattern = identityPattern; + } + + public OIDCCloudAuthPersonaMappingAttributesResponse providerId(UUID providerId) { + this.providerId = providerId; + return this; + } + + /** + * UUID of the registered Custom OIDC provider. + * + * @return providerId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getProviderId() { + return providerId; + } + + public void setProviderId(UUID providerId) { + this.providerId = providerId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingAttributesResponse + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingAttributesResponse oidcCloudAuthPersonaMappingAttributesResponse = + (OIDCCloudAuthPersonaMappingAttributesResponse) o; + return Objects.equals( + this.accountIdentifier, oidcCloudAuthPersonaMappingAttributesResponse.accountIdentifier) + && Objects.equals( + this.accountUuid, oidcCloudAuthPersonaMappingAttributesResponse.accountUuid) + && Objects.equals( + this.claimMatchers, oidcCloudAuthPersonaMappingAttributesResponse.claimMatchers) + && Objects.equals(this.createdAt, oidcCloudAuthPersonaMappingAttributesResponse.createdAt) + && Objects.equals(this.createdBy, oidcCloudAuthPersonaMappingAttributesResponse.createdBy) + && Objects.equals( + this.identityPattern, oidcCloudAuthPersonaMappingAttributesResponse.identityPattern) + && Objects.equals(this.providerId, oidcCloudAuthPersonaMappingAttributesResponse.providerId) + && Objects.equals( + this.additionalProperties, + oidcCloudAuthPersonaMappingAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountIdentifier, + accountUuid, + claimMatchers, + createdAt, + createdBy, + identityPattern, + providerId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingAttributesResponse {\n"); + sb.append(" accountIdentifier: ").append(toIndentedString(accountIdentifier)).append("\n"); + sb.append(" accountUuid: ").append(toIndentedString(accountUuid)).append("\n"); + sb.append(" claimMatchers: ").append(toIndentedString(claimMatchers)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" identityPattern: ").append(toIndentedString(identityPattern)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateAttributes.java new file mode 100644 index 00000000000..4682be030aa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateAttributes.java @@ -0,0 +1,260 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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; +import java.util.UUID; + +/** Attributes for creating a Custom OIDC persona mapping. */ +@JsonPropertyOrder({ + OIDCCloudAuthPersonaMappingCreateAttributes.JSON_PROPERTY_ACCOUNT_UUID, + OIDCCloudAuthPersonaMappingCreateAttributes.JSON_PROPERTY_CLAIM_MATCHERS, + OIDCCloudAuthPersonaMappingCreateAttributes.JSON_PROPERTY_IDENTITY_PATTERN, + OIDCCloudAuthPersonaMappingCreateAttributes.JSON_PROPERTY_PROVIDER_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_UUID = "account_uuid"; + private String accountUuid; + + public static final String JSON_PROPERTY_CLAIM_MATCHERS = "claim_matchers"; + private List claimMatchers = null; + + public static final String JSON_PROPERTY_IDENTITY_PATTERN = "identity_pattern"; + private String identityPattern; + + public static final String JSON_PROPERTY_PROVIDER_ID = "provider_id"; + private UUID providerId; + + public OIDCCloudAuthPersonaMappingCreateAttributes() {} + + @JsonCreator + public OIDCCloudAuthPersonaMappingCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_UUID) String accountUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_ID) UUID providerId) { + this.accountUuid = accountUuid; + this.providerId = providerId; + } + + public OIDCCloudAuthPersonaMappingCreateAttributes accountUuid(String accountUuid) { + this.accountUuid = accountUuid; + return this; + } + + /** + * UUID of the Datadog user or service account to authenticate as. + * + * @return accountUuid + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountUuid() { + return accountUuid; + } + + public void setAccountUuid(String accountUuid) { + this.accountUuid = accountUuid; + } + + public OIDCCloudAuthPersonaMappingCreateAttributes claimMatchers( + List claimMatchers) { + this.claimMatchers = claimMatchers; + if (claimMatchers != null) { + for (OIDCCloudAuthClaimMatcherCreate item : claimMatchers) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public OIDCCloudAuthPersonaMappingCreateAttributes addClaimMatchersItem( + OIDCCloudAuthClaimMatcherCreate claimMatchersItem) { + if (this.claimMatchers == null) { + this.claimMatchers = new ArrayList<>(); + } + this.claimMatchers.add(claimMatchersItem); + this.unparsed |= claimMatchersItem.unparsed; + return this; + } + + /** + * Every claim condition must match. Supply claim_matchers or identity_pattern, but not both. + * + * @return claimMatchers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLAIM_MATCHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getClaimMatchers() { + return claimMatchers; + } + + public void setClaimMatchers(List claimMatchers) { + this.claimMatchers = claimMatchers; + if (claimMatchers != null) { + for (OIDCCloudAuthClaimMatcherCreate item : claimMatchers) { + this.unparsed |= item.unparsed; + } + } + } + + public OIDCCloudAuthPersonaMappingCreateAttributes identityPattern(String identityPattern) { + this.identityPattern = identityPattern; + return this; + } + + /** + * Legacy glob pattern, limited to 500 UTF-8 bytes when creating a mapping, matched against the + * provider identity claim. Supply this or claim_matchers, but not both. Prefer claim_matchers + * with exact mode for a single Kubernetes service account. + * + * @return identityPattern + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDENTITY_PATTERN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIdentityPattern() { + return identityPattern; + } + + public void setIdentityPattern(String identityPattern) { + this.identityPattern = identityPattern; + } + + public OIDCCloudAuthPersonaMappingCreateAttributes providerId(UUID providerId) { + this.providerId = providerId; + return this; + } + + /** + * UUID of the registered Custom OIDC provider. + * + * @return providerId + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProviderId() { + return providerId; + } + + public void setProviderId(UUID providerId) { + this.providerId = providerId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingCreateAttributes + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingCreateAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingCreateAttributes oidcCloudAuthPersonaMappingCreateAttributes = + (OIDCCloudAuthPersonaMappingCreateAttributes) o; + return Objects.equals(this.accountUuid, oidcCloudAuthPersonaMappingCreateAttributes.accountUuid) + && Objects.equals( + this.claimMatchers, oidcCloudAuthPersonaMappingCreateAttributes.claimMatchers) + && Objects.equals( + this.identityPattern, oidcCloudAuthPersonaMappingCreateAttributes.identityPattern) + && Objects.equals(this.providerId, oidcCloudAuthPersonaMappingCreateAttributes.providerId) + && Objects.equals( + this.additionalProperties, + oidcCloudAuthPersonaMappingCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountUuid, claimMatchers, identityPattern, providerId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingCreateAttributes {\n"); + sb.append(" accountUuid: ").append(toIndentedString(accountUuid)).append("\n"); + sb.append(" claimMatchers: ").append(toIndentedString(claimMatchers)).append("\n"); + sb.append(" identityPattern: ").append(toIndentedString(identityPattern)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateData.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateData.java new file mode 100644 index 00000000000..79cfe4f0e63 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateData.java @@ -0,0 +1,189 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Custom OIDC persona mapping creation data. */ +@JsonPropertyOrder({ + OIDCCloudAuthPersonaMappingCreateData.JSON_PROPERTY_ATTRIBUTES, + OIDCCloudAuthPersonaMappingCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OIDCCloudAuthPersonaMappingCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OIDCCloudAuthPersonaMappingType type = + OIDCCloudAuthPersonaMappingType.CUSTOM_OIDC_IDENTITY_MAPPING; + + public OIDCCloudAuthPersonaMappingCreateData() {} + + @JsonCreator + public OIDCCloudAuthPersonaMappingCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OIDCCloudAuthPersonaMappingCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + OIDCCloudAuthPersonaMappingType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OIDCCloudAuthPersonaMappingCreateData attributes( + OIDCCloudAuthPersonaMappingCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Custom OIDC persona mapping. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthPersonaMappingCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OIDCCloudAuthPersonaMappingCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OIDCCloudAuthPersonaMappingCreateData type(OIDCCloudAuthPersonaMappingType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type returned by the existing Custom OIDC persona mapping API. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthPersonaMappingType getType() { + return type; + } + + public void setType(OIDCCloudAuthPersonaMappingType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingCreateData + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingCreateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingCreateData oidcCloudAuthPersonaMappingCreateData = + (OIDCCloudAuthPersonaMappingCreateData) o; + return Objects.equals(this.attributes, oidcCloudAuthPersonaMappingCreateData.attributes) + && Objects.equals(this.type, oidcCloudAuthPersonaMappingCreateData.type) + && Objects.equals( + this.additionalProperties, oidcCloudAuthPersonaMappingCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateRequest.java new file mode 100644 index 00000000000..fe2a04b31d4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingCreateRequest.java @@ -0,0 +1,152 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create a Custom OIDC persona mapping. */ +@JsonPropertyOrder({OIDCCloudAuthPersonaMappingCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OIDCCloudAuthPersonaMappingCreateData data; + + public OIDCCloudAuthPersonaMappingCreateRequest() {} + + @JsonCreator + public OIDCCloudAuthPersonaMappingCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OIDCCloudAuthPersonaMappingCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OIDCCloudAuthPersonaMappingCreateRequest data(OIDCCloudAuthPersonaMappingCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Custom OIDC persona mapping creation data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthPersonaMappingCreateData getData() { + return data; + } + + public void setData(OIDCCloudAuthPersonaMappingCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingCreateRequest + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingCreateRequest oidcCloudAuthPersonaMappingCreateRequest = + (OIDCCloudAuthPersonaMappingCreateRequest) o; + return Objects.equals(this.data, oidcCloudAuthPersonaMappingCreateRequest.data) + && Objects.equals( + this.additionalProperties, + oidcCloudAuthPersonaMappingCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingDataResponse.java new file mode 100644 index 00000000000..505e939bb6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingDataResponse.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Custom OIDC persona mapping resource. */ +@JsonPropertyOrder({ + OIDCCloudAuthPersonaMappingDataResponse.JSON_PROPERTY_ATTRIBUTES, + OIDCCloudAuthPersonaMappingDataResponse.JSON_PROPERTY_ID, + OIDCCloudAuthPersonaMappingDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OIDCCloudAuthPersonaMappingAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OIDCCloudAuthPersonaMappingType type = + OIDCCloudAuthPersonaMappingType.CUSTOM_OIDC_IDENTITY_MAPPING; + + public OIDCCloudAuthPersonaMappingDataResponse() {} + + @JsonCreator + public OIDCCloudAuthPersonaMappingDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OIDCCloudAuthPersonaMappingAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + OIDCCloudAuthPersonaMappingType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OIDCCloudAuthPersonaMappingDataResponse attributes( + OIDCCloudAuthPersonaMappingAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Stored Custom OIDC persona mapping attributes. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthPersonaMappingAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(OIDCCloudAuthPersonaMappingAttributesResponse attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OIDCCloudAuthPersonaMappingDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * Unique resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public OIDCCloudAuthPersonaMappingDataResponse type(OIDCCloudAuthPersonaMappingType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type returned by the existing Custom OIDC persona mapping API. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthPersonaMappingType getType() { + return type; + } + + public void setType(OIDCCloudAuthPersonaMappingType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingDataResponse + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingDataResponse oidcCloudAuthPersonaMappingDataResponse = + (OIDCCloudAuthPersonaMappingDataResponse) o; + return Objects.equals(this.attributes, oidcCloudAuthPersonaMappingDataResponse.attributes) + && Objects.equals(this.id, oidcCloudAuthPersonaMappingDataResponse.id) + && Objects.equals(this.type, oidcCloudAuthPersonaMappingDataResponse.type) + && Objects.equals( + this.additionalProperties, + oidcCloudAuthPersonaMappingDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingResponse.java new file mode 100644 index 00000000000..de12613a9a8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Custom OIDC persona mapping response. */ +@JsonPropertyOrder({OIDCCloudAuthPersonaMappingResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OIDCCloudAuthPersonaMappingDataResponse data; + + public OIDCCloudAuthPersonaMappingResponse() {} + + @JsonCreator + public OIDCCloudAuthPersonaMappingResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OIDCCloudAuthPersonaMappingDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OIDCCloudAuthPersonaMappingResponse data(OIDCCloudAuthPersonaMappingDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Custom OIDC persona mapping resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthPersonaMappingDataResponse getData() { + return data; + } + + public void setData(OIDCCloudAuthPersonaMappingDataResponse data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingResponse + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingResponse oidcCloudAuthPersonaMappingResponse = + (OIDCCloudAuthPersonaMappingResponse) o; + return Objects.equals(this.data, oidcCloudAuthPersonaMappingResponse.data) + && Objects.equals( + this.additionalProperties, oidcCloudAuthPersonaMappingResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingType.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingType.java new file mode 100644 index 00000000000..341772deb2b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type returned by the existing Custom OIDC persona mapping API. */ +@JsonSerialize( + using = OIDCCloudAuthPersonaMappingType.OIDCCloudAuthPersonaMappingTypeSerializer.class) +public class OIDCCloudAuthPersonaMappingType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("custom_oidc_identity_mapping")); + + public static final OIDCCloudAuthPersonaMappingType CUSTOM_OIDC_IDENTITY_MAPPING = + new OIDCCloudAuthPersonaMappingType("custom_oidc_identity_mapping"); + + OIDCCloudAuthPersonaMappingType(String value) { + super(value, allowedValues); + } + + public static class OIDCCloudAuthPersonaMappingTypeSerializer + extends StdSerializer { + public OIDCCloudAuthPersonaMappingTypeSerializer(Class t) { + super(t); + } + + public OIDCCloudAuthPersonaMappingTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OIDCCloudAuthPersonaMappingType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OIDCCloudAuthPersonaMappingType fromValue(String value) { + return new OIDCCloudAuthPersonaMappingType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingsResponse.java new file mode 100644 index 00000000000..bfd6e94d739 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthPersonaMappingsResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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; + +/** List of Custom OIDC persona mapping resources. */ +@JsonPropertyOrder({OIDCCloudAuthPersonaMappingsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthPersonaMappingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public OIDCCloudAuthPersonaMappingsResponse() {} + + @JsonCreator + public OIDCCloudAuthPersonaMappingsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (OIDCCloudAuthPersonaMappingDataResponse item : data) { + this.unparsed |= item.unparsed; + } + } + + public OIDCCloudAuthPersonaMappingsResponse data( + List data) { + this.data = data; + for (OIDCCloudAuthPersonaMappingDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public OIDCCloudAuthPersonaMappingsResponse addDataItem( + OIDCCloudAuthPersonaMappingDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Configured resources. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (OIDCCloudAuthPersonaMappingDataResponse item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthPersonaMappingsResponse + */ + @JsonAnySetter + public OIDCCloudAuthPersonaMappingsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthPersonaMappingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthPersonaMappingsResponse oidcCloudAuthPersonaMappingsResponse = + (OIDCCloudAuthPersonaMappingsResponse) o; + return Objects.equals(this.data, oidcCloudAuthPersonaMappingsResponse.data) + && Objects.equals( + this.additionalProperties, oidcCloudAuthPersonaMappingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthPersonaMappingsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderAttributesResponse.java new file mode 100644 index 00000000000..64ab3d25637 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderAttributesResponse.java @@ -0,0 +1,455 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +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; +import java.util.UUID; + +/** Stored Custom OIDC provider attributes. */ +@JsonPropertyOrder({ + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_AUDIENCES, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_CREATED_AT, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_CREATED_BY, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_DISCOVERY_TYPE, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_IDENTITY_CLAIM_NAME, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_ISSUER_URL, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_JWKS_URL, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_ORG_UUID_CLAIM_NAME, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_ORG_UUID_SOURCE, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_PROVIDER_NAME, + OIDCCloudAuthProviderAttributesResponse.JSON_PROPERTY_REQUIRED_CLAIMS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProviderAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCES = "audiences"; + private List audiences = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private UUID createdBy; + + public static final String JSON_PROPERTY_DISCOVERY_TYPE = "discovery_type"; + private OIDCCloudAuthDiscoveryType discoveryType; + + public static final String JSON_PROPERTY_IDENTITY_CLAIM_NAME = "identity_claim_name"; + private String identityClaimName = "sub"; + + public static final String JSON_PROPERTY_ISSUER_URL = "issuer_url"; + private String issuerUrl; + + public static final String JSON_PROPERTY_JWKS_URL = "jwks_url"; + private String jwksUrl; + + public static final String JSON_PROPERTY_ORG_UUID_CLAIM_NAME = "org_uuid_claim_name"; + private String orgUuidClaimName; + + public static final String JSON_PROPERTY_ORG_UUID_SOURCE = "org_uuid_source"; + private OIDCCloudAuthOrgUUIDSource orgUuidSource = OIDCCloudAuthOrgUUIDSource.DD_ORG_UUID; + + public static final String JSON_PROPERTY_PROVIDER_NAME = "provider_name"; + private String providerName; + + public static final String JSON_PROPERTY_REQUIRED_CLAIMS = "required_claims"; + private List requiredClaims = null; + + public OIDCCloudAuthProviderAttributesResponse audiences(List audiences) { + this.audiences = audiences; + return this; + } + + public OIDCCloudAuthProviderAttributesResponse addAudiencesItem(String audiencesItem) { + if (this.audiences == null) { + this.audiences = new ArrayList<>(); + } + this.audiences.add(audiencesItem); + return this; + } + + /** + * Expected token audiences. At least one audience is required. When org_uuid_source + * is aud, include datadog/{org_uuid} for the organization creating the provider. + * + * @return audiences + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIENCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAudiences() { + return audiences; + } + + public void setAudiences(List audiences) { + this.audiences = audiences; + } + + /** + * Time the configuration was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * UUID of the user who created the configuration. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCreatedBy() { + return createdBy; + } + + public OIDCCloudAuthProviderAttributesResponse discoveryType( + OIDCCloudAuthDiscoveryType discoveryType) { + this.discoveryType = discoveryType; + this.unparsed |= !discoveryType.isValid(); + return this; + } + + /** + * How the signing keys are discovered. + * + * @return discoveryType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISCOVERY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OIDCCloudAuthDiscoveryType getDiscoveryType() { + return discoveryType; + } + + public void setDiscoveryType(OIDCCloudAuthDiscoveryType discoveryType) { + if (!discoveryType.isValid()) { + this.unparsed = true; + } + this.discoveryType = discoveryType; + } + + public OIDCCloudAuthProviderAttributesResponse identityClaimName(String identityClaimName) { + this.identityClaimName = identityClaimName; + return this; + } + + /** + * Claim used by legacy identity_pattern mappings and in identity logs. + * + * @return identityClaimName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDENTITY_CLAIM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIdentityClaimName() { + return identityClaimName; + } + + public void setIdentityClaimName(String identityClaimName) { + this.identityClaimName = identityClaimName; + } + + public OIDCCloudAuthProviderAttributesResponse issuerUrl(String issuerUrl) { + this.issuerUrl = issuerUrl; + return this; + } + + /** + * HTTPS issuer URL that must match the token issuer. For oidc_discovery, signing keys are located + * through the issuer discovery document. + * + * @return issuerUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIssuerUrl() { + return issuerUrl; + } + + public void setIssuerUrl(String issuerUrl) { + this.issuerUrl = issuerUrl; + } + + public OIDCCloudAuthProviderAttributesResponse jwksUrl(String jwksUrl) { + this.jwksUrl = jwksUrl; + return this; + } + + /** + * HTTPS JSON Web Key Set URL. Required when discovery_type is direct_jwks + * . + * + * @return jwksUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JWKS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getJwksUrl() { + return jwksUrl; + } + + public void setJwksUrl(String jwksUrl) { + this.jwksUrl = jwksUrl; + } + + public OIDCCloudAuthProviderAttributesResponse orgUuidClaimName(String orgUuidClaimName) { + this.orgUuidClaimName = orgUuidClaimName; + return this; + } + + /** + * Optional name of the token claim containing the Datadog organization UUID. + * + * @return orgUuidClaimName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID_CLAIM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgUuidClaimName() { + return orgUuidClaimName; + } + + public void setOrgUuidClaimName(String orgUuidClaimName) { + this.orgUuidClaimName = orgUuidClaimName; + } + + public OIDCCloudAuthProviderAttributesResponse orgUuidSource( + OIDCCloudAuthOrgUUIDSource orgUuidSource) { + this.orgUuidSource = orgUuidSource; + this.unparsed |= !orgUuidSource.isValid(); + return this; + } + + /** + * Source of the organization UUID in the signed token. The aud source accepts a + * datadog/{org_uuid} audience. + * + * @return orgUuidSource + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OIDCCloudAuthOrgUUIDSource getOrgUuidSource() { + return orgUuidSource; + } + + public void setOrgUuidSource(OIDCCloudAuthOrgUUIDSource orgUuidSource) { + if (!orgUuidSource.isValid()) { + this.unparsed = true; + } + this.orgUuidSource = orgUuidSource; + } + + public OIDCCloudAuthProviderAttributesResponse providerName(String providerName) { + this.providerName = providerName; + return this; + } + + /** + * Name identifying the provider within the organization. + * + * @return providerName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProviderName() { + return providerName; + } + + public void setProviderName(String providerName) { + this.providerName = providerName; + } + + public OIDCCloudAuthProviderAttributesResponse requiredClaims( + List requiredClaims) { + this.requiredClaims = requiredClaims; + if (requiredClaims != null) { + for (OIDCCloudAuthClaimMatcher item : requiredClaims) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public OIDCCloudAuthProviderAttributesResponse addRequiredClaimsItem( + OIDCCloudAuthClaimMatcher requiredClaimsItem) { + if (this.requiredClaims == null) { + this.requiredClaims = new ArrayList<>(); + } + this.requiredClaims.add(requiredClaimsItem); + this.unparsed |= requiredClaimsItem.unparsed; + return this; + } + + /** + * Claim matchers required for every token from this provider, in addition to the persona mapping + * matchers. Shared issuers can require an exact tenant claim. + * + * @return requiredClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRequiredClaims() { + return requiredClaims; + } + + public void setRequiredClaims(List requiredClaims) { + this.requiredClaims = requiredClaims; + if (requiredClaims != null) { + for (OIDCCloudAuthClaimMatcher item : requiredClaims) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProviderAttributesResponse + */ + @JsonAnySetter + public OIDCCloudAuthProviderAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProviderAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProviderAttributesResponse oidcCloudAuthProviderAttributesResponse = + (OIDCCloudAuthProviderAttributesResponse) o; + return Objects.equals(this.audiences, oidcCloudAuthProviderAttributesResponse.audiences) + && Objects.equals(this.createdAt, oidcCloudAuthProviderAttributesResponse.createdAt) + && Objects.equals(this.createdBy, oidcCloudAuthProviderAttributesResponse.createdBy) + && Objects.equals(this.discoveryType, oidcCloudAuthProviderAttributesResponse.discoveryType) + && Objects.equals( + this.identityClaimName, oidcCloudAuthProviderAttributesResponse.identityClaimName) + && Objects.equals(this.issuerUrl, oidcCloudAuthProviderAttributesResponse.issuerUrl) + && Objects.equals(this.jwksUrl, oidcCloudAuthProviderAttributesResponse.jwksUrl) + && Objects.equals( + this.orgUuidClaimName, oidcCloudAuthProviderAttributesResponse.orgUuidClaimName) + && Objects.equals(this.orgUuidSource, oidcCloudAuthProviderAttributesResponse.orgUuidSource) + && Objects.equals(this.providerName, oidcCloudAuthProviderAttributesResponse.providerName) + && Objects.equals( + this.requiredClaims, oidcCloudAuthProviderAttributesResponse.requiredClaims) + && Objects.equals( + this.additionalProperties, + oidcCloudAuthProviderAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + audiences, + createdAt, + createdBy, + discoveryType, + identityClaimName, + issuerUrl, + jwksUrl, + orgUuidClaimName, + orgUuidSource, + providerName, + requiredClaims, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProviderAttributesResponse {\n"); + sb.append(" audiences: ").append(toIndentedString(audiences)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" discoveryType: ").append(toIndentedString(discoveryType)).append("\n"); + sb.append(" identityClaimName: ").append(toIndentedString(identityClaimName)).append("\n"); + sb.append(" issuerUrl: ").append(toIndentedString(issuerUrl)).append("\n"); + sb.append(" jwksUrl: ").append(toIndentedString(jwksUrl)).append("\n"); + sb.append(" orgUuidClaimName: ").append(toIndentedString(orgUuidClaimName)).append("\n"); + sb.append(" orgUuidSource: ").append(toIndentedString(orgUuidSource)).append("\n"); + sb.append(" providerName: ").append(toIndentedString(providerName)).append("\n"); + sb.append(" requiredClaims: ").append(toIndentedString(requiredClaims)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateAttributes.java new file mode 100644 index 00000000000..7d5931844ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateAttributes.java @@ -0,0 +1,423 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 for creating a Custom OIDC provider. */ +@JsonPropertyOrder({ + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_AUDIENCES, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_DISCOVERY_TYPE, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_IDENTITY_CLAIM_NAME, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_ISSUER_URL, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_JWKS_URL, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_ORG_UUID_CLAIM_NAME, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_ORG_UUID_SOURCE, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_PROVIDER_NAME, + OIDCCloudAuthProviderCreateAttributes.JSON_PROPERTY_REQUIRED_CLAIMS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProviderCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCES = "audiences"; + private List audiences = new ArrayList<>(); + + public static final String JSON_PROPERTY_DISCOVERY_TYPE = "discovery_type"; + private OIDCCloudAuthDiscoveryType discoveryType; + + public static final String JSON_PROPERTY_IDENTITY_CLAIM_NAME = "identity_claim_name"; + private String identityClaimName = "sub"; + + public static final String JSON_PROPERTY_ISSUER_URL = "issuer_url"; + private String issuerUrl; + + public static final String JSON_PROPERTY_JWKS_URL = "jwks_url"; + private String jwksUrl; + + public static final String JSON_PROPERTY_ORG_UUID_CLAIM_NAME = "org_uuid_claim_name"; + private String orgUuidClaimName; + + public static final String JSON_PROPERTY_ORG_UUID_SOURCE = "org_uuid_source"; + private OIDCCloudAuthOrgUUIDSource orgUuidSource = OIDCCloudAuthOrgUUIDSource.DD_ORG_UUID; + + public static final String JSON_PROPERTY_PROVIDER_NAME = "provider_name"; + private String providerName; + + public static final String JSON_PROPERTY_REQUIRED_CLAIMS = "required_claims"; + private List requiredClaims = null; + + public OIDCCloudAuthProviderCreateAttributes() {} + + @JsonCreator + public OIDCCloudAuthProviderCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUDIENCES) List audiences, + @JsonProperty(required = true, value = JSON_PROPERTY_DISCOVERY_TYPE) + OIDCCloudAuthDiscoveryType discoveryType, + @JsonProperty(required = true, value = JSON_PROPERTY_ISSUER_URL) String issuerUrl, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER_NAME) String providerName) { + this.audiences = audiences; + this.discoveryType = discoveryType; + this.unparsed |= !discoveryType.isValid(); + this.issuerUrl = issuerUrl; + this.providerName = providerName; + } + + public OIDCCloudAuthProviderCreateAttributes audiences(List audiences) { + this.audiences = audiences; + return this; + } + + public OIDCCloudAuthProviderCreateAttributes addAudiencesItem(String audiencesItem) { + this.audiences.add(audiencesItem); + return this; + } + + /** + * Expected token audiences. At least one audience is required. When org_uuid_source + * is aud, include datadog/{org_uuid} for the organization creating the provider. + * + * @return audiences + */ + @JsonProperty(JSON_PROPERTY_AUDIENCES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAudiences() { + return audiences; + } + + public void setAudiences(List audiences) { + this.audiences = audiences; + } + + public OIDCCloudAuthProviderCreateAttributes discoveryType( + OIDCCloudAuthDiscoveryType discoveryType) { + this.discoveryType = discoveryType; + this.unparsed |= !discoveryType.isValid(); + return this; + } + + /** + * How the signing keys are discovered. + * + * @return discoveryType + */ + @JsonProperty(JSON_PROPERTY_DISCOVERY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthDiscoveryType getDiscoveryType() { + return discoveryType; + } + + public void setDiscoveryType(OIDCCloudAuthDiscoveryType discoveryType) { + if (!discoveryType.isValid()) { + this.unparsed = true; + } + this.discoveryType = discoveryType; + } + + public OIDCCloudAuthProviderCreateAttributes identityClaimName(String identityClaimName) { + this.identityClaimName = identityClaimName; + return this; + } + + /** + * Claim used by legacy identity_pattern mappings and in identity logs. + * + * @return identityClaimName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDENTITY_CLAIM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIdentityClaimName() { + return identityClaimName; + } + + public void setIdentityClaimName(String identityClaimName) { + this.identityClaimName = identityClaimName; + } + + public OIDCCloudAuthProviderCreateAttributes issuerUrl(String issuerUrl) { + this.issuerUrl = issuerUrl; + return this; + } + + /** + * HTTPS issuer URL that must match the token issuer. For oidc_discovery, signing keys are located + * through the issuer discovery document. + * + * @return issuerUrl + */ + @JsonProperty(JSON_PROPERTY_ISSUER_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIssuerUrl() { + return issuerUrl; + } + + public void setIssuerUrl(String issuerUrl) { + this.issuerUrl = issuerUrl; + } + + public OIDCCloudAuthProviderCreateAttributes jwksUrl(String jwksUrl) { + this.jwksUrl = jwksUrl; + return this; + } + + /** + * HTTPS JSON Web Key Set URL. Required when discovery_type is direct_jwks + * . + * + * @return jwksUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JWKS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getJwksUrl() { + return jwksUrl; + } + + public void setJwksUrl(String jwksUrl) { + this.jwksUrl = jwksUrl; + } + + public OIDCCloudAuthProviderCreateAttributes orgUuidClaimName(String orgUuidClaimName) { + this.orgUuidClaimName = orgUuidClaimName; + return this; + } + + /** + * Optional name of the token claim containing the Datadog organization UUID. + * + * @return orgUuidClaimName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID_CLAIM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgUuidClaimName() { + return orgUuidClaimName; + } + + public void setOrgUuidClaimName(String orgUuidClaimName) { + this.orgUuidClaimName = orgUuidClaimName; + } + + public OIDCCloudAuthProviderCreateAttributes orgUuidSource( + OIDCCloudAuthOrgUUIDSource orgUuidSource) { + this.orgUuidSource = orgUuidSource; + this.unparsed |= !orgUuidSource.isValid(); + return this; + } + + /** + * Source of the organization UUID in the signed token. The aud source accepts a + * datadog/{org_uuid} audience. + * + * @return orgUuidSource + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OIDCCloudAuthOrgUUIDSource getOrgUuidSource() { + return orgUuidSource; + } + + public void setOrgUuidSource(OIDCCloudAuthOrgUUIDSource orgUuidSource) { + if (!orgUuidSource.isValid()) { + this.unparsed = true; + } + this.orgUuidSource = orgUuidSource; + } + + public OIDCCloudAuthProviderCreateAttributes providerName(String providerName) { + this.providerName = providerName; + return this; + } + + /** + * Name identifying the provider within the organization. + * + * @return providerName + */ + @JsonProperty(JSON_PROPERTY_PROVIDER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderName() { + return providerName; + } + + public void setProviderName(String providerName) { + this.providerName = providerName; + } + + public OIDCCloudAuthProviderCreateAttributes requiredClaims( + List requiredClaims) { + this.requiredClaims = requiredClaims; + if (requiredClaims != null) { + for (OIDCCloudAuthClaimMatcherCreate item : requiredClaims) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public OIDCCloudAuthProviderCreateAttributes addRequiredClaimsItem( + OIDCCloudAuthClaimMatcherCreate requiredClaimsItem) { + if (this.requiredClaims == null) { + this.requiredClaims = new ArrayList<>(); + } + this.requiredClaims.add(requiredClaimsItem); + this.unparsed |= requiredClaimsItem.unparsed; + return this; + } + + /** + * Claim matchers required for every token from this provider, in addition to the persona mapping + * matchers. Shared issuers can require an exact tenant claim. + * + * @return requiredClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRequiredClaims() { + return requiredClaims; + } + + public void setRequiredClaims(List requiredClaims) { + this.requiredClaims = requiredClaims; + if (requiredClaims != null) { + for (OIDCCloudAuthClaimMatcherCreate item : requiredClaims) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProviderCreateAttributes + */ + @JsonAnySetter + public OIDCCloudAuthProviderCreateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProviderCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProviderCreateAttributes oidcCloudAuthProviderCreateAttributes = + (OIDCCloudAuthProviderCreateAttributes) o; + return Objects.equals(this.audiences, oidcCloudAuthProviderCreateAttributes.audiences) + && Objects.equals(this.discoveryType, oidcCloudAuthProviderCreateAttributes.discoveryType) + && Objects.equals( + this.identityClaimName, oidcCloudAuthProviderCreateAttributes.identityClaimName) + && Objects.equals(this.issuerUrl, oidcCloudAuthProviderCreateAttributes.issuerUrl) + && Objects.equals(this.jwksUrl, oidcCloudAuthProviderCreateAttributes.jwksUrl) + && Objects.equals( + this.orgUuidClaimName, oidcCloudAuthProviderCreateAttributes.orgUuidClaimName) + && Objects.equals(this.orgUuidSource, oidcCloudAuthProviderCreateAttributes.orgUuidSource) + && Objects.equals(this.providerName, oidcCloudAuthProviderCreateAttributes.providerName) + && Objects.equals(this.requiredClaims, oidcCloudAuthProviderCreateAttributes.requiredClaims) + && Objects.equals( + this.additionalProperties, oidcCloudAuthProviderCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + audiences, + discoveryType, + identityClaimName, + issuerUrl, + jwksUrl, + orgUuidClaimName, + orgUuidSource, + providerName, + requiredClaims, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProviderCreateAttributes {\n"); + sb.append(" audiences: ").append(toIndentedString(audiences)).append("\n"); + sb.append(" discoveryType: ").append(toIndentedString(discoveryType)).append("\n"); + sb.append(" identityClaimName: ").append(toIndentedString(identityClaimName)).append("\n"); + sb.append(" issuerUrl: ").append(toIndentedString(issuerUrl)).append("\n"); + sb.append(" jwksUrl: ").append(toIndentedString(jwksUrl)).append("\n"); + sb.append(" orgUuidClaimName: ").append(toIndentedString(orgUuidClaimName)).append("\n"); + sb.append(" orgUuidSource: ").append(toIndentedString(orgUuidSource)).append("\n"); + sb.append(" providerName: ").append(toIndentedString(providerName)).append("\n"); + sb.append(" requiredClaims: ").append(toIndentedString(requiredClaims)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateData.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateData.java new file mode 100644 index 00000000000..bd863ada326 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Custom OIDC provider creation data. */ +@JsonPropertyOrder({ + OIDCCloudAuthProviderCreateData.JSON_PROPERTY_ATTRIBUTES, + OIDCCloudAuthProviderCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProviderCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OIDCCloudAuthProviderCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OIDCCloudAuthProviderType type = OIDCCloudAuthProviderType.CUSTOM_OIDC_PROVIDER_CONFIG; + + public OIDCCloudAuthProviderCreateData() {} + + @JsonCreator + public OIDCCloudAuthProviderCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OIDCCloudAuthProviderCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OIDCCloudAuthProviderType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OIDCCloudAuthProviderCreateData attributes( + OIDCCloudAuthProviderCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Custom OIDC provider. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthProviderCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OIDCCloudAuthProviderCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OIDCCloudAuthProviderCreateData type(OIDCCloudAuthProviderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthProviderType getType() { + return type; + } + + public void setType(OIDCCloudAuthProviderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProviderCreateData + */ + @JsonAnySetter + public OIDCCloudAuthProviderCreateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProviderCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProviderCreateData oidcCloudAuthProviderCreateData = + (OIDCCloudAuthProviderCreateData) o; + return Objects.equals(this.attributes, oidcCloudAuthProviderCreateData.attributes) + && Objects.equals(this.type, oidcCloudAuthProviderCreateData.type) + && Objects.equals( + this.additionalProperties, oidcCloudAuthProviderCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProviderCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateRequest.java new file mode 100644 index 00000000000..6e9b7bb1583 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderCreateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create a Custom OIDC provider. */ +@JsonPropertyOrder({OIDCCloudAuthProviderCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProviderCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OIDCCloudAuthProviderCreateData data; + + public OIDCCloudAuthProviderCreateRequest() {} + + @JsonCreator + public OIDCCloudAuthProviderCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OIDCCloudAuthProviderCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OIDCCloudAuthProviderCreateRequest data(OIDCCloudAuthProviderCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Custom OIDC provider creation data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthProviderCreateData getData() { + return data; + } + + public void setData(OIDCCloudAuthProviderCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProviderCreateRequest + */ + @JsonAnySetter + public OIDCCloudAuthProviderCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProviderCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProviderCreateRequest oidcCloudAuthProviderCreateRequest = + (OIDCCloudAuthProviderCreateRequest) o; + return Objects.equals(this.data, oidcCloudAuthProviderCreateRequest.data) + && Objects.equals( + this.additionalProperties, oidcCloudAuthProviderCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProviderCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderDataResponse.java new file mode 100644 index 00000000000..707c0ad2271 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderDataResponse.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Custom OIDC provider resource. */ +@JsonPropertyOrder({ + OIDCCloudAuthProviderDataResponse.JSON_PROPERTY_ATTRIBUTES, + OIDCCloudAuthProviderDataResponse.JSON_PROPERTY_ID, + OIDCCloudAuthProviderDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProviderDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OIDCCloudAuthProviderAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OIDCCloudAuthProviderType type = OIDCCloudAuthProviderType.CUSTOM_OIDC_PROVIDER_CONFIG; + + public OIDCCloudAuthProviderDataResponse() {} + + @JsonCreator + public OIDCCloudAuthProviderDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OIDCCloudAuthProviderAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OIDCCloudAuthProviderType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OIDCCloudAuthProviderDataResponse attributes( + OIDCCloudAuthProviderAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Stored Custom OIDC provider attributes. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthProviderAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(OIDCCloudAuthProviderAttributesResponse attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OIDCCloudAuthProviderDataResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * Unique resource identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public OIDCCloudAuthProviderDataResponse type(OIDCCloudAuthProviderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthProviderType getType() { + return type; + } + + public void setType(OIDCCloudAuthProviderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProviderDataResponse + */ + @JsonAnySetter + public OIDCCloudAuthProviderDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProviderDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProviderDataResponse oidcCloudAuthProviderDataResponse = + (OIDCCloudAuthProviderDataResponse) o; + return Objects.equals(this.attributes, oidcCloudAuthProviderDataResponse.attributes) + && Objects.equals(this.id, oidcCloudAuthProviderDataResponse.id) + && Objects.equals(this.type, oidcCloudAuthProviderDataResponse.type) + && Objects.equals( + this.additionalProperties, oidcCloudAuthProviderDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProviderDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderResponse.java new file mode 100644 index 00000000000..789c1315d10 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Custom OIDC provider response. */ +@JsonPropertyOrder({OIDCCloudAuthProviderResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProviderResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OIDCCloudAuthProviderDataResponse data; + + public OIDCCloudAuthProviderResponse() {} + + @JsonCreator + public OIDCCloudAuthProviderResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OIDCCloudAuthProviderDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OIDCCloudAuthProviderResponse data(OIDCCloudAuthProviderDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Custom OIDC provider resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OIDCCloudAuthProviderDataResponse getData() { + return data; + } + + public void setData(OIDCCloudAuthProviderDataResponse data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProviderResponse + */ + @JsonAnySetter + public OIDCCloudAuthProviderResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProviderResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProviderResponse oidcCloudAuthProviderResponse = (OIDCCloudAuthProviderResponse) o; + return Objects.equals(this.data, oidcCloudAuthProviderResponse.data) + && Objects.equals( + this.additionalProperties, oidcCloudAuthProviderResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProviderResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderType.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderType.java new file mode 100644 index 00000000000..711e9b37eab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProviderType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type. */ +@JsonSerialize(using = OIDCCloudAuthProviderType.OIDCCloudAuthProviderTypeSerializer.class) +public class OIDCCloudAuthProviderType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("custom_oidc_provider_config")); + + public static final OIDCCloudAuthProviderType CUSTOM_OIDC_PROVIDER_CONFIG = + new OIDCCloudAuthProviderType("custom_oidc_provider_config"); + + OIDCCloudAuthProviderType(String value) { + super(value, allowedValues); + } + + public static class OIDCCloudAuthProviderTypeSerializer + extends StdSerializer { + public OIDCCloudAuthProviderTypeSerializer(Class t) { + super(t); + } + + public OIDCCloudAuthProviderTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OIDCCloudAuthProviderType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OIDCCloudAuthProviderType fromValue(String value) { + return new OIDCCloudAuthProviderType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProvidersResponse.java b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProvidersResponse.java new file mode 100644 index 00000000000..4662b545ba2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OIDCCloudAuthProvidersResponse.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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; + +/** List of Custom OIDC provider resources. */ +@JsonPropertyOrder({OIDCCloudAuthProvidersResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OIDCCloudAuthProvidersResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public OIDCCloudAuthProvidersResponse() {} + + @JsonCreator + public OIDCCloudAuthProvidersResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (OIDCCloudAuthProviderDataResponse item : data) { + this.unparsed |= item.unparsed; + } + } + + public OIDCCloudAuthProvidersResponse data(List data) { + this.data = data; + for (OIDCCloudAuthProviderDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public OIDCCloudAuthProvidersResponse addDataItem(OIDCCloudAuthProviderDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Configured resources. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (OIDCCloudAuthProviderDataResponse item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OIDCCloudAuthProvidersResponse + */ + @JsonAnySetter + public OIDCCloudAuthProvidersResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OIDCCloudAuthProvidersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OIDCCloudAuthProvidersResponse oidcCloudAuthProvidersResponse = + (OIDCCloudAuthProvidersResponse) o; + return Objects.equals(this.data, oidcCloudAuthProvidersResponse.data) + && Objects.equals( + this.additionalProperties, oidcCloudAuthProvidersResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OIDCCloudAuthProvidersResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature b/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature index db55196cb4f..1845196acee 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature @@ -1,14 +1,71 @@ @endpoint(cloud-authentication) @endpoint(cloud-authentication-v2) Feature: Cloud Authentication - Configure AWS and GitHub cloud authentication mappings for persona and - intake authentication through the Datadog API. + Configure AWS, GitHub, and Custom OIDC cloud authentication for persona + and intake authentication through the Datadog API. Background: Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system And an instance of "CloudAuthentication" API - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Create a Custom OIDC persona mapping returns "Bad Request" response + Given operation "CreateOIDCCloudAuthPersonaMapping" enabled + And new "CreateOIDCCloudAuthPersonaMapping" request + And body with value {"data": {"attributes": {"account_uuid": "00000000-0000-0000-0000-000000000003", "claim_matchers": [{"claim": "sub", "mode": "exact", "values": ["system:serviceaccount:controllers:example-controller"]}], "identity_pattern": "system:serviceaccount:controllers:example-controller", "provider_id": "00000000-0000-0000-0000-000000000002"}, "type": "custom_oidc_identity_mapping"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Create a Custom OIDC persona mapping returns "Conflict" response + Given operation "CreateOIDCCloudAuthPersonaMapping" enabled + And new "CreateOIDCCloudAuthPersonaMapping" request + And body with value {"data": {"attributes": {"account_uuid": "00000000-0000-0000-0000-000000000003", "claim_matchers": [{"claim": "sub", "mode": "exact", "values": ["system:serviceaccount:controllers:example-controller"]}], "identity_pattern": "system:serviceaccount:controllers:example-controller", "provider_id": "00000000-0000-0000-0000-000000000002"}, "type": "custom_oidc_identity_mapping"}} + When the request is sent + Then the response status is 409 Conflict + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Create a Custom OIDC persona mapping returns "Created" response + Given there is a valid "role" in the system + And there is a valid "service_account_user_with_role" in the system + And there is a valid "oidc_cloud_auth_provider" in the system + And operation "CreateOIDCCloudAuthPersonaMapping" enabled + And new "CreateOIDCCloudAuthPersonaMapping" request + And body with value {"data": {"type": "custom_oidc_identity_mapping", "attributes": {"provider_id": "{{ oidc_cloud_auth_provider.data.id }}", "account_uuid": "{{ service_account_user_with_role.data.id }}", "claim_matchers": [{"claim": "sub", "mode": "exact", "values": ["system:serviceaccount:controllers:example-controller"]}]}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "custom_oidc_identity_mapping" + And the response "data" has field "id" + And the response "data.attributes.claim_matchers[0].mode" is equal to "exact" + And the response "data.attributes.account_uuid" is equal to "{{ service_account_user_with_role.data.id }}" + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Create a Custom OIDC provider returns "Bad Request" response + Given operation "CreateOIDCCloudAuthProvider" enabled + And new "CreateOIDCCloudAuthProvider" request + And body with value {"data": {"attributes": {"audiences": ["datadog/00000000-0000-0000-0000-000000000001"], "discovery_type": "oidc_discovery", "identity_claim_name": "sub", "issuer_url": "https://issuer.example.com", "jwks_url": "https://issuer.example.com/keys", "org_uuid_claim_name": "dd_org_uuid", "org_uuid_source": "dd_org_uuid", "provider_name": "example-cluster", "required_claims": [{"claim": "sub", "mode": "exact", "values": ["system:serviceaccount:controllers:example-controller"]}]}, "type": "custom_oidc_provider_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Create a Custom OIDC provider returns "Conflict" response + Given operation "CreateOIDCCloudAuthProvider" enabled + And new "CreateOIDCCloudAuthProvider" request + And body with value {"data": {"attributes": {"audiences": ["datadog/00000000-0000-0000-0000-000000000001"], "discovery_type": "oidc_discovery", "identity_claim_name": "sub", "issuer_url": "https://issuer.example.com", "jwks_url": "https://issuer.example.com/keys", "org_uuid_claim_name": "dd_org_uuid", "org_uuid_source": "dd_org_uuid", "provider_name": "example-cluster", "required_claims": [{"claim": "sub", "mode": "exact", "values": ["system:serviceaccount:controllers:example-controller"]}]}, "type": "custom_oidc_provider_config"}} + When the request is sent + Then the response status is 409 Conflict + + @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Create a Custom OIDC provider returns "Created" response + Given operation "CreateOIDCCloudAuthProvider" enabled + And new "CreateOIDCCloudAuthProvider" request + And body with value {"data": {"type": "custom_oidc_provider_config", "attributes": {"provider_name": "oidc-{{ unique_hash }}", "issuer_url": "https://oidc-{{ unique_hash }}.example.com", "discovery_type": "oidc_discovery", "audiences": ["sdk-test"]}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "custom_oidc_provider_config" + And the response "data" has field "id" + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create a GitHub cloud auth intake mapping returns "Bad Request" response Given operation "CreateGitHubCloudAuthIntakeMapping" enabled And new "CreateGitHubCloudAuthIntakeMapping" request @@ -16,7 +73,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create a GitHub cloud auth intake mapping returns "Conflict" response Given operation "CreateGitHubCloudAuthIntakeMapping" enabled And new "CreateGitHubCloudAuthIntakeMapping" request @@ -24,7 +81,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 409 Conflict - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create a GitHub cloud auth intake mapping returns "Created" response Given operation "CreateGitHubCloudAuthIntakeMapping" enabled And new "CreateGitHubCloudAuthIntakeMapping" request @@ -32,7 +89,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 201 Created - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create a GitHub cloud auth persona mapping returns "Bad Request" response Given operation "CreateGitHubCloudAuthPersonaMapping" enabled And new "CreateGitHubCloudAuthPersonaMapping" request @@ -40,7 +97,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create a GitHub cloud auth persona mapping returns "Conflict" response Given operation "CreateGitHubCloudAuthPersonaMapping" enabled And new "CreateGitHubCloudAuthPersonaMapping" request @@ -48,7 +105,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 409 Conflict - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create a GitHub cloud auth persona mapping returns "Created" response Given operation "CreateGitHubCloudAuthPersonaMapping" enabled And new "CreateGitHubCloudAuthPersonaMapping" request @@ -56,7 +113,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 201 Created - @team:ddoghq/team-aaaauthn + @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create an AWS cloud authentication intake mapping returns "Bad Request" response Given operation "CreateAWSCloudAuthIntakeMapping" enabled And new "CreateAWSCloudAuthIntakeMapping" request @@ -64,7 +121,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 400 Bad Request - @team:ddoghq/team-aaaauthn + @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create an AWS cloud authentication intake mapping returns "Conflict" response Given there is an integrated AWS test account for WIF And there is a valid "aws_cloud_auth_intake_mapping" in the system @@ -74,7 +131,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 409 Conflict - @team:ddoghq/team-aaaauthn + @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create an AWS cloud authentication intake mapping returns "Created" response Given there is an integrated AWS test account for WIF And operation "CreateAWSCloudAuthIntakeMapping" enabled @@ -86,7 +143,7 @@ Feature: Cloud Authentication And the response "data" has field "id" And the response "data.attributes.arn_pattern" is equal to "arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*" - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create an AWS cloud authentication persona mapping returns "Bad Request" response Given operation "CreateAWSCloudAuthPersonaMapping" enabled And new "CreateAWSCloudAuthPersonaMapping" request @@ -94,7 +151,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create an AWS cloud authentication persona mapping returns "Conflict" response Given operation "CreateAWSCloudAuthPersonaMapping" enabled And new "CreateAWSCloudAuthPersonaMapping" request @@ -102,7 +159,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 409 Conflict - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Create an AWS cloud authentication persona mapping returns "Created" response Given operation "CreateAWSCloudAuthPersonaMapping" enabled And new "CreateAWSCloudAuthPersonaMapping" request @@ -110,7 +167,68 @@ Feature: Cloud Authentication When the request is sent Then the response status is 201 Created - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC persona mapping returns "Bad Request" response + Given operation "DeleteOIDCCloudAuthPersonaMapping" enabled + And new "DeleteOIDCCloudAuthPersonaMapping" request + And request contains "persona_mapping_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC persona mapping returns "No Content" response + Given there is a valid "role" in the system + And there is a valid "service_account_user_with_role" in the system + And there is a valid "oidc_cloud_auth_provider" in the system + And there is a valid "oidc_cloud_auth_persona_mapping" in the system + And operation "DeleteOIDCCloudAuthPersonaMapping" enabled + And new "DeleteOIDCCloudAuthPersonaMapping" request + And request contains "persona_mapping_id" parameter from "oidc_cloud_auth_persona_mapping.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC persona mapping returns "Not Found" response + Given operation "DeleteOIDCCloudAuthPersonaMapping" enabled + And new "DeleteOIDCCloudAuthPersonaMapping" request + And request contains "persona_mapping_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC provider returns "Bad Request" response + Given operation "DeleteOIDCCloudAuthProvider" enabled + And new "DeleteOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC provider returns "Conflict" response + Given operation "DeleteOIDCCloudAuthProvider" enabled + And new "DeleteOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC provider returns "No Content" response + Given there is a valid "oidc_cloud_auth_provider" in the system + And operation "DeleteOIDCCloudAuthProvider" enabled + And new "DeleteOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "oidc_cloud_auth_provider.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Delete a Custom OIDC provider returns "Not Found" response + Given operation "DeleteOIDCCloudAuthProvider" enabled + And new "DeleteOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete a GitHub cloud auth intake mapping returns "No Content" response Given operation "DeleteGitHubCloudAuthIntakeMapping" enabled And new "DeleteGitHubCloudAuthIntakeMapping" request @@ -118,7 +236,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 204 No Content - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete a GitHub cloud auth intake mapping returns "Not Found" response Given operation "DeleteGitHubCloudAuthIntakeMapping" enabled And new "DeleteGitHubCloudAuthIntakeMapping" request @@ -126,7 +244,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete a GitHub cloud auth persona mapping returns "No Content" response Given operation "DeleteGitHubCloudAuthPersonaMapping" enabled And new "DeleteGitHubCloudAuthPersonaMapping" request @@ -134,7 +252,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 204 No Content - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete a GitHub cloud auth persona mapping returns "Not Found" response Given operation "DeleteGitHubCloudAuthPersonaMapping" enabled And new "DeleteGitHubCloudAuthPersonaMapping" request @@ -142,7 +260,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @skip-terraform-config @team:ddoghq/team-aaaauthn + @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete an AWS cloud authentication intake mapping returns "No Content" response Given there is an integrated AWS test account for WIF And there is a valid "aws_cloud_auth_intake_mapping" in the system @@ -152,7 +270,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 204 No Content - @team:ddoghq/team-aaaauthn + @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete an AWS cloud authentication intake mapping returns "Not Found" response Given operation "DeleteAWSCloudAuthIntakeMapping" enabled And new "DeleteAWSCloudAuthIntakeMapping" request @@ -160,7 +278,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete an AWS cloud authentication persona mapping returns "No Content" response Given operation "DeleteAWSCloudAuthPersonaMapping" enabled And new "DeleteAWSCloudAuthPersonaMapping" request @@ -168,7 +286,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 204 No Content - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Delete an AWS cloud authentication persona mapping returns "Not Found" response Given operation "DeleteAWSCloudAuthPersonaMapping" enabled And new "DeleteAWSCloudAuthPersonaMapping" request @@ -176,7 +294,66 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Get a Custom OIDC persona mapping returns "Bad Request" response + Given operation "GetOIDCCloudAuthPersonaMapping" enabled + And new "GetOIDCCloudAuthPersonaMapping" request + And request contains "persona_mapping_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Get a Custom OIDC persona mapping returns "Not Found" response + Given operation "GetOIDCCloudAuthPersonaMapping" enabled + And new "GetOIDCCloudAuthPersonaMapping" request + And request contains "persona_mapping_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Get a Custom OIDC persona mapping returns "OK" response + Given there is a valid "role" in the system + And there is a valid "service_account_user_with_role" in the system + And there is a valid "oidc_cloud_auth_provider" in the system + And there is a valid "oidc_cloud_auth_persona_mapping" in the system + And operation "GetOIDCCloudAuthPersonaMapping" enabled + And new "GetOIDCCloudAuthPersonaMapping" request + And request contains "persona_mapping_id" parameter from "oidc_cloud_auth_persona_mapping.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_oidc_identity_mapping" + And the response "data" has field "id" + And the response "data.attributes.claim_matchers[0].mode" is equal to "exact" + And the response "data.attributes.account_uuid" is equal to "{{ service_account_user_with_role.data.id }}" + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Get a Custom OIDC provider returns "Bad Request" response + Given operation "GetOIDCCloudAuthProvider" enabled + And new "GetOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Get a Custom OIDC provider returns "Not Found" response + Given operation "GetOIDCCloudAuthProvider" enabled + And new "GetOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: Get a Custom OIDC provider returns "OK" response + Given there is a valid "oidc_cloud_auth_provider" in the system + And operation "GetOIDCCloudAuthProvider" enabled + And new "GetOIDCCloudAuthProvider" request + And request contains "provider_id" parameter from "oidc_cloud_auth_provider.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_oidc_provider_config" + And the response "data" has field "id" + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get a GitHub cloud authentication intake mapping returns "Not Found" response Given operation "GetGitHubCloudAuthIntakeMapping" enabled And new "GetGitHubCloudAuthIntakeMapping" request @@ -184,7 +361,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get a GitHub cloud authentication intake mapping returns "OK" response Given operation "GetGitHubCloudAuthIntakeMapping" enabled And new "GetGitHubCloudAuthIntakeMapping" request @@ -192,7 +369,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 200 OK - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get a GitHub cloud authentication persona mapping returns "Not Found" response Given operation "GetGitHubCloudAuthPersonaMapping" enabled And new "GetGitHubCloudAuthPersonaMapping" request @@ -200,7 +377,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get a GitHub cloud authentication persona mapping returns "OK" response Given operation "GetGitHubCloudAuthPersonaMapping" enabled And new "GetGitHubCloudAuthPersonaMapping" request @@ -208,7 +385,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 200 OK - @team:ddoghq/team-aaaauthn + @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get an AWS cloud authentication intake mapping returns "Not Found" response Given operation "GetAWSCloudAuthIntakeMapping" enabled And new "GetAWSCloudAuthIntakeMapping" request @@ -216,7 +393,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @skip-terraform-config @team:ddoghq/team-aaaauthn + @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get an AWS cloud authentication intake mapping returns "OK" response Given there is an integrated AWS test account for WIF And there is a valid "aws_cloud_auth_intake_mapping" in the system @@ -228,7 +405,7 @@ Feature: Cloud Authentication And the response "data.id" has the same value as "aws_cloud_auth_intake_mapping.data.id" And the response "data.attributes.arn_pattern" is equal to "arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*" - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get an AWS cloud authentication persona mapping returns "Not Found" response Given operation "GetAWSCloudAuthPersonaMapping" enabled And new "GetAWSCloudAuthPersonaMapping" request @@ -236,7 +413,7 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: Get an AWS cloud authentication persona mapping returns "OK" response Given operation "GetAWSCloudAuthPersonaMapping" enabled And new "GetAWSCloudAuthPersonaMapping" request @@ -244,14 +421,14 @@ Feature: Cloud Authentication When the request is sent Then the response status is 200 OK - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List AWS cloud authentication intake mappings returns "Bad Request" response Given operation "ListAWSCloudAuthIntakeMappings" enabled And new "ListAWSCloudAuthIntakeMappings" request When the request is sent Then the response status is 400 Bad Request - @skip-terraform-config @team:ddoghq/team-aaaauthn + @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List AWS cloud authentication intake mappings returns "OK" response Given there is an integrated AWS test account for WIF And there is a valid "aws_cloud_auth_intake_mapping" in the system @@ -261,44 +438,79 @@ Feature: Cloud Authentication Then the response status is 200 OK And the response "data" has item with field "id" with value "{{ aws_cloud_auth_intake_mapping.data.id }}" - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List AWS cloud authentication persona mappings returns "Bad Request" response Given operation "ListAWSCloudAuthPersonaMappings" enabled And new "ListAWSCloudAuthPersonaMappings" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List AWS cloud authentication persona mappings returns "OK" response Given operation "ListAWSCloudAuthPersonaMappings" enabled And new "ListAWSCloudAuthPersonaMappings" request When the request is sent Then the response status is 200 OK - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List GitHub cloud authentication intake mappings returns "Bad Request" response Given operation "ListGitHubCloudAuthIntakeMappings" enabled And new "ListGitHubCloudAuthIntakeMappings" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List GitHub cloud authentication intake mappings returns "OK" response Given operation "ListGitHubCloudAuthIntakeMappings" enabled And new "ListGitHubCloudAuthIntakeMappings" request When the request is sent Then the response status is 200 OK - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List GitHub cloud authentication persona mappings returns "Bad Request" response Given operation "ListGitHubCloudAuthPersonaMappings" enabled And new "ListGitHubCloudAuthPersonaMappings" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:ddoghq/team-aaaauthn + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login Scenario: List GitHub cloud authentication persona mappings returns "OK" response Given operation "ListGitHubCloudAuthPersonaMappings" enabled And new "ListGitHubCloudAuthPersonaMappings" request When the request is sent Then the response status is 200 OK + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: List all Custom OIDC persona mappings returns "Bad Request" response + Given operation "ListOIDCCloudAuthPersonaMappings" enabled + And new "ListOIDCCloudAuthPersonaMappings" request + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: List all Custom OIDC persona mappings returns "OK" response + Given there is a valid "role" in the system + And there is a valid "service_account_user_with_role" in the system + And there is a valid "oidc_cloud_auth_provider" in the system + And there is a valid "oidc_cloud_auth_persona_mapping" in the system + And operation "ListOIDCCloudAuthPersonaMappings" enabled + And new "ListOIDCCloudAuthPersonaMappings" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "{{ oidc_cloud_auth_persona_mapping.data.id }}" + + @generated @skip @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: List all Custom OIDC providers returns "Bad Request" response + Given operation "ListOIDCCloudAuthProviders" enabled + And new "ListOIDCCloudAuthProviders" request + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @skip-terraform-config @team:ddoghq/credential-management @team:ddoghq/delegated-auth-login + Scenario: List all Custom OIDC providers returns "OK" response + Given there is a valid "oidc_cloud_auth_provider" in the system + And operation "ListOIDCCloudAuthProviders" enabled + And new "ListOIDCCloudAuthProviders" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "{{ oidc_cloud_auth_provider.data.id }}" diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 604850914b8..06322f8c1c2 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1891,6 +1891,18 @@ "tag": "Service Accounts", "operationId": "CreateServiceAccount" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"users\",\n \"attributes\": {\n \"email\": \"{{ unique }}@datadoghq.com\",\n \"service_account\": true\n },\n \"relationships\": {\n \"roles\": {\"data\": [{\"type\": \"roles\", \"id\": \"{{ role.data.id }}\"}]}\n }\n }\n}" + } + ], + "step": "there is a valid \"service_account_user_with_role\" in the system", + "key": "service_account_user_with_role", + "tag": "Service Accounts", + "operationId": "CreateServiceAccount" + }, { "parameters": [ { @@ -2209,6 +2221,30 @@ "tag": "Cloud Authentication", "operationId": "CreateAWSCloudAuthIntakeMapping" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"type\": \"custom_oidc_identity_mapping\", \"attributes\": {\"provider_id\": \"{{ oidc_cloud_auth_provider.data.id }}\", \"account_uuid\": \"{{ service_account_user_with_role.data.id }}\", \"claim_matchers\": [{\"claim\": \"sub\", \"mode\": \"exact\", \"values\": [\"system:serviceaccount:controllers:example-controller\"]}]}}}" + } + ], + "step": "there is a valid \"oidc_cloud_auth_persona_mapping\" in the system", + "key": "oidc_cloud_auth_persona_mapping", + "tag": "Cloud Authentication", + "operationId": "CreateOIDCCloudAuthPersonaMapping" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"type\": \"custom_oidc_provider_config\", \"attributes\": {\"provider_name\": \"oidc-{{ unique_hash }}\", \"issuer_url\": \"https://oidc-{{ unique_hash }}.example.com\", \"discovery_type\": \"oidc_discovery\", \"audiences\": [\"sdk-test\"]}}}" + } + ], + "step": "there is a valid \"oidc_cloud_auth_provider\" in the system", + "key": "oidc_cloud_auth_provider", + "tag": "Cloud Authentication", + "operationId": "CreateOIDCCloudAuthProvider" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 1dbe50efb1d..cbed5be1c56 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -11968,6 +11968,68 @@ "type": "safe" } }, + "ListOIDCCloudAuthPersonaMappings": { + "tag": "Cloud Authentication", + "undo": { + "type": "safe" + } + }, + "CreateOIDCCloudAuthPersonaMapping": { + "tag": "Cloud Authentication", + "undo": { + "operationId": "DeleteOIDCCloudAuthPersonaMapping", + "parameters": [ + { + "name": "persona_mapping_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteOIDCCloudAuthPersonaMapping": { + "tag": "Cloud Authentication", + "undo": { + "type": "idempotent" + } + }, + "GetOIDCCloudAuthPersonaMapping": { + "tag": "Cloud Authentication", + "undo": { + "type": "safe" + } + }, + "ListOIDCCloudAuthProviders": { + "tag": "Cloud Authentication", + "undo": { + "type": "safe" + } + }, + "CreateOIDCCloudAuthProvider": { + "tag": "Cloud Authentication", + "undo": { + "operationId": "DeleteOIDCCloudAuthProvider", + "parameters": [ + { + "name": "provider_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteOIDCCloudAuthProvider": { + "tag": "Cloud Authentication", + "undo": { + "type": "idempotent" + } + }, + "GetOIDCCloudAuthProvider": { + "tag": "Cloud Authentication", + "undo": { + "type": "safe" + } + }, "ListWorkflows": { "tag": "Workflow Automation", "undo": { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index b2e445cd3b6..ea0471a5ba0 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -4123,6 +4123,20 @@ "scenario": "Search tests events returns \"OK\" response with pagination", "version": "v2" }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/create-a-custom-oidc-persona-mapping-returns-created-response.json", + "scenario": "Create a Custom OIDC persona mapping returns \"Created\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/create-a-custom-oidc-provider-returns-created-response.json", + "scenario": "Create a Custom OIDC provider returns \"Created\" response", + "version": "v2" + }, { "feature": "Cloud Authentication", "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", @@ -4144,6 +4158,20 @@ "scenario": "Create an AWS cloud authentication intake mapping returns \"Created\" response", "version": "v2" }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/delete-a-custom-oidc-persona-mapping-returns-no-content-response.json", + "scenario": "Delete a Custom OIDC persona mapping returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/delete-a-custom-oidc-provider-returns-no-content-response.json", + "scenario": "Delete a Custom OIDC provider returns \"No Content\" response", + "version": "v2" + }, { "feature": "Cloud Authentication", "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", @@ -4158,6 +4186,20 @@ "scenario": "Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", "version": "v2" }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/get-a-custom-oidc-persona-mapping-returns-ok-response.json", + "scenario": "Get a Custom OIDC persona mapping returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/get-a-custom-oidc-provider-returns-ok-response.json", + "scenario": "Get a Custom OIDC provider returns \"OK\" response", + "version": "v2" + }, { "feature": "Cloud Authentication", "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", @@ -4179,6 +4221,20 @@ "scenario": "List AWS cloud authentication intake mappings returns \"OK\" response", "version": "v2" }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/list-all-custom-oidc-persona-mappings-returns-ok-response.json", + "scenario": "List all Custom OIDC persona mappings returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../com/datadog/api/client/v2/api/cloud_authentication.feature", + "file": "v2/cloud-authentication/list-all-custom-oidc-providers-returns-ok-response.json", + "scenario": "List all Custom OIDC providers returns \"OK\" response", + "version": "v2" + }, { "feature": "Cloud Cost Management", "feature_file": "../../com/datadog/api/client/v2/api/cloud_cost_management.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-persona-mapping-returns-created-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-persona-mapping-returns-created-response.json new file mode 100644 index 00000000000..7be726aa08e --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-persona-mapping-returns-created-response.json @@ -0,0 +1,43 @@ +{ + "api": "CloudAuthentication", + "expected_status": 201, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Create a Custom OIDC persona mapping returns \"Created\" response", + "operation_id": "CreateOIDCCloudAuthPersonaMapping", + "request": { + "body": { + "schema": { + "format": null, + "ref": "OIDCCloudAuthPersonaMappingCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "account_uuid": "{{ service_account_user_with_role.data.id }}", + "claim_matchers": [ + { + "claim": "sub", + "mode": "exact", + "values": [ + "system:serviceaccount:controllers:example-controller" + ] + } + ], + "provider_id": "{{ oidc_cloud_auth_provider.data.id }}" + }, + "type": "custom_oidc_identity_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/oidc/persona_mapping" + }, + "scenario": "Create a Custom OIDC persona mapping returns \"Created\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-provider-returns-created-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-provider-returns-created-response.json new file mode 100644 index 00000000000..0047da58c76 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/create-a-custom-oidc-provider-returns-created-response.json @@ -0,0 +1,38 @@ +{ + "api": "CloudAuthentication", + "expected_status": 201, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Create a Custom OIDC provider returns \"Created\" response", + "operation_id": "CreateOIDCCloudAuthProvider", + "request": { + "body": { + "schema": { + "format": null, + "ref": "OIDCCloudAuthProviderCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-{{ unique_hash }}.example.com", + "provider_name": "oidc-{{ unique_hash }}" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/oidc/provider" + }, + "scenario": "Create a Custom OIDC provider returns \"Created\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-persona-mapping-returns-no-content-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-persona-mapping-returns-no-content-response.json new file mode 100644 index 00000000000..84eccfaf556 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-persona-mapping-returns-no-content-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 204, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Delete a Custom OIDC persona mapping returns \"No Content\" response", + "operation_id": "DeleteOIDCCloudAuthPersonaMapping", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "persona_mapping_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "oidc_cloud_auth_persona_mapping.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/wif/oidc/persona_mapping/{persona_mapping_id}" + }, + "scenario": "Delete a Custom OIDC persona mapping returns \"No Content\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-provider-returns-no-content-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-provider-returns-no-content-response.json new file mode 100644 index 00000000000..f8e6e3a6c65 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/delete-a-custom-oidc-provider-returns-no-content-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 204, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Delete a Custom OIDC provider returns \"No Content\" response", + "operation_id": "DeleteOIDCCloudAuthProvider", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "provider_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "oidc_cloud_auth_provider.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/wif/oidc/provider/{provider_id}" + }, + "scenario": "Delete a Custom OIDC provider returns \"No Content\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-persona-mapping-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-persona-mapping-returns-ok-response.json new file mode 100644 index 00000000000..e5e8f1cca91 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-persona-mapping-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 200, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Get a Custom OIDC persona mapping returns \"OK\" response", + "operation_id": "GetOIDCCloudAuthPersonaMapping", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "persona_mapping_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "oidc_cloud_auth_persona_mapping.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/wif/oidc/persona_mapping/{persona_mapping_id}" + }, + "scenario": "Get a Custom OIDC persona mapping returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-provider-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-provider-returns-ok-response.json new file mode 100644 index 00000000000..d07af702b6d --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/get-a-custom-oidc-provider-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 200, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Get a Custom OIDC provider returns \"OK\" response", + "operation_id": "GetOIDCCloudAuthProvider", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "provider_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "oidc_cloud_auth_provider.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/wif/oidc/provider/{provider_id}" + }, + "scenario": "Get a Custom OIDC provider returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-persona-mappings-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-persona-mappings-returns-ok-response.json new file mode 100644 index 00000000000..08715d34e7c --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-persona-mappings-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "CloudAuthentication", + "expected_status": 200, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/List all Custom OIDC persona mappings returns \"OK\" response", + "operation_id": "ListOIDCCloudAuthPersonaMappings", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/oidc/persona_mapping" + }, + "scenario": "List all Custom OIDC persona mappings returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-providers-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-providers-returns-ok-response.json new file mode 100644 index 00000000000..f2f19ba1d10 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/cloud-authentication/list-all-custom-oidc-providers-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "CloudAuthentication", + "expected_status": 200, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/List all Custom OIDC providers returns \"OK\" response", + "operation_id": "ListOIDCCloudAuthProviders", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/oidc/provider" + }, + "scenario": "List all Custom OIDC providers returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/cloud-authentication.json b/src/test/resources/generated-test/test-server-data/v2/cloud-authentication.json index 51afb51e7dc..906f0dafcda 100644 --- a/src/test/resources/generated-test/test-server-data/v2/cloud-authentication.json +++ b/src/test/resources/generated-test/test-server-data/v2/cloud-authentication.json @@ -3,7 +3,7 @@ "recordings": [ { "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:41:58.788Z", + "frozen_at": "2026-11-05T21:32:15.740Z", "interactions": [ { "request": { @@ -12,58 +12,68 @@ "value": { "data": { "attributes": { - "arn_pattern": "not-an-arn" + "name": "Test-Create_a_Custom_OIDC_persona_mapping_returns_Created_response-1793914335" }, - "type": "aws_cloud_auth_intake_mapping" + "type": "roles" } } }, "content_type": "application/json", "method": "POST", - "path": "/api/v2/wif/aws/intake_mapping", + "path": "/api/v2/roles", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid ARN pattern format\"}]}" + "value": "{\"data\":{\"id\":\"ab697112-564d-5005-810f-2e4d7c79bfd0\",\"type\":\"roles\",\"attributes\":{\"created_at\":\"2026-11-05T21:32:20.885687Z\",\"modified_at\":\"2026-11-05T21:32:20.887247Z\",\"name\":\"Test-Create_a_Custom_OIDC_persona_mapping_returns_Created_response-1793914335\",\"team_count\":0,\"user_count\":0},\"relationships\":{\"permissions\":{\"data\":[{\"id\":\"de796e53-9bf5-521a-9f1b-607cb5144a04\",\"type\":\"permissions\"},{\"id\":\"e26672cd-7816-550f-ba6d-ef2ccd74a855\",\"type\":\"permissions\"},{\"id\":\"c25972d3-7b22-5549-8aef-2c6284156df8\",\"type\":\"permissions\"},{\"id\":\"47b95fa2-acb3-5cc9-ba59-aa9a9ea98482\",\"type\":\"permissions\"},{\"id\":\"62630f06-15f6-57ea-87a8-a2fafeef4390\",\"type\":\"permissions\"},{\"id\":\"ed6753a6-7596-5003-8817-32c4252118dc\",\"type\":\"permissions\"},{\"id\":\"959dd3c1-f6ac-540d-a554-fb505090228a\",\"type\":\"permissions\"},{\"id\":\"7898000c-4468-51f3-8663-abb02240568a\",\"type\":\"permissions\"},{\"id\":\"43e3923c-30d5-5063-9fe9-b5586613f61f\",\"type\":\"permissions\"},{\"id\":\"7a67188c-c249-55dc-b7f1-8c157a9cc009\",\"type\":\"permissions\"},{\"id\":\"800d49aa-2874-52fa-b04a-e7c315b90566\",\"type\":\"permissions\"},{\"id\":\"61db7ad1-dfbc-58ac-9715-8cb979d8ea5e\",\"type\":\"permissions\"},{\"id\":\"8e44d087-3fcf-572c-87ac-cdf13c5cd3d5\",\"type\":\"permissions\"},{\"id\":\"b3b4f318-1da7-5426-93b9-05b103faba58\",\"type\":\"permissions\"},{\"id\":\"d7d58ca3-ce77-510e-813a-1a6580655889\",\"type\":\"permissions\"},{\"id\":\"adbfd0d1-8f5b-58c2-889a-61bd2914e34f\",\"type\":\"permissions\"},{\"id\":\"c87e93d8-d078-5b87-a2e4-e0ff21a7bf0b\",\"type\":\"permissions\"},{\"id\":\"0353915b-c07e-5e9e-917e-e43d9faef377\",\"type\":\"permissions\"},{\"id\":\"75613a26-a865-5279-9c43-8379635f42a5\",\"type\":\"permissions\"}]}}}}" }, "headers": { "content-type": "application/vnd.api+json" }, - "reason": "Bad Request", - "status": 400 + "reason": "OK", + "status": 200 } - } - ], - "scenario": "Create an AWS cloud authentication intake mapping returns \"Bad Request\" response", - "version": "v2" - }, - { - "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:41:58.958Z", - "interactions": [ + }, { "request": { "body": { - "type": "empty", - "value": null + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Create_a_Custom_OIDC_persona_mapping_returns_Created_response-1793914335@datadoghq.com", + "service_account": true + }, + "relationships": { + "roles": { + "data": [ + { + "id": "ab697112-564d-5005-810f-2e4d7c79bfd0", + "type": "roles" + } + ] + } + }, + "type": "users" + } + } }, - "content_type": "", - "method": "GET", - "path": "/api/v2/integration/aws/accounts", + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/service_accounts", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + "value": "{\"data\":{\"type\":\"users\",\"id\":\"e47d0c8d-266c-5e75-b150-22b2bcaef29c\",\"attributes\":{\"uuid\":\"e47d0c8d-266c-5e75-b150-22b2bcaef29c\",\"name\":null,\"handle\":\"e47d0c8d-266c-5e75-b150-22b2bcaef29c\",\"created_at\":\"2026-11-05T21:32:26.144575+00:00\",\"modified_at\":\"2026-11-05T21:32:26.144575+00:00\",\"email\":\"test-create_a_custom_oidc_persona_mapping_returns_created_response-1793914335@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/c24ad5b10269bdff900c8542c47b11e2?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":true,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[{\"type\":\"roles\",\"id\":\"ab697112-564d-5005-810f-2e4d7c79bfd0\"}]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"f989be54-3c44-536d-b6a6-cce20ce9c70c\"}}}}}" }, "headers": { - "content-type": "application/vnd.api+json" + "content-type": "application/json" }, - "reason": "OK", - "status": 200 + "reason": "Created", + "status": 201 } }, { @@ -73,21 +83,26 @@ "value": { "data": { "attributes": { - "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*" + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-e3a0a619a3d493d3.example.com", + "provider_name": "oidc-e3a0a619a3d493d3" }, - "type": "aws_cloud_auth_intake_mapping" + "type": "custom_oidc_provider_config" } } }, "content_type": "application/json", "method": "POST", - "path": "/api/v2/wif/aws/intake_mapping", + "path": "/api/v2/wif/oidc/provider", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"f4f3ca19-91bf-4e21-9424-ade6e1f26ff5\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*\"}}}" + "value": "{\"data\":{\"id\":\"ba3d323b-94a0-5f53-9f3d-012fd2d63ed0\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:32:31.517999009Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-e3a0a619a3d493d3.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-e3a0a619a3d493d3\"}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -103,27 +118,37 @@ "value": { "data": { "attributes": { - "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*" + "account_uuid": "e47d0c8d-266c-5e75-b150-22b2bcaef29c", + "claim_matchers": [ + { + "claim": "sub", + "mode": "exact", + "values": [ + "system:serviceaccount:controllers:example-controller" + ] + } + ], + "provider_id": "ba3d323b-94a0-5f53-9f3d-012fd2d63ed0" }, - "type": "aws_cloud_auth_intake_mapping" + "type": "custom_oidc_identity_mapping" } } }, "content_type": "application/json", "method": "POST", - "path": "/api/v2/wif/aws/intake_mapping", + "path": "/api/v2/wif/oidc/persona_mapping", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"ARN pattern already exists in intake mapping\"}]}" + "value": "{\"data\":{\"id\":\"138b4be7-1365-5744-b90c-3af0d2b9c474\",\"type\":\"custom_oidc_identity_mapping\",\"attributes\":{\"account_identifier\":\"e47d0c8d-266c-5e75-b150-22b2bcaef29c\",\"account_uuid\":\"e47d0c8d-266c-5e75-b150-22b2bcaef29c\",\"claim_matchers\":[{\"claim\":\"sub\",\"mode\":\"exact\",\"values\":[\"system:serviceaccount:controllers:example-controller\"]}],\"created_at\":\"2026-11-05T21:32:36.68186799Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"provider_id\":\"ba3d323b-94a0-5f53-9f3d-012fd2d63ed0\"}}}" }, "headers": { "content-type": "application/vnd.api+json" }, - "reason": "Conflict", - "status": 409 + "reason": "Created", + "status": 201 } }, { @@ -134,7 +159,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/f4f3ca19-91bf-4e21-9424-ade6e1f26ff5", + "path": "/api/v2/wif/oidc/persona_mapping/138b4be7-1365-5744-b90c-3af0d2b9c474", "query": [] }, "response": { @@ -146,15 +171,7 @@ "reason": "No Content", "status": 204 } - } - ], - "scenario": "Create an AWS cloud authentication intake mapping returns \"Conflict\" response", - "version": "v2" - }, - { - "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:41:59.581Z", - "interactions": [ + }, { "request": { "body": { @@ -162,50 +179,39 @@ "value": null }, "content_type": "", - "method": "GET", - "path": "/api/v2/integration/aws/accounts", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/ba3d323b-94a0-5f53-9f3d-012fd2d63ed0", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" - }, - "headers": { - "content-type": "application/vnd.api+json" + "value": "" }, - "reason": "OK", - "status": 200 + "headers": {}, + "reason": "No Content", + "status": 204 } }, { "request": { "body": { - "type": "json", - "value": { - "data": { - "attributes": { - "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-484d2c17a502b020/*" - }, - "type": "aws_cloud_auth_intake_mapping" - } - } + "type": "empty", + "value": null }, - "content_type": "application/json", - "method": "POST", - "path": "/api/v2/wif/aws/intake_mapping", + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/e47d0c8d-266c-5e75-b150-22b2bcaef29c", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"6b882892-4b24-48cc-ae5a-951a868cf4f1\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-484d2c17a502b020/*\"}}}" - }, - "headers": { - "content-type": "application/vnd.api+json" + "value": "" }, - "reason": "Created", - "status": 201 + "headers": {}, + "reason": "No Content", + "status": 204 } }, { @@ -216,7 +222,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/6b882892-4b24-48cc-ae5a-951a868cf4f1", + "path": "/api/v2/roles/ab697112-564d-5005-810f-2e4d7c79bfd0", "query": [] }, "response": { @@ -230,36 +236,13 @@ } } ], - "scenario": "Create an AWS cloud authentication intake mapping returns \"Created\" response", + "scenario": "Create a Custom OIDC persona mapping returns \"Created\" response", "version": "v2" }, { "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:42:00.102Z", + "frozen_at": "2026-11-05T21:32:57.855Z", "interactions": [ - { - "request": { - "body": { - "type": "empty", - "value": null - }, - "content_type": "", - "method": "GET", - "path": "/api/v2/integration/aws/accounts", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" - }, - "headers": { - "content-type": "application/vnd.api+json" - }, - "reason": "OK", - "status": 200 - } - }, { "request": { "body": { @@ -267,21 +250,26 @@ "value": { "data": { "attributes": { - "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-e42cabb82e76a0b0/*" + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-b5429c819ca435c7.example.com", + "provider_name": "oidc-b5429c819ca435c7" }, - "type": "aws_cloud_auth_intake_mapping" + "type": "custom_oidc_provider_config" } } }, "content_type": "application/json", "method": "POST", - "path": "/api/v2/wif/aws/intake_mapping", + "path": "/api/v2/wif/oidc/provider", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"5f939215-97b2-41e9-930e-f0527336b0aa\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-e42cabb82e76a0b0/*\"}}}" + "value": "{\"data\":{\"id\":\"2c8dfc6f-d4c5-56c5-bd3e-ab481e3c3ff4\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:33:02.989650701Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-b5429c819ca435c7.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-b5429c819ca435c7\"}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -298,7 +286,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/5f939215-97b2-41e9-930e-f0527336b0aa", + "path": "/api/v2/wif/oidc/provider/2c8dfc6f-d4c5-56c5-bd3e-ab481e3c3ff4", "query": [] }, "response": { @@ -310,99 +298,52 @@ "reason": "No Content", "status": 204 } - }, - { - "request": { - "body": { - "type": "empty", - "value": null - }, - "content_type": "", - "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/5f939215-97b2-41e9-930e-f0527336b0aa", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" - }, - "headers": { - "content-type": "application/vnd.api+json" - }, - "reason": "Not Found", - "status": 404 - } - } - ], - "scenario": "Delete an AWS cloud authentication intake mapping returns \"No Content\" response", - "version": "v2" - }, - { - "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:42:00.690Z", - "interactions": [ - { - "request": { - "body": { - "type": "empty", - "value": null - }, - "content_type": "", - "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/00000000-0000-0000-0000-000000000000", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" - }, - "headers": { - "content-type": "application/vnd.api+json" - }, - "reason": "Not Found", - "status": 404 - } } ], - "scenario": "Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", + "scenario": "Create a Custom OIDC provider returns \"Created\" response", "version": "v2" }, { "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:42:00.815Z", + "frozen_at": "2026-10-29T17:41:58.788Z", "interactions": [ { "request": { "body": { - "type": "empty", - "value": null + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "not-an-arn" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } }, - "content_type": "", - "method": "GET", - "path": "/api/v2/wif/aws/intake_mapping/00000000-0000-0000-0000-000000000000", + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + "value": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid ARN pattern format\"}]}" }, "headers": { "content-type": "application/vnd.api+json" }, - "reason": "Not Found", - "status": 404 + "reason": "Bad Request", + "status": 400 } } ], - "scenario": "Get an AWS cloud authentication intake mapping returns \"Not Found\" response", + "scenario": "Create an AWS cloud authentication intake mapping returns \"Bad Request\" response", "version": "v2" }, { "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:42:00.943Z", + "frozen_at": "2026-10-29T17:41:58.958Z", "interactions": [ { "request": { @@ -434,7 +375,7 @@ "value": { "data": { "attributes": { - "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*" + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*" }, "type": "aws_cloud_auth_intake_mapping" } @@ -448,7 +389,7 @@ "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"5283249d-a3a6-4291-88b6-e155bda4ab65\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*\"}}}" + "value": "{\"data\":{\"id\":\"f4f3ca19-91bf-4e21-9424-ade6e1f26ff5\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*\"}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -460,24 +401,31 @@ { "request": { "body": { - "type": "empty", - "value": null + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } }, - "content_type": "", - "method": "GET", - "path": "/api/v2/wif/aws/intake_mapping/5283249d-a3a6-4291-88b6-e155bda4ab65", + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"5283249d-a3a6-4291-88b6-e155bda4ab65\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*\"}}}" + "value": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"ARN pattern already exists in intake mapping\"}]}" }, "headers": { "content-type": "application/vnd.api+json" }, - "reason": "OK", - "status": 200 + "reason": "Conflict", + "status": 409 } }, { @@ -488,7 +436,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/5283249d-a3a6-4291-88b6-e155bda4ab65", + "path": "/api/v2/wif/aws/intake_mapping/f4f3ca19-91bf-4e21-9424-ade6e1f26ff5", "query": [] }, "response": { @@ -502,12 +450,12 @@ } } ], - "scenario": "Get an AWS cloud authentication intake mapping returns \"OK\" response", + "scenario": "Create an AWS cloud authentication intake mapping returns \"Conflict\" response", "version": "v2" }, { "feature": "Cloud Authentication", - "frozen_at": "2026-10-29T17:42:01.510Z", + "frozen_at": "2026-10-29T17:41:59.581Z", "interactions": [ { "request": { @@ -539,7 +487,7 @@ "value": { "data": { "attributes": { - "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*" + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-484d2c17a502b020/*" }, "type": "aws_cloud_auth_intake_mapping" } @@ -553,7 +501,7 @@ "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"80586b57-c847-4a6d-8e02-2e2c185996d0\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*\"}}}" + "value": "{\"data\":{\"id\":\"6b882892-4b24-48cc-ae5a-951a868cf4f1\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-484d2c17a502b020/*\"}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -569,14 +517,1262 @@ "value": null }, "content_type": "", - "method": "GET", - "path": "/api/v2/wif/aws/intake_mapping", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/6b882892-4b24-48cc-ae5a-951a868cf4f1", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Create an AWS cloud authentication intake mapping returns \"Created\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-11-05T21:33:08.190Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "name": "Test-Delete_a_Custom_OIDC_persona_mapping_returns_No_Content_response-1793914388" + }, + "type": "roles" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/roles", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"23cb8406-88e9-5ce7-9cbb-c17cefb2592e\",\"type\":\"roles\",\"attributes\":{\"created_at\":\"2026-11-05T21:33:13.307428Z\",\"modified_at\":\"2026-11-05T21:33:13.308543Z\",\"name\":\"Test-Delete_a_Custom_OIDC_persona_mapping_returns_No_Content_response-1793914388\",\"team_count\":0,\"user_count\":0},\"relationships\":{\"permissions\":{\"data\":[{\"id\":\"de796e53-9bf5-521a-9f1b-607cb5144a04\",\"type\":\"permissions\"},{\"id\":\"e26672cd-7816-550f-ba6d-ef2ccd74a855\",\"type\":\"permissions\"},{\"id\":\"c25972d3-7b22-5549-8aef-2c6284156df8\",\"type\":\"permissions\"},{\"id\":\"47b95fa2-acb3-5cc9-ba59-aa9a9ea98482\",\"type\":\"permissions\"},{\"id\":\"62630f06-15f6-57ea-87a8-a2fafeef4390\",\"type\":\"permissions\"},{\"id\":\"ed6753a6-7596-5003-8817-32c4252118dc\",\"type\":\"permissions\"},{\"id\":\"959dd3c1-f6ac-540d-a554-fb505090228a\",\"type\":\"permissions\"},{\"id\":\"7898000c-4468-51f3-8663-abb02240568a\",\"type\":\"permissions\"},{\"id\":\"43e3923c-30d5-5063-9fe9-b5586613f61f\",\"type\":\"permissions\"},{\"id\":\"7a67188c-c249-55dc-b7f1-8c157a9cc009\",\"type\":\"permissions\"},{\"id\":\"800d49aa-2874-52fa-b04a-e7c315b90566\",\"type\":\"permissions\"},{\"id\":\"61db7ad1-dfbc-58ac-9715-8cb979d8ea5e\",\"type\":\"permissions\"},{\"id\":\"8e44d087-3fcf-572c-87ac-cdf13c5cd3d5\",\"type\":\"permissions\"},{\"id\":\"b3b4f318-1da7-5426-93b9-05b103faba58\",\"type\":\"permissions\"},{\"id\":\"d7d58ca3-ce77-510e-813a-1a6580655889\",\"type\":\"permissions\"},{\"id\":\"adbfd0d1-8f5b-58c2-889a-61bd2914e34f\",\"type\":\"permissions\"},{\"id\":\"c87e93d8-d078-5b87-a2e4-e0ff21a7bf0b\",\"type\":\"permissions\"},{\"id\":\"0353915b-c07e-5e9e-917e-e43d9faef377\",\"type\":\"permissions\"},{\"id\":\"75613a26-a865-5279-9c43-8379635f42a5\",\"type\":\"permissions\"}]}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Delete_a_Custom_OIDC_persona_mapping_returns_No_Content_response-1793914388@datadoghq.com", + "service_account": true + }, + "relationships": { + "roles": { + "data": [ + { + "id": "23cb8406-88e9-5ce7-9cbb-c17cefb2592e", + "type": "roles" + } + ] + } + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/service_accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"6c8a55af-7e68-56e0-82e7-f2b4b820562e\",\"attributes\":{\"uuid\":\"6c8a55af-7e68-56e0-82e7-f2b4b820562e\",\"name\":null,\"handle\":\"6c8a55af-7e68-56e0-82e7-f2b4b820562e\",\"created_at\":\"2026-11-05T21:33:18.551443+00:00\",\"modified_at\":\"2026-11-05T21:33:18.551443+00:00\",\"email\":\"test-delete_a_custom_oidc_persona_mapping_returns_no_content_response-1793914388@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/f665ab53055f144d91d858fa49991f5d?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":true,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[{\"type\":\"roles\",\"id\":\"23cb8406-88e9-5ce7-9cbb-c17cefb2592e\"}]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"f989be54-3c44-536d-b6a6-cce20ce9c70c\"}}}}}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-e9207b15e2f2bf61.example.com", + "provider_name": "oidc-e9207b15e2f2bf61" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"4385b408-7e11-58d4-92ec-158a4cf499a6\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:33:23.959776927Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-e9207b15e2f2bf61.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-e9207b15e2f2bf61\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "account_uuid": "6c8a55af-7e68-56e0-82e7-f2b4b820562e", + "claim_matchers": [ + { + "claim": "sub", + "mode": "exact", + "values": [ + "system:serviceaccount:controllers:example-controller" + ] + } + ], + "provider_id": "4385b408-7e11-58d4-92ec-158a4cf499a6" + }, + "type": "custom_oidc_identity_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/persona_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"09086d40-9014-5f07-bc96-3d788cdb6e5f\",\"type\":\"custom_oidc_identity_mapping\",\"attributes\":{\"account_identifier\":\"6c8a55af-7e68-56e0-82e7-f2b4b820562e\",\"account_uuid\":\"6c8a55af-7e68-56e0-82e7-f2b4b820562e\",\"claim_matchers\":[{\"claim\":\"sub\",\"mode\":\"exact\",\"values\":[\"system:serviceaccount:controllers:example-controller\"]}],\"created_at\":\"2026-11-05T21:33:29.134831712Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"provider_id\":\"4385b408-7e11-58d4-92ec-158a4cf499a6\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/persona_mapping/09086d40-9014-5f07-bc96-3d788cdb6e5f", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/persona_mapping/09086d40-9014-5f07-bc96-3d788cdb6e5f", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/4385b408-7e11-58d4-92ec-158a4cf499a6", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/6c8a55af-7e68-56e0-82e7-f2b4b820562e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/roles/23cb8406-88e9-5ce7-9cbb-c17cefb2592e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Delete a Custom OIDC persona mapping returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-11-05T21:33:55.587Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-5525743cbc1c8350.example.com", + "provider_name": "oidc-5525743cbc1c8350" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"a3e19571-d076-5251-a0a2-f7693e1161dc\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:34:00.685670358Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-5525743cbc1c8350.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-5525743cbc1c8350\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/a3e19571-d076-5251-a0a2-f7693e1161dc", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/a3e19571-d076-5251-a0a2-f7693e1161dc", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete a Custom OIDC provider returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.102Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-e42cabb82e76a0b0/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5f939215-97b2-41e9-930e-f0527336b0aa\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-e42cabb82e76a0b0/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/5f939215-97b2-41e9-930e-f0527336b0aa", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/5f939215-97b2-41e9-930e-f0527336b0aa", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete an AWS cloud authentication intake mapping returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.690Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/00000000-0000-0000-0000-000000000000", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-11-05T21:34:10.992Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "name": "Test-Get_a_Custom_OIDC_persona_mapping_returns_OK_response-1793914450" + }, + "type": "roles" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/roles", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"9a6cec11-eb7f-577d-aa46-04a9856388e7\",\"type\":\"roles\",\"attributes\":{\"created_at\":\"2026-11-05T21:34:16.120568Z\",\"modified_at\":\"2026-11-05T21:34:16.121791Z\",\"name\":\"Test-Get_a_Custom_OIDC_persona_mapping_returns_OK_response-1793914450\",\"team_count\":0,\"user_count\":0},\"relationships\":{\"permissions\":{\"data\":[{\"id\":\"de796e53-9bf5-521a-9f1b-607cb5144a04\",\"type\":\"permissions\"},{\"id\":\"e26672cd-7816-550f-ba6d-ef2ccd74a855\",\"type\":\"permissions\"},{\"id\":\"c25972d3-7b22-5549-8aef-2c6284156df8\",\"type\":\"permissions\"},{\"id\":\"47b95fa2-acb3-5cc9-ba59-aa9a9ea98482\",\"type\":\"permissions\"},{\"id\":\"62630f06-15f6-57ea-87a8-a2fafeef4390\",\"type\":\"permissions\"},{\"id\":\"ed6753a6-7596-5003-8817-32c4252118dc\",\"type\":\"permissions\"},{\"id\":\"959dd3c1-f6ac-540d-a554-fb505090228a\",\"type\":\"permissions\"},{\"id\":\"7898000c-4468-51f3-8663-abb02240568a\",\"type\":\"permissions\"},{\"id\":\"43e3923c-30d5-5063-9fe9-b5586613f61f\",\"type\":\"permissions\"},{\"id\":\"7a67188c-c249-55dc-b7f1-8c157a9cc009\",\"type\":\"permissions\"},{\"id\":\"800d49aa-2874-52fa-b04a-e7c315b90566\",\"type\":\"permissions\"},{\"id\":\"61db7ad1-dfbc-58ac-9715-8cb979d8ea5e\",\"type\":\"permissions\"},{\"id\":\"8e44d087-3fcf-572c-87ac-cdf13c5cd3d5\",\"type\":\"permissions\"},{\"id\":\"b3b4f318-1da7-5426-93b9-05b103faba58\",\"type\":\"permissions\"},{\"id\":\"d7d58ca3-ce77-510e-813a-1a6580655889\",\"type\":\"permissions\"},{\"id\":\"adbfd0d1-8f5b-58c2-889a-61bd2914e34f\",\"type\":\"permissions\"},{\"id\":\"c87e93d8-d078-5b87-a2e4-e0ff21a7bf0b\",\"type\":\"permissions\"},{\"id\":\"0353915b-c07e-5e9e-917e-e43d9faef377\",\"type\":\"permissions\"},{\"id\":\"75613a26-a865-5279-9c43-8379635f42a5\",\"type\":\"permissions\"}]}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_a_Custom_OIDC_persona_mapping_returns_OK_response-1793914450@datadoghq.com", + "service_account": true + }, + "relationships": { + "roles": { + "data": [ + { + "id": "9a6cec11-eb7f-577d-aa46-04a9856388e7", + "type": "roles" + } + ] + } + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/service_accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"attributes\":{\"uuid\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"name\":null,\"handle\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"created_at\":\"2026-11-05T21:34:21.397051+00:00\",\"modified_at\":\"2026-11-05T21:34:21.397051+00:00\",\"email\":\"test-get_a_custom_oidc_persona_mapping_returns_ok_response-1793914450@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/456083358188b7d986f52665e202bf15?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":true,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[{\"type\":\"roles\",\"id\":\"9a6cec11-eb7f-577d-aa46-04a9856388e7\"}]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"f989be54-3c44-536d-b6a6-cce20ce9c70c\"}}}}}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-4556ea997dc115a2.example.com", + "provider_name": "oidc-4556ea997dc115a2" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"26fa1ee2-2a70-533c-9f28-6c19ca09e745\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:34:26.812542823Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-4556ea997dc115a2.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-4556ea997dc115a2\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "account_uuid": "7384ba20-e3d3-5c55-affb-8e9f6fe28ab9", + "claim_matchers": [ + { + "claim": "sub", + "mode": "exact", + "values": [ + "system:serviceaccount:controllers:example-controller" + ] + } + ], + "provider_id": "26fa1ee2-2a70-533c-9f28-6c19ca09e745" + }, + "type": "custom_oidc_identity_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/persona_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"93083fcc-9a3c-5c92-97b2-61007bb2d455\",\"type\":\"custom_oidc_identity_mapping\",\"attributes\":{\"account_identifier\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"account_uuid\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"claim_matchers\":[{\"claim\":\"sub\",\"mode\":\"exact\",\"values\":[\"system:serviceaccount:controllers:example-controller\"]}],\"created_at\":\"2026-11-05T21:34:31.981910134Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"provider_id\":\"26fa1ee2-2a70-533c-9f28-6c19ca09e745\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/oidc/persona_mapping/93083fcc-9a3c-5c92-97b2-61007bb2d455", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"93083fcc-9a3c-5c92-97b2-61007bb2d455\",\"type\":\"custom_oidc_identity_mapping\",\"attributes\":{\"account_identifier\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"account_uuid\":\"7384ba20-e3d3-5c55-affb-8e9f6fe28ab9\",\"claim_matchers\":[{\"claim\":\"sub\",\"mode\":\"exact\",\"values\":[\"system:serviceaccount:controllers:example-controller\"]}],\"created_at\":\"2026-11-05T21:34:31.981910134Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"provider_id\":\"26fa1ee2-2a70-533c-9f28-6c19ca09e745\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/persona_mapping/93083fcc-9a3c-5c92-97b2-61007bb2d455", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/26fa1ee2-2a70-533c-9f28-6c19ca09e745", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/7384ba20-e3d3-5c55-affb-8e9f6fe28ab9", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/roles/9a6cec11-eb7f-577d-aa46-04a9856388e7", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get a Custom OIDC persona mapping returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-11-05T21:34:58.147Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-dc0221816d457d05.example.com", + "provider_name": "oidc-dc0221816d457d05" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"bd99165d-6b00-5a96-9650-fe5d21d94157\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:35:03.255756732Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-dc0221816d457d05.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-dc0221816d457d05\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/oidc/provider/bd99165d-6b00-5a96-9650-fe5d21d94157", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"bd99165d-6b00-5a96-9650-fe5d21d94157\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:35:03.255756732Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-dc0221816d457d05.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-dc0221816d457d05\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/bd99165d-6b00-5a96-9650-fe5d21d94157", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get a Custom OIDC provider returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.815Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/aws/intake_mapping/00000000-0000-0000-0000-000000000000", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get an AWS cloud authentication intake mapping returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.943Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5283249d-a3a6-4291-88b6-e155bda4ab65\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/aws/intake_mapping/5283249d-a3a6-4291-88b6-e155bda4ab65", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5283249d-a3a6-4291-88b6-e155bda4ab65\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/5283249d-a3a6-4291-88b6-e155bda4ab65", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get an AWS cloud authentication intake mapping returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:01.510Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"80586b57-c847-4a6d-8e02-2e2c185996d0\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"80586b57-c847-4a6d-8e02-2e2c185996d0\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/80586b57-c847-4a6d-8e02-2e2c185996d0", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List AWS cloud authentication intake mappings returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-11-05T21:35:13.618Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "name": "Test-List_all_Custom_OIDC_persona_mappings_returns_OK_response-1793914513" + }, + "type": "roles" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/roles", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":[{\"id\":\"80586b57-c847-4a6d-8e02-2e2c185996d0\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*\"}}]}" + "value": "{\"data\":{\"id\":\"d1c38435-cac7-5b5f-ae6a-ad601dca2bb2\",\"type\":\"roles\",\"attributes\":{\"created_at\":\"2026-11-05T21:35:18.749023Z\",\"modified_at\":\"2026-11-05T21:35:18.750035Z\",\"name\":\"Test-List_all_Custom_OIDC_persona_mappings_returns_OK_response-1793914513\",\"team_count\":0,\"user_count\":0},\"relationships\":{\"permissions\":{\"data\":[{\"id\":\"de796e53-9bf5-521a-9f1b-607cb5144a04\",\"type\":\"permissions\"},{\"id\":\"e26672cd-7816-550f-ba6d-ef2ccd74a855\",\"type\":\"permissions\"},{\"id\":\"c25972d3-7b22-5549-8aef-2c6284156df8\",\"type\":\"permissions\"},{\"id\":\"47b95fa2-acb3-5cc9-ba59-aa9a9ea98482\",\"type\":\"permissions\"},{\"id\":\"62630f06-15f6-57ea-87a8-a2fafeef4390\",\"type\":\"permissions\"},{\"id\":\"ed6753a6-7596-5003-8817-32c4252118dc\",\"type\":\"permissions\"},{\"id\":\"959dd3c1-f6ac-540d-a554-fb505090228a\",\"type\":\"permissions\"},{\"id\":\"7898000c-4468-51f3-8663-abb02240568a\",\"type\":\"permissions\"},{\"id\":\"43e3923c-30d5-5063-9fe9-b5586613f61f\",\"type\":\"permissions\"},{\"id\":\"7a67188c-c249-55dc-b7f1-8c157a9cc009\",\"type\":\"permissions\"},{\"id\":\"800d49aa-2874-52fa-b04a-e7c315b90566\",\"type\":\"permissions\"},{\"id\":\"61db7ad1-dfbc-58ac-9715-8cb979d8ea5e\",\"type\":\"permissions\"},{\"id\":\"8e44d087-3fcf-572c-87ac-cdf13c5cd3d5\",\"type\":\"permissions\"},{\"id\":\"b3b4f318-1da7-5426-93b9-05b103faba58\",\"type\":\"permissions\"},{\"id\":\"d7d58ca3-ce77-510e-813a-1a6580655889\",\"type\":\"permissions\"},{\"id\":\"adbfd0d1-8f5b-58c2-889a-61bd2914e34f\",\"type\":\"permissions\"},{\"id\":\"c87e93d8-d078-5b87-a2e4-e0ff21a7bf0b\",\"type\":\"permissions\"},{\"id\":\"0353915b-c07e-5e9e-917e-e43d9faef377\",\"type\":\"permissions\"},{\"id\":\"75613a26-a865-5279-9c43-8379635f42a5\",\"type\":\"permissions\"}]}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-List_all_Custom_OIDC_persona_mappings_returns_OK_response-1793914513@datadoghq.com", + "service_account": true + }, + "relationships": { + "roles": { + "data": [ + { + "id": "d1c38435-cac7-5b5f-ae6a-ad601dca2bb2", + "type": "roles" + } + ] + } + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/service_accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"attributes\":{\"uuid\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"name\":null,\"handle\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"created_at\":\"2026-11-05T21:35:24.011243+00:00\",\"modified_at\":\"2026-11-05T21:35:24.011243+00:00\",\"email\":\"test-list_all_custom_oidc_persona_mappings_returns_ok_response-1793914513@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/8ca8394a9ea43cc44a341c5d95307612?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":true,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[{\"type\":\"roles\",\"id\":\"d1c38435-cac7-5b5f-ae6a-ad601dca2bb2\"}]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"f989be54-3c44-536d-b6a6-cce20ce9c70c\"}}}}}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-3faf3ee154c2c092.example.com", + "provider_name": "oidc-3faf3ee154c2c092" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"ce9cbd47-32b3-570a-8c27-2242c148616c\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:35:29.675797538Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-3faf3ee154c2c092.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-3faf3ee154c2c092\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "account_uuid": "d331b580-ebf6-55c4-a82b-16ad9a1188a6", + "claim_matchers": [ + { + "claim": "sub", + "mode": "exact", + "values": [ + "system:serviceaccount:controllers:example-controller" + ] + } + ], + "provider_id": "ce9cbd47-32b3-570a-8c27-2242c148616c" + }, + "type": "custom_oidc_identity_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/persona_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"69b84e3a-5213-5424-b67c-13d7784c4dfd\",\"type\":\"custom_oidc_identity_mapping\",\"attributes\":{\"account_identifier\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"account_uuid\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"claim_matchers\":[{\"claim\":\"sub\",\"mode\":\"exact\",\"values\":[\"system:serviceaccount:controllers:example-controller\"]}],\"created_at\":\"2026-11-05T21:35:34.840415726Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"provider_id\":\"ce9cbd47-32b3-570a-8c27-2242c148616c\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/oidc/persona_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"69b84e3a-5213-5424-b67c-13d7784c4dfd\",\"type\":\"custom_oidc_identity_mapping\",\"attributes\":{\"account_identifier\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"account_uuid\":\"d331b580-ebf6-55c4-a82b-16ad9a1188a6\",\"claim_matchers\":[{\"claim\":\"sub\",\"mode\":\"exact\",\"values\":[\"system:serviceaccount:controllers:example-controller\"]}],\"created_at\":\"2026-11-05T21:35:34.840415726Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"provider_id\":\"ce9cbd47-32b3-570a-8c27-2242c148616c\"}}]}" }, "headers": { "content-type": "application/vnd.api+json" @@ -593,7 +1789,70 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/wif/aws/intake_mapping/80586b57-c847-4a6d-8e02-2e2c185996d0", + "path": "/api/v2/wif/oidc/persona_mapping/69b84e3a-5213-5424-b67c-13d7784c4dfd", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/ce9cbd47-32b3-570a-8c27-2242c148616c", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/d331b580-ebf6-55c4-a82b-16ad9a1188a6", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/roles/d1c38435-cac7-5b5f-ae6a-ad601dca2bb2", "query": [] }, "response": { @@ -607,7 +1866,94 @@ } } ], - "scenario": "List AWS cloud authentication intake mappings returns \"OK\" response", + "scenario": "List all Custom OIDC persona mappings returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-11-05T21:36:01.224Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "audiences": [ + "sdk-test" + ], + "discovery_type": "oidc_discovery", + "issuer_url": "https://oidc-68ad4765405427f0.example.com", + "provider_name": "oidc-68ad4765405427f0" + }, + "type": "custom_oidc_provider_config" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"f2d7cc1c-69e2-5e8e-aff3-d06dfbf38a51\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:36:06.327402478Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-68ad4765405427f0.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-68ad4765405427f0\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/oidc/provider", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"f2d7cc1c-69e2-5e8e-aff3-d06dfbf38a51\",\"type\":\"custom_oidc_provider_config\",\"attributes\":{\"audiences\":[\"sdk-test\"],\"created_at\":\"2026-11-05T21:36:06.327402478Z\",\"created_by\":\"4df2743e-002e-558d-8789-25ae05238231\",\"discovery_type\":\"oidc_discovery\",\"identity_claim_name\":\"sub\",\"issuer_url\":\"https://oidc-68ad4765405427f0.example.com\",\"org_uuid_source\":\"dd_org_uuid\",\"provider_name\":\"oidc-68ad4765405427f0\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/oidc/provider/f2d7cc1c-69e2-5e8e-aff3-d06dfbf38a51", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List all Custom OIDC providers returns \"OK\" response", "version": "v2" } ],