diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 06889282417..ce0a0f2f0e7 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -26513,6 +26513,7 @@ paths: - ap2.datadoghq.com - datadoghq.eu - ddog-gov.com + - us2.ddog-gov.com subdomain: default: ip-ranges description: The subdomain where the API is deployed. @@ -39887,6 +39888,7 @@ paths: - ap2.datadoghq.com - datadoghq.eu - ddog-gov.com + - us2.ddog-gov.com subdomain: default: http-intake.logs description: The subdomain where the API is deployed. @@ -39927,6 +39929,7 @@ servers: - ap2.datadoghq.com - datadoghq.eu - ddog-gov.com + - us2.ddog-gov.com subdomain: default: api description: The subdomain where the API is deployed. diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b02440dcf09..4980e3a1bd2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1140,9 +1140,9 @@ components: schema: type: string PersonalAccessTokenID: - description: The ID of the personal access token. + description: The UUID of the personal access token. in: path - name: pat_id + name: pat_uuid required: true schema: example: "00000000-0000-1234-0000-000000000000" @@ -29288,6 +29288,11 @@ components: FullPersonalAccessTokenAttributes: description: Attributes of a full personal access token, including the token key. properties: + alias: + description: The alias (short identifier) of the personal access token. + example: "2H9MCNMBM8FQjQ16YucXkX" + readOnly: true + type: string created_at: description: Creation date of the personal access token. example: "2024-01-01T00:00:00+00:00" @@ -31093,7 +31098,7 @@ components: properties: org_site: description: The site of the organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization. @@ -51401,7 +51406,7 @@ components: type: string owner_org_site: description: The site of the organization that owns this org group. - example: "us1" + example: "datadoghq.com" type: string owner_org_uuid: description: The UUID of the organization that owns this org group. @@ -51507,7 +51512,7 @@ components: type: string org_site: description: The site of the member organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the member organization. @@ -51728,8 +51733,11 @@ components: example: value: "UTC" type: object - enforcement_tier: - $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" + enforced_at: + description: Timestamp when the policy was enforced. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string modified_at: description: Timestamp when the policy was last modified. example: "2024-01-15T10:30:00Z" @@ -51739,12 +51747,9 @@ components: description: The name of the policy. example: "monitor_timezone" type: string - policy_type: - $ref: "#/components/schemas/OrgGroupPolicyPolicyType" required: - policy_name - - policy_type - - enforcement_tier + - enforced_at - modified_at type: object OrgGroupPolicyConfigAttributes: @@ -51815,8 +51820,7 @@ components: x-enum-varnames: - ORG_GROUP_POLICY_CONFIGS OrgGroupPolicyCreateAttributes: - description: >- - Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. + description: Attributes for creating an org group policy. properties: content: additionalProperties: {} @@ -51824,14 +51828,10 @@ components: example: value: "UTC" type: object - enforcement_tier: - $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" policy_name: description: The name of the policy. example: "monitor_timezone" type: string - policy_type: - $ref: "#/components/schemas/OrgGroupPolicyPolicyType" required: - policy_name - content @@ -51885,20 +51885,6 @@ components: - type - attributes type: object - OrgGroupPolicyEnforcementTier: - default: DEFAULT - description: >- - The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. - enum: - - DEFAULT - - ENFORCE - - DELEGATE - example: DEFAULT - type: string - x-enum-varnames: - - DEFAULT - - ENFORCE - - DELEGATE OrgGroupPolicyListResponse: description: Response containing a list of org group policies. properties: @@ -51931,7 +51917,7 @@ components: type: string org_site: description: The site of the organization that has the override. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization that has the override. @@ -51949,7 +51935,7 @@ components: properties: org_site: description: The site of the organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization to grant the override. @@ -52065,12 +52051,11 @@ components: x-enum-varnames: - ORG_GROUP_POLICY_OVERRIDES OrgGroupPolicyOverrideUpdateAttributes: - description: >- - Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. + description: Attributes for updating a policy override. properties: org_site: description: The site of the organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization. @@ -52106,16 +52091,6 @@ components: required: - data type: object - OrgGroupPolicyPolicyType: - default: org_config - description: >- - The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - enum: - - org_config - example: org_config - type: string - x-enum-varnames: - - ORG_CONFIG OrgGroupPolicyRelationshipToOne: description: Relationship to a single org group policy. properties: @@ -52184,8 +52159,6 @@ components: example: value: "UTC" type: object - enforcement_tier: - $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" type: object OrgGroupPolicyUpdateData: description: Data for updating an org group policy. @@ -53550,6 +53523,11 @@ components: PersonalAccessTokenAttributes: description: Attributes of a personal access token. properties: + alias: + description: The alias (short identifier) of the personal access token. + example: "2H9MCNMBM8FQjQ16YucXkX" + readOnly: true + type: string created_at: description: Creation date of the personal access token. example: "2024-01-01T00:00:00+00:00" @@ -78095,10 +78073,6 @@ components: description: Title of the user. nullable: true type: string - uuid: - description: UUID of the user. - readOnly: true - type: string verified: description: Whether the user is verified. type: boolean @@ -83198,6 +83172,14 @@ paths: requestBody: content: application/json: + examples: + default: + value: + data: + attributes: + user_ids: + - "00000000-0000-0000-0000-000000000000" + type: anonymize_users_request schema: $ref: "#/components/schemas/AnonymizeUsersRequest" required: true @@ -93594,6 +93576,7 @@ paths: - ap2.datadoghq.com - datadoghq.eu - ddog-gov.com + - us2.ddog-gov.com subdomain: default: event-management-intake description: The subdomain where the API is deployed. @@ -102801,6 +102784,7 @@ paths: - ap2.datadoghq.com - datadoghq.eu - ddog-gov.com + - us2.ddog-gov.com subdomain: default: http-intake.logs description: The subdomain where the API is deployed. @@ -108470,7 +108454,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108528,7 +108512,7 @@ paths: data: attributes: orgs: - - org_site: "us1" + - org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" relationships: source_org_group: @@ -108555,7 +108539,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108620,7 +108604,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108701,7 +108685,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108769,10 +108753,9 @@ paths: - attributes: content: value: "UTC" - enforcement_tier: "DEFAULT" + enforced_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" policy_name: "monitor_timezone" - policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108828,9 +108811,7 @@ paths: attributes: content: value: "UTC" - enforcement_tier: "DEFAULT" policy_name: "monitor_timezone" - policy_type: "org_config" relationships: org_group: data: @@ -108851,10 +108832,9 @@ paths: attributes: content: value: "UTC" - enforcement_tier: "DEFAULT" + enforced_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" policy_name: "monitor_timezone" - policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108944,73 +108924,8 @@ 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/). - get: - description: Get a specific organization group policy by its ID. - operationId: GetOrgGroupPolicy - parameters: - - $ref: "#/components/parameters/OrgGroupPolicyId" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - content: - value: "UTC" - enforcement_tier: "DEFAULT" - modified_at: "2024-01-15T10:30:00Z" - policy_name: "monitor_timezone" - policy_type: "org_config" - id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" - relationships: - org_group: - data: - id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" - type: org_groups - type: org_group_policies - schema: - $ref: "#/components/schemas/OrgGroupPolicyResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "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" - summary: Get an org group policy - tags: [Org Groups] - "x-permission": - operator: OR - permissions: - - org_group_read - 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/). patch: - description: Update an existing organization group policy. + description: Update the content of an existing organization group policy. operationId: UpdateOrgGroupPolicy parameters: - $ref: "#/components/parameters/OrgGroupPolicyId" @@ -109024,7 +108939,6 @@ paths: attributes: content: value: "US/Eastern" - enforcement_tier: "ENFORCE" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" type: org_group_policies schema: @@ -109041,10 +108955,9 @@ paths: attributes: content: value: "US/Eastern" - enforcement_tier: "ENFORCE" + enforced_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" policy_name: "monitor_timezone" - policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -109158,7 +109071,7 @@ paths: - attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109217,7 +109130,7 @@ paths: value: data: attributes: - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" relationships: org_group: @@ -109243,7 +109156,7 @@ paths: attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109338,73 +109251,6 @@ 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/). - get: - description: Get a specific organization group policy override by its ID. - operationId: GetOrgGroupPolicyOverride - parameters: - - $ref: "#/components/parameters/OrgGroupPolicyOverrideId" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-15T10:30:00Z" - modified_at: "2024-01-15T10:30:00Z" - org_site: "us1" - org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" - id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" - relationships: - org_group: - data: - id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" - type: org_groups - org_group_policy: - data: - id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" - type: org_group_policies - type: org_group_policy_overrides - schema: - $ref: "#/components/schemas/OrgGroupPolicyOverrideResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "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" - summary: Get an org group policy override - tags: [Org Groups] - "x-permission": - operator: OR - permissions: - - org_group_read - 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/). patch: description: Update an existing organization group policy override. operationId: UpdateOrgGroupPolicyOverride @@ -109418,7 +109264,7 @@ paths: value: data: attributes: - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" type: org_group_policy_overrides @@ -109436,7 +109282,7 @@ paths: attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109508,7 +109354,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109575,7 +109421,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109678,7 +109524,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109751,7 +109597,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" name: "Updated Org Group Name" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109919,7 +109765,7 @@ paths: operator: OR permissions: - user_app_keys - /api/v2/personal_access_tokens/{pat_id}: + /api/v2/personal_access_tokens/{pat_uuid}: delete: description: Revoke a specific personal access token. operationId: RevokePersonalAccessToken @@ -121498,7 +121344,7 @@ paths: operator: OR permissions: - service_account_write - /api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}: + /api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}: delete: description: Revoke a specific access token for a service account. operationId: RevokeServiceAccountAccessToken @@ -130461,6 +130307,7 @@ servers: - ap2.datadoghq.com - datadoghq.eu - ddog-gov.com + - us2.ddog-gov.com subdomain: default: api description: The subdomain where the API is deployed. diff --git a/api/datadog/configuration.go b/api/datadog/configuration.go index 272002142d0..11e2ca2f4f3 100644 --- a/api/datadog/configuration.go +++ b/api/datadog/configuration.go @@ -161,6 +161,7 @@ func NewConfiguration() *Configuration { "ap2.datadoghq.com", "datadoghq.eu", "ddog-gov.com", + "us2.ddog-gov.com", }, }, "subdomain": { @@ -215,6 +216,7 @@ func NewConfiguration() *Configuration { "ap2.datadoghq.com", "datadoghq.eu", "ddog-gov.com", + "us2.ddog-gov.com", }, }, "subdomain": { @@ -264,6 +266,7 @@ func NewConfiguration() *Configuration { "ap2.datadoghq.com", "datadoghq.eu", "ddog-gov.com", + "us2.ddog-gov.com", }, }, "subdomain": { @@ -317,6 +320,7 @@ func NewConfiguration() *Configuration { "ap2.datadoghq.com", "datadoghq.eu", "ddog-gov.com", + "us2.ddog-gov.com", }, }, "subdomain": { @@ -370,6 +374,7 @@ func NewConfiguration() *Configuration { "ap2.datadoghq.com", "datadoghq.eu", "ddog-gov.com", + "us2.ddog-gov.com", }, }, "subdomain": { @@ -875,8 +880,6 @@ func NewConfiguration() *Configuration { "v2.DeleteOrgGroupPolicyOverride": false, "v2.GetOrgGroup": false, "v2.GetOrgGroupMembership": false, - "v2.GetOrgGroupPolicy": false, - "v2.GetOrgGroupPolicyOverride": false, "v2.ListOrgGroupMemberships": false, "v2.ListOrgGroupPolicies": false, "v2.ListOrgGroupPolicyConfigs": false, diff --git a/api/datadogV2/api_key_management.go b/api/datadogV2/api_key_management.go index aa913b42fb0..af65ee57388 100644 --- a/api/datadogV2/api_key_management.go +++ b/api/datadogV2/api_key_management.go @@ -753,7 +753,7 @@ func (a *KeyManagementApi) GetCurrentUserApplicationKey(ctx _context.Context, ap // GetPersonalAccessToken Get a personal access token. // Get a specific personal access token by its UUID. -func (a *KeyManagementApi) GetPersonalAccessToken(ctx _context.Context, patId string) (PersonalAccessTokenResponse, *_nethttp.Response, error) { +func (a *KeyManagementApi) GetPersonalAccessToken(ctx _context.Context, patUuid string) (PersonalAccessTokenResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -765,8 +765,8 @@ func (a *KeyManagementApi) GetPersonalAccessToken(ctx _context.Context, patId st return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_id}" - localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, ""))) + localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_uuid}" + localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, ""))) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -1519,7 +1519,7 @@ func (a *KeyManagementApi) ListPersonalAccessTokens(ctx _context.Context, o ...L // RevokePersonalAccessToken Revoke a personal access token. // Revoke a specific personal access token. -func (a *KeyManagementApi) RevokePersonalAccessToken(ctx _context.Context, patId string) (*_nethttp.Response, error) { +func (a *KeyManagementApi) RevokePersonalAccessToken(ctx _context.Context, patUuid string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -1530,8 +1530,8 @@ func (a *KeyManagementApi) RevokePersonalAccessToken(ctx _context.Context, patId return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_id}" - localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, ""))) + localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_uuid}" + localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, ""))) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -1831,7 +1831,7 @@ func (a *KeyManagementApi) UpdateCurrentUserApplicationKey(ctx _context.Context, // UpdatePersonalAccessToken Update a personal access token. // Update a specific personal access token. -func (a *KeyManagementApi) UpdatePersonalAccessToken(ctx _context.Context, patId string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) { +func (a *KeyManagementApi) UpdatePersonalAccessToken(ctx _context.Context, patUuid string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -1843,8 +1843,8 @@ func (a *KeyManagementApi) UpdatePersonalAccessToken(ctx _context.Context, patId return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_id}" - localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, ""))) + localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_uuid}" + localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, ""))) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/api/datadogV2/api_org_groups.go b/api/datadogV2/api_org_groups.go index 94c720f3116..c9cf0509896 100644 --- a/api/datadogV2/api_org_groups.go +++ b/api/datadogV2/api_org_groups.go @@ -860,198 +860,6 @@ func (a *OrgGroupsApi) GetOrgGroupMembership(ctx _context.Context, orgGroupMembe return localVarReturnValue, localVarHTTPResponse, nil } -// GetOrgGroupPolicy Get an org group policy. -// Get a specific organization group policy by its ID. -func (a *OrgGroupsApi) GetOrgGroupPolicy(ctx _context.Context, orgGroupPolicyId uuid.UUID) (OrgGroupPolicyResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarReturnValue OrgGroupPolicyResponse - ) - - operationId := "v2.GetOrgGroupPolicy" - isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId) - if !isOperationEnabled { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - if isOperationEnabled && a.Client.Cfg.Debug { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.OrgGroupsApi.GetOrgGroupPolicy") - if err != nil { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v2/org_group_policies/{org_group_policy_id}" - localVarPath = datadog.ReplacePathParameter(localVarPath, "{org_group_policy_id}", _neturl.PathEscape(datadog.ParameterToString(orgGroupPolicyId, ""))) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarHeaderParams["Accept"] = "application/json" - - if a.Client.Cfg.DelegatedTokenConfig != nil { - err = datadog.UseDelegatedTokenAuth(ctx, &localVarHeaderParams, a.Client.Cfg.DelegatedTokenConfig) - if err != nil { - return localVarReturnValue, nil, err - } - } else { - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - } - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 { - var v JSONAPIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -// GetOrgGroupPolicyOverride Get an org group policy override. -// Get a specific organization group policy override by its ID. -func (a *OrgGroupsApi) GetOrgGroupPolicyOverride(ctx _context.Context, orgGroupPolicyOverrideId uuid.UUID) (OrgGroupPolicyOverrideResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarReturnValue OrgGroupPolicyOverrideResponse - ) - - operationId := "v2.GetOrgGroupPolicyOverride" - isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId) - if !isOperationEnabled { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - if isOperationEnabled && a.Client.Cfg.Debug { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.OrgGroupsApi.GetOrgGroupPolicyOverride") - if err != nil { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v2/org_group_policy_overrides/{org_group_policy_override_id}" - localVarPath = datadog.ReplacePathParameter(localVarPath, "{org_group_policy_override_id}", _neturl.PathEscape(datadog.ParameterToString(orgGroupPolicyOverrideId, ""))) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarHeaderParams["Accept"] = "application/json" - - if a.Client.Cfg.DelegatedTokenConfig != nil { - err = datadog.UseDelegatedTokenAuth(ctx, &localVarHeaderParams, a.Client.Cfg.DelegatedTokenConfig) - if err != nil { - return localVarReturnValue, nil, err - } - } else { - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - } - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 { - var v JSONAPIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - // ListOrgGroupMembershipsOptionalParameters holds optional parameters for ListOrgGroupMemberships. type ListOrgGroupMembershipsOptionalParameters struct { FilterOrgGroupId *uuid.UUID @@ -1970,7 +1778,7 @@ func (a *OrgGroupsApi) UpdateOrgGroupMembership(ctx _context.Context, orgGroupMe } // UpdateOrgGroupPolicy Update an org group policy. -// Update an existing organization group policy. +// Update the content of an existing organization group policy. func (a *OrgGroupsApi) UpdateOrgGroupPolicy(ctx _context.Context, orgGroupPolicyId uuid.UUID, body OrgGroupPolicyUpdateRequest) (OrgGroupPolicyResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch diff --git a/api/datadogV2/api_service_accounts.go b/api/datadogV2/api_service_accounts.go index 5f906e6e80d..587e515d7e2 100644 --- a/api/datadogV2/api_service_accounts.go +++ b/api/datadogV2/api_service_accounts.go @@ -328,7 +328,7 @@ func (a *ServiceAccountsApi) DeleteServiceAccountApplicationKey(ctx _context.Con // GetServiceAccountAccessToken Get an access token for a service account. // Get a specific access token for a service account by its UUID. -func (a *ServiceAccountsApi) GetServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patId string) (PersonalAccessTokenResponse, *_nethttp.Response, error) { +func (a *ServiceAccountsApi) GetServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patUuid string) (PersonalAccessTokenResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -340,9 +340,9 @@ func (a *ServiceAccountsApi) GetServiceAccountAccessToken(ctx _context.Context, return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}" + localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}" localVarPath = datadog.ReplacePathParameter(localVarPath, "{service_account_id}", _neturl.PathEscape(datadog.ParameterToString(serviceAccountId, ""))) - localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, ""))) + localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, ""))) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -778,7 +778,7 @@ func (a *ServiceAccountsApi) ListServiceAccountApplicationKeys(ctx _context.Cont // RevokeServiceAccountAccessToken Revoke an access token for a service account. // Revoke a specific access token for a service account. -func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patId string) (*_nethttp.Response, error) { +func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patUuid string) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -789,9 +789,9 @@ func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Contex return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}" + localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}" localVarPath = datadog.ReplacePathParameter(localVarPath, "{service_account_id}", _neturl.PathEscape(datadog.ParameterToString(serviceAccountId, ""))) - localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, ""))) + localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, ""))) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -847,7 +847,7 @@ func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Contex // UpdateServiceAccountAccessToken Update an access token for a service account. // Update a specific access token for a service account. -func (a *ServiceAccountsApi) UpdateServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patId string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) { +func (a *ServiceAccountsApi) UpdateServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patUuid string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -859,9 +859,9 @@ func (a *ServiceAccountsApi) UpdateServiceAccountAccessToken(ctx _context.Contex return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}" + localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}" localVarPath = datadog.ReplacePathParameter(localVarPath, "{service_account_id}", _neturl.PathEscape(datadog.ParameterToString(serviceAccountId, ""))) - localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, ""))) + localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, ""))) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/api/datadogV2/doc.go b/api/datadogV2/doc.go index 2837c4b9bc0..27d853a4fc0 100644 --- a/api/datadogV2/doc.go +++ b/api/datadogV2/doc.go @@ -619,8 +619,6 @@ // - [OrgGroupsApi.DeleteOrgGroupPolicyOverride] // - [OrgGroupsApi.GetOrgGroup] // - [OrgGroupsApi.GetOrgGroupMembership] -// - [OrgGroupsApi.GetOrgGroupPolicy] -// - [OrgGroupsApi.GetOrgGroupPolicyOverride] // - [OrgGroupsApi.ListOrgGroupMemberships] // - [OrgGroupsApi.ListOrgGroupPolicies] // - [OrgGroupsApi.ListOrgGroupPolicyConfigs] diff --git a/api/datadogV2/model_full_personal_access_token_attributes.go b/api/datadogV2/model_full_personal_access_token_attributes.go index e3c1b041de3..8a6279eed6b 100644 --- a/api/datadogV2/model_full_personal_access_token_attributes.go +++ b/api/datadogV2/model_full_personal_access_token_attributes.go @@ -12,6 +12,8 @@ import ( // FullPersonalAccessTokenAttributes Attributes of a full personal access token, including the token key. type FullPersonalAccessTokenAttributes struct { + // The alias (short identifier) of the personal access token. + Alias *string `json:"alias,omitempty"` // Creation date of the personal access token. CreatedAt *time.Time `json:"created_at,omitempty"` // Expiration date of the personal access token. @@ -46,6 +48,34 @@ func NewFullPersonalAccessTokenAttributesWithDefaults() *FullPersonalAccessToken return &this } +// GetAlias returns the Alias field value if set, zero value otherwise. +func (o *FullPersonalAccessTokenAttributes) GetAlias() string { + if o == nil || o.Alias == nil { + var ret string + return ret + } + return *o.Alias +} + +// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FullPersonalAccessTokenAttributes) GetAliasOk() (*string, bool) { + if o == nil || o.Alias == nil { + return nil, false + } + return o.Alias, true +} + +// HasAlias returns a boolean if a field has been set. +func (o *FullPersonalAccessTokenAttributes) HasAlias() bool { + return o != nil && o.Alias != nil +} + +// SetAlias gets a reference to the given string and assigns it to the Alias field. +func (o *FullPersonalAccessTokenAttributes) SetAlias(v string) { + o.Alias = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *FullPersonalAccessTokenAttributes) GetCreatedAt() time.Time { if o == nil || o.CreatedAt == nil { @@ -231,6 +261,9 @@ func (o FullPersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + if o.Alias != nil { + toSerialize["alias"] = o.Alias + } if o.CreatedAt != nil { if o.CreatedAt.Nanosecond() == 0 { toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00") @@ -263,6 +296,7 @@ func (o FullPersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *FullPersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Alias *string `json:"alias,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` ExpiresAt datadog.NullableTime `json:"expires_at,omitempty"` Key *string `json:"key,omitempty"` @@ -275,10 +309,11 @@ func (o *FullPersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "expires_at", "key", "name", "public_portion", "scopes"}) + datadog.DeleteKeys(additionalProperties, &[]string{"alias", "created_at", "expires_at", "key", "name", "public_portion", "scopes"}) } else { return err } + o.Alias = all.Alias o.CreatedAt = all.CreatedAt o.ExpiresAt = all.ExpiresAt o.Key = all.Key diff --git a/api/datadogV2/model_org_group_policy_attributes.go b/api/datadogV2/model_org_group_policy_attributes.go index 991bcf818bf..7e8dbbd5985 100644 --- a/api/datadogV2/model_org_group_policy_attributes.go +++ b/api/datadogV2/model_org_group_policy_attributes.go @@ -15,14 +15,12 @@ import ( type OrgGroupPolicyAttributes struct { // The policy content as key-value pairs. Content map[string]interface{} `json:"content,omitempty"` - // The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. - EnforcementTier OrgGroupPolicyEnforcementTier `json:"enforcement_tier"` + // Timestamp when the policy was enforced. + EnforcedAt time.Time `json:"enforced_at"` // Timestamp when the policy was last modified. ModifiedAt time.Time `json:"modified_at"` // The name of the policy. PolicyName string `json:"policy_name"` - // The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - PolicyType OrgGroupPolicyPolicyType `json:"policy_type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -32,12 +30,11 @@ type OrgGroupPolicyAttributes struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewOrgGroupPolicyAttributes(enforcementTier OrgGroupPolicyEnforcementTier, modifiedAt time.Time, policyName string, policyType OrgGroupPolicyPolicyType) *OrgGroupPolicyAttributes { +func NewOrgGroupPolicyAttributes(enforcedAt time.Time, modifiedAt time.Time, policyName string) *OrgGroupPolicyAttributes { this := OrgGroupPolicyAttributes{} - this.EnforcementTier = enforcementTier + this.EnforcedAt = enforcedAt this.ModifiedAt = modifiedAt this.PolicyName = policyName - this.PolicyType = policyType return &this } @@ -46,10 +43,6 @@ func NewOrgGroupPolicyAttributes(enforcementTier OrgGroupPolicyEnforcementTier, // but it doesn't guarantee that properties required by API are set. func NewOrgGroupPolicyAttributesWithDefaults() *OrgGroupPolicyAttributes { this := OrgGroupPolicyAttributes{} - var enforcementTier OrgGroupPolicyEnforcementTier = ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT - this.EnforcementTier = enforcementTier - var policyType OrgGroupPolicyPolicyType = ORGGROUPPOLICYPOLICYTYPE_ORG_CONFIG - this.PolicyType = policyType return &this } @@ -81,27 +74,27 @@ func (o *OrgGroupPolicyAttributes) SetContent(v map[string]interface{}) { o.Content = v } -// GetEnforcementTier returns the EnforcementTier field value. -func (o *OrgGroupPolicyAttributes) GetEnforcementTier() OrgGroupPolicyEnforcementTier { +// GetEnforcedAt returns the EnforcedAt field value. +func (o *OrgGroupPolicyAttributes) GetEnforcedAt() time.Time { if o == nil { - var ret OrgGroupPolicyEnforcementTier + var ret time.Time return ret } - return o.EnforcementTier + return o.EnforcedAt } -// GetEnforcementTierOk returns a tuple with the EnforcementTier field value +// GetEnforcedAtOk returns a tuple with the EnforcedAt field value // and a boolean to check if the value has been set. -func (o *OrgGroupPolicyAttributes) GetEnforcementTierOk() (*OrgGroupPolicyEnforcementTier, bool) { +func (o *OrgGroupPolicyAttributes) GetEnforcedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.EnforcementTier, true + return &o.EnforcedAt, true } -// SetEnforcementTier sets field value. -func (o *OrgGroupPolicyAttributes) SetEnforcementTier(v OrgGroupPolicyEnforcementTier) { - o.EnforcementTier = v +// SetEnforcedAt sets field value. +func (o *OrgGroupPolicyAttributes) SetEnforcedAt(v time.Time) { + o.EnforcedAt = v } // GetModifiedAt returns the ModifiedAt field value. @@ -150,29 +143,6 @@ func (o *OrgGroupPolicyAttributes) SetPolicyName(v string) { o.PolicyName = v } -// GetPolicyType returns the PolicyType field value. -func (o *OrgGroupPolicyAttributes) GetPolicyType() OrgGroupPolicyPolicyType { - if o == nil { - var ret OrgGroupPolicyPolicyType - return ret - } - return o.PolicyType -} - -// GetPolicyTypeOk returns a tuple with the PolicyType field value -// and a boolean to check if the value has been set. -func (o *OrgGroupPolicyAttributes) GetPolicyTypeOk() (*OrgGroupPolicyPolicyType, bool) { - if o == nil { - return nil, false - } - return &o.PolicyType, true -} - -// SetPolicyType sets field value. -func (o *OrgGroupPolicyAttributes) SetPolicyType(v OrgGroupPolicyPolicyType) { - o.PolicyType = v -} - // MarshalJSON serializes the struct using spec logic. func (o OrgGroupPolicyAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -182,14 +152,17 @@ func (o OrgGroupPolicyAttributes) MarshalJSON() ([]byte, error) { if o.Content != nil { toSerialize["content"] = o.Content } - toSerialize["enforcement_tier"] = o.EnforcementTier + if o.EnforcedAt.Nanosecond() == 0 { + toSerialize["enforced_at"] = o.EnforcedAt.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["enforced_at"] = o.EnforcedAt.Format("2006-01-02T15:04:05.000Z07:00") + } if o.ModifiedAt.Nanosecond() == 0 { toSerialize["modified_at"] = o.ModifiedAt.Format("2006-01-02T15:04:05Z07:00") } else { toSerialize["modified_at"] = o.ModifiedAt.Format("2006-01-02T15:04:05.000Z07:00") } toSerialize["policy_name"] = o.PolicyName - toSerialize["policy_type"] = o.PolicyType for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -200,17 +173,16 @@ func (o OrgGroupPolicyAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *OrgGroupPolicyAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Content map[string]interface{} `json:"content,omitempty"` - EnforcementTier *OrgGroupPolicyEnforcementTier `json:"enforcement_tier"` - ModifiedAt *time.Time `json:"modified_at"` - PolicyName *string `json:"policy_name"` - PolicyType *OrgGroupPolicyPolicyType `json:"policy_type"` + Content map[string]interface{} `json:"content,omitempty"` + EnforcedAt *time.Time `json:"enforced_at"` + ModifiedAt *time.Time `json:"modified_at"` + PolicyName *string `json:"policy_name"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } - if all.EnforcementTier == nil { - return fmt.Errorf("required field enforcement_tier missing") + if all.EnforcedAt == nil { + return fmt.Errorf("required field enforced_at missing") } if all.ModifiedAt == nil { return fmt.Errorf("required field modified_at missing") @@ -218,38 +190,20 @@ func (o *OrgGroupPolicyAttributes) UnmarshalJSON(bytes []byte) (err error) { if all.PolicyName == nil { return fmt.Errorf("required field policy_name missing") } - if all.PolicyType == nil { - return fmt.Errorf("required field policy_type missing") - } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"content", "enforcement_tier", "modified_at", "policy_name", "policy_type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"content", "enforced_at", "modified_at", "policy_name"}) } else { return err } - - hasInvalidField := false o.Content = all.Content - if !all.EnforcementTier.IsValid() { - hasInvalidField = true - } else { - o.EnforcementTier = *all.EnforcementTier - } + o.EnforcedAt = *all.EnforcedAt o.ModifiedAt = *all.ModifiedAt o.PolicyName = *all.PolicyName - if !all.PolicyType.IsValid() { - hasInvalidField = true - } else { - o.PolicyType = *all.PolicyType - } if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties } - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - return nil } diff --git a/api/datadogV2/model_org_group_policy_create_attributes.go b/api/datadogV2/model_org_group_policy_create_attributes.go index 6abfed21957..750d72688b7 100644 --- a/api/datadogV2/model_org_group_policy_create_attributes.go +++ b/api/datadogV2/model_org_group_policy_create_attributes.go @@ -10,16 +10,12 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// OrgGroupPolicyCreateAttributes Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. +// OrgGroupPolicyCreateAttributes Attributes for creating an org group policy. type OrgGroupPolicyCreateAttributes struct { // The policy content as key-value pairs. Content map[string]interface{} `json:"content"` - // The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. - EnforcementTier *OrgGroupPolicyEnforcementTier `json:"enforcement_tier,omitempty"` // The name of the policy. PolicyName string `json:"policy_name"` - // The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - PolicyType *OrgGroupPolicyPolicyType `json:"policy_type,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -32,11 +28,7 @@ type OrgGroupPolicyCreateAttributes struct { func NewOrgGroupPolicyCreateAttributes(content map[string]interface{}, policyName string) *OrgGroupPolicyCreateAttributes { this := OrgGroupPolicyCreateAttributes{} this.Content = content - var enforcementTier OrgGroupPolicyEnforcementTier = ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT - this.EnforcementTier = &enforcementTier this.PolicyName = policyName - var policyType OrgGroupPolicyPolicyType = ORGGROUPPOLICYPOLICYTYPE_ORG_CONFIG - this.PolicyType = &policyType return &this } @@ -45,10 +37,6 @@ func NewOrgGroupPolicyCreateAttributes(content map[string]interface{}, policyNam // but it doesn't guarantee that properties required by API are set. func NewOrgGroupPolicyCreateAttributesWithDefaults() *OrgGroupPolicyCreateAttributes { this := OrgGroupPolicyCreateAttributes{} - var enforcementTier OrgGroupPolicyEnforcementTier = ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT - this.EnforcementTier = &enforcementTier - var policyType OrgGroupPolicyPolicyType = ORGGROUPPOLICYPOLICYTYPE_ORG_CONFIG - this.PolicyType = &policyType return &this } @@ -75,34 +63,6 @@ func (o *OrgGroupPolicyCreateAttributes) SetContent(v map[string]interface{}) { o.Content = v } -// GetEnforcementTier returns the EnforcementTier field value if set, zero value otherwise. -func (o *OrgGroupPolicyCreateAttributes) GetEnforcementTier() OrgGroupPolicyEnforcementTier { - if o == nil || o.EnforcementTier == nil { - var ret OrgGroupPolicyEnforcementTier - return ret - } - return *o.EnforcementTier -} - -// GetEnforcementTierOk returns a tuple with the EnforcementTier field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrgGroupPolicyCreateAttributes) GetEnforcementTierOk() (*OrgGroupPolicyEnforcementTier, bool) { - if o == nil || o.EnforcementTier == nil { - return nil, false - } - return o.EnforcementTier, true -} - -// HasEnforcementTier returns a boolean if a field has been set. -func (o *OrgGroupPolicyCreateAttributes) HasEnforcementTier() bool { - return o != nil && o.EnforcementTier != nil -} - -// SetEnforcementTier gets a reference to the given OrgGroupPolicyEnforcementTier and assigns it to the EnforcementTier field. -func (o *OrgGroupPolicyCreateAttributes) SetEnforcementTier(v OrgGroupPolicyEnforcementTier) { - o.EnforcementTier = &v -} - // GetPolicyName returns the PolicyName field value. func (o *OrgGroupPolicyCreateAttributes) GetPolicyName() string { if o == nil { @@ -126,34 +86,6 @@ func (o *OrgGroupPolicyCreateAttributes) SetPolicyName(v string) { o.PolicyName = v } -// GetPolicyType returns the PolicyType field value if set, zero value otherwise. -func (o *OrgGroupPolicyCreateAttributes) GetPolicyType() OrgGroupPolicyPolicyType { - if o == nil || o.PolicyType == nil { - var ret OrgGroupPolicyPolicyType - return ret - } - return *o.PolicyType -} - -// GetPolicyTypeOk returns a tuple with the PolicyType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrgGroupPolicyCreateAttributes) GetPolicyTypeOk() (*OrgGroupPolicyPolicyType, bool) { - if o == nil || o.PolicyType == nil { - return nil, false - } - return o.PolicyType, true -} - -// HasPolicyType returns a boolean if a field has been set. -func (o *OrgGroupPolicyCreateAttributes) HasPolicyType() bool { - return o != nil && o.PolicyType != nil -} - -// SetPolicyType gets a reference to the given OrgGroupPolicyPolicyType and assigns it to the PolicyType field. -func (o *OrgGroupPolicyCreateAttributes) SetPolicyType(v OrgGroupPolicyPolicyType) { - o.PolicyType = &v -} - // MarshalJSON serializes the struct using spec logic. func (o OrgGroupPolicyCreateAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -161,13 +93,7 @@ func (o OrgGroupPolicyCreateAttributes) MarshalJSON() ([]byte, error) { return datadog.Marshal(o.UnparsedObject) } toSerialize["content"] = o.Content - if o.EnforcementTier != nil { - toSerialize["enforcement_tier"] = o.EnforcementTier - } toSerialize["policy_name"] = o.PolicyName - if o.PolicyType != nil { - toSerialize["policy_type"] = o.PolicyType - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -178,10 +104,8 @@ func (o OrgGroupPolicyCreateAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *OrgGroupPolicyCreateAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Content *map[string]interface{} `json:"content"` - EnforcementTier *OrgGroupPolicyEnforcementTier `json:"enforcement_tier,omitempty"` - PolicyName *string `json:"policy_name"` - PolicyType *OrgGroupPolicyPolicyType `json:"policy_type,omitempty"` + Content *map[string]interface{} `json:"content"` + PolicyName *string `json:"policy_name"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) @@ -194,32 +118,16 @@ func (o *OrgGroupPolicyCreateAttributes) UnmarshalJSON(bytes []byte) (err error) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"content", "enforcement_tier", "policy_name", "policy_type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"content", "policy_name"}) } else { return err } - - hasInvalidField := false o.Content = *all.Content - if all.EnforcementTier != nil && !all.EnforcementTier.IsValid() { - hasInvalidField = true - } else { - o.EnforcementTier = all.EnforcementTier - } o.PolicyName = *all.PolicyName - if all.PolicyType != nil && !all.PolicyType.IsValid() { - hasInvalidField = true - } else { - o.PolicyType = all.PolicyType - } if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties } - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - return nil } diff --git a/api/datadogV2/model_org_group_policy_create_data.go b/api/datadogV2/model_org_group_policy_create_data.go index 0cacd6cdb3f..17c95127d1c 100644 --- a/api/datadogV2/model_org_group_policy_create_data.go +++ b/api/datadogV2/model_org_group_policy_create_data.go @@ -12,7 +12,7 @@ import ( // OrgGroupPolicyCreateData Data for creating an org group policy. type OrgGroupPolicyCreateData struct { - // Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. + // Attributes for creating an org group policy. Attributes OrgGroupPolicyCreateAttributes `json:"attributes"` // Relationships for creating a policy. Relationships OrgGroupPolicyCreateRelationships `json:"relationships"` diff --git a/api/datadogV2/model_org_group_policy_enforcement_tier.go b/api/datadogV2/model_org_group_policy_enforcement_tier.go deleted file mode 100644 index be22bd23928..00000000000 --- a/api/datadogV2/model_org_group_policy_enforcement_tier.go +++ /dev/null @@ -1,68 +0,0 @@ -// 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 datadogV2 - -import ( - "fmt" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// OrgGroupPolicyEnforcementTier The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. -type OrgGroupPolicyEnforcementTier string - -// List of OrgGroupPolicyEnforcementTier. -const ( - ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT OrgGroupPolicyEnforcementTier = "DEFAULT" - ORGGROUPPOLICYENFORCEMENTTIER_ENFORCE OrgGroupPolicyEnforcementTier = "ENFORCE" - ORGGROUPPOLICYENFORCEMENTTIER_DELEGATE OrgGroupPolicyEnforcementTier = "DELEGATE" -) - -var allowedOrgGroupPolicyEnforcementTierEnumValues = []OrgGroupPolicyEnforcementTier{ - ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT, - ORGGROUPPOLICYENFORCEMENTTIER_ENFORCE, - ORGGROUPPOLICYENFORCEMENTTIER_DELEGATE, -} - -// GetAllowedValues reeturns the list of possible values. -func (v *OrgGroupPolicyEnforcementTier) GetAllowedValues() []OrgGroupPolicyEnforcementTier { - return allowedOrgGroupPolicyEnforcementTierEnumValues -} - -// UnmarshalJSON deserializes the given payload. -func (v *OrgGroupPolicyEnforcementTier) UnmarshalJSON(src []byte) error { - var value string - err := datadog.Unmarshal(src, &value) - if err != nil { - return err - } - *v = OrgGroupPolicyEnforcementTier(value) - return nil -} - -// NewOrgGroupPolicyEnforcementTierFromValue returns a pointer to a valid OrgGroupPolicyEnforcementTier -// for the value passed as argument, or an error if the value passed is not allowed by the enum. -func NewOrgGroupPolicyEnforcementTierFromValue(v string) (*OrgGroupPolicyEnforcementTier, error) { - ev := OrgGroupPolicyEnforcementTier(v) - if ev.IsValid() { - return &ev, nil - } - return nil, fmt.Errorf("invalid value '%v' for OrgGroupPolicyEnforcementTier: valid values are %v", v, allowedOrgGroupPolicyEnforcementTierEnumValues) -} - -// IsValid return true if the value is valid for the enum, false otherwise. -func (v OrgGroupPolicyEnforcementTier) IsValid() bool { - for _, existing := range allowedOrgGroupPolicyEnforcementTierEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to OrgGroupPolicyEnforcementTier value. -func (v OrgGroupPolicyEnforcementTier) Ptr() *OrgGroupPolicyEnforcementTier { - return &v -} diff --git a/api/datadogV2/model_org_group_policy_override_update_attributes.go b/api/datadogV2/model_org_group_policy_override_update_attributes.go index 13c1f39dca8..79826362c25 100644 --- a/api/datadogV2/model_org_group_policy_override_update_attributes.go +++ b/api/datadogV2/model_org_group_policy_override_update_attributes.go @@ -12,7 +12,7 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// OrgGroupPolicyOverrideUpdateAttributes Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. +// OrgGroupPolicyOverrideUpdateAttributes Attributes for updating a policy override. type OrgGroupPolicyOverrideUpdateAttributes struct { // The site of the organization. OrgSite string `json:"org_site"` diff --git a/api/datadogV2/model_org_group_policy_override_update_data.go b/api/datadogV2/model_org_group_policy_override_update_data.go index a3d2667eb71..387cda78190 100644 --- a/api/datadogV2/model_org_group_policy_override_update_data.go +++ b/api/datadogV2/model_org_group_policy_override_update_data.go @@ -14,7 +14,7 @@ import ( // OrgGroupPolicyOverrideUpdateData Data for updating a policy override. type OrgGroupPolicyOverrideUpdateData struct { - // Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. + // Attributes for updating a policy override. Attributes OrgGroupPolicyOverrideUpdateAttributes `json:"attributes"` // The ID of the policy override. Id uuid.UUID `json:"id"` diff --git a/api/datadogV2/model_org_group_policy_policy_type.go b/api/datadogV2/model_org_group_policy_policy_type.go deleted file mode 100644 index 347d0a4038c..00000000000 --- a/api/datadogV2/model_org_group_policy_policy_type.go +++ /dev/null @@ -1,64 +0,0 @@ -// 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 datadogV2 - -import ( - "fmt" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// OrgGroupPolicyPolicyType The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. -type OrgGroupPolicyPolicyType string - -// List of OrgGroupPolicyPolicyType. -const ( - ORGGROUPPOLICYPOLICYTYPE_ORG_CONFIG OrgGroupPolicyPolicyType = "org_config" -) - -var allowedOrgGroupPolicyPolicyTypeEnumValues = []OrgGroupPolicyPolicyType{ - ORGGROUPPOLICYPOLICYTYPE_ORG_CONFIG, -} - -// GetAllowedValues reeturns the list of possible values. -func (v *OrgGroupPolicyPolicyType) GetAllowedValues() []OrgGroupPolicyPolicyType { - return allowedOrgGroupPolicyPolicyTypeEnumValues -} - -// UnmarshalJSON deserializes the given payload. -func (v *OrgGroupPolicyPolicyType) UnmarshalJSON(src []byte) error { - var value string - err := datadog.Unmarshal(src, &value) - if err != nil { - return err - } - *v = OrgGroupPolicyPolicyType(value) - return nil -} - -// NewOrgGroupPolicyPolicyTypeFromValue returns a pointer to a valid OrgGroupPolicyPolicyType -// for the value passed as argument, or an error if the value passed is not allowed by the enum. -func NewOrgGroupPolicyPolicyTypeFromValue(v string) (*OrgGroupPolicyPolicyType, error) { - ev := OrgGroupPolicyPolicyType(v) - if ev.IsValid() { - return &ev, nil - } - return nil, fmt.Errorf("invalid value '%v' for OrgGroupPolicyPolicyType: valid values are %v", v, allowedOrgGroupPolicyPolicyTypeEnumValues) -} - -// IsValid return true if the value is valid for the enum, false otherwise. -func (v OrgGroupPolicyPolicyType) IsValid() bool { - for _, existing := range allowedOrgGroupPolicyPolicyTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to OrgGroupPolicyPolicyType value. -func (v OrgGroupPolicyPolicyType) Ptr() *OrgGroupPolicyPolicyType { - return &v -} diff --git a/api/datadogV2/model_org_group_policy_update_attributes.go b/api/datadogV2/model_org_group_policy_update_attributes.go index 7435909b3d5..834e6e129f7 100644 --- a/api/datadogV2/model_org_group_policy_update_attributes.go +++ b/api/datadogV2/model_org_group_policy_update_attributes.go @@ -12,8 +12,6 @@ import ( type OrgGroupPolicyUpdateAttributes struct { // The policy content as key-value pairs. Content map[string]interface{} `json:"content,omitempty"` - // The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. - EnforcementTier *OrgGroupPolicyEnforcementTier `json:"enforcement_tier,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -25,8 +23,6 @@ type OrgGroupPolicyUpdateAttributes struct { // will change when the set of required properties is changed. func NewOrgGroupPolicyUpdateAttributes() *OrgGroupPolicyUpdateAttributes { this := OrgGroupPolicyUpdateAttributes{} - var enforcementTier OrgGroupPolicyEnforcementTier = ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT - this.EnforcementTier = &enforcementTier return &this } @@ -35,8 +31,6 @@ func NewOrgGroupPolicyUpdateAttributes() *OrgGroupPolicyUpdateAttributes { // but it doesn't guarantee that properties required by API are set. func NewOrgGroupPolicyUpdateAttributesWithDefaults() *OrgGroupPolicyUpdateAttributes { this := OrgGroupPolicyUpdateAttributes{} - var enforcementTier OrgGroupPolicyEnforcementTier = ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT - this.EnforcementTier = &enforcementTier return &this } @@ -68,34 +62,6 @@ func (o *OrgGroupPolicyUpdateAttributes) SetContent(v map[string]interface{}) { o.Content = v } -// GetEnforcementTier returns the EnforcementTier field value if set, zero value otherwise. -func (o *OrgGroupPolicyUpdateAttributes) GetEnforcementTier() OrgGroupPolicyEnforcementTier { - if o == nil || o.EnforcementTier == nil { - var ret OrgGroupPolicyEnforcementTier - return ret - } - return *o.EnforcementTier -} - -// GetEnforcementTierOk returns a tuple with the EnforcementTier field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrgGroupPolicyUpdateAttributes) GetEnforcementTierOk() (*OrgGroupPolicyEnforcementTier, bool) { - if o == nil || o.EnforcementTier == nil { - return nil, false - } - return o.EnforcementTier, true -} - -// HasEnforcementTier returns a boolean if a field has been set. -func (o *OrgGroupPolicyUpdateAttributes) HasEnforcementTier() bool { - return o != nil && o.EnforcementTier != nil -} - -// SetEnforcementTier gets a reference to the given OrgGroupPolicyEnforcementTier and assigns it to the EnforcementTier field. -func (o *OrgGroupPolicyUpdateAttributes) SetEnforcementTier(v OrgGroupPolicyEnforcementTier) { - o.EnforcementTier = &v -} - // MarshalJSON serializes the struct using spec logic. func (o OrgGroupPolicyUpdateAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -105,9 +71,6 @@ func (o OrgGroupPolicyUpdateAttributes) MarshalJSON() ([]byte, error) { if o.Content != nil { toSerialize["content"] = o.Content } - if o.EnforcementTier != nil { - toSerialize["enforcement_tier"] = o.EnforcementTier - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -118,34 +81,22 @@ func (o OrgGroupPolicyUpdateAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *OrgGroupPolicyUpdateAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Content map[string]interface{} `json:"content,omitempty"` - EnforcementTier *OrgGroupPolicyEnforcementTier `json:"enforcement_tier,omitempty"` + Content map[string]interface{} `json:"content,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"content", "enforcement_tier"}) + datadog.DeleteKeys(additionalProperties, &[]string{"content"}) } else { return err } - - hasInvalidField := false o.Content = all.Content - if all.EnforcementTier != nil && !all.EnforcementTier.IsValid() { - hasInvalidField = true - } else { - o.EnforcementTier = all.EnforcementTier - } if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties } - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - return nil } diff --git a/api/datadogV2/model_personal_access_token_attributes.go b/api/datadogV2/model_personal_access_token_attributes.go index cbc6c6a5765..e0177090627 100644 --- a/api/datadogV2/model_personal_access_token_attributes.go +++ b/api/datadogV2/model_personal_access_token_attributes.go @@ -12,6 +12,8 @@ import ( // PersonalAccessTokenAttributes Attributes of a personal access token. type PersonalAccessTokenAttributes struct { + // The alias (short identifier) of the personal access token. + Alias *string `json:"alias,omitempty"` // Creation date of the personal access token. CreatedAt *time.Time `json:"created_at,omitempty"` // Expiration date of the personal access token. @@ -48,6 +50,34 @@ func NewPersonalAccessTokenAttributesWithDefaults() *PersonalAccessTokenAttribut return &this } +// GetAlias returns the Alias field value if set, zero value otherwise. +func (o *PersonalAccessTokenAttributes) GetAlias() string { + if o == nil || o.Alias == nil { + var ret string + return ret + } + return *o.Alias +} + +// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonalAccessTokenAttributes) GetAliasOk() (*string, bool) { + if o == nil || o.Alias == nil { + return nil, false + } + return o.Alias, true +} + +// HasAlias returns a boolean if a field has been set. +func (o *PersonalAccessTokenAttributes) HasAlias() bool { + return o != nil && o.Alias != nil +} + +// SetAlias gets a reference to the given string and assigns it to the Alias field. +func (o *PersonalAccessTokenAttributes) SetAlias(v string) { + o.Alias = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *PersonalAccessTokenAttributes) GetCreatedAt() time.Time { if o == nil || o.CreatedAt == nil { @@ -283,6 +313,9 @@ func (o PersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + if o.Alias != nil { + toSerialize["alias"] = o.Alias + } if o.CreatedAt != nil { if o.CreatedAt.Nanosecond() == 0 { toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00") @@ -318,6 +351,7 @@ func (o PersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *PersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Alias *string `json:"alias,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` ExpiresAt datadog.NullableTime `json:"expires_at,omitempty"` LastUsedAt datadog.NullableTime `json:"last_used_at,omitempty"` @@ -331,10 +365,11 @@ func (o *PersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err error) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "expires_at", "last_used_at", "modified_at", "name", "public_portion", "scopes"}) + datadog.DeleteKeys(additionalProperties, &[]string{"alias", "created_at", "expires_at", "last_used_at", "modified_at", "name", "public_portion", "scopes"}) } else { return err } + o.Alias = all.Alias o.CreatedAt = all.CreatedAt o.ExpiresAt = all.ExpiresAt o.LastUsedAt = all.LastUsedAt diff --git a/api/datadogV2/model_user_attributes.go b/api/datadogV2/model_user_attributes.go index ca100381561..bf1de98afac 100644 --- a/api/datadogV2/model_user_attributes.go +++ b/api/datadogV2/model_user_attributes.go @@ -36,8 +36,6 @@ type UserAttributes struct { Status *string `json:"status,omitempty"` // Title of the user. Title datadog.NullableString `json:"title,omitempty"` - // UUID of the user. - Uuid *string `json:"uuid,omitempty"` // Whether the user is verified. Verified *bool `json:"verified,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -431,34 +429,6 @@ func (o *UserAttributes) UnsetTitle() { o.Title.Unset() } -// GetUuid returns the Uuid field value if set, zero value otherwise. -func (o *UserAttributes) GetUuid() string { - if o == nil || o.Uuid == nil { - var ret string - return ret - } - return *o.Uuid -} - -// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UserAttributes) GetUuidOk() (*string, bool) { - if o == nil || o.Uuid == nil { - return nil, false - } - return o.Uuid, true -} - -// HasUuid returns a boolean if a field has been set. -func (o *UserAttributes) HasUuid() bool { - return o != nil && o.Uuid != nil -} - -// SetUuid gets a reference to the given string and assigns it to the Uuid field. -func (o *UserAttributes) SetUuid(v string) { - o.Uuid = &v -} - // GetVerified returns the Verified field value if set, zero value otherwise. func (o *UserAttributes) GetVerified() bool { if o == nil || o.Verified == nil { @@ -537,9 +507,6 @@ func (o UserAttributes) MarshalJSON() ([]byte, error) { if o.Title.IsSet() { toSerialize["title"] = o.Title.Get() } - if o.Uuid != nil { - toSerialize["uuid"] = o.Uuid - } if o.Verified != nil { toSerialize["verified"] = o.Verified } @@ -565,7 +532,6 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) { ServiceAccount *bool `json:"service_account,omitempty"` Status *string `json:"status,omitempty"` Title datadog.NullableString `json:"title,omitempty"` - Uuid *string `json:"uuid,omitempty"` Verified *bool `json:"verified,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { @@ -573,7 +539,7 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "disabled", "email", "handle", "icon", "last_login_time", "mfa_enabled", "modified_at", "name", "service_account", "status", "title", "uuid", "verified"}) + datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "disabled", "email", "handle", "icon", "last_login_time", "mfa_enabled", "modified_at", "name", "service_account", "status", "title", "verified"}) } else { return err } @@ -589,7 +555,6 @@ func (o *UserAttributes) UnmarshalJSON(bytes []byte) (err error) { o.ServiceAccount = all.ServiceAccount o.Status = all.Status o.Title = all.Title - o.Uuid = all.Uuid o.Verified = all.Verified if len(additionalProperties) > 0 { diff --git a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.go b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.go index 10a0c578460..6dce74c1774 100644 --- a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.go +++ b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.go @@ -19,7 +19,7 @@ func main() { Attributes: datadogV2.OrgGroupMembershipBulkUpdateAttributes{ Orgs: []datadogV2.GlobalOrgIdentifier{ { - OrgSite: "us1", + OrgSite: "datadoghq.com", OrgUuid: uuid.MustParse("c3d4e5f6-a7b8-9012-cdef-012345678901"), }, }, diff --git a/examples/v2/org-groups/CreateOrgGroupPolicy.go b/examples/v2/org-groups/CreateOrgGroupPolicy.go index 629d0a7b6d1..0636dd5fc10 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicy.go +++ b/examples/v2/org-groups/CreateOrgGroupPolicy.go @@ -20,9 +20,7 @@ func main() { Content: map[string]interface{}{ "value": "UTC", }, - EnforcementTier: datadogV2.ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT.Ptr(), - PolicyName: "monitor_timezone", - PolicyType: datadogV2.ORGGROUPPOLICYPOLICYTYPE_ORG_CONFIG.Ptr(), + PolicyName: "monitor_timezone", }, Relationships: datadogV2.OrgGroupPolicyCreateRelationships{ OrgGroup: datadogV2.OrgGroupRelationshipToOne{ diff --git a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.go b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.go index 3c11e16ba52..025656732b4 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.go +++ b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.go @@ -17,7 +17,7 @@ func main() { body := datadogV2.OrgGroupPolicyOverrideCreateRequest{ Data: datadogV2.OrgGroupPolicyOverrideCreateData{ Attributes: datadogV2.OrgGroupPolicyOverrideCreateAttributes{ - OrgSite: "us1", + OrgSite: "datadoghq.com", OrgUuid: uuid.MustParse("c3d4e5f6-a7b8-9012-cdef-012345678901"), }, Relationships: datadogV2.OrgGroupPolicyOverrideCreateRelationships{ diff --git a/examples/v2/org-groups/GetOrgGroupPolicy.go b/examples/v2/org-groups/GetOrgGroupPolicy.go deleted file mode 100644 index 93bcc2447ec..00000000000 --- a/examples/v2/org-groups/GetOrgGroupPolicy.go +++ /dev/null @@ -1,31 +0,0 @@ -// Get an org group policy returns "OK" response - -package main - -import ( - "context" - "encoding/json" - "fmt" - "os" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" - "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" - "github.com/google/uuid" -) - -func main() { - ctx := datadog.NewDefaultContext(context.Background()) - configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v2.GetOrgGroupPolicy", true) - apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewOrgGroupsApi(apiClient) - resp, r, err := api.GetOrgGroupPolicy(ctx, uuid.MustParse("1a2b3c4d-5e6f-7890-abcd-ef0123456789")) - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrgGroupsApi.GetOrgGroupPolicy`: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - - responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `OrgGroupsApi.GetOrgGroupPolicy`:\n%s\n", responseContent) -} diff --git a/examples/v2/org-groups/GetOrgGroupPolicyOverride.go b/examples/v2/org-groups/GetOrgGroupPolicyOverride.go deleted file mode 100644 index f97bb267ba4..00000000000 --- a/examples/v2/org-groups/GetOrgGroupPolicyOverride.go +++ /dev/null @@ -1,31 +0,0 @@ -// Get an org group policy override returns "OK" response - -package main - -import ( - "context" - "encoding/json" - "fmt" - "os" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" - "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" - "github.com/google/uuid" -) - -func main() { - ctx := datadog.NewDefaultContext(context.Background()) - configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v2.GetOrgGroupPolicyOverride", true) - apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewOrgGroupsApi(apiClient) - resp, r, err := api.GetOrgGroupPolicyOverride(ctx, uuid.MustParse("9f8e7d6c-5b4a-3210-fedc-ba0987654321")) - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrgGroupsApi.GetOrgGroupPolicyOverride`: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - - responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `OrgGroupsApi.GetOrgGroupPolicyOverride`:\n%s\n", responseContent) -} diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicy.go b/examples/v2/org-groups/UpdateOrgGroupPolicy.go index 8e368f5dbce..07ae331e69a 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicy.go +++ b/examples/v2/org-groups/UpdateOrgGroupPolicy.go @@ -20,7 +20,6 @@ func main() { Content: map[string]interface{}{ "value": "UTC", }, - EnforcementTier: datadogV2.ORGGROUPPOLICYENFORCEMENTTIER_DEFAULT.Ptr(), }, Id: uuid.MustParse("1a2b3c4d-5e6f-7890-abcd-ef0123456789"), Type: datadogV2.ORGGROUPPOLICYTYPE_ORG_GROUP_POLICIES, diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.go b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.go index 3d43d9b4856..1f8bbeef01b 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.go +++ b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.go @@ -17,7 +17,7 @@ func main() { body := datadogV2.OrgGroupPolicyOverrideUpdateRequest{ Data: datadogV2.OrgGroupPolicyOverrideUpdateData{ Attributes: datadogV2.OrgGroupPolicyOverrideUpdateAttributes{ - OrgSite: "us1", + OrgSite: "datadoghq.com", OrgUuid: uuid.MustParse("c3d4e5f6-a7b8-9012-cdef-012345678901"), }, Id: uuid.MustParse("9f8e7d6c-5b4a-3210-fedc-ba0987654321"), diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.freeze index 7ccf87f4bd5..b457d0ec92c 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.freeze @@ -1 +1 @@ -2026-04-16T20:03:06.304Z \ No newline at end of file +2026-04-03T21:02:56.793Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.yaml index 724b272974c..6d2f1538644 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Create_an_access_token_for_a_service_account_returns_Created_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} + {"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/service_accounts response: - body: '{"data":{"type":"users","id":"498cce13-39cf-11f1-9928-be1871753dee","attributes":{"uuid":"498cce13-39cf-11f1-9928-be1871753dee","name":null,"handle":"498cce13-39cf-11f1-9928-be1871753dee","created_at":"2026-04-16T20:03:08.017467+00:00","modified_at":"2026-04-16T20:03:08.017467+00:00","email":"test-create_an_access_token_for_a_service_account_returns_created_response-1776369786@datadoghq.com","icon":"https://secure.gravatar.com/avatar/ed167ebfacd06c99ea70d4c121f5a7f1?s=48&d=retro","title":"user + body: '{"data":{"type":"users","id":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:02:56.980609+00:00","modified_at":"2026-04-03T21:02:56.980609+00:00","email":"test-create_an_access_token_for_a_service_account_returns_created_response-1775250176@datadoghq.com","icon":"https://secure.gravatar.com/avatar/1a703b50769c96d7b84a5470f474ef74?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} + {"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} form: {} headers: Accept: @@ -33,9 +33,9 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/service_accounts/498cce13-39cf-11f1-9928-be1871753dee/access_tokens + url: https://api.datadoghq.com/api/v2/service_accounts/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: - body: '{"data":{"id":"88337232-8552-4495-987c-1cfed567d461","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:08.381725456Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","public_portion":"ddpat_490SyfYQqhqnr008BTjQWn","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"498cce13-39cf-11f1-9928-be1871753dee","type":"users"}}}}}' + body: '{"data":{"id":"6f2491f5-8c3f-45a3-962a-5f769b95e806","type":"personal_access_tokens","attributes":{"alias":"3NirNJ5Y2qB4Fmac8B4wnm","created_at":"2026-04-03T21:02:57.288351972Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","public_portion":"3NirNJ5Y2qB4Fmac8B4wnm","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' code: 201 duration: 0ms headers: @@ -50,7 +50,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/service_accounts/498cce13-39cf-11f1-9928-be1871753dee/access_tokens/88337232-8552-4495-987c-1cfed567d461 + url: https://api.datadoghq.com/api/v2/service_accounts/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0/access_tokens/6f2491f5-8c3f-45a3-962a-5f769b95e806 response: body: '' code: 204 @@ -65,7 +65,7 @@ interactions: - '*/*' id: 3 method: DELETE - url: https://api.datadoghq.com/api/v2/users/498cce13-39cf-11f1-9928-be1871753dee + url: https://api.datadoghq.com/api/v2/users/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.freeze index 767a9f9c250..55c4828532c 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.freeze @@ -1 +1 @@ -2026-04-16T20:03:09.123Z \ No newline at end of file +2026-04-03T21:03:03.500Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.yaml index 73e2532377d..436e00a25c0 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Get_an_access_token_for_a_service_account_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} + {"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/service_accounts response: - body: '{"data":{"type":"users","id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","attributes":{"uuid":"4a56376d-39cf-11f1-9a29-2eb65349fc01","name":null,"handle":"4a56376d-39cf-11f1-9a29-2eb65349fc01","created_at":"2026-04-16T20:03:09.337439+00:00","modified_at":"2026-04-16T20:03:09.337439+00:00","email":"test-get_an_access_token_for_a_service_account_returns_ok_response-1776369789@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7473377b9dced0689feddb50f5d82d29?s=48&d=retro","title":"user + body: '{"data":{"type":"users","id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:03.714879+00:00","modified_at":"2026-04-03T21:03:03.714879+00:00","email":"test-get_an_access_token_for_a_service_account_returns_ok_response-1775250183@datadoghq.com","icon":"https://secure.gravatar.com/avatar/bb3c6df0d99066bbe05cf7dff99b5561?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} + {"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} form: {} headers: Accept: @@ -33,9 +33,9 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens + url: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: - body: '{"data":{"id":"b84d8c2c-b88c-4f72-82ef-fc09dddd1153","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:09.695802251Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","public_portion":"ddpat_5bm1hhcTKQzH22hPiJgkEN","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","type":"users"}}}}}' + body: '{"data":{"id":"f2362958-1e67-414b-985d-d3196afd9315","type":"personal_access_tokens","attributes":{"alias":"7N2tUOwxIjSF8QziOBIpVd","created_at":"2026-04-03T21:03:04.002376467Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","public_portion":"7N2tUOwxIjSF8QziOBIpVd","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' code: 201 duration: 0ms headers: @@ -50,9 +50,9 @@ interactions: - application/json id: 2 method: GET - url: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens/b84d8c2c-b88c-4f72-82ef-fc09dddd1153 + url: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens/f2362958-1e67-414b-985d-d3196afd9315 response: - body: '{"data":{"id":"b84d8c2c-b88c-4f72-82ef-fc09dddd1153","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:09.695802Z","expires_at":null,"last_used_at":null,"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","public_portion":"ddpat_5bm1hhcTKQzH22hPiJgkEN","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","type":"users"}}}}}' + body: '{"data":{"id":"f2362958-1e67-414b-985d-d3196afd9315","type":"personal_access_tokens","attributes":{"alias":"7N2tUOwxIjSF8QziOBIpVd","created_at":"2026-04-03T21:03:04.002376Z","expires_at":null,"last_used_at":null,"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","public_portion":"7N2tUOwxIjSF8QziOBIpVd","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' code: 200 duration: 0ms headers: @@ -67,7 +67,7 @@ interactions: - '*/*' id: 3 method: DELETE - url: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens/b84d8c2c-b88c-4f72-82ef-fc09dddd1153 + url: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens/f2362958-1e67-414b-985d-d3196afd9315 response: body: '' code: 204 @@ -82,7 +82,7 @@ interactions: - '*/*' id: 4 method: DELETE - url: https://api.datadoghq.com/api/v2/users/4a56376d-39cf-11f1-9a29-2eb65349fc01 + url: https://api.datadoghq.com/api/v2/users/8161ef90-2fa0-11f1-991f-62f4bfc595d0 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.freeze index db15643c3b7..6234af8a3e4 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.freeze @@ -1 +1 @@ -2026-04-16T20:03:10.610Z \ No newline at end of file +2026-04-03T21:03:09.026Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.yaml index 2efdce4ef32..499e160a9bc 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_List_access_tokens_for_a_service_account_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1776369790@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} + {"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1775250189@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} form: {} headers: Accept: @@ -12,10 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/service_accounts response: - body: '{"data":{"type":"users","id":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","attributes":{"uuid":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","name":null,"handle":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","created_at":"2026-04-16T20:03:10.837056+00:00","modified_at":"2026-04-16T20:03:10.837056+00:00","email":"test-list_access_tokens_for_a_service_account_returns_ok_response-1776369790@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0a5772e4c2381e3c1061e55142e2281a?s=48&d=retro","title":"user - title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' + body: '{"data":{"type":"users","id":"84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7","attributes":{"name":null,"handle":"84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7","created_at":"2026-04-03T21:03:09.205232+00:00","modified_at":"2026-04-03T21:03:09.205232+00:00","email":"test-list_access_tokens_for_a_service_account_returns_ok_response-1775250189@datadoghq.com","icon":"https://secure.gravatar.com/avatar/816e106f74328dd4c20e98c116a9edeb?s=48&d=retro","title":"user + title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}' code: 201 duration: 0ms headers: @@ -30,7 +28,7 @@ interactions: - application/json id: 1 method: GET - url: https://api.datadoghq.com/api/v2/service_accounts/4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens + url: https://api.datadoghq.com/api/v2/service_accounts/84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7/access_tokens response: body: '{"data":[],"meta":{"page":{"total_filtered_count":0}}}' code: 200 @@ -47,7 +45,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/users/4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4 + url: https://api.datadoghq.com/api/v2/users/84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.freeze index 4a8602fd913..fa38ba91a95 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.freeze @@ -1 +1 @@ -2026-04-16T20:03:12.932Z \ No newline at end of file +2026-04-03T21:03:10.520Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.yaml index 61c4a96697a..bd62e41dca8 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Revoke_an_access_token_for_a_service_account_returns_No_Content_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} + {"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/service_accounts response: - body: '{"data":{"type":"users","id":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","attributes":{"uuid":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","name":null,"handle":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","created_at":"2026-04-16T20:03:13.136998+00:00","modified_at":"2026-04-16T20:03:13.136998+00:00","email":"test-revoke_an_access_token_for_a_service_account_returns_no_content_response-1776369792@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7586d09a6a08e32a963f425a34463a4d?s=48&d=retro","title":"user + body: '{"data":{"type":"users","id":"860878b5-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"860878b5-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:11.517157+00:00","modified_at":"2026-04-03T21:03:11.517157+00:00","email":"test-revoke_an_access_token_for_a_service_account_returns_no_content_response-1775250190@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7d18813f3cbc71a5e46b1184fc3ad8fb?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} + {"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} form: {} headers: Accept: @@ -33,9 +33,9 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens + url: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: - body: '{"data":{"id":"a5b5e3c3-2b58-448b-a1b1-5c97f16837a6","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:13.505344652Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","public_portion":"ddpat_52grBIAi4zKGY0uxhjLVVW","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","type":"users"}}}}}' + body: '{"data":{"id":"7346d75b-83f3-48ba-9186-899fc80bce16","type":"personal_access_tokens","attributes":{"alias":"3VWUVmuRsjFIKue2Uq9ii6","created_at":"2026-04-03T21:03:11.782016283Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","public_portion":"3VWUVmuRsjFIKue2Uq9ii6","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"860878b5-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' code: 201 duration: 0ms headers: @@ -50,7 +50,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens/a5b5e3c3-2b58-448b-a1b1-5c97f16837a6 + url: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens/7346d75b-83f3-48ba-9186-899fc80bce16 response: body: '' code: 204 @@ -65,7 +65,7 @@ interactions: - '*/*' id: 3 method: DELETE - url: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens/a5b5e3c3-2b58-448b-a1b1-5c97f16837a6 + url: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens/7346d75b-83f3-48ba-9186-899fc80bce16 response: body: '' code: 204 @@ -80,7 +80,7 @@ interactions: - '*/*' id: 4 method: DELETE - url: https://api.datadoghq.com/api/v2/users/4c99fbee-39cf-11f1-beb2-cad70c641dfa + url: https://api.datadoghq.com/api/v2/users/860878b5-2fa0-11f1-991f-62f4bfc595d0 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.freeze index 58278ff6c0f..6a894d59da1 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.freeze @@ -1 +1 @@ -2026-04-16T20:03:14.527Z \ No newline at end of file +2026-04-03T21:03:12.499Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.yaml index 076b078d281..863ff33c1b9 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Service_Accounts/Scenario_Update_an_access_token_for_a_service_account_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} + {"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/service_accounts response: - body: '{"data":{"type":"users","id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","attributes":{"uuid":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","name":null,"handle":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","created_at":"2026-04-16T20:03:14.742691+00:00","modified_at":"2026-04-16T20:03:14.742691+00:00","email":"test-update_an_access_token_for_a_service_account_returns_ok_response-1776369794@datadoghq.com","icon":"https://secure.gravatar.com/avatar/05aacae415f13819561258b03c973881?s=48&d=retro","title":"user + body: '{"data":{"type":"users","id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:12.706435+00:00","modified_at":"2026-04-03T21:03:12.706435+00:00","email":"test-update_an_access_token_for_a_service_account_returns_ok_response-1775250192@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8ef25c203ebdbe5e11acb74bd99ba7da?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} + {"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","scopes":["dashboards_read"]},"type":"personal_access_tokens"}} form: {} headers: Accept: @@ -33,9 +33,9 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens + url: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: - body: '{"data":{"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:15.138533237Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxx","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","public_portion":"ddpat_79OZ2nUHcB3McO399ZaVVt","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","type":"users"}}}}}' + body: '{"data":{"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens","attributes":{"alias":"4hW0tyOpjf5Dj84mZaXqwe","created_at":"2026-04-03T21:03:12.978132411Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxXxxx_xxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","public_portion":"4hW0tyOpjf5Dj84mZaXqwe","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' code: 201 duration: 0ms headers: @@ -44,7 +44,7 @@ interactions: status: 201 Created - request: body: | - {"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794-updated"},"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens"}} + {"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192-updated"},"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens"}} form: {} headers: Accept: @@ -53,9 +53,9 @@ interactions: - application/json id: 2 method: PATCH - url: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens/eafa3dd9-430d-4075-a183-63171c7f3de5 + url: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens/9a7d27cc-4969-4a57-990c-03c23a9f2adc response: - body: '{"data":{"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:15.138533Z","expires_at":null,"last_used_at":null,"modified_at":"2026-04-16T20:03:15.375809Z","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794-updated","public_portion":"ddpat_79OZ2nUHcB3McO399ZaVVt","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","type":"users"}}}}}' + body: '{"data":{"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens","attributes":{"alias":"4hW0tyOpjf5Dj84mZaXqwe","created_at":"2026-04-03T21:03:12.978132Z","expires_at":null,"last_used_at":null,"modified_at":"2026-04-03T21:03:13.152078Z","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192-updated","public_portion":"4hW0tyOpjf5Dj84mZaXqwe","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' code: 200 duration: 0ms headers: @@ -70,7 +70,7 @@ interactions: - '*/*' id: 3 method: DELETE - url: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens/eafa3dd9-430d-4075-a183-63171c7f3de5 + url: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens/9a7d27cc-4969-4a57-990c-03c23a9f2adc response: body: '' code: 204 @@ -85,7 +85,7 @@ interactions: - '*/*' id: 4 method: DELETE - url: https://api.datadoghq.com/api/v2/users/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4 + url: https://api.datadoghq.com/api/v2/users/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0 response: body: '' code: 204 diff --git a/tests/scenarios/features/v2/key_management.feature b/tests/scenarios/features/v2/key_management.feature index 365c53ed7c2..6c464845562 100644 --- a/tests/scenarios/features/v2/key_management.feature +++ b/tests/scenarios/features/v2/key_management.feature @@ -221,7 +221,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get a personal access token returns "Not Found" response Given new "GetPersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -229,7 +229,7 @@ Feature: Key Management Scenario: Get a personal access token returns "OK" response Given there is a valid "personal_access_token" in the system And new "GetPersonalAccessToken" request - And request contains "pat_id" parameter from "personal_access_token.data.id" + And request contains "pat_uuid" parameter from "personal_access_token.data.id" When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "personal_access_tokens" @@ -355,21 +355,21 @@ Feature: Key Management Scenario: Revoke a personal access token returns "No Content" response Given there is a valid "personal_access_token" in the system And new "RevokePersonalAccessToken" request - And request contains "pat_id" parameter from "personal_access_token.data.id" + And request contains "pat_uuid" parameter from "personal_access_token.data.id" When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/credentials-management Scenario: Revoke a personal access token returns "Not Found" response Given new "RevokePersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Bad Request" response Given new "UpdatePersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 400 Bad Request @@ -377,7 +377,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Not Found" response Given new "UpdatePersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 404 Not Found @@ -386,7 +386,7 @@ Feature: Key Management Scenario: Update a personal access token returns "OK" response Given there is a valid "personal_access_token" in the system And new "UpdatePersonalAccessToken" request - And request contains "pat_id" parameter from "personal_access_token.data.id" + And request contains "pat_uuid" parameter from "personal_access_token.data.id" And body with value {"data": {"type": "personal_access_tokens", "id": "{{ personal_access_token.data.id }}", "attributes": {"name": "{{ unique }}-updated"}}} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/org_groups.feature b/tests/scenarios/features/v2/org_groups.feature index b8c5fe1b61d..73cce63cd8e 100644 --- a/tests/scenarios/features/v2/org_groups.feature +++ b/tests/scenarios/features/v2/org_groups.feature @@ -12,7 +12,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "Bad Request" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 400 Bad Request @@ -20,7 +20,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "Not Found" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 404 Not Found @@ -28,7 +28,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "OK" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 200 OK @@ -36,7 +36,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Bad Request" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 400 Bad Request @@ -44,7 +44,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Conflict" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 409 Conflict @@ -52,7 +52,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Created" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 201 Created @@ -60,7 +60,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Bad Request" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -68,7 +68,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Conflict" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 409 Conflict @@ -76,7 +76,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Created" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 201 Created @@ -200,54 +200,6 @@ Feature: Org Groups When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy override returns "Bad Request" response - Given operation "GetOrgGroupPolicyOverride" enabled - And new "GetOrgGroupPolicyOverride" request - And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy override returns "Not Found" response - Given operation "GetOrgGroupPolicyOverride" enabled - And new "GetOrgGroupPolicyOverride" request - And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy override returns "OK" response - Given operation "GetOrgGroupPolicyOverride" enabled - And new "GetOrgGroupPolicyOverride" request - And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy returns "Bad Request" response - Given operation "GetOrgGroupPolicy" enabled - And new "GetOrgGroupPolicy" request - And request contains "org_group_policy_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy returns "Not Found" response - Given operation "GetOrgGroupPolicy" enabled - And new "GetOrgGroupPolicy" request - And request contains "org_group_policy_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy returns "OK" response - Given operation "GetOrgGroupPolicy" enabled - And new "GetOrgGroupPolicy" request - And request contains "org_group_policy_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/org-management Scenario: Get an org group returns "Bad Request" response Given operation "GetOrgGroup" enabled @@ -371,7 +323,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 400 Bad Request @@ -380,7 +332,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 404 Not Found @@ -389,7 +341,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 200 OK @@ -398,7 +350,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -407,7 +359,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 404 Not Found @@ -416,7 +368,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/service_accounts.feature b/tests/scenarios/features/v2/service_accounts.feature index fa8c81440e2..25744abc832 100644 --- a/tests/scenarios/features/v2/service_accounts.feature +++ b/tests/scenarios/features/v2/service_accounts.feature @@ -142,7 +142,7 @@ Feature: Service Accounts Scenario: Get an access token for a service account returns "Not Found" response Given new "GetServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -152,7 +152,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "GetServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_id" parameter from "service_account_access_token.data.id" + And request contains "pat_uuid" parameter from "service_account_access_token.data.id" When the request is sent Then the response status is 200 OK And the response "data.attributes.name" has the same value as "service_account_access_token.data.attributes.name" @@ -232,7 +232,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "RevokeServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_id" parameter from "service_account_access_token.data.id" + And request contains "pat_uuid" parameter from "service_account_access_token.data.id" When the request is sent Then the response status is 204 No Content @@ -240,7 +240,7 @@ Feature: Service Accounts Scenario: Revoke an access token for a service account returns "Not Found" response Given new "RevokeServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -248,7 +248,7 @@ Feature: Service Accounts Scenario: Update an access token for a service account returns "Bad Request" response Given new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 400 Bad Request @@ -257,7 +257,7 @@ Feature: Service Accounts Scenario: Update an access token for a service account returns "Not Found" response Given new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 404 Not Found @@ -268,7 +268,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_id" parameter from "service_account_access_token.data.id" + And request contains "pat_uuid" parameter from "service_account_access_token.data.id" And body with value {"data": {"id": "{{ service_account_access_token.data.id }}", "type": "personal_access_tokens", "attributes": {"name": "{{ service_account_access_token.data.attributes.name }}-updated"}}} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index 484b2541ffb..25b2d6b0df1 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -4228,12 +4228,6 @@ "type": "unsafe" } }, - "GetOrgGroupPolicy": { - "tag": "Org Groups", - "undo": { - "type": "safe" - } - }, "UpdateOrgGroupPolicy": { "tag": "Org Groups", "undo": { @@ -4270,12 +4264,6 @@ "type": "unsafe" } }, - "GetOrgGroupPolicyOverride": { - "tag": "Org Groups", - "undo": { - "type": "safe" - } - }, "UpdateOrgGroupPolicyOverride": { "tag": "Org Groups", "undo": { @@ -4336,7 +4324,7 @@ "operationId": "RevokePersonalAccessToken", "parameters": [ { - "name": "pat_id", + "name": "pat_uuid", "source": "data.id" } ], @@ -5901,7 +5889,7 @@ "source": "data.relationships.owned_by.data.id" }, { - "name": "pat_id", + "name": "pat_uuid", "source": "data.id" } ],