diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0509d97d04..8c3c60eee2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5588,6 +5588,16 @@ components: xray_services: $ref: "#/components/schemas/XRayServicesList" type: object + AccessPolicyEffect: + description: The effect applied when an email address matches the policy. Deny policies take precedence over allow policies. + enum: + - allow + - deny + example: allow + type: string + x-enum-varnames: + - ALLOW + - DENY AccessTokenListItem: description: An access token entry returned by the personal access tokens list endpoint. May represent either a personal or a service access token. properties: @@ -32482,6 +32492,38 @@ components: type: string x-enum-varnames: - CREATE_SNAPSHOT + CreateStatusPageEmailAccessPolicyRequest: + description: Request object for creating a status page email access policy. + properties: + data: + $ref: "#/components/schemas/CreateStatusPageEmailAccessPolicyRequestData" + required: + - data + type: object + CreateStatusPageEmailAccessPolicyRequestData: + description: The data object for creating a status page email access policy. + properties: + attributes: + $ref: "#/components/schemas/CreateStatusPageEmailAccessPolicyRequestDataAttributes" + type: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyType" + required: + - attributes + - type + type: object + CreateStatusPageEmailAccessPolicyRequestDataAttributes: + description: Attributes for creating a status page email access policy. + properties: + effect: + $ref: "#/components/schemas/AccessPolicyEffect" + pattern: + description: The email address pattern matched by the policy. Supports an exact address (`user@example.com`), all addresses in a domain (`@example.com`), or all addresses in subdomains (`@*.example.com`). + example: "@example.com" + type: string + required: + - effect + - pattern + type: object CreateStatusPageRequest: description: Request object for creating a status page. example: @@ -32559,7 +32601,7 @@ components: $ref: "#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItems" type: array domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. example: status-page-us1 type: string email_header_image: @@ -32655,15 +32697,17 @@ components: $ref: "#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType" type: object CreateStatusPageRequestDataAttributesType: - description: The type of the status page controlling how the status page is accessed. + description: The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. enum: - public - internal + - private example: public type: string x-enum-varnames: - PUBLIC - INTERNAL + - PRIVATE CreateStatusPageRequestDataAttributesVisualizationLayout: description: The layout of components on the status page. Defaults to `list`. `grid` requires `visualization_type` to be `component_name_only`; changing `visualization_type` to any other value resets the layout to `list`. enum: @@ -103754,7 +103798,7 @@ components: example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM type: string domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. example: status-page-us1 type: string email_header_image: @@ -135196,7 +135240,7 @@ components: description: Whether the custom domain is configured. type: boolean domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. type: string email_header_image: description: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -135379,7 +135423,7 @@ components: description: Whether the custom domain is configured. type: boolean domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. type: string email_header_image: description: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -135532,6 +135576,143 @@ components: type: string x-enum-varnames: - STATUS_PAGES + StatusPageEmailAccessPolicyArrayResponse: + description: Response object for a list of status page email access policies. + properties: + data: + description: A list of status page email access policy data objects. + items: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyData" + type: array + included: + description: Resources related to the email access policies, when requested using the `include` query parameter. + items: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyIncluded" + type: array + required: + - data + type: object + StatusPageEmailAccessPolicyData: + description: The data object for a status page email access policy. + properties: + attributes: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataAttributes" + id: + description: The ID of the email access policy. + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + relationships: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationships" + type: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyType" + required: + - attributes + - id + - relationships + - type + type: object + StatusPageEmailAccessPolicyDataAttributes: + description: Attributes of a status page email access policy. + properties: + created_at: + description: Timestamp of when the email access policy was created. + example: "2026-01-01T00:00:00.000Z" + format: date-time + type: string + effect: + $ref: "#/components/schemas/AccessPolicyEffect" + pattern: + description: The email address pattern matched by the policy. + example: "@example.com" + type: string + required: + - created_at + - effect + - pattern + type: object + StatusPageEmailAccessPolicyDataRelationships: + description: Relationships of a status page email access policy. + properties: + created_by_user: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser" + status_page: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsStatusPage" + required: + - created_by_user + - status_page + type: object + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser: + description: The Datadog user who created the email access policy. + properties: + data: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData" + required: + - data + type: object + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData: + description: The data object identifying the Datadog user who created the email access policy. + properties: + id: + description: The ID of the Datadog user who created the email access policy. + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + type: + $ref: "#/components/schemas/StatusPagesUserType" + required: + - id + - type + type: object + StatusPageEmailAccessPolicyDataRelationshipsStatusPage: + description: The status page associated with the email access policy. + properties: + data: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsStatusPageData" + required: + - data + type: object + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData: + description: The data object identifying the status page associated with the email access policy. + properties: + id: + description: The ID of the status page associated with the email access policy. + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + type: + $ref: "#/components/schemas/StatusPageDataType" + required: + - id + - type + type: object + StatusPageEmailAccessPolicyIncluded: + description: An included resource related to a status page email access policy. + oneOf: + - $ref: "#/components/schemas/StatusPagesUser" + - $ref: "#/components/schemas/StatusPageAsIncluded" + StatusPageEmailAccessPolicyResponse: + description: Response object for a status page email access policy. + properties: + data: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyData" + included: + description: Resources related to the email access policy, when requested using the `include` query parameter. + items: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyIncluded" + type: array + required: + - data + type: object + StatusPageEmailAccessPolicyType: + default: email_access_policies + description: Status page email access policy resource type. + enum: + - email_access_policies + example: email_access_policies + type: string + x-enum-varnames: + - EMAIL_ACCESS_POLICIES StatusPagesComponent: description: Response object for a single component. properties: @@ -257819,6 +258000,233 @@ paths: operator: AND permissions: - status_pages_settings_write + /api/v2/statuspages/{page_id}/access_policies/email: + get: + description: Lists the email access policies for a private status page. + operationId: ListEmailAccessPolicies + parameters: + - description: The ID of the private status page. + in: path + name: page_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: "Comma-separated list of resources to include. Supported values: created_by_user, status_page." + in: query + name: include + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-01-01T00:00:00.000Z" + effect: allow + pattern: "@example.com" + id: 00000000-0000-0000-0000-000000000001 + relationships: + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000003 + type: users + status_page: + data: + id: 00000000-0000-0000-0000-000000000002 + type: status_pages + type: email_access_policies + schema: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyArrayResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_settings_read + summary: List email access policies + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + post: + description: Creates an email access policy for a private status page. + operationId: CreateEmailAccessPolicy + parameters: + - description: The ID of the private status page. + in: path + name: page_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: "Comma-separated list of resources to include. Supported values: created_by_user, status_page." + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + effect: allow + pattern: "@example.com" + type: email_access_policies + schema: + $ref: "#/components/schemas/CreateStatusPageEmailAccessPolicyRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-01-01T00:00:00.000Z" + effect: allow + pattern: "@example.com" + id: 00000000-0000-0000-0000-000000000001 + relationships: + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000003 + type: users + status_page: + data: + id: 00000000-0000-0000-0000-000000000002 + type: status_pages + type: email_access_policies + schema: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyResponse" + 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 + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_settings_write + summary: Create an email access policy + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + /api/v2/statuspages/{page_id}/access_policies/email/{policy_id}: + delete: + description: Deletes an email access policy from a private status page. + operationId: DeleteEmailAccessPolicy + parameters: + - description: The ID of the private status page. + in: path + name: page_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the email access policy. + in: path + name: policy_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_settings_write + summary: Delete an email access policy + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write /api/v2/statuspages/{page_id}/components: get: description: Lists all components for a status page. @@ -259483,7 +259891,7 @@ paths: - status_pages_incident_write /api/v2/statuspages/{page_id}/publish: post: - description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. + description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. For pages of type `private`, makes the status page available to users authorized by its email access policies and requires the `status_pages_private_page_publish` permission. A private status page must have at least one email access policy before it can be published. operationId: PublishStatusPage parameters: - description: The ID of the status page. @@ -259503,6 +259911,7 @@ paths: appKeyAuth: [] - AuthZ: - status_pages_internal_page_publish + - status_pages_private_page_publish - status_pages_public_page_publish summary: Publish status page tags: @@ -259512,9 +259921,10 @@ paths: permissions: - status_pages_public_page_publish - status_pages_internal_page_publish + - status_pages_private_page_publish /api/v2/statuspages/{page_id}/unpublish: post: - description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. + description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. For pages of type `private`, removes access to the private status page and requires the `status_pages_private_page_publish` permission. operationId: UnpublishStatusPage parameters: - description: The ID of the status page. @@ -259534,6 +259944,7 @@ paths: appKeyAuth: [] - AuthZ: - status_pages_internal_page_publish + - status_pages_private_page_publish - status_pages_public_page_publish summary: Unpublish status page tags: @@ -259543,6 +259954,7 @@ paths: permissions: - status_pages_public_page_publish - status_pages_internal_page_publish + - status_pages_private_page_publish /api/v2/stegadography/get-widgets: post: description: |- diff --git a/examples/v2/status-pages/CreateEmailAccessPolicy.py b/examples/v2/status-pages/CreateEmailAccessPolicy.py new file mode 100644 index 0000000000..8003adcb2e --- /dev/null +++ b/examples/v2/status-pages/CreateEmailAccessPolicy.py @@ -0,0 +1,39 @@ +""" +Create an email access policy returns "Created" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.status_pages_api import StatusPagesApi +from datadog_api_client.v2.model.access_policy_effect import AccessPolicyEffect +from datadog_api_client.v2.model.create_status_page_email_access_policy_request import ( + CreateStatusPageEmailAccessPolicyRequest, +) +from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data import ( + CreateStatusPageEmailAccessPolicyRequestData, +) +from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data_attributes import ( + CreateStatusPageEmailAccessPolicyRequestDataAttributes, +) +from datadog_api_client.v2.model.status_page_email_access_policy_type import StatusPageEmailAccessPolicyType + +# there is a valid "private_status_page" in the system +PRIVATE_STATUS_PAGE_DATA_ID = environ["PRIVATE_STATUS_PAGE_DATA_ID"] + +body = CreateStatusPageEmailAccessPolicyRequest( + data=CreateStatusPageEmailAccessPolicyRequestData( + attributes=CreateStatusPageEmailAccessPolicyRequestDataAttributes( + effect=AccessPolicyEffect.ALLOW, + pattern="@example.com", + ), + type=StatusPageEmailAccessPolicyType.EMAIL_ACCESS_POLICIES, + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = StatusPagesApi(api_client) + response = api_instance.create_email_access_policy(page_id=PRIVATE_STATUS_PAGE_DATA_ID, body=body) + + print(response) diff --git a/examples/v2/status-pages/DeleteEmailAccessPolicy.py b/examples/v2/status-pages/DeleteEmailAccessPolicy.py new file mode 100644 index 0000000000..4c27251218 --- /dev/null +++ b/examples/v2/status-pages/DeleteEmailAccessPolicy.py @@ -0,0 +1,22 @@ +""" +Delete an email access policy returns "No Content" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.status_pages_api import StatusPagesApi + +# there is a valid "private_status_page" in the system +PRIVATE_STATUS_PAGE_DATA_ID = environ["PRIVATE_STATUS_PAGE_DATA_ID"] + +# there is a valid "email_access_policy" in the system +EMAIL_ACCESS_POLICY_DATA_ID = environ["EMAIL_ACCESS_POLICY_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = StatusPagesApi(api_client) + api_instance.delete_email_access_policy( + page_id=PRIVATE_STATUS_PAGE_DATA_ID, + policy_id=EMAIL_ACCESS_POLICY_DATA_ID, + ) diff --git a/examples/v2/status-pages/ListEmailAccessPolicies.py b/examples/v2/status-pages/ListEmailAccessPolicies.py new file mode 100644 index 0000000000..de988e86f8 --- /dev/null +++ b/examples/v2/status-pages/ListEmailAccessPolicies.py @@ -0,0 +1,20 @@ +""" +List email access policies returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.status_pages_api import StatusPagesApi + +# there is a valid "private_status_page" in the system +PRIVATE_STATUS_PAGE_DATA_ID = environ["PRIVATE_STATUS_PAGE_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = StatusPagesApi(api_client) + response = api_instance.list_email_access_policies( + page_id=PRIVATE_STATUS_PAGE_DATA_ID, + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/status_pages_api.py b/src/datadog_api_client/v2/api/status_pages_api.py index 0315bc6453..1bd83e23bc 100644 --- a/src/datadog_api_client/v2/api/status_pages_api.py +++ b/src/datadog_api_client/v2/api/status_pages_api.py @@ -18,6 +18,13 @@ from datadog_api_client.v2.model.degradation_array import DegradationArray from datadog_api_client.v2.model.maintenance_array import MaintenanceArray from datadog_api_client.v2.model.patch_status_page_request import PatchStatusPageRequest +from datadog_api_client.v2.model.status_page_email_access_policy_array_response import ( + StatusPageEmailAccessPolicyArrayResponse, +) +from datadog_api_client.v2.model.status_page_email_access_policy_response import StatusPageEmailAccessPolicyResponse +from datadog_api_client.v2.model.create_status_page_email_access_policy_request import ( + CreateStatusPageEmailAccessPolicyRequest, +) from datadog_api_client.v2.model.status_pages_component_array import StatusPagesComponentArray from datadog_api_client.v2.model.status_pages_component import StatusPagesComponent from datadog_api_client.v2.model.create_component_request import CreateComponentRequest @@ -214,6 +221,37 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_email_access_policy_endpoint = _Endpoint( + settings={ + "response_type": (StatusPageEmailAccessPolicyResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/statuspages/{page_id}/access_policies/email", + "operation_id": "create_email_access_policy", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "page_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "page_id", + "location": "path", + }, + "include": { + "openapi_types": (str,), + "attribute": "include", + "location": "query", + }, + "body": { + "required": True, + "openapi_types": (CreateStatusPageEmailAccessPolicyRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_maintenance_endpoint = _Endpoint( settings={ "response_type": (Maintenance,), @@ -393,6 +431,35 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_email_access_policy_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/statuspages/{page_id}/access_policies/email/{policy_id}", + "operation_id": "delete_email_access_policy", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "page_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "page_id", + "location": "path", + }, + "policy_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "policy_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._delete_maintenance_template_endpoint = _Endpoint( settings={ "response_type": None, @@ -794,6 +861,34 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_email_access_policies_endpoint = _Endpoint( + settings={ + "response_type": (StatusPageEmailAccessPolicyArrayResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/statuspages/{page_id}/access_policies/email", + "operation_id": "list_email_access_policies", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "page_id", + "location": "path", + }, + "include": { + "openapi_types": (str,), + "attribute": "include", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_maintenances_endpoint = _Endpoint( settings={ "response_type": (MaintenanceArray,), @@ -1407,6 +1502,34 @@ def create_degradation_template( return self._create_degradation_template_endpoint.call_with_http_info(**kwargs) + def create_email_access_policy( + self, + page_id: UUID, + body: CreateStatusPageEmailAccessPolicyRequest, + *, + include: Union[str, UnsetType] = unset, + ) -> StatusPageEmailAccessPolicyResponse: + """Create an email access policy. + + Creates an email access policy for a private status page. + + :param page_id: The ID of the private status page. + :type page_id: UUID + :type body: CreateStatusPageEmailAccessPolicyRequest + :param include: Comma-separated list of resources to include. Supported values: created_by_user, status_page. + :type include: str, optional + :rtype: StatusPageEmailAccessPolicyResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["page_id"] = page_id + + if include is not unset: + kwargs["include"] = include + + kwargs["body"] = body + + return self._create_email_access_policy_endpoint.call_with_http_info(**kwargs) + def create_maintenance( self, page_id: UUID, @@ -1558,6 +1681,28 @@ def delete_degradation_template( return self._delete_degradation_template_endpoint.call_with_http_info(**kwargs) + def delete_email_access_policy( + self, + page_id: UUID, + policy_id: UUID, + ) -> None: + """Delete an email access policy. + + Deletes an email access policy from a private status page. + + :param page_id: The ID of the private status page. + :type page_id: UUID + :param policy_id: The ID of the email access policy. + :type policy_id: UUID + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["page_id"] = page_id + + kwargs["policy_id"] = policy_id + + return self._delete_email_access_policy_endpoint.call_with_http_info(**kwargs) + def delete_maintenance_template( self, page_id: UUID, @@ -1907,6 +2052,30 @@ def list_degradation_templates( return self._list_degradation_templates_endpoint.call_with_http_info(**kwargs) + def list_email_access_policies( + self, + page_id: UUID, + *, + include: Union[str, UnsetType] = unset, + ) -> StatusPageEmailAccessPolicyArrayResponse: + """List email access policies. + + Lists the email access policies for a private status page. + + :param page_id: The ID of the private status page. + :type page_id: UUID + :param include: Comma-separated list of resources to include. Supported values: created_by_user, status_page. + :type include: str, optional + :rtype: StatusPageEmailAccessPolicyArrayResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["page_id"] = page_id + + if include is not unset: + kwargs["include"] = include + + return self._list_email_access_policies_endpoint.call_with_http_info(**kwargs) + def list_maintenances( self, *, @@ -2060,7 +2229,7 @@ def publish_status_page( ) -> None: """Publish status page. - Publishes a status page. For pages of type ``public`` , makes the status page available on the public internet and requires the ``status_pages_public_page_publish`` permission. For pages of type ``internal`` , makes the status page available under the ``status-pages/$domain_prefix/view`` route within the Datadog organization and requires the ``status_pages_internal_page_publish`` permission. + Publishes a status page. For pages of type ``public`` , makes the status page available on the public internet and requires the ``status_pages_public_page_publish`` permission. For pages of type ``internal`` , makes the status page available under the ``status-pages/$domain_prefix/view`` route within the Datadog organization and requires the ``status_pages_internal_page_publish`` permission. For pages of type ``private`` , makes the status page available to users authorized by its email access policies and requires the ``status_pages_private_page_publish`` permission. A private status page must have at least one email access policy before it can be published. :param page_id: The ID of the status page. :type page_id: UUID @@ -2104,7 +2273,7 @@ def unpublish_status_page( ) -> None: """Unpublish status page. - Unpublishes a status page. For pages of type ``public`` , removes the status page from the public internet and requires the ``status_pages_public_page_publish`` permission. For pages of type ``internal`` , removes the ``status-pages/$domain_prefix/view`` route from the Datadog organization and requires the ``status_pages_internal_page_publish`` permission. + Unpublishes a status page. For pages of type ``public`` , removes the status page from the public internet and requires the ``status_pages_public_page_publish`` permission. For pages of type ``internal`` , removes the ``status-pages/$domain_prefix/view`` route from the Datadog organization and requires the ``status_pages_internal_page_publish`` permission. For pages of type ``private`` , removes access to the private status page and requires the ``status_pages_private_page_publish`` permission. :param page_id: The ID of the status page. :type page_id: UUID diff --git a/src/datadog_api_client/v2/model/access_policy_effect.py b/src/datadog_api_client/v2/model/access_policy_effect.py new file mode 100644 index 0000000000..4c734d3317 --- /dev/null +++ b/src/datadog_api_client/v2/model/access_policy_effect.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 AccessPolicyEffect(ModelSimple): + """ + The effect applied when an email address matches the policy. Deny policies take precedence over allow policies. + + :param value: Must be one of ["allow", "deny"]. + :type value: str + """ + + allowed_values = { + "allow", + "deny", + } + ALLOW: ClassVar["AccessPolicyEffect"] + DENY: ClassVar["AccessPolicyEffect"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AccessPolicyEffect.ALLOW = AccessPolicyEffect("allow") +AccessPolicyEffect.DENY = AccessPolicyEffect("deny") diff --git a/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request.py b/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request.py new file mode 100644 index 0000000000..fb219e0694 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_status_page_email_access_policy_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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data import ( + CreateStatusPageEmailAccessPolicyRequestData, + ) + + +class CreateStatusPageEmailAccessPolicyRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data import ( + CreateStatusPageEmailAccessPolicyRequestData, + ) + + return { + "data": (CreateStatusPageEmailAccessPolicyRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: CreateStatusPageEmailAccessPolicyRequestData, **kwargs): + """ + Request object for creating a status page email access policy. + + :param data: The data object for creating a status page email access policy. + :type data: CreateStatusPageEmailAccessPolicyRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request_data.py b/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request_data.py new file mode 100644 index 0000000000..967e8d99f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request_data.py @@ -0,0 +1,57 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +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.create_status_page_email_access_policy_request_data_attributes import ( + CreateStatusPageEmailAccessPolicyRequestDataAttributes, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_type import StatusPageEmailAccessPolicyType + + +class CreateStatusPageEmailAccessPolicyRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data_attributes import ( + CreateStatusPageEmailAccessPolicyRequestDataAttributes, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_type import StatusPageEmailAccessPolicyType + + return { + "attributes": (CreateStatusPageEmailAccessPolicyRequestDataAttributes,), + "type": (StatusPageEmailAccessPolicyType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: CreateStatusPageEmailAccessPolicyRequestDataAttributes, + type: StatusPageEmailAccessPolicyType, + **kwargs, + ): + """ + The data object for creating a status page email access policy. + + :param attributes: Attributes for creating a status page email access policy. + :type attributes: CreateStatusPageEmailAccessPolicyRequestDataAttributes + + :param type: Status page email access policy resource type. + :type type: StatusPageEmailAccessPolicyType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request_data_attributes.py b/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request_data_attributes.py new file mode 100644 index 0000000000..e465323639 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_status_page_email_access_policy_request_data_attributes.py @@ -0,0 +1,46 @@ +# 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.access_policy_effect import AccessPolicyEffect + + +class CreateStatusPageEmailAccessPolicyRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.access_policy_effect import AccessPolicyEffect + + return { + "effect": (AccessPolicyEffect,), + "pattern": (str,), + } + + attribute_map = { + "effect": "effect", + "pattern": "pattern", + } + + def __init__(self_, effect: AccessPolicyEffect, pattern: str, **kwargs): + """ + Attributes for creating a status page email access policy. + + :param effect: The effect applied when an email address matches the policy. Deny policies take precedence over allow policies. + :type effect: AccessPolicyEffect + + :param pattern: The email address pattern matched by the policy. Supports an exact address ( ``user@example.com`` ), all addresses in a domain ( ``@example.com`` ), or all addresses in subdomains ( ``@*.example.com`` ). + :type pattern: str + """ + super().__init__(kwargs) + + self_.effect = effect + self_.pattern = pattern diff --git a/src/datadog_api_client/v2/model/create_status_page_request_data_attributes.py b/src/datadog_api_client/v2/model/create_status_page_request_data_attributes.py index 7bcee5835b..fb0659752c 100644 --- a/src/datadog_api_client/v2/model/create_status_page_request_data_attributes.py +++ b/src/datadog_api_client/v2/model/create_status_page_request_data_attributes.py @@ -108,7 +108,7 @@ def __init__( :param components: The components displayed on the status page. :type components: [CreateStatusPageRequestDataAttributesComponentsItems], optional - :param domain_prefix: The subdomain of the status page's url taking the form ``https://{domain_prefix}.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. + :param domain_prefix: The subdomain of the status page URL. Public pages use ``https://{domain_prefix}.statuspage.datadoghq.com`` , while private pages use ``https://{domain_prefix}.private.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. :type domain_prefix: str :param email_header_image: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -138,7 +138,7 @@ def __init__( :param subscriptions_enabled: Whether users can subscribe to the status page. :type subscriptions_enabled: bool, optional - :param type: The type of the status page controlling how the status page is accessed. + :param type: The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. :type type: CreateStatusPageRequestDataAttributesType :param visualization_layout: The layout of components on the status page. Defaults to ``list``. ``grid`` requires ``visualization_type`` to be ``component_name_only`` ; changing ``visualization_type`` to any other value resets the layout to ``list``. diff --git a/src/datadog_api_client/v2/model/create_status_page_request_data_attributes_type.py b/src/datadog_api_client/v2/model/create_status_page_request_data_attributes_type.py index 20ba0e8a2d..7434bfb2ea 100644 --- a/src/datadog_api_client/v2/model/create_status_page_request_data_attributes_type.py +++ b/src/datadog_api_client/v2/model/create_status_page_request_data_attributes_type.py @@ -14,18 +14,20 @@ class CreateStatusPageRequestDataAttributesType(ModelSimple): """ - The type of the status page controlling how the status page is accessed. + The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. - :param value: Must be one of ["public", "internal"]. + :param value: Must be one of ["public", "internal", "private"]. :type value: str """ allowed_values = { "public", "internal", + "private", } PUBLIC: ClassVar["CreateStatusPageRequestDataAttributesType"] INTERNAL: ClassVar["CreateStatusPageRequestDataAttributesType"] + PRIVATE: ClassVar["CreateStatusPageRequestDataAttributesType"] @cached_property def openapi_types(_): @@ -36,3 +38,4 @@ def openapi_types(_): CreateStatusPageRequestDataAttributesType.PUBLIC = CreateStatusPageRequestDataAttributesType("public") CreateStatusPageRequestDataAttributesType.INTERNAL = CreateStatusPageRequestDataAttributesType("internal") +CreateStatusPageRequestDataAttributesType.PRIVATE = CreateStatusPageRequestDataAttributesType("private") diff --git a/src/datadog_api_client/v2/model/patch_status_page_request_data_attributes.py b/src/datadog_api_client/v2/model/patch_status_page_request_data_attributes.py index e6777b4be0..30b0b05bf7 100644 --- a/src/datadog_api_client/v2/model/patch_status_page_request_data_attributes.py +++ b/src/datadog_api_client/v2/model/patch_status_page_request_data_attributes.py @@ -96,7 +96,7 @@ def __init__( :param company_logo: The base64-encoded image data displayed on the status page. :type company_logo: str, optional - :param domain_prefix: The subdomain of the status page's url taking the form ``https://{domain_prefix}.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. + :param domain_prefix: The subdomain of the status page URL. Public pages use ``https://{domain_prefix}.statuspage.datadoghq.com`` , while private pages use ``https://{domain_prefix}.private.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. :type domain_prefix: str, optional :param email_header_image: The base64-encoded image data displayed in email notifications sent to status page subscribers. @@ -126,7 +126,7 @@ def __init__( :param subscriptions_enabled: Whether users can subscribe to the status page. :type subscriptions_enabled: bool, optional - :param type: The type of the status page controlling how the status page is accessed. + :param type: The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. :type type: CreateStatusPageRequestDataAttributesType, optional :param visualization_layout: The layout of components on the status page. Defaults to ``list``. ``grid`` requires ``visualization_type`` to be ``component_name_only`` ; changing ``visualization_type`` to any other value resets the layout to ``list``. diff --git a/src/datadog_api_client/v2/model/status_page_as_included_attributes.py b/src/datadog_api_client/v2/model/status_page_as_included_attributes.py index 1c4152e744..a4027a725d 100644 --- a/src/datadog_api_client/v2/model/status_page_as_included_attributes.py +++ b/src/datadog_api_client/v2/model/status_page_as_included_attributes.py @@ -136,7 +136,7 @@ def __init__( :param custom_domain_enabled: Whether the custom domain is configured. :type custom_domain_enabled: bool, optional - :param domain_prefix: The subdomain of the status page's url taking the form ``https://{domain_prefix}.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. + :param domain_prefix: The subdomain of the status page URL. Public pages use ``https://{domain_prefix}.statuspage.datadoghq.com`` , while private pages use ``https://{domain_prefix}.private.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. :type domain_prefix: str, optional :param email_header_image: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -175,7 +175,7 @@ def __init__( :param subscriptions_enabled: Whether users can subscribe to the status page. :type subscriptions_enabled: bool, optional - :param type: The type of the status page controlling how the status page is accessed. + :param type: The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. :type type: CreateStatusPageRequestDataAttributesType, optional :param visualization_layout: The layout of components on the status page. Defaults to ``list``. ``grid`` requires ``visualization_type`` to be ``component_name_only`` ; changing ``visualization_type`` to any other value resets the layout to ``list``. diff --git a/src/datadog_api_client/v2/model/status_page_data_attributes.py b/src/datadog_api_client/v2/model/status_page_data_attributes.py index f7c364867b..86f3855a12 100644 --- a/src/datadog_api_client/v2/model/status_page_data_attributes.py +++ b/src/datadog_api_client/v2/model/status_page_data_attributes.py @@ -137,7 +137,7 @@ def __init__( :param custom_domain_enabled: Whether the custom domain is configured. :type custom_domain_enabled: bool, optional - :param domain_prefix: The subdomain of the status page's url taking the form ``https://{domain_prefix}.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. + :param domain_prefix: The subdomain of the status page URL. Public pages use ``https://{domain_prefix}.statuspage.datadoghq.com`` , while private pages use ``https://{domain_prefix}.private.statuspage.datadoghq.com``. Globally unique across Datadog Status Pages. :type domain_prefix: str, optional :param email_header_image: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -176,7 +176,7 @@ def __init__( :param subscriptions_enabled: Whether users can subscribe to the status page. :type subscriptions_enabled: bool, optional - :param type: The type of the status page controlling how the status page is accessed. + :param type: The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. :type type: CreateStatusPageRequestDataAttributesType, optional :param visualization_layout: The layout of components on the status page. Defaults to ``list``. ``grid`` requires ``visualization_type`` to be ``component_name_only`` ; changing ``visualization_type`` to any other value resets the layout to ``list``. diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_array_response.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_array_response.py new file mode 100644 index 0000000000..0da83a0144 --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_array_response.py @@ -0,0 +1,62 @@ +# 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.status_page_email_access_policy_data import StatusPageEmailAccessPolicyData + from datadog_api_client.v2.model.status_page_email_access_policy_included import StatusPageEmailAccessPolicyIncluded + from datadog_api_client.v2.model.status_pages_user import StatusPagesUser + from datadog_api_client.v2.model.status_page_as_included import StatusPageAsIncluded + + +class StatusPageEmailAccessPolicyArrayResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_email_access_policy_data import StatusPageEmailAccessPolicyData + from datadog_api_client.v2.model.status_page_email_access_policy_included import ( + StatusPageEmailAccessPolicyIncluded, + ) + + return { + "data": ([StatusPageEmailAccessPolicyData],), + "included": ([StatusPageEmailAccessPolicyIncluded],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: List[StatusPageEmailAccessPolicyData], + included: Union[ + List[Union[StatusPageEmailAccessPolicyIncluded, StatusPagesUser, StatusPageAsIncluded]], UnsetType + ] = unset, + **kwargs, + ): + """ + Response object for a list of status page email access policies. + + :param data: A list of status page email access policy data objects. + :type data: [StatusPageEmailAccessPolicyData] + + :param included: Resources related to the email access policies, when requested using the ``include`` query parameter. + :type included: [StatusPageEmailAccessPolicyIncluded], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data.py new file mode 100644 index 0000000000..3e85dcb71c --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data.py @@ -0,0 +1,78 @@ +# 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, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.status_page_email_access_policy_data_attributes import ( + StatusPageEmailAccessPolicyDataAttributes, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships import ( + StatusPageEmailAccessPolicyDataRelationships, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_type import StatusPageEmailAccessPolicyType + + +class StatusPageEmailAccessPolicyData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_email_access_policy_data_attributes import ( + StatusPageEmailAccessPolicyDataAttributes, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships import ( + StatusPageEmailAccessPolicyDataRelationships, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_type import StatusPageEmailAccessPolicyType + + return { + "attributes": (StatusPageEmailAccessPolicyDataAttributes,), + "id": (UUID,), + "relationships": (StatusPageEmailAccessPolicyDataRelationships,), + "type": (StatusPageEmailAccessPolicyType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: StatusPageEmailAccessPolicyDataAttributes, + id: UUID, + relationships: StatusPageEmailAccessPolicyDataRelationships, + type: StatusPageEmailAccessPolicyType, + **kwargs, + ): + """ + The data object for a status page email access policy. + + :param attributes: Attributes of a status page email access policy. + :type attributes: StatusPageEmailAccessPolicyDataAttributes + + :param id: The ID of the email access policy. + :type id: UUID + + :param relationships: Relationships of a status page email access policy. + :type relationships: StatusPageEmailAccessPolicyDataRelationships + + :param type: Status page email access policy resource type. + :type type: StatusPageEmailAccessPolicyType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.relationships = relationships + self_.type = type diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data_attributes.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_attributes.py new file mode 100644 index 0000000000..72588c36ca --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_attributes.py @@ -0,0 +1,53 @@ +# 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, + datetime, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.access_policy_effect import AccessPolicyEffect + + +class StatusPageEmailAccessPolicyDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.access_policy_effect import AccessPolicyEffect + + return { + "created_at": (datetime,), + "effect": (AccessPolicyEffect,), + "pattern": (str,), + } + + attribute_map = { + "created_at": "created_at", + "effect": "effect", + "pattern": "pattern", + } + + def __init__(self_, created_at: datetime, effect: AccessPolicyEffect, pattern: str, **kwargs): + """ + Attributes of a status page email access policy. + + :param created_at: Timestamp of when the email access policy was created. + :type created_at: datetime + + :param effect: The effect applied when an email address matches the policy. Deny policies take precedence over allow policies. + :type effect: AccessPolicyEffect + + :param pattern: The email address pattern matched by the policy. + :type pattern: str + """ + super().__init__(kwargs) + + self_.created_at = created_at + self_.effect = effect + self_.pattern = pattern diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships.py new file mode 100644 index 0000000000..bc7269b33a --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +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.status_page_email_access_policy_data_relationships_created_by_user import ( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_status_page import ( + StatusPageEmailAccessPolicyDataRelationshipsStatusPage, + ) + + +class StatusPageEmailAccessPolicyDataRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_created_by_user import ( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser, + ) + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_status_page import ( + StatusPageEmailAccessPolicyDataRelationshipsStatusPage, + ) + + return { + "created_by_user": (StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser,), + "status_page": (StatusPageEmailAccessPolicyDataRelationshipsStatusPage,), + } + + attribute_map = { + "created_by_user": "created_by_user", + "status_page": "status_page", + } + + def __init__( + self_, + created_by_user: StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser, + status_page: StatusPageEmailAccessPolicyDataRelationshipsStatusPage, + **kwargs, + ): + """ + Relationships of a status page email access policy. + + :param created_by_user: The Datadog user who created the email access policy. + :type created_by_user: StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser + + :param status_page: The status page associated with the email access policy. + :type status_page: StatusPageEmailAccessPolicyDataRelationshipsStatusPage + """ + super().__init__(kwargs) + + self_.created_by_user = created_by_user + self_.status_page = status_page diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_created_by_user.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_created_by_user.py new file mode 100644 index 0000000000..73041659c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_created_by_user.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_created_by_user_data import ( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData, + ) + + +class StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_created_by_user_data import ( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData, + ) + + return { + "data": (StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData, **kwargs): + """ + The Datadog user who created the email access policy. + + :param data: The data object identifying the Datadog user who created the email access policy. + :type data: StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_created_by_user_data.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_created_by_user_data.py new file mode 100644 index 0000000000..023b9e12e6 --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_created_by_user_data.py @@ -0,0 +1,47 @@ +# 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, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.status_pages_user_type import StatusPagesUserType + + +class StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_pages_user_type import StatusPagesUserType + + return { + "id": (UUID,), + "type": (StatusPagesUserType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: StatusPagesUserType, **kwargs): + """ + The data object identifying the Datadog user who created the email access policy. + + :param id: The ID of the Datadog user who created the email access policy. + :type id: UUID + + :param type: Users resource type. + :type type: StatusPagesUserType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_status_page.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_status_page.py new file mode 100644 index 0000000000..e35b610fa8 --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_status_page.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_status_page_data import ( + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData, + ) + + +class StatusPageEmailAccessPolicyDataRelationshipsStatusPage(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_status_page_data import ( + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData, + ) + + return { + "data": (StatusPageEmailAccessPolicyDataRelationshipsStatusPageData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: StatusPageEmailAccessPolicyDataRelationshipsStatusPageData, **kwargs): + """ + The status page associated with the email access policy. + + :param data: The data object identifying the status page associated with the email access policy. + :type data: StatusPageEmailAccessPolicyDataRelationshipsStatusPageData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_status_page_data.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_status_page_data.py new file mode 100644 index 0000000000..5ae6cf9c7b --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_data_relationships_status_page_data.py @@ -0,0 +1,47 @@ +# 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, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.status_page_data_type import StatusPageDataType + + +class StatusPageEmailAccessPolicyDataRelationshipsStatusPageData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_data_type import StatusPageDataType + + return { + "id": (UUID,), + "type": (StatusPageDataType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: StatusPageDataType, **kwargs): + """ + The data object identifying the status page associated with the email access policy. + + :param id: The ID of the status page associated with the email access policy. + :type id: UUID + + :param type: Status pages resource type. + :type type: StatusPageDataType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_included.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_included.py new file mode 100644 index 0000000000..2ac4616118 --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_included.py @@ -0,0 +1,49 @@ +# 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 ( + ModelComposed, + cached_property, +) + + +class StatusPageEmailAccessPolicyIncluded(ModelComposed): + def __init__(self, **kwargs): + """ + An included resource related to a status page email access policy. + + :param attributes: Attributes of the Datadog user. + :type attributes: StatusPagesUserAttributes, optional + + :param id: The ID of the Datadog user. + :type id: UUID, optional + + :param type: Users resource type. + :type type: StatusPagesUserType + + :param relationships: The relationships of a status page. + :type relationships: StatusPageAsIncludedRelationships, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.status_pages_user import StatusPagesUser + from datadog_api_client.v2.model.status_page_as_included import StatusPageAsIncluded + + return { + "oneOf": [ + StatusPagesUser, + StatusPageAsIncluded, + ], + } diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_response.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_response.py new file mode 100644 index 0000000000..e74b45bb0d --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_response.py @@ -0,0 +1,62 @@ +# 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.status_page_email_access_policy_data import StatusPageEmailAccessPolicyData + from datadog_api_client.v2.model.status_page_email_access_policy_included import StatusPageEmailAccessPolicyIncluded + from datadog_api_client.v2.model.status_pages_user import StatusPagesUser + from datadog_api_client.v2.model.status_page_as_included import StatusPageAsIncluded + + +class StatusPageEmailAccessPolicyResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.status_page_email_access_policy_data import StatusPageEmailAccessPolicyData + from datadog_api_client.v2.model.status_page_email_access_policy_included import ( + StatusPageEmailAccessPolicyIncluded, + ) + + return { + "data": (StatusPageEmailAccessPolicyData,), + "included": ([StatusPageEmailAccessPolicyIncluded],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: StatusPageEmailAccessPolicyData, + included: Union[ + List[Union[StatusPageEmailAccessPolicyIncluded, StatusPagesUser, StatusPageAsIncluded]], UnsetType + ] = unset, + **kwargs, + ): + """ + Response object for a status page email access policy. + + :param data: The data object for a status page email access policy. + :type data: StatusPageEmailAccessPolicyData + + :param included: Resources related to the email access policy, when requested using the ``include`` query parameter. + :type included: [StatusPageEmailAccessPolicyIncluded], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/status_page_email_access_policy_type.py b/src/datadog_api_client/v2/model/status_page_email_access_policy_type.py new file mode 100644 index 0000000000..ecef5071f5 --- /dev/null +++ b/src/datadog_api_client/v2/model/status_page_email_access_policy_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 StatusPageEmailAccessPolicyType(ModelSimple): + """ + Status page email access policy resource type. + + :param value: If omitted defaults to "email_access_policies". Must be one of ["email_access_policies"]. + :type value: str + """ + + allowed_values = { + "email_access_policies", + } + EMAIL_ACCESS_POLICIES: ClassVar["StatusPageEmailAccessPolicyType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +StatusPageEmailAccessPolicyType.EMAIL_ACCESS_POLICIES = StatusPageEmailAccessPolicyType("email_access_policies") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 4922f44bbf..d6918ba32e 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -211,6 +211,7 @@ from datadog_api_client.v2.model.aws_resource_type_tag_filter import AWSResourceTypeTagFilter from datadog_api_client.v2.model.aws_resources_config import AWSResourcesConfig from datadog_api_client.v2.model.aws_traces_config import AWSTracesConfig +from datadog_api_client.v2.model.access_policy_effect import AccessPolicyEffect from datadog_api_client.v2.model.access_token_list_item import AccessTokenListItem from datadog_api_client.v2.model.access_token_list_item_relationships import AccessTokenListItemRelationships from datadog_api_client.v2.model.access_token_owner_type import AccessTokenOwnerType @@ -2350,6 +2351,15 @@ from datadog_api_client.v2.model.create_snapshot_template_variable import CreateSnapshotTemplateVariable from datadog_api_client.v2.model.create_snapshot_timeseries_legend_type import CreateSnapshotTimeseriesLegendType from datadog_api_client.v2.model.create_snapshot_type import CreateSnapshotType +from datadog_api_client.v2.model.create_status_page_email_access_policy_request import ( + CreateStatusPageEmailAccessPolicyRequest, +) +from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data import ( + CreateStatusPageEmailAccessPolicyRequestData, +) +from datadog_api_client.v2.model.create_status_page_email_access_policy_request_data_attributes import ( + CreateStatusPageEmailAccessPolicyRequestDataAttributes, +) from datadog_api_client.v2.model.create_status_page_request import CreateStatusPageRequest from datadog_api_client.v2.model.create_status_page_request_data import CreateStatusPageRequestData from datadog_api_client.v2.model.create_status_page_request_data_attributes import CreateStatusPageRequestDataAttributes @@ -12161,6 +12171,31 @@ StatusPageDataRelationshipsLastModifiedByUserData, ) from datadog_api_client.v2.model.status_page_data_type import StatusPageDataType +from datadog_api_client.v2.model.status_page_email_access_policy_array_response import ( + StatusPageEmailAccessPolicyArrayResponse, +) +from datadog_api_client.v2.model.status_page_email_access_policy_data import StatusPageEmailAccessPolicyData +from datadog_api_client.v2.model.status_page_email_access_policy_data_attributes import ( + StatusPageEmailAccessPolicyDataAttributes, +) +from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships import ( + StatusPageEmailAccessPolicyDataRelationships, +) +from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_created_by_user import ( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser, +) +from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_created_by_user_data import ( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData, +) +from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_status_page import ( + StatusPageEmailAccessPolicyDataRelationshipsStatusPage, +) +from datadog_api_client.v2.model.status_page_email_access_policy_data_relationships_status_page_data import ( + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData, +) +from datadog_api_client.v2.model.status_page_email_access_policy_included import StatusPageEmailAccessPolicyIncluded +from datadog_api_client.v2.model.status_page_email_access_policy_response import StatusPageEmailAccessPolicyResponse +from datadog_api_client.v2.model.status_page_email_access_policy_type import StatusPageEmailAccessPolicyType from datadog_api_client.v2.model.status_pages_component import StatusPagesComponent from datadog_api_client.v2.model.status_pages_component_array import StatusPagesComponentArray from datadog_api_client.v2.model.status_pages_component_array_included import StatusPagesComponentArrayIncluded @@ -14004,6 +14039,7 @@ "AWSResourceTypeTagFilter", "AWSResourcesConfig", "AWSTracesConfig", + "AccessPolicyEffect", "AccessTokenListItem", "AccessTokenListItemRelationships", "AccessTokenOwnerType", @@ -15613,6 +15649,9 @@ "CreateSnapshotTemplateVariable", "CreateSnapshotTimeseriesLegendType", "CreateSnapshotType", + "CreateStatusPageEmailAccessPolicyRequest", + "CreateStatusPageEmailAccessPolicyRequestData", + "CreateStatusPageEmailAccessPolicyRequestDataAttributes", "CreateStatusPageRequest", "CreateStatusPageRequestData", "CreateStatusPageRequestDataAttributes", @@ -21894,6 +21933,17 @@ "StatusPageDataRelationshipsLastModifiedByUser", "StatusPageDataRelationshipsLastModifiedByUserData", "StatusPageDataType", + "StatusPageEmailAccessPolicyArrayResponse", + "StatusPageEmailAccessPolicyData", + "StatusPageEmailAccessPolicyDataAttributes", + "StatusPageEmailAccessPolicyDataRelationships", + "StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser", + "StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData", + "StatusPageEmailAccessPolicyDataRelationshipsStatusPage", + "StatusPageEmailAccessPolicyDataRelationshipsStatusPageData", + "StatusPageEmailAccessPolicyIncluded", + "StatusPageEmailAccessPolicyResponse", + "StatusPageEmailAccessPolicyType", "StatusPagesComponent", "StatusPagesComponentArray", "StatusPagesComponentArrayIncluded", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index 53531e75bb..2a1d17e57e 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -12565,6 +12565,13 @@ "scenario": "Update a span-based metric returns \"OK\" response", "version": "v2" }, + { + "feature": "Status Pages", + "feature_file": "../../v2/features/status_pages.feature", + "file": "v2/status-pages/create-an-email-access-policy-returns-created-response.json", + "scenario": "Create an email access policy returns \"Created\" response", + "version": "v2" + }, { "feature": "Status Pages", "feature_file": "../../v2/features/status_pages.feature", @@ -12607,6 +12614,13 @@ "scenario": "Create status page returns \"Created\" response", "version": "v2" }, + { + "feature": "Status Pages", + "feature_file": "../../v2/features/status_pages.feature", + "file": "v2/status-pages/delete-an-email-access-policy-returns-no-content-response.json", + "scenario": "Delete an email access policy returns \"No Content\" response", + "version": "v2" + }, { "feature": "Status Pages", "feature_file": "../../v2/features/status_pages.feature", @@ -12670,6 +12684,13 @@ "scenario": "List degradations returns \"OK\" response", "version": "v2" }, + { + "feature": "Status Pages", + "feature_file": "../../v2/features/status_pages.feature", + "file": "v2/status-pages/list-email-access-policies-returns-ok-response.json", + "scenario": "List email access policies returns \"OK\" response", + "version": "v2" + }, { "feature": "Status Pages", "feature_file": "../../v2/features/status_pages.feature", diff --git a/tests/generated-test/test-runner-data/v2/status-pages/create-an-email-access-policy-returns-created-response.json b/tests/generated-test/test-runner-data/v2/status-pages/create-an-email-access-policy-returns-created-response.json new file mode 100644 index 0000000000..ca25f7f8ff --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/status-pages/create-an-email-access-policy-returns-created-response.json @@ -0,0 +1,51 @@ +{ + "api": "StatusPages", + "expected_status": 201, + "feature": "Status Pages", + "id": "v2/Status Pages/Create an email access policy returns \"Created\" response", + "operation_id": "CreateEmailAccessPolicy", + "request": { + "body": { + "schema": { + "format": null, + "ref": "CreateStatusPageEmailAccessPolicyRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "effect": "allow", + "pattern": "@example.com" + }, + "type": "email_access_policies" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "private_status_page.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/statuspages/{page_id}/access_policies/email" + }, + "scenario": "Create an email access policy returns \"Created\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/status-pages/delete-an-email-access-policy-returns-no-content-response.json b/tests/generated-test/test-runner-data/v2/status-pages/delete-an-email-access-policy-returns-no-content-response.json new file mode 100644 index 0000000000..696247a5ae --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/status-pages/delete-an-email-access-policy-returns-no-content-response.json @@ -0,0 +1,51 @@ +{ + "api": "StatusPages", + "expected_status": 204, + "feature": "Status Pages", + "id": "v2/Status Pages/Delete an email access policy returns \"No Content\" response", + "operation_id": "DeleteEmailAccessPolicy", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "private_status_page.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "path", + "name": "policy_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "email_access_policy.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/statuspages/{page_id}/access_policies/email/{policy_id}" + }, + "scenario": "Delete an email access policy returns \"No Content\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/status-pages/list-email-access-policies-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/status-pages/list-email-access-policies-returns-ok-response.json new file mode 100644 index 0000000000..a51694b43a --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/status-pages/list-email-access-policies-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "StatusPages", + "expected_status": 200, + "feature": "Status Pages", + "id": "v2/Status Pages/List email access policies returns \"OK\" response", + "operation_id": "ListEmailAccessPolicies", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "private_status_page.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/statuspages/{page_id}/access_policies/email" + }, + "scenario": "List email access policies returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/v2/status-pages.json b/tests/generated-test/test-server-data/v2/status-pages.json index e5aa807d9a..82b658f7fa 100644 --- a/tests/generated-test/test-server-data/v2/status-pages.json +++ b/tests/generated-test/test-server-data/v2/status-pages.json @@ -1,6 +1,120 @@ { "feature": "Status Pages", "recordings": [ + { + "feature": "Status Pages", + "frozen_at": "2026-11-09T20:00:30.155Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "domain_prefix": "private-ff5d0d55579dd97e", + "name": "A Private Status Page", + "type": "private", + "visualization_type": "bars_and_uptime_percentage" + }, + "type": "status_pages" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/statuspages", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"a4e1c201-4c61-4da9-a929-1470d9e66417\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-11-09T20:00:30.262802Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"private-ff5d0d55579dd97e\",\"email_header_image\":null,\"email_notifications_enabled\":true,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-11-09T20:00:30.262802Z\",\"ms_teams_subscriptions_enabled\":false,\"name\":\"A Private Status Page\",\"page_url\":\"https://private-ff5d0d55579dd97e.private.statuspage.datadoghq.com\",\"rss_feed_enabled\":false,\"slack_app_icon\":null,\"slack_subscriptions_enabled\":false,\"subscriptions_enabled\":false,\"type\":\"private\",\"visualization_layout\":\"list\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "effect": "allow", + "pattern": "@example.com" + }, + "type": "email_access_policies" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/statuspages/a4e1c201-4c61-4da9-a929-1470d9e66417/access_policies/email", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"8a7f8b1a-e42c-4265-8f51-d4f3a1ba7ee6\",\"type\":\"email_access_policies\",\"attributes\":{\"created_at\":\"2026-11-09T20:00:30.993828Z\",\"effect\":\"allow\",\"pattern\":\"@example.com\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"a4e1c201-4c61-4da9-a929-1470d9e66417\",\"type\":\"status_pages\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/a4e1c201-4c61-4da9-a929-1470d9e66417/access_policies/email/8a7f8b1a-e42c-4265-8f51-d4f3a1ba7ee6", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/a4e1c201-4c61-4da9-a929-1470d9e66417", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Create an email access policy returns \"Created\" response", + "version": "v2" + }, { "feature": "Status Pages", "frozen_at": "2026-05-04T14:30:13.862Z", @@ -768,6 +882,143 @@ "scenario": "Create status page returns \"Created\" response", "version": "v2" }, + { + "feature": "Status Pages", + "frozen_at": "2026-11-09T20:00:49.286Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "domain_prefix": "private-0b4fc65664dd3e87", + "name": "A Private Status Page", + "type": "private", + "visualization_type": "bars_and_uptime_percentage" + }, + "type": "status_pages" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/statuspages", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"22a7ed26-874a-4584-88e3-fa07d55bc202\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-11-09T20:00:49.396441Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"private-0b4fc65664dd3e87\",\"email_header_image\":null,\"email_notifications_enabled\":true,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-11-09T20:00:49.396441Z\",\"ms_teams_subscriptions_enabled\":false,\"name\":\"A Private Status Page\",\"page_url\":\"https://private-0b4fc65664dd3e87.private.statuspage.datadoghq.com\",\"rss_feed_enabled\":false,\"slack_app_icon\":null,\"slack_subscriptions_enabled\":false,\"subscriptions_enabled\":false,\"type\":\"private\",\"visualization_layout\":\"list\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "effect": "allow", + "pattern": "@example.com" + }, + "type": "email_access_policies" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/statuspages/22a7ed26-874a-4584-88e3-fa07d55bc202/access_policies/email", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"e8a7cfc3-0103-4a68-9700-3354c101f137\",\"type\":\"email_access_policies\",\"attributes\":{\"created_at\":\"2026-11-09T20:00:49.957602Z\",\"effect\":\"allow\",\"pattern\":\"@example.com\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"22a7ed26-874a-4584-88e3-fa07d55bc202\",\"type\":\"status_pages\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/22a7ed26-874a-4584-88e3-fa07d55bc202/access_policies/email/e8a7cfc3-0103-4a68-9700-3354c101f137", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/22a7ed26-874a-4584-88e3-fa07d55bc202/access_policies/email/e8a7cfc3-0103-4a68-9700-3354c101f137", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"title\":\"Not Found\",\"detail\":\"Email access policy not found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/22a7ed26-874a-4584-88e3-fa07d55bc202", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Delete an email access policy returns \"No Content\" response", + "version": "v2" + }, { "feature": "Status Pages", "frozen_at": "2026-04-24T14:12:43.423Z", @@ -1911,6 +2162,143 @@ "scenario": "List degradations returns \"OK\" response", "version": "v2" }, + { + "feature": "Status Pages", + "frozen_at": "2026-11-09T20:01:07.784Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "domain_prefix": "private-c487bbcbee9a427d", + "name": "A Private Status Page", + "type": "private", + "visualization_type": "bars_and_uptime_percentage" + }, + "type": "status_pages" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/statuspages", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"87442022-940d-4f8a-afbe-21de27d9ef22\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-11-09T20:01:07.892553Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"private-c487bbcbee9a427d\",\"email_header_image\":null,\"email_notifications_enabled\":true,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-11-09T20:01:07.892553Z\",\"ms_teams_subscriptions_enabled\":false,\"name\":\"A Private Status Page\",\"page_url\":\"https://private-c487bbcbee9a427d.private.statuspage.datadoghq.com\",\"rss_feed_enabled\":false,\"slack_app_icon\":null,\"slack_subscriptions_enabled\":false,\"subscriptions_enabled\":false,\"type\":\"private\",\"visualization_layout\":\"list\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "effect": "allow", + "pattern": "@example.com" + }, + "type": "email_access_policies" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/statuspages/87442022-940d-4f8a-afbe-21de27d9ef22/access_policies/email", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"22ac744d-3e3b-4ad0-a24a-664d51a246c4\",\"type\":\"email_access_policies\",\"attributes\":{\"created_at\":\"2026-11-09T20:01:08.552722Z\",\"effect\":\"allow\",\"pattern\":\"@example.com\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"87442022-940d-4f8a-afbe-21de27d9ef22\",\"type\":\"status_pages\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/statuspages/87442022-940d-4f8a-afbe-21de27d9ef22/access_policies/email", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"22ac744d-3e3b-4ad0-a24a-664d51a246c4\",\"type\":\"email_access_policies\",\"attributes\":{\"created_at\":\"2026-11-09T20:01:08.552722Z\",\"effect\":\"allow\",\"pattern\":\"@example.com\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"87442022-940d-4f8a-afbe-21de27d9ef22\",\"type\":\"status_pages\"}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/87442022-940d-4f8a-afbe-21de27d9ef22/access_policies/email/22ac744d-3e3b-4ad0-a24a-664d51a246c4", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/statuspages/87442022-940d-4f8a-afbe-21de27d9ef22", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List email access policies returns \"OK\" response", + "version": "v2" + }, { "feature": "Status Pages", "frozen_at": "2026-04-24T14:12:58.081Z", diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index a84119bd03..2d3ed35caf 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -1995,6 +1995,18 @@ "tag": "Service Level Objectives", "operationId": "CreateSLOReportJob" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"A Private Status Page\",\n \"domain_prefix\": \"private-{{ unique_hash }}\",\n \"type\": \"private\",\n \"visualization_type\": \"bars_and_uptime_percentage\"\n },\n \"type\": \"status_pages\"\n }\n}" + } + ], + "step": "there is a valid \"private_status_page\" in the system", + "key": "private_status_page", + "tag": "Status Pages", + "operationId": "CreateStatusPage" + }, { "parameters": [ { @@ -2007,6 +2019,22 @@ "tag": "Status Pages", "operationId": "CreateStatusPage" }, + { + "parameters": [ + { + "name": "page_id", + "value": "\"{{ private_status_page.data.id }}\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"email_access_policies\",\n \"attributes\": {\n \"effect\": \"allow\",\n \"pattern\": \"@example.com\"\n }\n }\n}" + } + ], + "step": "there is a valid \"email_access_policy\" in the system", + "key": "email_access_policy", + "tag": "Status Pages", + "operationId": "CreateEmailAccessPolicy" + }, { "parameters": [ { diff --git a/tests/v2/features/status_pages.feature b/tests/v2/features/status_pages.feature index 26237ffb61..c8f5c5dab4 100644 --- a/tests/v2/features/status_pages.feature +++ b/tests/v2/features/status_pages.feature @@ -10,6 +10,41 @@ Feature: Status Pages And a valid "appKeyAuth" key in the system And an instance of "StatusPages" API + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Bad Request" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Conflict" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 409 Conflict + + @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Created" response + Given there is a valid "private_status_page" in the system + And new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "private_status_page.data.id" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.effect" is equal to "allow" + And the response "data.attributes.pattern" is equal to "@example.com" + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Not Found" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/incident-app Scenario: Create backfilled degradation returns "Created" response Given there is a valid "status_page" in the system @@ -83,6 +118,32 @@ Feature: Status Pages When the request is sent Then the response status is 201 Created + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an email access policy returns "Bad Request" response + Given new "DeleteEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/incident-app + Scenario: Delete an email access policy returns "No Content" response + Given new "DeleteEmailAccessPolicy" request + And there is a valid "private_status_page" in the system + And there is a valid "email_access_policy" in the system + And request contains "page_id" parameter from "private_status_page.data.id" + And request contains "policy_id" parameter from "email_access_policy.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an email access policy returns "Not Found" response + Given new "DeleteEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/incident-app Scenario: Delete component returns "No Content" response Given new "DeleteComponent" request @@ -222,6 +283,30 @@ Feature: Status Pages When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/incident-app + Scenario: List email access policies returns "Bad Request" response + Given new "ListEmailAccessPolicies" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: List email access policies returns "Not Found" response + Given new "ListEmailAccessPolicies" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:ddoghq/incident-app + Scenario: List email access policies returns "OK" response + Given new "ListEmailAccessPolicies" request + And there is a valid "private_status_page" in the system + And there is a valid "email_access_policy" in the system + And request contains "page_id" parameter from "private_status_page.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "{{ email_access_policy.data.id }}" + @generated @skip @team:ddoghq/incident-app Scenario: List maintenance templates returns "OK" response Given new "ListMaintenanceTemplates" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index d446ce6c5a..ecd54435b6 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -10746,6 +10746,35 @@ "type": "idempotent" } }, + "ListEmailAccessPolicies": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "CreateEmailAccessPolicy": { + "tag": "Status Pages", + "undo": { + "operationId": "DeleteEmailAccessPolicy", + "parameters": [ + { + "name": "page_id", + "source": "data.relationships.status_page.data.id" + }, + { + "name": "policy_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteEmailAccessPolicy": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, "ListComponents": { "tag": "Status Pages", "undo": {