|
76 | 76 | from .metering_mode_response import GetLogStoreMeteringModeResponse, \ |
77 | 77 | GetMetricStoreMeteringModeResponse, UpdateLogStoreMeteringModeResponse, \ |
78 | 78 | UpdateMetricStoreMeteringModeResponse |
| 79 | +from .multimodal_config_response import GetLogStoreMultimodalConfigurationResponse, \ |
| 80 | + PutLogStoreMultimodalConfigurationResponse |
79 | 81 | from .object_response import PutObjectResponse, GetObjectResponse |
80 | 82 | from .util import require_python3, object_name_encode |
81 | 83 |
|
@@ -1833,6 +1835,61 @@ def update_logstore_metering_mode(self, project_name, logstore_name, metering_mo |
1833 | 1835 | (resp, header) = self._send("PUT", project_name, body_str, resource, params, headers) |
1834 | 1836 | return UpdateLogStoreMeteringModeResponse(header, resp) |
1835 | 1837 |
|
| 1838 | + def get_logstore_multimodal_configuration(self, project_name, logstore_name): |
| 1839 | + """ Get the multimodal configuration of the logstore |
| 1840 | + Unsuccessful operation will cause an LogException. |
| 1841 | +
|
| 1842 | + :type project_name: string |
| 1843 | + :param project_name: the Project name |
| 1844 | +
|
| 1845 | + :type logstore_name: string |
| 1846 | + :param logstore_name: the logstore name |
| 1847 | +
|
| 1848 | + :return: GetLogStoreMultimodalConfigurationResponse |
| 1849 | +
|
| 1850 | + :raise: LogException |
| 1851 | + """ |
| 1852 | + params = {} |
| 1853 | + resource = "/logstores/" + logstore_name + "/multimodalconfiguration" |
| 1854 | + headers = {} |
| 1855 | + |
| 1856 | + (resp, header) = self._send("GET", project_name, None, resource, params, headers) |
| 1857 | + return GetLogStoreMultimodalConfigurationResponse(resp, header) |
| 1858 | + |
| 1859 | + def put_logstore_multimodal_configuration(self, project_name, logstore_name, status, anonymous_write=None): |
| 1860 | + """ Put the multimodal configuration of the logstore |
| 1861 | + Unsuccessful operation will cause an LogException. |
| 1862 | +
|
| 1863 | + :type project_name: string |
| 1864 | + :param project_name: the Project name |
| 1865 | +
|
| 1866 | + :type logstore_name: string |
| 1867 | + :param logstore_name: the logstore name |
| 1868 | + |
| 1869 | + :type status: string |
| 1870 | + :param status: the status of multimodal configuration, required (e.g., "Enabled" or "Disabled") |
| 1871 | + |
| 1872 | + :type anonymous_write: string |
| 1873 | + :param anonymous_write: the anonymous write setting, optional (e.g., "Enabled" or "Disabled") |
| 1874 | +
|
| 1875 | + :return: PutLogStoreMultimodalConfigurationResponse |
| 1876 | +
|
| 1877 | + :raise: LogException |
| 1878 | + """ |
| 1879 | + params = {} |
| 1880 | + resource = "/logstores/" + logstore_name + "/multimodalconfiguration" |
| 1881 | + headers = {"x-log-bodyrawsize": '0', "Content-Type": "application/json"} |
| 1882 | + body = { |
| 1883 | + "status": status |
| 1884 | + } |
| 1885 | + if anonymous_write is not None: |
| 1886 | + body["anonymousWrite"] = anonymous_write |
| 1887 | + |
| 1888 | + body_str = six.b(json.dumps(body)) |
| 1889 | + |
| 1890 | + (resp, header) = self._send("PUT", project_name, body_str, resource, params, headers) |
| 1891 | + return PutLogStoreMultimodalConfigurationResponse(header, resp) |
| 1892 | + |
1836 | 1893 | def get_metric_store_metering_mode(self, project_name, metric_store_name): |
1837 | 1894 | """ Get the metering mode of the metric store |
1838 | 1895 | Unsuccessful operation will cause an LogException. |
|
0 commit comments