diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6..49086bdc75 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4568,6 +4568,15 @@ components: type: string x-enum-varnames: - DEPLOYMENT + AppFavoriteType: + default: favorites + description: The favorite resource type. + enum: + - favorites + example: favorites + type: string + x-enum-varnames: + - FAVORITES AppKeyRegistrationData: description: Data related to the app key registration. properties: @@ -4628,6 +4637,25 @@ components: format: int64 type: integer type: object + AppProtectionLevel: + description: The publication protection level of the app. `approval_required` means changes must go through an approval workflow before being published. + enum: + - direct_publish + - approval_required + example: direct_publish + type: string + x-enum-varnames: + - DIRECT_PUBLISH + - APPROVAL_REQUIRED + AppProtectionLevelType: + default: protectionLevel + description: The protection-level resource type. + enum: + - protectionLevel + example: protectionLevel + type: string + x-enum-varnames: + - PROTECTIONLEVEL AppRelationship: description: The app's publication relationship and custom connections. properties: @@ -4639,6 +4667,24 @@ components: deployment: $ref: "#/components/schemas/DeploymentRelationship" type: object + AppSelfServiceType: + default: selfService + description: The self-service resource type. + enum: + - selfService + example: selfService + type: string + x-enum-varnames: + - SELFSERVICE + AppTagsType: + default: tags + description: The tags resource type. + enum: + - tags + example: tags + type: string + x-enum-varnames: + - TAGS AppTriggerWrapper: description: "Schema for an App-based trigger." properties: @@ -4650,6 +4696,80 @@ components: required: - appTrigger type: object + AppVersion: + description: A version of an app. + properties: + attributes: + $ref: "#/components/schemas/AppVersionAttributes" + id: + description: The ID of the app version. + example: 9e20cbaf-68da-45a6-9ccf-54193ac29fa5 + format: uuid + type: string + type: + $ref: "#/components/schemas/AppVersionType" + type: object + AppVersionAttributes: + description: Attributes describing an app version. + properties: + app_id: + description: The ID of the app this version belongs to. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + format: uuid + type: string + created_at: + description: Timestamp of when the version was created. + format: date-time + type: string + has_ever_been_published: + description: Whether this version has ever been published. + example: true + type: boolean + name: + description: The optional human-readable name of the version. + example: v1.2.0 - bug fix release + type: string + updated_at: + description: Timestamp of when the version was last updated. + format: date-time + type: string + user_id: + description: The ID of the user who created the version. + format: int64 + type: integer + user_name: + description: The name (or email) of the user who created the version. + example: jane.doe@example.com + type: string + user_uuid: + description: The UUID of the user who created the version. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + format: uuid + type: string + version: + description: The version number of the app, starting at 1. + example: 3 + format: int64 + type: integer + type: object + AppVersionNameType: + default: versionNames + description: The version-name resource type. + enum: + - versionNames + example: versionNames + type: string + x-enum-varnames: + - VERSIONNAMES + AppVersionType: + default: appVersions + description: The app-version resource type. + enum: + - appVersions + example: appVersions + type: string + x-enum-varnames: + - APPVERSIONS ApplicationKeyCreateAttributes: description: Attributes used to create an application Key. properties: @@ -17102,6 +17222,40 @@ components: - type - number type: object + CreatePublishRequestRequest: + description: A request to ask for approval to publish an app whose protection level is `approval_required`. + example: + data: + attributes: + description: Adds new dashboard widgets and a few bug fixes. + title: Release v1.2 to production + type: publishRequest + properties: + data: + $ref: "#/components/schemas/CreatePublishRequestRequestData" + type: object + CreatePublishRequestRequestData: + description: Data for creating a publish request. + properties: + attributes: + $ref: "#/components/schemas/CreatePublishRequestRequestDataAttributes" + type: + $ref: "#/components/schemas/PublishRequestType" + type: object + CreatePublishRequestRequestDataAttributes: + description: Attributes for creating a publish request. + properties: + description: + description: An optional description of the changes in this publish request. + example: Adds new dashboard widgets and a few bug fixes. + type: string + title: + description: A short title for the publish request. + example: Release v1.2 to production + type: string + required: + - title + type: object CreateRuleRequest: description: Scorecard create rule request. properties: @@ -40575,6 +40729,17 @@ components: format: int64 type: integer type: object + ListAppVersionsResponse: + description: A paginated list of versions for an app. + properties: + data: + description: The list of app versions. + items: + $ref: "#/components/schemas/AppVersion" + type: array + meta: + $ref: "#/components/schemas/ListAppsResponseMeta" + type: object ListApplicationKeysResponse: description: Response for a list of application keys. properties: @@ -56379,6 +56544,15 @@ components: data: $ref: "#/components/schemas/Deployment" type: object + PublishRequestType: + default: publishRequest + description: The publish-request resource type. + enum: + - publishRequest + example: publishRequest + type: string + x-enum-varnames: + - PUBLISHREQUEST PutAppsDatastoreItemResponseArray: description: Response after successfully inserting multiple items into a datastore, containing the identifiers of the created items. properties: @@ -79669,6 +79843,62 @@ components: data: $ref: "#/components/schemas/ActionConnectionData" type: object + UpdateAppFavoriteRequest: + description: A request to add or remove an app from the current user's favorites. + example: + data: + attributes: + favorite: true + type: favorites + properties: + data: + $ref: "#/components/schemas/UpdateAppFavoriteRequestData" + type: object + UpdateAppFavoriteRequestData: + description: Data for updating an app's favorite status. + properties: + attributes: + $ref: "#/components/schemas/UpdateAppFavoriteRequestDataAttributes" + type: + $ref: "#/components/schemas/AppFavoriteType" + type: object + UpdateAppFavoriteRequestDataAttributes: + description: Attributes for updating an app's favorite status. + properties: + favorite: + description: Whether the app should be marked as a favorite for the current user. + example: true + type: boolean + required: + - favorite + type: object + UpdateAppProtectionLevelRequest: + description: A request to update an app's publication protection level. + example: + data: + attributes: + protectionLevel: approval_required + type: protectionLevel + properties: + data: + $ref: "#/components/schemas/UpdateAppProtectionLevelRequestData" + type: object + UpdateAppProtectionLevelRequestData: + description: Data for updating an app's publication protection level. + properties: + attributes: + $ref: "#/components/schemas/UpdateAppProtectionLevelRequestDataAttributes" + type: + $ref: "#/components/schemas/AppProtectionLevelType" + type: object + UpdateAppProtectionLevelRequestDataAttributes: + description: Attributes for updating an app's publication protection level. + properties: + protectionLevel: + $ref: "#/components/schemas/AppProtectionLevel" + required: + - protectionLevel + type: object UpdateAppRequest: description: A request object for updating an existing app. example: @@ -79828,6 +80058,99 @@ components: type: string type: array type: object + UpdateAppSelfServiceRequest: + description: A request to enable or disable self-service for an app. + example: + data: + attributes: + selfService: true + type: selfService + properties: + data: + $ref: "#/components/schemas/UpdateAppSelfServiceRequestData" + type: object + UpdateAppSelfServiceRequestData: + description: Data for updating an app's self-service status. + properties: + attributes: + $ref: "#/components/schemas/UpdateAppSelfServiceRequestDataAttributes" + type: + $ref: "#/components/schemas/AppSelfServiceType" + type: object + UpdateAppSelfServiceRequestDataAttributes: + description: Attributes for updating an app's self-service status. + properties: + selfService: + description: Whether the app is enabled for self-service. + example: true + type: boolean + required: + - selfService + type: object + UpdateAppTagsRequest: + description: A request to replace the tags on an app. + example: + data: + attributes: + tags: + - team:platform + - service:ops + type: tags + properties: + data: + $ref: "#/components/schemas/UpdateAppTagsRequestData" + type: object + UpdateAppTagsRequestData: + description: Data for replacing an app's tags. + properties: + attributes: + $ref: "#/components/schemas/UpdateAppTagsRequestDataAttributes" + type: + $ref: "#/components/schemas/AppTagsType" + type: object + UpdateAppTagsRequestDataAttributes: + description: Attributes for replacing an app's tags. + properties: + tags: + description: The full list of tags that should be set on the app. Existing tags not present in this list are removed. + example: + - team:platform + - service:ops + items: + type: string + type: array + required: + - tags + type: object + UpdateAppVersionNameRequest: + description: A request to assign a human-readable name to a specific app version. + example: + data: + attributes: + name: v1.2.0 - bug fix release + type: versionNames + properties: + data: + $ref: "#/components/schemas/UpdateAppVersionNameRequestData" + type: object + UpdateAppVersionNameRequestData: + description: Data for naming a specific app version. + properties: + attributes: + $ref: "#/components/schemas/UpdateAppVersionNameRequestDataAttributes" + type: + $ref: "#/components/schemas/AppVersionNameType" + type: object + UpdateAppVersionNameRequestDataAttributes: + description: Attributes for naming a specific app version. + properties: + name: + description: The name to assign to the app version. + example: v1.2.0 - bug fix release + type: string + required: + - name + type: object UpdateAppsDatastoreItemRequest: description: Request to update specific fields on an existing datastore item. properties: @@ -88719,6 +89042,534 @@ paths: operator: OR permissions: - apps_write + "/api/v2/app-builder/apps/{app_id}/favorite": + patch: + description: Add or remove an app from the current user's favorites. Favorited apps can be filtered for using the `filter[favorite]` query parameter on the [List Apps](https://docs.datadoghq.com/api/latest/app-builder/#list-apps) endpoint. + operationId: UpdateAppFavorite + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + favorite: true + type: favorites + schema: + $ref: "#/components/schemas/UpdateAppFavoriteRequest" + required: true + responses: + "200": + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update App Favorite Status + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_run + "/api/v2/app-builder/apps/{app_id}/protection-level": + patch: + description: Update the publication protection level of an app. When set to `approval_required`, future publishes must go through an approval workflow before going live. + operationId: UpdateProtectionLevel + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + protectionLevel: approval_required + type: protectionLevel + schema: + $ref: "#/components/schemas/UpdateAppProtectionLevelRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + components: [] + description: This is a simple example app + favorite: false + name: Example App + queries: [] + rootInstanceName: grid0 + tags: [] + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: appDefinitions + schema: + $ref: "#/components/schemas/UpdateAppResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update App Protection Level + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_write + "/api/v2/app-builder/apps/{app_id}/publish-request": + post: + description: Create a publish request to ask for approval to publish an app whose protection level is `approval_required`. Publishing happens automatically once the request is approved by a user with the appropriate permissions. + operationId: CreatePublishRequest + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Adds new dashboard widgets and a few bug fixes. + title: Release v1.2 to production + type: publishRequest + schema: + $ref: "#/components/schemas/CreatePublishRequestRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + app_version_id: 9e20cbaf-68da-45a6-9ccf-54193ac29fa5 + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + meta: + created_at: "2026-04-01T12:00:00Z" + user_name: jane.doe@example.com + user_uuid: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: deployment + schema: + $ref: "#/components/schemas/PublishAppResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create Publish Request + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_write + "/api/v2/app-builder/apps/{app_id}/revert": + post: + description: Revert an app to a previous version. The version to revert to is selected through the `version` query parameter. The reverted version becomes the new latest version of the app. + operationId: RevertApp + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + - description: The version number of the app to revert to. Cannot be `latest`. The special value `deployed` can be used to revert to the currently published version. + example: "2" + in: query + name: version + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + components: [] + description: This is a simple example app + favorite: false + name: Example App + queries: [] + rootInstanceName: grid0 + tags: [] + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: appDefinitions + schema: + $ref: "#/components/schemas/UpdateAppResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Revert App + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_write + "/api/v2/app-builder/apps/{app_id}/self-service": + patch: + description: Enable or disable self-service for an app. Self-service apps can be discovered and run by users in your organization without explicit access being granted. + operationId: UpdateAppSelfService + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + selfService: true + type: selfService + schema: + $ref: "#/components/schemas/UpdateAppSelfServiceRequest" + required: true + responses: + "200": + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update App Self-Service Status + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_write + "/api/v2/app-builder/apps/{app_id}/tags": + patch: + description: Replace the tags on an app. The provided list overwrites the existing tags entirely; tags not present in the request body are removed. + operationId: UpdateAppTags + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + tags: + - team:platform + - service:ops + type: tags + schema: + $ref: "#/components/schemas/UpdateAppTagsRequest" + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update App Tags + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_write + "/api/v2/app-builder/apps/{app_id}/version-name": + patch: + description: Assign a human-readable name to a specific version of an app. The version is selected through the `version` query parameter. + operationId: UpdateAppVersionName + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + - description: The version number of the app to name. The special values `latest` and `deployed` can also be used to target the latest or currently published version. + example: "3" + in: query + name: version + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: v1.2.0 - bug fix release + type: versionNames + schema: + $ref: "#/components/schemas/UpdateAppVersionNameRequest" + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Name App Version + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_write + "/api/v2/app-builder/apps/{app_id}/versions": + get: + description: List the versions of an app. This endpoint is paginated. + operationId: ListAppVersions + parameters: + - description: The ID of the app. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: app_id + required: true + schema: + format: uuid + type: string + - description: The number of versions to return per page. + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The page number to return. + in: query + name: page + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + app_id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + created_at: "2026-04-01T12:00:00Z" + has_ever_been_published: true + name: v1.2.0 - bug fix release + updated_at: "2026-04-01T12:00:00Z" + user_name: jane.doe@example.com + user_uuid: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + version: 3 + id: 9e20cbaf-68da-45a6-9ccf-54193ac29fa5 + type: appVersions + meta: + page: + totalCount: 1 + schema: + $ref: "#/components/schemas/ListAppVersionsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List App Versions + tags: + - App Builder + "x-permission": + operator: AND + permissions: + - apps_run + - connections_read /api/v2/application_keys: get: description: List all application keys available for your org diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index a897eca3b3..b0f2f83613 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -781,6 +781,13 @@ datadog\_api\_client.v2.model.app\_deployment\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.app\_favorite\_type module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_favorite_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.app\_key\_registration\_data module ----------------------------------------------------------------- @@ -802,6 +809,20 @@ datadog\_api\_client.v2.model.app\_meta module :members: :show-inheritance: +datadog\_api\_client.v2.model.app\_protection\_level module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_protection_level + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.app\_protection\_level\_type module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_protection_level_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.app\_relationship module ------------------------------------------------------ @@ -809,6 +830,20 @@ datadog\_api\_client.v2.model.app\_relationship module :members: :show-inheritance: +datadog\_api\_client.v2.model.app\_self\_service\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_self_service_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.app\_tags\_type module +---------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_tags_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.app\_trigger\_wrapper module ---------------------------------------------------------- @@ -816,6 +851,27 @@ datadog\_api\_client.v2.model.app\_trigger\_wrapper module :members: :show-inheritance: +datadog\_api\_client.v2.model.app\_version\_attributes module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_version_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.app\_version\_name\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_version_name_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.app\_version\_type module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.app_version_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.application\_key\_create\_attributes module ------------------------------------------------------------------------- @@ -6920,6 +6976,27 @@ datadog\_api\_client.v2.model.create\_phone\_notification\_channel\_config modul :members: :show-inheritance: +datadog\_api\_client.v2.model.create\_publish\_request\_request module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_publish_request_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_publish\_request\_request\_data module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_publish_request_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_publish\_request\_request\_data\_attributes module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_publish_request_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.create\_rule\_request module ---------------------------------------------------------- @@ -16419,6 +16496,13 @@ datadog\_api\_client.v2.model.list\_app\_key\_registrations\_response\_meta modu :members: :show-inheritance: +datadog\_api\_client.v2.model.list\_app\_versions\_response module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.list_app_versions_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.list\_application\_keys\_response module ---------------------------------------------------------------------- @@ -24861,6 +24945,13 @@ datadog\_api\_client.v2.model.publish\_app\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.publish\_request\_type module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.publish_request_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.put\_apps\_datastore\_item\_response\_array module -------------------------------------------------------------------------------- @@ -35207,6 +35298,48 @@ datadog\_api\_client.v2.model.update\_action\_connection\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.update\_app\_favorite\_request module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_favorite_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_favorite\_request\_data module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_favorite_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_favorite\_request\_data\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_favorite_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_protection\_level\_request module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_protection_level_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_protection\_level\_request\_data module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_protection_level_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_protection\_level\_request\_data\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_protection_level_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.update\_app\_request module --------------------------------------------------------- @@ -35249,6 +35382,69 @@ datadog\_api\_client.v2.model.update\_app\_response\_data\_attributes module :members: :show-inheritance: +datadog\_api\_client.v2.model.update\_app\_self\_service\_request module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_app_self_service_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_self\_service\_request\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_app_self_service_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_self\_service\_request\_data\_attributes module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_app_self_service_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_tags\_request module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_tags_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_tags\_request\_data module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_tags_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_tags\_request\_data\_attributes module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_app_tags_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_version\_name\_request module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_app_version_name_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_version\_name\_request\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_app_version_name_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_app\_version\_name\_request\_data\_attributes module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_app_version_name_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.update\_apps\_datastore\_item\_request module --------------------------------------------------------------------------- diff --git a/examples/v2/app-builder/CreatePublishRequest.py b/examples/v2/app-builder/CreatePublishRequest.py new file mode 100644 index 0000000000..53012889b7 --- /dev/null +++ b/examples/v2/app-builder/CreatePublishRequest.py @@ -0,0 +1,30 @@ +""" +Create Publish Request returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from datadog_api_client.v2.model.create_publish_request_request import CreatePublishRequestRequest +from datadog_api_client.v2.model.create_publish_request_request_data import CreatePublishRequestRequestData +from datadog_api_client.v2.model.create_publish_request_request_data_attributes import ( + CreatePublishRequestRequestDataAttributes, +) +from datadog_api_client.v2.model.publish_request_type import PublishRequestType +from uuid import UUID + +body = CreatePublishRequestRequest( + data=CreatePublishRequestRequestData( + attributes=CreatePublishRequestRequestDataAttributes( + description="Adds new dashboard widgets and a few bug fixes.", + title="Release v1.2 to production", + ), + type=PublishRequestType.PUBLISHREQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + response = api_instance.create_publish_request(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body) + + print(response) diff --git a/examples/v2/app-builder/ListAppVersions.py b/examples/v2/app-builder/ListAppVersions.py new file mode 100644 index 0000000000..984b9f327d --- /dev/null +++ b/examples/v2/app-builder/ListAppVersions.py @@ -0,0 +1,16 @@ +""" +List App Versions returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from uuid import UUID + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + response = api_instance.list_app_versions( + app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + ) + + print(response) diff --git a/examples/v2/app-builder/RevertApp.py b/examples/v2/app-builder/RevertApp.py new file mode 100644 index 0000000000..ee975115a5 --- /dev/null +++ b/examples/v2/app-builder/RevertApp.py @@ -0,0 +1,17 @@ +""" +Revert App returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from uuid import UUID + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + response = api_instance.revert_app( + app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + version="version", + ) + + print(response) diff --git a/examples/v2/app-builder/UpdateAppFavorite.py b/examples/v2/app-builder/UpdateAppFavorite.py new file mode 100644 index 0000000000..28e99bcce4 --- /dev/null +++ b/examples/v2/app-builder/UpdateAppFavorite.py @@ -0,0 +1,27 @@ +""" +Update App Favorite Status returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from datadog_api_client.v2.model.app_favorite_type import AppFavoriteType +from datadog_api_client.v2.model.update_app_favorite_request import UpdateAppFavoriteRequest +from datadog_api_client.v2.model.update_app_favorite_request_data import UpdateAppFavoriteRequestData +from datadog_api_client.v2.model.update_app_favorite_request_data_attributes import ( + UpdateAppFavoriteRequestDataAttributes, +) +from uuid import UUID + +body = UpdateAppFavoriteRequest( + data=UpdateAppFavoriteRequestData( + attributes=UpdateAppFavoriteRequestDataAttributes( + favorite=True, + ), + type=AppFavoriteType.FAVORITES, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + api_instance.update_app_favorite(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body) diff --git a/examples/v2/app-builder/UpdateAppSelfService.py b/examples/v2/app-builder/UpdateAppSelfService.py new file mode 100644 index 0000000000..41b6f65c83 --- /dev/null +++ b/examples/v2/app-builder/UpdateAppSelfService.py @@ -0,0 +1,27 @@ +""" +Update App Self-Service Status returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from datadog_api_client.v2.model.app_self_service_type import AppSelfServiceType +from datadog_api_client.v2.model.update_app_self_service_request import UpdateAppSelfServiceRequest +from datadog_api_client.v2.model.update_app_self_service_request_data import UpdateAppSelfServiceRequestData +from datadog_api_client.v2.model.update_app_self_service_request_data_attributes import ( + UpdateAppSelfServiceRequestDataAttributes, +) +from uuid import UUID + +body = UpdateAppSelfServiceRequest( + data=UpdateAppSelfServiceRequestData( + attributes=UpdateAppSelfServiceRequestDataAttributes( + self_service=True, + ), + type=AppSelfServiceType.SELFSERVICE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + api_instance.update_app_self_service(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body) diff --git a/examples/v2/app-builder/UpdateAppTags.py b/examples/v2/app-builder/UpdateAppTags.py new file mode 100644 index 0000000000..f17a84daf0 --- /dev/null +++ b/examples/v2/app-builder/UpdateAppTags.py @@ -0,0 +1,28 @@ +""" +Update App Tags returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from datadog_api_client.v2.model.app_tags_type import AppTagsType +from datadog_api_client.v2.model.update_app_tags_request import UpdateAppTagsRequest +from datadog_api_client.v2.model.update_app_tags_request_data import UpdateAppTagsRequestData +from datadog_api_client.v2.model.update_app_tags_request_data_attributes import UpdateAppTagsRequestDataAttributes +from uuid import UUID + +body = UpdateAppTagsRequest( + data=UpdateAppTagsRequestData( + attributes=UpdateAppTagsRequestDataAttributes( + tags=[ + "team:platform", + "service:ops", + ], + ), + type=AppTagsType.TAGS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + api_instance.update_app_tags(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body) diff --git a/examples/v2/app-builder/UpdateAppVersionName.py b/examples/v2/app-builder/UpdateAppVersionName.py new file mode 100644 index 0000000000..24810d300d --- /dev/null +++ b/examples/v2/app-builder/UpdateAppVersionName.py @@ -0,0 +1,29 @@ +""" +Name App Version returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from datadog_api_client.v2.model.app_version_name_type import AppVersionNameType +from datadog_api_client.v2.model.update_app_version_name_request import UpdateAppVersionNameRequest +from datadog_api_client.v2.model.update_app_version_name_request_data import UpdateAppVersionNameRequestData +from datadog_api_client.v2.model.update_app_version_name_request_data_attributes import ( + UpdateAppVersionNameRequestDataAttributes, +) +from uuid import UUID + +body = UpdateAppVersionNameRequest( + data=UpdateAppVersionNameRequestData( + attributes=UpdateAppVersionNameRequestDataAttributes( + name="v1.2.0 - bug fix release", + ), + type=AppVersionNameType.VERSIONNAMES, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + api_instance.update_app_version_name( + app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), version="version", body=body + ) diff --git a/examples/v2/app-builder/UpdateProtectionLevel.py b/examples/v2/app-builder/UpdateProtectionLevel.py new file mode 100644 index 0000000000..a4962bd9f5 --- /dev/null +++ b/examples/v2/app-builder/UpdateProtectionLevel.py @@ -0,0 +1,30 @@ +""" +Update App Protection Level returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.app_builder_api import AppBuilderApi +from datadog_api_client.v2.model.app_protection_level import AppProtectionLevel +from datadog_api_client.v2.model.app_protection_level_type import AppProtectionLevelType +from datadog_api_client.v2.model.update_app_protection_level_request import UpdateAppProtectionLevelRequest +from datadog_api_client.v2.model.update_app_protection_level_request_data import UpdateAppProtectionLevelRequestData +from datadog_api_client.v2.model.update_app_protection_level_request_data_attributes import ( + UpdateAppProtectionLevelRequestDataAttributes, +) +from uuid import UUID + +body = UpdateAppProtectionLevelRequest( + data=UpdateAppProtectionLevelRequestData( + attributes=UpdateAppProtectionLevelRequestDataAttributes( + protection_level=AppProtectionLevel.APPROVAL_REQUIRED, + ), + type=AppProtectionLevelType.PROTECTIONLEVEL, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AppBuilderApi(api_client) + response = api_instance.update_protection_level(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/app_builder_api.py b/src/datadog_api_client/v2/api/app_builder_api.py index 1cf38f0b68..416927e549 100644 --- a/src/datadog_api_client/v2/api/app_builder_api.py +++ b/src/datadog_api_client/v2/api/app_builder_api.py @@ -24,6 +24,13 @@ from datadog_api_client.v2.model.update_app_request import UpdateAppRequest from datadog_api_client.v2.model.unpublish_app_response import UnpublishAppResponse from datadog_api_client.v2.model.publish_app_response import PublishAppResponse +from datadog_api_client.v2.model.update_app_favorite_request import UpdateAppFavoriteRequest +from datadog_api_client.v2.model.update_app_protection_level_request import UpdateAppProtectionLevelRequest +from datadog_api_client.v2.model.create_publish_request_request import CreatePublishRequestRequest +from datadog_api_client.v2.model.update_app_self_service_request import UpdateAppSelfServiceRequest +from datadog_api_client.v2.model.update_app_tags_request import UpdateAppTagsRequest +from datadog_api_client.v2.model.update_app_version_name_request import UpdateAppVersionNameRequest +from datadog_api_client.v2.model.list_app_versions_response import ListAppVersionsResponse class AppBuilderApi: @@ -56,6 +63,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_publish_request_endpoint = _Endpoint( + settings={ + "response_type": (PublishAppResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/publish-request", + "operation_id": "create_publish_request", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (CreatePublishRequestRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._delete_app_endpoint = _Endpoint( settings={ "response_type": (DeleteAppResponse,), @@ -200,6 +233,39 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_app_versions_endpoint = _Endpoint( + settings={ + "response_type": (ListAppVersionsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/versions", + "operation_id": "list_app_versions", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "limit": { + "openapi_types": (int,), + "attribute": "limit", + "location": "query", + }, + "page": { + "openapi_types": (int,), + "attribute": "page", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._publish_app_endpoint = _Endpoint( settings={ "response_type": (PublishAppResponse,), @@ -223,6 +289,35 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._revert_app_endpoint = _Endpoint( + settings={ + "response_type": (UpdateAppResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/revert", + "operation_id": "revert_app", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "version": { + "required": True, + "openapi_types": (str,), + "attribute": "version", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._unpublish_app_endpoint = _Endpoint( settings={ "response_type": (UnpublishAppResponse,), @@ -272,6 +367,142 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_app_favorite_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/favorite", + "operation_id": "update_app_favorite", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (UpdateAppFavoriteRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._update_app_self_service_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/self-service", + "operation_id": "update_app_self_service", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (UpdateAppSelfServiceRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._update_app_tags_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/tags", + "operation_id": "update_app_tags", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (UpdateAppTagsRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._update_app_version_name_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/version-name", + "operation_id": "update_app_version_name", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "version": { + "required": True, + "openapi_types": (str,), + "attribute": "version", + "location": "query", + }, + "body": { + "required": True, + "openapi_types": (UpdateAppVersionNameRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._update_protection_level_endpoint = _Endpoint( + settings={ + "response_type": (UpdateAppResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/protection-level", + "operation_id": "update_protection_level", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "app_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (UpdateAppProtectionLevelRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + def create_app( self, body: CreateAppRequest, @@ -288,6 +519,27 @@ def create_app( return self._create_app_endpoint.call_with_http_info(**kwargs) + def create_publish_request( + self, + app_id: UUID, + body: CreatePublishRequestRequest, + ) -> PublishAppResponse: + """Create Publish Request. + + Create a publish request to ask for approval to publish an app whose protection level is ``approval_required``. Publishing happens automatically once the request is approved by a user with the appropriate permissions. + + :param app_id: The ID of the app. + :type app_id: UUID + :type body: CreatePublishRequestRequest + :rtype: PublishAppResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["body"] = body + + return self._create_publish_request_endpoint.call_with_http_info(**kwargs) + def delete_app( self, app_id: UUID, @@ -424,6 +676,36 @@ def list_apps( return self._list_apps_endpoint.call_with_http_info(**kwargs) + def list_app_versions( + self, + app_id: UUID, + *, + limit: Union[int, UnsetType] = unset, + page: Union[int, UnsetType] = unset, + ) -> ListAppVersionsResponse: + """List App Versions. + + List the versions of an app. This endpoint is paginated. + + :param app_id: The ID of the app. + :type app_id: UUID + :param limit: The number of versions to return per page. + :type limit: int, optional + :param page: The page number to return. + :type page: int, optional + :rtype: ListAppVersionsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + if limit is not unset: + kwargs["limit"] = limit + + if page is not unset: + kwargs["page"] = page + + return self._list_app_versions_endpoint.call_with_http_info(**kwargs) + def publish_app( self, app_id: UUID, @@ -441,6 +723,28 @@ def publish_app( return self._publish_app_endpoint.call_with_http_info(**kwargs) + def revert_app( + self, + app_id: UUID, + version: str, + ) -> UpdateAppResponse: + """Revert App. + + Revert an app to a previous version. The version to revert to is selected through the ``version`` query parameter. The reverted version becomes the new latest version of the app. + + :param app_id: The ID of the app. + :type app_id: UUID + :param version: The version number of the app to revert to. Cannot be ``latest``. The special value ``deployed`` can be used to revert to the currently published version. + :type version: str + :rtype: UpdateAppResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["version"] = version + + return self._revert_app_endpoint.call_with_http_info(**kwargs) + def unpublish_app( self, app_id: UUID, @@ -478,3 +782,113 @@ def update_app( kwargs["body"] = body return self._update_app_endpoint.call_with_http_info(**kwargs) + + def update_app_favorite( + self, + app_id: UUID, + body: UpdateAppFavoriteRequest, + ) -> None: + """Update App Favorite Status. + + Add or remove an app from the current user's favorites. Favorited apps can be filtered for using the ``filter[favorite]`` query parameter on the `List Apps `_ endpoint. + + :param app_id: The ID of the app. + :type app_id: UUID + :type body: UpdateAppFavoriteRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["body"] = body + + return self._update_app_favorite_endpoint.call_with_http_info(**kwargs) + + def update_app_self_service( + self, + app_id: UUID, + body: UpdateAppSelfServiceRequest, + ) -> None: + """Update App Self-Service Status. + + Enable or disable self-service for an app. Self-service apps can be discovered and run by users in your organization without explicit access being granted. + + :param app_id: The ID of the app. + :type app_id: UUID + :type body: UpdateAppSelfServiceRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["body"] = body + + return self._update_app_self_service_endpoint.call_with_http_info(**kwargs) + + def update_app_tags( + self, + app_id: UUID, + body: UpdateAppTagsRequest, + ) -> None: + """Update App Tags. + + Replace the tags on an app. The provided list overwrites the existing tags entirely; tags not present in the request body are removed. + + :param app_id: The ID of the app. + :type app_id: UUID + :type body: UpdateAppTagsRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["body"] = body + + return self._update_app_tags_endpoint.call_with_http_info(**kwargs) + + def update_app_version_name( + self, + app_id: UUID, + version: str, + body: UpdateAppVersionNameRequest, + ) -> None: + """Name App Version. + + Assign a human-readable name to a specific version of an app. The version is selected through the ``version`` query parameter. + + :param app_id: The ID of the app. + :type app_id: UUID + :param version: The version number of the app to name. The special values ``latest`` and ``deployed`` can also be used to target the latest or currently published version. + :type version: str + :type body: UpdateAppVersionNameRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["version"] = version + + kwargs["body"] = body + + return self._update_app_version_name_endpoint.call_with_http_info(**kwargs) + + def update_protection_level( + self, + app_id: UUID, + body: UpdateAppProtectionLevelRequest, + ) -> UpdateAppResponse: + """Update App Protection Level. + + Update the publication protection level of an app. When set to ``approval_required`` , future publishes must go through an approval workflow before going live. + + :param app_id: The ID of the app. + :type app_id: UUID + :type body: UpdateAppProtectionLevelRequest + :rtype: UpdateAppResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + kwargs["body"] = body + + return self._update_protection_level_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/model/app_favorite_type.py b/src/datadog_api_client/v2/model/app_favorite_type.py new file mode 100644 index 0000000000..54e92d3b58 --- /dev/null +++ b/src/datadog_api_client/v2/model/app_favorite_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppFavoriteType(ModelSimple): + """ + The favorite resource type. + + :param value: If omitted defaults to "favorites". Must be one of ["favorites"]. + :type value: str + """ + + allowed_values = { + "favorites", + } + FAVORITES: ClassVar["AppFavoriteType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppFavoriteType.FAVORITES = AppFavoriteType("favorites") diff --git a/src/datadog_api_client/v2/model/app_protection_level.py b/src/datadog_api_client/v2/model/app_protection_level.py new file mode 100644 index 0000000000..7b6913684a --- /dev/null +++ b/src/datadog_api_client/v2/model/app_protection_level.py @@ -0,0 +1,38 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppProtectionLevel(ModelSimple): + """ + The publication protection level of the app. `approval_required` means changes must go through an approval workflow before being published. + + :param value: Must be one of ["direct_publish", "approval_required"]. + :type value: str + """ + + allowed_values = { + "direct_publish", + "approval_required", + } + DIRECT_PUBLISH: ClassVar["AppProtectionLevel"] + APPROVAL_REQUIRED: ClassVar["AppProtectionLevel"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppProtectionLevel.DIRECT_PUBLISH = AppProtectionLevel("direct_publish") +AppProtectionLevel.APPROVAL_REQUIRED = AppProtectionLevel("approval_required") diff --git a/src/datadog_api_client/v2/model/app_protection_level_type.py b/src/datadog_api_client/v2/model/app_protection_level_type.py new file mode 100644 index 0000000000..fa58cae192 --- /dev/null +++ b/src/datadog_api_client/v2/model/app_protection_level_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppProtectionLevelType(ModelSimple): + """ + The protection-level resource type. + + :param value: If omitted defaults to "protectionLevel". Must be one of ["protectionLevel"]. + :type value: str + """ + + allowed_values = { + "protectionLevel", + } + PROTECTIONLEVEL: ClassVar["AppProtectionLevelType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppProtectionLevelType.PROTECTIONLEVEL = AppProtectionLevelType("protectionLevel") diff --git a/src/datadog_api_client/v2/model/app_self_service_type.py b/src/datadog_api_client/v2/model/app_self_service_type.py new file mode 100644 index 0000000000..a356010995 --- /dev/null +++ b/src/datadog_api_client/v2/model/app_self_service_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppSelfServiceType(ModelSimple): + """ + The self-service resource type. + + :param value: If omitted defaults to "selfService". Must be one of ["selfService"]. + :type value: str + """ + + allowed_values = { + "selfService", + } + SELFSERVICE: ClassVar["AppSelfServiceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppSelfServiceType.SELFSERVICE = AppSelfServiceType("selfService") diff --git a/src/datadog_api_client/v2/model/app_tags_type.py b/src/datadog_api_client/v2/model/app_tags_type.py new file mode 100644 index 0000000000..bea4acdcef --- /dev/null +++ b/src/datadog_api_client/v2/model/app_tags_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppTagsType(ModelSimple): + """ + The tags resource type. + + :param value: If omitted defaults to "tags". Must be one of ["tags"]. + :type value: str + """ + + allowed_values = { + "tags", + } + TAGS: ClassVar["AppTagsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppTagsType.TAGS = AppTagsType("tags") diff --git a/src/datadog_api_client/v2/model/app_version.py b/src/datadog_api_client/v2/model/app_version.py new file mode 100644 index 0000000000..dc80812dfd --- /dev/null +++ b/src/datadog_api_client/v2/model/app_version.py @@ -0,0 +1,65 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.app_version_attributes import AppVersionAttributes + from datadog_api_client.v2.model.app_version_type import AppVersionType + + +class AppVersion(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.app_version_attributes import AppVersionAttributes + from datadog_api_client.v2.model.app_version_type import AppVersionType + + return { + "attributes": (AppVersionAttributes,), + "id": (UUID,), + "type": (AppVersionType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[AppVersionAttributes, UnsetType] = unset, + id: Union[UUID, UnsetType] = unset, + type: Union[AppVersionType, UnsetType] = unset, + **kwargs, + ): + """ + A version of an app. + + :param attributes: Attributes describing an app version. + :type attributes: AppVersionAttributes, optional + + :param id: The ID of the app version. + :type id: UUID, optional + + :param type: The app-version resource type. + :type type: AppVersionType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/app_version_attributes.py b/src/datadog_api_client/v2/model/app_version_attributes.py new file mode 100644 index 0000000000..d1ae11453f --- /dev/null +++ b/src/datadog_api_client/v2/model/app_version_attributes.py @@ -0,0 +1,106 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, + UUID, +) + + +class AppVersionAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "app_id": (UUID,), + "created_at": (datetime,), + "has_ever_been_published": (bool,), + "name": (str,), + "updated_at": (datetime,), + "user_id": (int,), + "user_name": (str,), + "user_uuid": (UUID,), + "version": (int,), + } + + attribute_map = { + "app_id": "app_id", + "created_at": "created_at", + "has_ever_been_published": "has_ever_been_published", + "name": "name", + "updated_at": "updated_at", + "user_id": "user_id", + "user_name": "user_name", + "user_uuid": "user_uuid", + "version": "version", + } + + def __init__( + self_, + app_id: Union[UUID, UnsetType] = unset, + created_at: Union[datetime, UnsetType] = unset, + has_ever_been_published: Union[bool, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + updated_at: Union[datetime, UnsetType] = unset, + user_id: Union[int, UnsetType] = unset, + user_name: Union[str, UnsetType] = unset, + user_uuid: Union[UUID, UnsetType] = unset, + version: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Attributes describing an app version. + + :param app_id: The ID of the app this version belongs to. + :type app_id: UUID, optional + + :param created_at: Timestamp of when the version was created. + :type created_at: datetime, optional + + :param has_ever_been_published: Whether this version has ever been published. + :type has_ever_been_published: bool, optional + + :param name: The optional human-readable name of the version. + :type name: str, optional + + :param updated_at: Timestamp of when the version was last updated. + :type updated_at: datetime, optional + + :param user_id: The ID of the user who created the version. + :type user_id: int, optional + + :param user_name: The name (or email) of the user who created the version. + :type user_name: str, optional + + :param user_uuid: The UUID of the user who created the version. + :type user_uuid: UUID, optional + + :param version: The version number of the app, starting at 1. + :type version: int, optional + """ + if app_id is not unset: + kwargs["app_id"] = app_id + if created_at is not unset: + kwargs["created_at"] = created_at + if has_ever_been_published is not unset: + kwargs["has_ever_been_published"] = has_ever_been_published + if name is not unset: + kwargs["name"] = name + if updated_at is not unset: + kwargs["updated_at"] = updated_at + if user_id is not unset: + kwargs["user_id"] = user_id + if user_name is not unset: + kwargs["user_name"] = user_name + if user_uuid is not unset: + kwargs["user_uuid"] = user_uuid + if version is not unset: + kwargs["version"] = version + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/app_version_name_type.py b/src/datadog_api_client/v2/model/app_version_name_type.py new file mode 100644 index 0000000000..f320e3131f --- /dev/null +++ b/src/datadog_api_client/v2/model/app_version_name_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppVersionNameType(ModelSimple): + """ + The version-name resource type. + + :param value: If omitted defaults to "versionNames". Must be one of ["versionNames"]. + :type value: str + """ + + allowed_values = { + "versionNames", + } + VERSIONNAMES: ClassVar["AppVersionNameType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppVersionNameType.VERSIONNAMES = AppVersionNameType("versionNames") diff --git a/src/datadog_api_client/v2/model/app_version_type.py b/src/datadog_api_client/v2/model/app_version_type.py new file mode 100644 index 0000000000..345e8de8c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/app_version_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AppVersionType(ModelSimple): + """ + The app-version resource type. + + :param value: If omitted defaults to "appVersions". Must be one of ["appVersions"]. + :type value: str + """ + + allowed_values = { + "appVersions", + } + APPVERSIONS: ClassVar["AppVersionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AppVersionType.APPVERSIONS = AppVersionType("appVersions") diff --git a/src/datadog_api_client/v2/model/create_publish_request_request.py b/src/datadog_api_client/v2/model/create_publish_request_request.py new file mode 100644 index 0000000000..eda08b7d88 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_publish_request_request.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_publish_request_request_data import CreatePublishRequestRequestData + + +class CreatePublishRequestRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_publish_request_request_data import CreatePublishRequestRequestData + + return { + "data": (CreatePublishRequestRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreatePublishRequestRequestData, UnsetType] = unset, **kwargs): + """ + A request to ask for approval to publish an app whose protection level is ``approval_required``. + + :param data: Data for creating a publish request. + :type data: CreatePublishRequestRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_publish_request_request_data.py b/src/datadog_api_client/v2/model/create_publish_request_request_data.py new file mode 100644 index 0000000000..42bf11a64b --- /dev/null +++ b/src/datadog_api_client/v2/model/create_publish_request_request_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_publish_request_request_data_attributes import ( + CreatePublishRequestRequestDataAttributes, + ) + from datadog_api_client.v2.model.publish_request_type import PublishRequestType + + +class CreatePublishRequestRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_publish_request_request_data_attributes import ( + CreatePublishRequestRequestDataAttributes, + ) + from datadog_api_client.v2.model.publish_request_type import PublishRequestType + + return { + "attributes": (CreatePublishRequestRequestDataAttributes,), + "type": (PublishRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[CreatePublishRequestRequestDataAttributes, UnsetType] = unset, + type: Union[PublishRequestType, UnsetType] = unset, + **kwargs, + ): + """ + Data for creating a publish request. + + :param attributes: Attributes for creating a publish request. + :type attributes: CreatePublishRequestRequestDataAttributes, optional + + :param type: The publish-request resource type. + :type type: PublishRequestType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_publish_request_request_data_attributes.py b/src/datadog_api_client/v2/model/create_publish_request_request_data_attributes.py new file mode 100644 index 0000000000..ca6fdcb8a6 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_publish_request_request_data_attributes.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class CreatePublishRequestRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "description": (str,), + "title": (str,), + } + + attribute_map = { + "description": "description", + "title": "title", + } + + def __init__(self_, title: str, description: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes for creating a publish request. + + :param description: An optional description of the changes in this publish request. + :type description: str, optional + + :param title: A short title for the publish request. + :type title: str + """ + if description is not unset: + kwargs["description"] = description + super().__init__(kwargs) + + self_.title = title diff --git a/src/datadog_api_client/v2/model/list_app_versions_response.py b/src/datadog_api_client/v2/model/list_app_versions_response.py new file mode 100644 index 0000000000..9d3603046c --- /dev/null +++ b/src/datadog_api_client/v2/model/list_app_versions_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.app_version import AppVersion + from datadog_api_client.v2.model.list_apps_response_meta import ListAppsResponseMeta + + +class ListAppVersionsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.app_version import AppVersion + from datadog_api_client.v2.model.list_apps_response_meta import ListAppsResponseMeta + + return { + "data": ([AppVersion],), + "meta": (ListAppsResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, + data: Union[List[AppVersion], UnsetType] = unset, + meta: Union[ListAppsResponseMeta, UnsetType] = unset, + **kwargs, + ): + """ + A paginated list of versions for an app. + + :param data: The list of app versions. + :type data: [AppVersion], optional + + :param meta: Pagination metadata. + :type meta: ListAppsResponseMeta, optional + """ + if data is not unset: + kwargs["data"] = data + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/publish_request_type.py b/src/datadog_api_client/v2/model/publish_request_type.py new file mode 100644 index 0000000000..8b4d44be28 --- /dev/null +++ b/src/datadog_api_client/v2/model/publish_request_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class PublishRequestType(ModelSimple): + """ + The publish-request resource type. + + :param value: If omitted defaults to "publishRequest". Must be one of ["publishRequest"]. + :type value: str + """ + + allowed_values = { + "publishRequest", + } + PUBLISHREQUEST: ClassVar["PublishRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +PublishRequestType.PUBLISHREQUEST = PublishRequestType("publishRequest") diff --git a/src/datadog_api_client/v2/model/update_app_favorite_request.py b/src/datadog_api_client/v2/model/update_app_favorite_request.py new file mode 100644 index 0000000000..a75cf41236 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_favorite_request.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_favorite_request_data import UpdateAppFavoriteRequestData + + +class UpdateAppFavoriteRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_favorite_request_data import UpdateAppFavoriteRequestData + + return { + "data": (UpdateAppFavoriteRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[UpdateAppFavoriteRequestData, UnsetType] = unset, **kwargs): + """ + A request to add or remove an app from the current user's favorites. + + :param data: Data for updating an app's favorite status. + :type data: UpdateAppFavoriteRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_favorite_request_data.py b/src/datadog_api_client/v2/model/update_app_favorite_request_data.py new file mode 100644 index 0000000000..992c45456e --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_favorite_request_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_favorite_request_data_attributes import ( + UpdateAppFavoriteRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_favorite_type import AppFavoriteType + + +class UpdateAppFavoriteRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_favorite_request_data_attributes import ( + UpdateAppFavoriteRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_favorite_type import AppFavoriteType + + return { + "attributes": (UpdateAppFavoriteRequestDataAttributes,), + "type": (AppFavoriteType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[UpdateAppFavoriteRequestDataAttributes, UnsetType] = unset, + type: Union[AppFavoriteType, UnsetType] = unset, + **kwargs, + ): + """ + Data for updating an app's favorite status. + + :param attributes: Attributes for updating an app's favorite status. + :type attributes: UpdateAppFavoriteRequestDataAttributes, optional + + :param type: The favorite resource type. + :type type: AppFavoriteType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_favorite_request_data_attributes.py b/src/datadog_api_client/v2/model/update_app_favorite_request_data_attributes.py new file mode 100644 index 0000000000..bd592023f1 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_favorite_request_data_attributes.py @@ -0,0 +1,33 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class UpdateAppFavoriteRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "favorite": (bool,), + } + + attribute_map = { + "favorite": "favorite", + } + + def __init__(self_, favorite: bool, **kwargs): + """ + Attributes for updating an app's favorite status. + + :param favorite: Whether the app should be marked as a favorite for the current user. + :type favorite: bool + """ + super().__init__(kwargs) + + self_.favorite = favorite diff --git a/src/datadog_api_client/v2/model/update_app_protection_level_request.py b/src/datadog_api_client/v2/model/update_app_protection_level_request.py new file mode 100644 index 0000000000..d18771c975 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_protection_level_request.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_protection_level_request_data import UpdateAppProtectionLevelRequestData + + +class UpdateAppProtectionLevelRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_protection_level_request_data import ( + UpdateAppProtectionLevelRequestData, + ) + + return { + "data": (UpdateAppProtectionLevelRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[UpdateAppProtectionLevelRequestData, UnsetType] = unset, **kwargs): + """ + A request to update an app's publication protection level. + + :param data: Data for updating an app's publication protection level. + :type data: UpdateAppProtectionLevelRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_protection_level_request_data.py b/src/datadog_api_client/v2/model/update_app_protection_level_request_data.py new file mode 100644 index 0000000000..353775b054 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_protection_level_request_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_protection_level_request_data_attributes import ( + UpdateAppProtectionLevelRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_protection_level_type import AppProtectionLevelType + + +class UpdateAppProtectionLevelRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_protection_level_request_data_attributes import ( + UpdateAppProtectionLevelRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_protection_level_type import AppProtectionLevelType + + return { + "attributes": (UpdateAppProtectionLevelRequestDataAttributes,), + "type": (AppProtectionLevelType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[UpdateAppProtectionLevelRequestDataAttributes, UnsetType] = unset, + type: Union[AppProtectionLevelType, UnsetType] = unset, + **kwargs, + ): + """ + Data for updating an app's publication protection level. + + :param attributes: Attributes for updating an app's publication protection level. + :type attributes: UpdateAppProtectionLevelRequestDataAttributes, optional + + :param type: The protection-level resource type. + :type type: AppProtectionLevelType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_protection_level_request_data_attributes.py b/src/datadog_api_client/v2/model/update_app_protection_level_request_data_attributes.py new file mode 100644 index 0000000000..523f2b584b --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_protection_level_request_data_attributes.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.app_protection_level import AppProtectionLevel + + +class UpdateAppProtectionLevelRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.app_protection_level import AppProtectionLevel + + return { + "protection_level": (AppProtectionLevel,), + } + + attribute_map = { + "protection_level": "protectionLevel", + } + + def __init__(self_, protection_level: AppProtectionLevel, **kwargs): + """ + Attributes for updating an app's publication protection level. + + :param protection_level: The publication protection level of the app. ``approval_required`` means changes must go through an approval workflow before being published. + :type protection_level: AppProtectionLevel + """ + super().__init__(kwargs) + + self_.protection_level = protection_level diff --git a/src/datadog_api_client/v2/model/update_app_self_service_request.py b/src/datadog_api_client/v2/model/update_app_self_service_request.py new file mode 100644 index 0000000000..ccd3601106 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_self_service_request.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_self_service_request_data import UpdateAppSelfServiceRequestData + + +class UpdateAppSelfServiceRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_self_service_request_data import UpdateAppSelfServiceRequestData + + return { + "data": (UpdateAppSelfServiceRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[UpdateAppSelfServiceRequestData, UnsetType] = unset, **kwargs): + """ + A request to enable or disable self-service for an app. + + :param data: Data for updating an app's self-service status. + :type data: UpdateAppSelfServiceRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_self_service_request_data.py b/src/datadog_api_client/v2/model/update_app_self_service_request_data.py new file mode 100644 index 0000000000..5c8c11aea0 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_self_service_request_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_self_service_request_data_attributes import ( + UpdateAppSelfServiceRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_self_service_type import AppSelfServiceType + + +class UpdateAppSelfServiceRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_self_service_request_data_attributes import ( + UpdateAppSelfServiceRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_self_service_type import AppSelfServiceType + + return { + "attributes": (UpdateAppSelfServiceRequestDataAttributes,), + "type": (AppSelfServiceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[UpdateAppSelfServiceRequestDataAttributes, UnsetType] = unset, + type: Union[AppSelfServiceType, UnsetType] = unset, + **kwargs, + ): + """ + Data for updating an app's self-service status. + + :param attributes: Attributes for updating an app's self-service status. + :type attributes: UpdateAppSelfServiceRequestDataAttributes, optional + + :param type: The self-service resource type. + :type type: AppSelfServiceType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_self_service_request_data_attributes.py b/src/datadog_api_client/v2/model/update_app_self_service_request_data_attributes.py new file mode 100644 index 0000000000..0d7b09ecfb --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_self_service_request_data_attributes.py @@ -0,0 +1,33 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class UpdateAppSelfServiceRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "self_service": (bool,), + } + + attribute_map = { + "self_service": "selfService", + } + + def __init__(self_, self_service: bool, **kwargs): + """ + Attributes for updating an app's self-service status. + + :param self_service: Whether the app is enabled for self-service. + :type self_service: bool + """ + super().__init__(kwargs) + + self_.self_service = self_service diff --git a/src/datadog_api_client/v2/model/update_app_tags_request.py b/src/datadog_api_client/v2/model/update_app_tags_request.py new file mode 100644 index 0000000000..3f9c68ab79 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_tags_request.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_tags_request_data import UpdateAppTagsRequestData + + +class UpdateAppTagsRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_tags_request_data import UpdateAppTagsRequestData + + return { + "data": (UpdateAppTagsRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[UpdateAppTagsRequestData, UnsetType] = unset, **kwargs): + """ + A request to replace the tags on an app. + + :param data: Data for replacing an app's tags. + :type data: UpdateAppTagsRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_tags_request_data.py b/src/datadog_api_client/v2/model/update_app_tags_request_data.py new file mode 100644 index 0000000000..ced08372f6 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_tags_request_data.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_tags_request_data_attributes import UpdateAppTagsRequestDataAttributes + from datadog_api_client.v2.model.app_tags_type import AppTagsType + + +class UpdateAppTagsRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_tags_request_data_attributes import ( + UpdateAppTagsRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_tags_type import AppTagsType + + return { + "attributes": (UpdateAppTagsRequestDataAttributes,), + "type": (AppTagsType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[UpdateAppTagsRequestDataAttributes, UnsetType] = unset, + type: Union[AppTagsType, UnsetType] = unset, + **kwargs, + ): + """ + Data for replacing an app's tags. + + :param attributes: Attributes for replacing an app's tags. + :type attributes: UpdateAppTagsRequestDataAttributes, optional + + :param type: The tags resource type. + :type type: AppTagsType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_tags_request_data_attributes.py b/src/datadog_api_client/v2/model/update_app_tags_request_data_attributes.py new file mode 100644 index 0000000000..112f928355 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_tags_request_data_attributes.py @@ -0,0 +1,34 @@ +# 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. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class UpdateAppTagsRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "tags": ([str],), + } + + attribute_map = { + "tags": "tags", + } + + def __init__(self_, tags: List[str], **kwargs): + """ + Attributes for replacing an app's tags. + + :param tags: The full list of tags that should be set on the app. Existing tags not present in this list are removed. + :type tags: [str] + """ + super().__init__(kwargs) + + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/update_app_version_name_request.py b/src/datadog_api_client/v2/model/update_app_version_name_request.py new file mode 100644 index 0000000000..37983894fa --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_version_name_request.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_version_name_request_data import UpdateAppVersionNameRequestData + + +class UpdateAppVersionNameRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_version_name_request_data import UpdateAppVersionNameRequestData + + return { + "data": (UpdateAppVersionNameRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[UpdateAppVersionNameRequestData, UnsetType] = unset, **kwargs): + """ + A request to assign a human-readable name to a specific app version. + + :param data: Data for naming a specific app version. + :type data: UpdateAppVersionNameRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_version_name_request_data.py b/src/datadog_api_client/v2/model/update_app_version_name_request_data.py new file mode 100644 index 0000000000..5129e906f6 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_version_name_request_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.update_app_version_name_request_data_attributes import ( + UpdateAppVersionNameRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_version_name_type import AppVersionNameType + + +class UpdateAppVersionNameRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.update_app_version_name_request_data_attributes import ( + UpdateAppVersionNameRequestDataAttributes, + ) + from datadog_api_client.v2.model.app_version_name_type import AppVersionNameType + + return { + "attributes": (UpdateAppVersionNameRequestDataAttributes,), + "type": (AppVersionNameType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[UpdateAppVersionNameRequestDataAttributes, UnsetType] = unset, + type: Union[AppVersionNameType, UnsetType] = unset, + **kwargs, + ): + """ + Data for naming a specific app version. + + :param attributes: Attributes for naming a specific app version. + :type attributes: UpdateAppVersionNameRequestDataAttributes, optional + + :param type: The version-name resource type. + :type type: AppVersionNameType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_app_version_name_request_data_attributes.py b/src/datadog_api_client/v2/model/update_app_version_name_request_data_attributes.py new file mode 100644 index 0000000000..3845f2135e --- /dev/null +++ b/src/datadog_api_client/v2/model/update_app_version_name_request_data_attributes.py @@ -0,0 +1,33 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class UpdateAppVersionNameRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + } + + attribute_map = { + "name": "name", + } + + def __init__(self_, name: str, **kwargs): + """ + Attributes for naming a specific app version. + + :param name: The name to assign to the app version. + :type name: str + """ + super().__init__(kwargs) + + self_.name = name diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f1cb60da57..d456cd9ff9 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -220,11 +220,20 @@ from datadog_api_client.v2.model.app_builder_event_type import AppBuilderEventType from datadog_api_client.v2.model.app_definition_type import AppDefinitionType from datadog_api_client.v2.model.app_deployment_type import AppDeploymentType +from datadog_api_client.v2.model.app_favorite_type import AppFavoriteType from datadog_api_client.v2.model.app_key_registration_data import AppKeyRegistrationData from datadog_api_client.v2.model.app_key_registration_data_type import AppKeyRegistrationDataType from datadog_api_client.v2.model.app_meta import AppMeta +from datadog_api_client.v2.model.app_protection_level import AppProtectionLevel +from datadog_api_client.v2.model.app_protection_level_type import AppProtectionLevelType from datadog_api_client.v2.model.app_relationship import AppRelationship +from datadog_api_client.v2.model.app_self_service_type import AppSelfServiceType +from datadog_api_client.v2.model.app_tags_type import AppTagsType from datadog_api_client.v2.model.app_trigger_wrapper import AppTriggerWrapper +from datadog_api_client.v2.model.app_version import AppVersion +from datadog_api_client.v2.model.app_version_attributes import AppVersionAttributes +from datadog_api_client.v2.model.app_version_name_type import AppVersionNameType +from datadog_api_client.v2.model.app_version_type import AppVersionType from datadog_api_client.v2.model.application_key_create_attributes import ApplicationKeyCreateAttributes from datadog_api_client.v2.model.application_key_create_data import ApplicationKeyCreateData from datadog_api_client.v2.model.application_key_create_request import ApplicationKeyCreateRequest @@ -1313,6 +1322,11 @@ from datadog_api_client.v2.model.create_page_response_data import CreatePageResponseData from datadog_api_client.v2.model.create_page_response_data_type import CreatePageResponseDataType from datadog_api_client.v2.model.create_phone_notification_channel_config import CreatePhoneNotificationChannelConfig +from datadog_api_client.v2.model.create_publish_request_request import CreatePublishRequestRequest +from datadog_api_client.v2.model.create_publish_request_request_data import CreatePublishRequestRequestData +from datadog_api_client.v2.model.create_publish_request_request_data_attributes import ( + CreatePublishRequestRequestDataAttributes, +) from datadog_api_client.v2.model.create_rule_request import CreateRuleRequest from datadog_api_client.v2.model.create_rule_request_data import CreateRuleRequestData from datadog_api_client.v2.model.create_rule_response import CreateRuleResponse @@ -3301,6 +3315,7 @@ from datadog_api_client.v2.model.list_allocations_response import ListAllocationsResponse from datadog_api_client.v2.model.list_app_key_registrations_response import ListAppKeyRegistrationsResponse from datadog_api_client.v2.model.list_app_key_registrations_response_meta import ListAppKeyRegistrationsResponseMeta +from datadog_api_client.v2.model.list_app_versions_response import ListAppVersionsResponse from datadog_api_client.v2.model.list_application_keys_response import ListApplicationKeysResponse from datadog_api_client.v2.model.list_apps_response import ListAppsResponse from datadog_api_client.v2.model.list_apps_response_data_items import ListAppsResponseDataItems @@ -5075,6 +5090,7 @@ from datadog_api_client.v2.model.projected_cost_type import ProjectedCostType from datadog_api_client.v2.model.projects_response import ProjectsResponse from datadog_api_client.v2.model.publish_app_response import PublishAppResponse +from datadog_api_client.v2.model.publish_request_type import PublishRequestType from datadog_api_client.v2.model.put_apps_datastore_item_response_array import PutAppsDatastoreItemResponseArray from datadog_api_client.v2.model.put_apps_datastore_item_response_data import PutAppsDatastoreItemResponseData from datadog_api_client.v2.model.put_incident_notification_rule_request import PutIncidentNotificationRuleRequest @@ -7190,12 +7206,35 @@ from datadog_api_client.v2.model.unpublish_app_response import UnpublishAppResponse from datadog_api_client.v2.model.update_action_connection_request import UpdateActionConnectionRequest from datadog_api_client.v2.model.update_action_connection_response import UpdateActionConnectionResponse +from datadog_api_client.v2.model.update_app_favorite_request import UpdateAppFavoriteRequest +from datadog_api_client.v2.model.update_app_favorite_request_data import UpdateAppFavoriteRequestData +from datadog_api_client.v2.model.update_app_favorite_request_data_attributes import ( + UpdateAppFavoriteRequestDataAttributes, +) +from datadog_api_client.v2.model.update_app_protection_level_request import UpdateAppProtectionLevelRequest +from datadog_api_client.v2.model.update_app_protection_level_request_data import UpdateAppProtectionLevelRequestData +from datadog_api_client.v2.model.update_app_protection_level_request_data_attributes import ( + UpdateAppProtectionLevelRequestDataAttributes, +) from datadog_api_client.v2.model.update_app_request import UpdateAppRequest from datadog_api_client.v2.model.update_app_request_data import UpdateAppRequestData from datadog_api_client.v2.model.update_app_request_data_attributes import UpdateAppRequestDataAttributes from datadog_api_client.v2.model.update_app_response import UpdateAppResponse from datadog_api_client.v2.model.update_app_response_data import UpdateAppResponseData from datadog_api_client.v2.model.update_app_response_data_attributes import UpdateAppResponseDataAttributes +from datadog_api_client.v2.model.update_app_self_service_request import UpdateAppSelfServiceRequest +from datadog_api_client.v2.model.update_app_self_service_request_data import UpdateAppSelfServiceRequestData +from datadog_api_client.v2.model.update_app_self_service_request_data_attributes import ( + UpdateAppSelfServiceRequestDataAttributes, +) +from datadog_api_client.v2.model.update_app_tags_request import UpdateAppTagsRequest +from datadog_api_client.v2.model.update_app_tags_request_data import UpdateAppTagsRequestData +from datadog_api_client.v2.model.update_app_tags_request_data_attributes import UpdateAppTagsRequestDataAttributes +from datadog_api_client.v2.model.update_app_version_name_request import UpdateAppVersionNameRequest +from datadog_api_client.v2.model.update_app_version_name_request_data import UpdateAppVersionNameRequestData +from datadog_api_client.v2.model.update_app_version_name_request_data_attributes import ( + UpdateAppVersionNameRequestDataAttributes, +) from datadog_api_client.v2.model.update_apps_datastore_item_request import UpdateAppsDatastoreItemRequest from datadog_api_client.v2.model.update_apps_datastore_item_request_data import UpdateAppsDatastoreItemRequestData from datadog_api_client.v2.model.update_apps_datastore_item_request_data_attributes import ( @@ -7694,11 +7733,20 @@ "AppBuilderEventType", "AppDefinitionType", "AppDeploymentType", + "AppFavoriteType", "AppKeyRegistrationData", "AppKeyRegistrationDataType", "AppMeta", + "AppProtectionLevel", + "AppProtectionLevelType", "AppRelationship", + "AppSelfServiceType", + "AppTagsType", "AppTriggerWrapper", + "AppVersion", + "AppVersionAttributes", + "AppVersionNameType", + "AppVersionType", "ApplicationKeyCreateAttributes", "ApplicationKeyCreateData", "ApplicationKeyCreateRequest", @@ -8487,6 +8535,9 @@ "CreatePageResponseData", "CreatePageResponseDataType", "CreatePhoneNotificationChannelConfig", + "CreatePublishRequestRequest", + "CreatePublishRequestRequestData", + "CreatePublishRequestRequestDataAttributes", "CreateRuleRequest", "CreateRuleRequestData", "CreateRuleResponse", @@ -9977,6 +10028,7 @@ "ListAllocationsResponse", "ListAppKeyRegistrationsResponse", "ListAppKeyRegistrationsResponseMeta", + "ListAppVersionsResponse", "ListApplicationKeysResponse", "ListAppsResponse", "ListAppsResponseDataItems", @@ -11051,6 +11103,7 @@ "ProjectedCostType", "ProjectsResponse", "PublishAppResponse", + "PublishRequestType", "PutAppsDatastoreItemResponseArray", "PutAppsDatastoreItemResponseData", "PutIncidentNotificationRuleRequest", @@ -12534,12 +12587,27 @@ "UnpublishAppResponse", "UpdateActionConnectionRequest", "UpdateActionConnectionResponse", + "UpdateAppFavoriteRequest", + "UpdateAppFavoriteRequestData", + "UpdateAppFavoriteRequestDataAttributes", + "UpdateAppProtectionLevelRequest", + "UpdateAppProtectionLevelRequestData", + "UpdateAppProtectionLevelRequestDataAttributes", "UpdateAppRequest", "UpdateAppRequestData", "UpdateAppRequestDataAttributes", "UpdateAppResponse", "UpdateAppResponseData", "UpdateAppResponseDataAttributes", + "UpdateAppSelfServiceRequest", + "UpdateAppSelfServiceRequestData", + "UpdateAppSelfServiceRequestDataAttributes", + "UpdateAppTagsRequest", + "UpdateAppTagsRequestData", + "UpdateAppTagsRequestDataAttributes", + "UpdateAppVersionNameRequest", + "UpdateAppVersionNameRequestData", + "UpdateAppVersionNameRequestDataAttributes", "UpdateAppsDatastoreItemRequest", "UpdateAppsDatastoreItemRequestData", "UpdateAppsDatastoreItemRequestDataAttributes", diff --git a/tests/v2/features/app_builder.feature b/tests/v2/features/app_builder.feature index 1ef2502e80..a61d55f15e 100644 --- a/tests/v2/features/app_builder.feature +++ b/tests/v2/features/app_builder.feature @@ -27,6 +27,30 @@ Feature: App Builder Then the response status is 201 Created And the response "data.type" is equal to "appDefinitions" + @generated @skip @team:DataDog/app-builder-backend + Scenario: Create Publish Request returns "Bad Request" response + Given new "CreatePublishRequest" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production"}, "type": "publishRequest"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Create Publish Request returns "Created" response + Given new "CreatePublishRequest" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production"}, "type": "publishRequest"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Create Publish Request returns "Not Found" response + Given new "CreatePublishRequest" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production"}, "type": "publishRequest"}} + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/app-builder-backend Scenario: Delete App returns "Bad Request" response Given new "DeleteApp" request @@ -115,6 +139,27 @@ Feature: App Builder And the response "data.id" has the same value as "app.data.id" And the response "data.type" is equal to "appDefinitions" + @generated @skip @team:DataDog/app-builder-backend + Scenario: List App Versions returns "Bad Request" response + Given new "ListAppVersions" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: List App Versions returns "Not Found" response + Given new "ListAppVersions" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: List App Versions returns "OK" response + Given new "ListAppVersions" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/app-builder-backend Scenario: List Apps returns "Bad Request" response Given new "ListApps" request @@ -127,6 +172,33 @@ Feature: App Builder When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/app-builder-backend + Scenario: Name App Version returns "Bad Request" response + Given new "UpdateAppVersionName" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "v1.2.0 - bug fix release"}, "type": "versionNames"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Name App Version returns "No Content" response + Given new "UpdateAppVersionName" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "v1.2.0 - bug fix release"}, "type": "versionNames"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Name App Version returns "Not Found" response + Given new "UpdateAppVersionName" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "v1.2.0 - bug fix release"}, "type": "versionNames"}} + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/app-builder-backend Scenario: Publish App returns "Bad Request" response Given new "PublishApp" request @@ -149,6 +221,30 @@ Feature: App Builder When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/app-builder-backend + Scenario: Revert App returns "Bad Request" response + Given new "RevertApp" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Revert App returns "Not Found" response + Given new "RevertApp" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Revert App returns "OK" response + Given new "RevertApp" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/app-builder-backend Scenario: Unpublish App returns "Bad Request" response Given new "UnpublishApp" request @@ -171,6 +267,102 @@ Feature: App Builder When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Favorite Status returns "Bad Request" response + Given new "UpdateAppFavorite" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"favorite": true}, "type": "favorites"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Favorite Status returns "Not Found" response + Given new "UpdateAppFavorite" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"favorite": true}, "type": "favorites"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Favorite Status returns "OK" response + Given new "UpdateAppFavorite" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"favorite": true}, "type": "favorites"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Protection Level returns "Bad Request" response + Given new "UpdateProtectionLevel" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"protectionLevel": "approval_required"}, "type": "protectionLevel"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Protection Level returns "Not Found" response + Given new "UpdateProtectionLevel" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"protectionLevel": "approval_required"}, "type": "protectionLevel"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Protection Level returns "OK" response + Given new "UpdateProtectionLevel" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"protectionLevel": "approval_required"}, "type": "protectionLevel"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Self-Service Status returns "Bad Request" response + Given new "UpdateAppSelfService" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"selfService": true}, "type": "selfService"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Self-Service Status returns "Not Found" response + Given new "UpdateAppSelfService" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"selfService": true}, "type": "selfService"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Self-Service Status returns "OK" response + Given new "UpdateAppSelfService" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"selfService": true}, "type": "selfService"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Tags returns "Bad Request" response + Given new "UpdateAppTags" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tags": ["team:platform", "service:ops"]}, "type": "tags"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Tags returns "No Content" response + Given new "UpdateAppTags" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tags": ["team:platform", "service:ops"]}, "type": "tags"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update App Tags returns "Not Found" response + Given new "UpdateAppTags" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"tags": ["team:platform", "service:ops"]}, "type": "tags"}} + When the request is sent + Then the response status is 404 Not Found + @skip-typescript @team:DataDog/app-builder-backend Scenario: Update App returns "Bad Request" response Given new "UpdateApp" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index d5a8323e27..eab901e5b6 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -632,6 +632,61 @@ "type": "idempotent" } }, + "UpdateAppFavorite": { + "tag": "App Builder", + "undo": { + "type": "idempotent" + } + }, + "UpdateProtectionLevel": { + "tag": "App Builder", + "undo": { + "type": "idempotent" + } + }, + "CreatePublishRequest": { + "tag": "App Builder", + "undo": { + "operationId": "DeleteApp", + "parameters": [ + { + "name": "app_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "RevertApp": { + "tag": "App Builder", + "undo": { + "type": "idempotent" + } + }, + "UpdateAppSelfService": { + "tag": "App Builder", + "undo": { + "type": "idempotent" + } + }, + "UpdateAppTags": { + "tag": "App Builder", + "undo": { + "type": "idempotent" + } + }, + "UpdateAppVersionName": { + "tag": "App Builder", + "undo": { + "type": "idempotent" + } + }, + "ListAppVersions": { + "tag": "App Builder", + "undo": { + "type": "safe" + } + }, "ListApplicationKeys": { "tag": "Key Management", "undo": {