|
| 1 | +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 2 | +# This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 3 | +# Copyright 2019-Present Datadog, Inc. |
| 4 | +from __future__ import annotations |
| 5 | + |
| 6 | +from typing import Any, Dict |
| 7 | + |
| 8 | +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint |
| 9 | +from datadog_api_client.configuration import Configuration |
| 10 | +from datadog_api_client.v2.model.temporal_cloud_open_metrics_integration_accounts_response import ( |
| 11 | + TemporalCloudOpenMetricsIntegrationAccountsResponse, |
| 12 | +) |
| 13 | +from datadog_api_client.v2.model.temporal_cloud_open_metrics_integration_account_response import ( |
| 14 | + TemporalCloudOpenMetricsIntegrationAccountResponse, |
| 15 | +) |
| 16 | +from datadog_api_client.v2.model.temporal_cloud_open_metrics_integration_account_create_request import ( |
| 17 | + TemporalCloudOpenMetricsIntegrationAccountCreateRequest, |
| 18 | +) |
| 19 | +from datadog_api_client.v2.model.temporal_cloud_open_metrics_integration_account_update_request import ( |
| 20 | + TemporalCloudOpenMetricsIntegrationAccountUpdateRequest, |
| 21 | +) |
| 22 | + |
| 23 | + |
| 24 | +class TemporalCloudOpenMetricsIntegrationApi: |
| 25 | + """ |
| 26 | + Manage your Datadog Temporal Cloud OpenMetrics integration accounts and account resources |
| 27 | + directly through the Datadog API. See the |
| 28 | + `Temporal Cloud OpenMetrics integration page <https://docs.datadoghq.com/integrations/temporal-cloud-openmetrics/>`_ for |
| 29 | + more information. |
| 30 | + """ |
| 31 | + |
| 32 | + def __init__(self, api_client=None): |
| 33 | + if api_client is None: |
| 34 | + api_client = ApiClient(Configuration()) |
| 35 | + self.api_client = api_client |
| 36 | + |
| 37 | + self._create_temporal_cloud_open_metrics_integration_account_endpoint = _Endpoint( |
| 38 | + settings={ |
| 39 | + "response_type": (TemporalCloudOpenMetricsIntegrationAccountResponse,), |
| 40 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 41 | + "endpoint_path": "/api/v2/integration-interfaces/temporal-cloud-openmetrics/accounts", |
| 42 | + "operation_id": "create_temporal_cloud_open_metrics_integration_account", |
| 43 | + "http_method": "POST", |
| 44 | + "version": "v2", |
| 45 | + }, |
| 46 | + params_map={ |
| 47 | + "body": { |
| 48 | + "required": True, |
| 49 | + "openapi_types": (TemporalCloudOpenMetricsIntegrationAccountCreateRequest,), |
| 50 | + "location": "body", |
| 51 | + }, |
| 52 | + }, |
| 53 | + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, |
| 54 | + api_client=api_client, |
| 55 | + ) |
| 56 | + |
| 57 | + self._delete_temporal_cloud_open_metrics_integration_account_endpoint = _Endpoint( |
| 58 | + settings={ |
| 59 | + "response_type": None, |
| 60 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 61 | + "endpoint_path": "/api/v2/integration-interfaces/temporal-cloud-openmetrics/accounts/{account_id}", |
| 62 | + "operation_id": "delete_temporal_cloud_open_metrics_integration_account", |
| 63 | + "http_method": "DELETE", |
| 64 | + "version": "v2", |
| 65 | + }, |
| 66 | + params_map={ |
| 67 | + "account_id": { |
| 68 | + "required": True, |
| 69 | + "openapi_types": (str,), |
| 70 | + "attribute": "account_id", |
| 71 | + "location": "path", |
| 72 | + }, |
| 73 | + }, |
| 74 | + headers_map={ |
| 75 | + "accept": ["*/*"], |
| 76 | + }, |
| 77 | + api_client=api_client, |
| 78 | + ) |
| 79 | + |
| 80 | + self._get_temporal_cloud_open_metrics_integration_account_endpoint = _Endpoint( |
| 81 | + settings={ |
| 82 | + "response_type": (TemporalCloudOpenMetricsIntegrationAccountResponse,), |
| 83 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 84 | + "endpoint_path": "/api/v2/integration-interfaces/temporal-cloud-openmetrics/accounts/{account_id}", |
| 85 | + "operation_id": "get_temporal_cloud_open_metrics_integration_account", |
| 86 | + "http_method": "GET", |
| 87 | + "version": "v2", |
| 88 | + }, |
| 89 | + params_map={ |
| 90 | + "account_id": { |
| 91 | + "required": True, |
| 92 | + "openapi_types": (str,), |
| 93 | + "attribute": "account_id", |
| 94 | + "location": "path", |
| 95 | + }, |
| 96 | + }, |
| 97 | + headers_map={ |
| 98 | + "accept": ["application/json"], |
| 99 | + }, |
| 100 | + api_client=api_client, |
| 101 | + ) |
| 102 | + |
| 103 | + self._list_temporal_cloud_open_metrics_integration_accounts_endpoint = _Endpoint( |
| 104 | + settings={ |
| 105 | + "response_type": (TemporalCloudOpenMetricsIntegrationAccountsResponse,), |
| 106 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 107 | + "endpoint_path": "/api/v2/integration-interfaces/temporal-cloud-openmetrics/accounts", |
| 108 | + "operation_id": "list_temporal_cloud_open_metrics_integration_accounts", |
| 109 | + "http_method": "GET", |
| 110 | + "version": "v2", |
| 111 | + }, |
| 112 | + params_map={}, |
| 113 | + headers_map={ |
| 114 | + "accept": ["application/json"], |
| 115 | + }, |
| 116 | + api_client=api_client, |
| 117 | + ) |
| 118 | + |
| 119 | + self._update_temporal_cloud_open_metrics_integration_account_endpoint = _Endpoint( |
| 120 | + settings={ |
| 121 | + "response_type": (TemporalCloudOpenMetricsIntegrationAccountResponse,), |
| 122 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 123 | + "endpoint_path": "/api/v2/integration-interfaces/temporal-cloud-openmetrics/accounts/{account_id}", |
| 124 | + "operation_id": "update_temporal_cloud_open_metrics_integration_account", |
| 125 | + "http_method": "PATCH", |
| 126 | + "version": "v2", |
| 127 | + }, |
| 128 | + params_map={ |
| 129 | + "account_id": { |
| 130 | + "required": True, |
| 131 | + "openapi_types": (str,), |
| 132 | + "attribute": "account_id", |
| 133 | + "location": "path", |
| 134 | + }, |
| 135 | + "body": { |
| 136 | + "required": True, |
| 137 | + "openapi_types": (TemporalCloudOpenMetricsIntegrationAccountUpdateRequest,), |
| 138 | + "location": "body", |
| 139 | + }, |
| 140 | + }, |
| 141 | + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, |
| 142 | + api_client=api_client, |
| 143 | + ) |
| 144 | + |
| 145 | + def create_temporal_cloud_open_metrics_integration_account( |
| 146 | + self, |
| 147 | + body: TemporalCloudOpenMetricsIntegrationAccountCreateRequest, |
| 148 | + ) -> TemporalCloudOpenMetricsIntegrationAccountResponse: |
| 149 | + """Create a Temporal Cloud OpenMetrics account. |
| 150 | +
|
| 151 | + Create a Temporal Cloud OpenMetrics integration account. |
| 152 | +
|
| 153 | + :type body: TemporalCloudOpenMetricsIntegrationAccountCreateRequest |
| 154 | + :rtype: TemporalCloudOpenMetricsIntegrationAccountResponse |
| 155 | + """ |
| 156 | + kwargs: Dict[str, Any] = {} |
| 157 | + kwargs["body"] = body |
| 158 | + |
| 159 | + return self._create_temporal_cloud_open_metrics_integration_account_endpoint.call_with_http_info(**kwargs) |
| 160 | + |
| 161 | + def delete_temporal_cloud_open_metrics_integration_account( |
| 162 | + self, |
| 163 | + account_id: str, |
| 164 | + ) -> None: |
| 165 | + """Delete a Temporal Cloud OpenMetrics account. |
| 166 | +
|
| 167 | + Delete a Temporal Cloud OpenMetrics integration account. |
| 168 | +
|
| 169 | + :param account_id: Unique identifier of the integration account. |
| 170 | + :type account_id: str |
| 171 | + :rtype: None |
| 172 | + """ |
| 173 | + kwargs: Dict[str, Any] = {} |
| 174 | + kwargs["account_id"] = account_id |
| 175 | + |
| 176 | + return self._delete_temporal_cloud_open_metrics_integration_account_endpoint.call_with_http_info(**kwargs) |
| 177 | + |
| 178 | + def get_temporal_cloud_open_metrics_integration_account( |
| 179 | + self, |
| 180 | + account_id: str, |
| 181 | + ) -> TemporalCloudOpenMetricsIntegrationAccountResponse: |
| 182 | + """Get a Temporal Cloud OpenMetrics account. |
| 183 | +
|
| 184 | + Get a Temporal Cloud OpenMetrics integration account. |
| 185 | +
|
| 186 | + :param account_id: Unique identifier of the integration account. |
| 187 | + :type account_id: str |
| 188 | + :rtype: TemporalCloudOpenMetricsIntegrationAccountResponse |
| 189 | + """ |
| 190 | + kwargs: Dict[str, Any] = {} |
| 191 | + kwargs["account_id"] = account_id |
| 192 | + |
| 193 | + return self._get_temporal_cloud_open_metrics_integration_account_endpoint.call_with_http_info(**kwargs) |
| 194 | + |
| 195 | + def list_temporal_cloud_open_metrics_integration_accounts( |
| 196 | + self, |
| 197 | + ) -> TemporalCloudOpenMetricsIntegrationAccountsResponse: |
| 198 | + """List Temporal Cloud OpenMetrics accounts. |
| 199 | +
|
| 200 | + List Temporal Cloud OpenMetrics integration accounts. |
| 201 | +
|
| 202 | + :rtype: TemporalCloudOpenMetricsIntegrationAccountsResponse |
| 203 | + """ |
| 204 | + kwargs: Dict[str, Any] = {} |
| 205 | + return self._list_temporal_cloud_open_metrics_integration_accounts_endpoint.call_with_http_info(**kwargs) |
| 206 | + |
| 207 | + def update_temporal_cloud_open_metrics_integration_account( |
| 208 | + self, |
| 209 | + account_id: str, |
| 210 | + body: TemporalCloudOpenMetricsIntegrationAccountUpdateRequest, |
| 211 | + ) -> TemporalCloudOpenMetricsIntegrationAccountResponse: |
| 212 | + """Update a Temporal Cloud OpenMetrics account. |
| 213 | +
|
| 214 | + Update a Temporal Cloud OpenMetrics integration account. Only the fields provided are changed. |
| 215 | +
|
| 216 | + :param account_id: Unique identifier of the integration account. |
| 217 | + :type account_id: str |
| 218 | + :type body: TemporalCloudOpenMetricsIntegrationAccountUpdateRequest |
| 219 | + :rtype: TemporalCloudOpenMetricsIntegrationAccountResponse |
| 220 | + """ |
| 221 | + kwargs: Dict[str, Any] = {} |
| 222 | + kwargs["account_id"] = account_id |
| 223 | + |
| 224 | + kwargs["body"] = body |
| 225 | + |
| 226 | + return self._update_temporal_cloud_open_metrics_integration_account_endpoint.call_with_http_info(**kwargs) |
0 commit comments