From 065643b4883a9b927fe2011d5ff365571e20adcf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:53:37 +0000 Subject: [PATCH 1/5] Initial plan From 1802b6d35b87f51f477ffc397e0d51ab5a23d570 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:57:49 +0000 Subject: [PATCH 2/5] fix: use preview API for stream analytics outputs --- .../latest/stream_analytics/output/_create.py | 6 +++--- .../latest/stream_analytics/output/_delete.py | 6 +++--- .../latest/stream_analytics/output/_list.py | 6 +++--- .../latest/stream_analytics/output/_show.py | 6 +++--- .../latest/stream_analytics/output/_test.py | 6 +++--- .../latest/stream_analytics/output/_update.py | 6 +++--- .../latest/recordings/test_job_scale.yaml | 2 +- .../test_output_create_policy_violation.yaml | 2 +- .../latest/recordings/test_output_crud.yaml | 18 +++++++++--------- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py index 8e95902a66b..49daacf6efa 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py @@ -19,9 +19,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2020-03-01", + "version": "2021-10-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2020-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2021-10-01-preview"], ] } @@ -155,7 +155,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2020-03-01", + "api-version", "2021-10-01-preview", required=True, ), } diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py index b40a9c731fb..2da6b318dcf 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py @@ -20,9 +20,9 @@ class Delete(AAZCommand): """ _aaz_info = { - "version": "2020-03-01", + "version": "2021-10-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2020-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2021-10-01-preview"], ] } @@ -126,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2020-03-01", + "api-version", "2021-10-01-preview", required=True, ), } diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py index bdaa53a799d..e39677b91b3 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py @@ -19,9 +19,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2020-03-01", + "version": "2021-10-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs", "2020-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs", "2021-10-01-preview"], ] } @@ -125,7 +125,7 @@ def query_parameters(self): "$select", self.ctx.args.select, ), **self.serialize_query_param( - "api-version", "2020-03-01", + "api-version", "2021-10-01-preview", required=True, ), } diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py index 6ab9f511f36..5e8d1ba25d1 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py @@ -19,9 +19,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2020-03-01", + "version": "2021-10-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2020-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2021-10-01-preview"], ] } @@ -127,7 +127,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2020-03-01", + "api-version", "2021-10-01-preview", required=True, ), } diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py index b7fd0117971..3e9239cb609 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py @@ -19,9 +19,9 @@ class Test(AAZCommand): """ _aaz_info = { - "version": "2020-03-01", + "version": "2021-10-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}/test", "2020-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}/test", "2021-10-01-preview"], ] } @@ -168,7 +168,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2020-03-01", + "api-version", "2021-10-01-preview", required=True, ), } diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py index e9916a88a20..d6d08b83fd4 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py @@ -19,9 +19,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2020-03-01", + "version": "2021-10-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2020-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.streamanalytics/streamingjobs/{}/outputs/{}", "2021-10-01-preview"], ] } @@ -153,7 +153,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2020-03-01", + "api-version", "2021-10-01-preview", required=True, ), } diff --git a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_job_scale.yaml b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_job_scale.yaml index 66f9e112225..e688c207ac2 100644 --- a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_job_scale.yaml +++ b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_job_scale.yaml @@ -412,7 +412,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output\",\r\n diff --git a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_create_policy_violation.yaml b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_create_policy_violation.yaml index c145fecaa98..ba5340f9f52 100644 --- a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_create_policy_violation.yaml +++ b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_create_policy_violation.yaml @@ -435,7 +435,7 @@ interactions: User-Agent: - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: '{"error":{"code":"RequestDisallowedByPolicy","target":"output","message":"Resource diff --git a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_crud.yaml b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_crud.yaml index fcd388846c9..8764dc33e20 100644 --- a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_crud.yaml +++ b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_crud.yaml @@ -283,7 +283,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output\",\r\n @@ -353,7 +353,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output/test?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output/test?api-version=2021-10-01-preview response: body: string: '' @@ -365,7 +365,7 @@ interactions: date: - Thu, 18 Sep 2025 07:10:04 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output/OperationResults/0638937504000000000.ec270fc8-162c-47b2-a625-4776bddde233?api-version=2020-03-01&t=638937762053425024&c=MIIIrzCCBpegAwIBAgITUQB9VQ7j8TP8msVbVQABAH1VDjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDQwHhcNMjUwNzE3MTAxMTQxWhcNMjYwMTEzMTAxMTQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN9uFRCckwovJWtl1-Qq22Rnc8i5ftzF4eCW9m-t2gMd0gI4H3ggHFS8o7Lgo7NFrSHde_fOw5TG4ClBFPIvYtP-yRXA_gQTjDDxbdEKLTNE3lXVjb2lGS92EXrq2q8SW9iUszX4c5rv7wvK4PYYmWBgrA0pnZoN3Sb-PCkHdwTiQ6s-KaN9TaDX22q-VAiBKtuEV3lfxq84cdn8poLqbGH9aJs3mwzZSvSnDtSic6XB7Wn2B9rEtP4D_EPxNAlrtE-8p4QQxJKsU4kvH2HkbDTA3s-9XDYPgpo-bc_TuPA79C9cwY_yDUwxeCiVXq6u1ouDEDRV8y-SdlEtMwA_L3kCAwEAAaOCBJwwggSYMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHkBggrBgEFBQcBAQSCAdYwggHSMGgGCCsGAQUFBzAChlxodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDEuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDIuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDMuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDQuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDAdBgNVHQ4EFgQUb0zVsI6tU0Ya4PntQPSVi05azTgwDgYDVR0PAQH_BAQDAgWgMIIBNQYDVR0fBIIBLDCCASgwggEkoIIBIKCCARyGQmh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2lpbmZyYS9DUkwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDEuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDIuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDMuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDQuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwHwYDVR0jBBgwFoAUOXFdqRUQLcTffi9ZbkBNwN_vNpowHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQDNOTwuwpaNg6Wb6rlDJvYkgpjYBgD7v-G5oudCTfWxa38GVpr03GvcKMMKXsPqS9r4NAOXfLjlf7xqYiwUCShYUrJU3IDKm0amgY_xtVwywcT-VPGF7VZHrEHKa7b6ZR0_aUw_msh7FWtVxpZNW3Lq26ebDEtB-rbUQ_BDwH2K2tb_oKc8WzIVNBwAoAWWDHyVWJKRoEVp59P5KYLdqvg8VrchPaYU3B1ZYbSol1dPcoTFBbiR1xTC4gihNsdye7dgkDwJThyhtefnZZ1zeiWxnXwiLxuZk6pf7cEKEN0xfBtqSBq-ShHoa0RC1xAzAdGngTv75eYqs7hVFdEIZwytl9j_DVoh7vDwgUi0D3gu_ArliQZQbJaOgadOSsCvfyC4FDs0zFzh5gJEl4CTM9fYPZWGJPQPaH1nAoBwgqHZE1WF0uh4144LhpYs9GlduCWQ3jQeVjXsFsZdZPSYXdPojWuL34Voqf1gb07y4lB4vNsjgX0MCWgmfG4Jm7I_MwoL3FGM3SQN_84HB4tHG58f3-ztGcxleLHe1VBfPj-Efh6FPeHNFg7Lyc28aIJf6Lti8Bv9FjBGl_x8j5VVCMC3OI6aRMl9fqjNw4qBFbYmAY9f42CiaGsbnlC2k4FIKuYBkHw9mEe9pG9jKYsbU8WWhYfmRSvsH_TDoUW9GnH_HA&s=1xKuCz2Q2xlrAqhAZHM8pamWFeh543argy38ZNbQpQD6ekAQ447D7chNnobbuZD1wIo_6cZ7bU3qxE2_YuhKzpIRuqyj0b4URKMwVUwQgkrojfJC75rZFXGmDj9bYyYxfEMoP-LzW3DEk7olHvp1YjvM63w0XQc1nGPa2HS9YWj0XmP_vmvukDQ-s3_4T7vXI72ol_wcsZbZ6T6yFkB98EzIbSz3NYQN7er1JTuAnqHdjaO8MXzrYERMX-SDq0r3E5ZwAYHkwP-cHyGdYMl_IC4vMzGmYEpftfSe1OzM5eAgmtGrzxj5V0Mxzq73gLkALdez3w2X26fOQTLbv6q8wA&h=O4uJ4YSh65vBpaRGbqq7rGslVKjr8CuO1X1grn0GpNU + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output/OperationResults/0638937504000000000.ec270fc8-162c-47b2-a625-4776bddde233?api-version=2021-10-01-preview&t=638937762053425024&c=MIIIrzCCBpegAwIBAgITUQB9VQ7j8TP8msVbVQABAH1VDjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDQwHhcNMjUwNzE3MTAxMTQxWhcNMjYwMTEzMTAxMTQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN9uFRCckwovJWtl1-Qq22Rnc8i5ftzF4eCW9m-t2gMd0gI4H3ggHFS8o7Lgo7NFrSHde_fOw5TG4ClBFPIvYtP-yRXA_gQTjDDxbdEKLTNE3lXVjb2lGS92EXrq2q8SW9iUszX4c5rv7wvK4PYYmWBgrA0pnZoN3Sb-PCkHdwTiQ6s-KaN9TaDX22q-VAiBKtuEV3lfxq84cdn8poLqbGH9aJs3mwzZSvSnDtSic6XB7Wn2B9rEtP4D_EPxNAlrtE-8p4QQxJKsU4kvH2HkbDTA3s-9XDYPgpo-bc_TuPA79C9cwY_yDUwxeCiVXq6u1ouDEDRV8y-SdlEtMwA_L3kCAwEAAaOCBJwwggSYMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHkBggrBgEFBQcBAQSCAdYwggHSMGgGCCsGAQUFBzAChlxodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDEuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDIuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDMuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDQuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDAdBgNVHQ4EFgQUb0zVsI6tU0Ya4PntQPSVi05azTgwDgYDVR0PAQH_BAQDAgWgMIIBNQYDVR0fBIIBLDCCASgwggEkoIIBIKCCARyGQmh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2lpbmZyYS9DUkwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDEuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDIuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDMuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDQuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwHwYDVR0jBBgwFoAUOXFdqRUQLcTffi9ZbkBNwN_vNpowHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQDNOTwuwpaNg6Wb6rlDJvYkgpjYBgD7v-G5oudCTfWxa38GVpr03GvcKMMKXsPqS9r4NAOXfLjlf7xqYiwUCShYUrJU3IDKm0amgY_xtVwywcT-VPGF7VZHrEHKa7b6ZR0_aUw_msh7FWtVxpZNW3Lq26ebDEtB-rbUQ_BDwH2K2tb_oKc8WzIVNBwAoAWWDHyVWJKRoEVp59P5KYLdqvg8VrchPaYU3B1ZYbSol1dPcoTFBbiR1xTC4gihNsdye7dgkDwJThyhtefnZZ1zeiWxnXwiLxuZk6pf7cEKEN0xfBtqSBq-ShHoa0RC1xAzAdGngTv75eYqs7hVFdEIZwytl9j_DVoh7vDwgUi0D3gu_ArliQZQbJaOgadOSsCvfyC4FDs0zFzh5gJEl4CTM9fYPZWGJPQPaH1nAoBwgqHZE1WF0uh4144LhpYs9GlduCWQ3jQeVjXsFsZdZPSYXdPojWuL34Voqf1gb07y4lB4vNsjgX0MCWgmfG4Jm7I_MwoL3FGM3SQN_84HB4tHG58f3-ztGcxleLHe1VBfPj-Efh6FPeHNFg7Lyc28aIJf6Lti8Bv9FjBGl_x8j5VVCMC3OI6aRMl9fqjNw4qBFbYmAY9f42CiaGsbnlC2k4FIKuYBkHw9mEe9pG9jKYsbU8WWhYfmRSvsH_TDoUW9GnH_HA&s=1xKuCz2Q2xlrAqhAZHM8pamWFeh543argy38ZNbQpQD6ekAQ447D7chNnobbuZD1wIo_6cZ7bU3qxE2_YuhKzpIRuqyj0b4URKMwVUwQgkrojfJC75rZFXGmDj9bYyYxfEMoP-LzW3DEk7olHvp1YjvM63w0XQc1nGPa2HS9YWj0XmP_vmvukDQ-s3_4T7vXI72ol_wcsZbZ6T6yFkB98EzIbSz3NYQN7er1JTuAnqHdjaO8MXzrYERMX-SDq0r3E5ZwAYHkwP-cHyGdYMl_IC4vMzGmYEpftfSe1OzM5eAgmtGrzxj5V0Mxzq73gLkALdez3w2X26fOQTLbv6q8wA&h=O4uJ4YSh65vBpaRGbqq7rGslVKjr8CuO1X1grn0GpNU pragma: - no-cache strict-transport-security: @@ -401,7 +401,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output/OperationResults/0638937504000000000.ec270fc8-162c-47b2-a625-4776bddde233?api-version=2020-03-01&t=638937762053425024&c=MIIIrzCCBpegAwIBAgITUQB9VQ7j8TP8msVbVQABAH1VDjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDQwHhcNMjUwNzE3MTAxMTQxWhcNMjYwMTEzMTAxMTQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN9uFRCckwovJWtl1-Qq22Rnc8i5ftzF4eCW9m-t2gMd0gI4H3ggHFS8o7Lgo7NFrSHde_fOw5TG4ClBFPIvYtP-yRXA_gQTjDDxbdEKLTNE3lXVjb2lGS92EXrq2q8SW9iUszX4c5rv7wvK4PYYmWBgrA0pnZoN3Sb-PCkHdwTiQ6s-KaN9TaDX22q-VAiBKtuEV3lfxq84cdn8poLqbGH9aJs3mwzZSvSnDtSic6XB7Wn2B9rEtP4D_EPxNAlrtE-8p4QQxJKsU4kvH2HkbDTA3s-9XDYPgpo-bc_TuPA79C9cwY_yDUwxeCiVXq6u1ouDEDRV8y-SdlEtMwA_L3kCAwEAAaOCBJwwggSYMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHkBggrBgEFBQcBAQSCAdYwggHSMGgGCCsGAQUFBzAChlxodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDEuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDIuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDMuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDQuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDAdBgNVHQ4EFgQUb0zVsI6tU0Ya4PntQPSVi05azTgwDgYDVR0PAQH_BAQDAgWgMIIBNQYDVR0fBIIBLDCCASgwggEkoIIBIKCCARyGQmh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2lpbmZyYS9DUkwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDEuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDIuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDMuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDQuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwHwYDVR0jBBgwFoAUOXFdqRUQLcTffi9ZbkBNwN_vNpowHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQDNOTwuwpaNg6Wb6rlDJvYkgpjYBgD7v-G5oudCTfWxa38GVpr03GvcKMMKXsPqS9r4NAOXfLjlf7xqYiwUCShYUrJU3IDKm0amgY_xtVwywcT-VPGF7VZHrEHKa7b6ZR0_aUw_msh7FWtVxpZNW3Lq26ebDEtB-rbUQ_BDwH2K2tb_oKc8WzIVNBwAoAWWDHyVWJKRoEVp59P5KYLdqvg8VrchPaYU3B1ZYbSol1dPcoTFBbiR1xTC4gihNsdye7dgkDwJThyhtefnZZ1zeiWxnXwiLxuZk6pf7cEKEN0xfBtqSBq-ShHoa0RC1xAzAdGngTv75eYqs7hVFdEIZwytl9j_DVoh7vDwgUi0D3gu_ArliQZQbJaOgadOSsCvfyC4FDs0zFzh5gJEl4CTM9fYPZWGJPQPaH1nAoBwgqHZE1WF0uh4144LhpYs9GlduCWQ3jQeVjXsFsZdZPSYXdPojWuL34Voqf1gb07y4lB4vNsjgX0MCWgmfG4Jm7I_MwoL3FGM3SQN_84HB4tHG58f3-ztGcxleLHe1VBfPj-Efh6FPeHNFg7Lyc28aIJf6Lti8Bv9FjBGl_x8j5VVCMC3OI6aRMl9fqjNw4qBFbYmAY9f42CiaGsbnlC2k4FIKuYBkHw9mEe9pG9jKYsbU8WWhYfmRSvsH_TDoUW9GnH_HA&s=1xKuCz2Q2xlrAqhAZHM8pamWFeh543argy38ZNbQpQD6ekAQ447D7chNnobbuZD1wIo_6cZ7bU3qxE2_YuhKzpIRuqyj0b4URKMwVUwQgkrojfJC75rZFXGmDj9bYyYxfEMoP-LzW3DEk7olHvp1YjvM63w0XQc1nGPa2HS9YWj0XmP_vmvukDQ-s3_4T7vXI72ol_wcsZbZ6T6yFkB98EzIbSz3NYQN7er1JTuAnqHdjaO8MXzrYERMX-SDq0r3E5ZwAYHkwP-cHyGdYMl_IC4vMzGmYEpftfSe1OzM5eAgmtGrzxj5V0Mxzq73gLkALdez3w2X26fOQTLbv6q8wA&h=O4uJ4YSh65vBpaRGbqq7rGslVKjr8CuO1X1grn0GpNU + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output/OperationResults/0638937504000000000.ec270fc8-162c-47b2-a625-4776bddde233?api-version=2021-10-01-preview&t=638937762053425024&c=MIIIrzCCBpegAwIBAgITUQB9VQ7j8TP8msVbVQABAH1VDjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDQwHhcNMjUwNzE3MTAxMTQxWhcNMjYwMTEzMTAxMTQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN9uFRCckwovJWtl1-Qq22Rnc8i5ftzF4eCW9m-t2gMd0gI4H3ggHFS8o7Lgo7NFrSHde_fOw5TG4ClBFPIvYtP-yRXA_gQTjDDxbdEKLTNE3lXVjb2lGS92EXrq2q8SW9iUszX4c5rv7wvK4PYYmWBgrA0pnZoN3Sb-PCkHdwTiQ6s-KaN9TaDX22q-VAiBKtuEV3lfxq84cdn8poLqbGH9aJs3mwzZSvSnDtSic6XB7Wn2B9rEtP4D_EPxNAlrtE-8p4QQxJKsU4kvH2HkbDTA3s-9XDYPgpo-bc_TuPA79C9cwY_yDUwxeCiVXq6u1ouDEDRV8y-SdlEtMwA_L3kCAwEAAaOCBJwwggSYMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHkBggrBgEFBQcBAQSCAdYwggHSMGgGCCsGAQUFBzAChlxodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDEuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDIuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDMuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDBYBggrBgEFBQcwAoZMaHR0cDovL2NybDQuYW1lLmdibC9haWEvbWVsMDFwa2lpbnRjYTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNydDAdBgNVHQ4EFgQUb0zVsI6tU0Ya4PntQPSVi05azTgwDgYDVR0PAQH_BAQDAgWgMIIBNQYDVR0fBIIBLDCCASgwggEkoIIBIKCCARyGQmh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2lpbmZyYS9DUkwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDEuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDIuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDMuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybIY0aHR0cDovL2NybDQuYW1lLmdibC9jcmwvQU1FJTIwSW5mcmElMjBDQSUyMDA0KDEpLmNybDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwHwYDVR0jBBgwFoAUOXFdqRUQLcTffi9ZbkBNwN_vNpowHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQDNOTwuwpaNg6Wb6rlDJvYkgpjYBgD7v-G5oudCTfWxa38GVpr03GvcKMMKXsPqS9r4NAOXfLjlf7xqYiwUCShYUrJU3IDKm0amgY_xtVwywcT-VPGF7VZHrEHKa7b6ZR0_aUw_msh7FWtVxpZNW3Lq26ebDEtB-rbUQ_BDwH2K2tb_oKc8WzIVNBwAoAWWDHyVWJKRoEVp59P5KYLdqvg8VrchPaYU3B1ZYbSol1dPcoTFBbiR1xTC4gihNsdye7dgkDwJThyhtefnZZ1zeiWxnXwiLxuZk6pf7cEKEN0xfBtqSBq-ShHoa0RC1xAzAdGngTv75eYqs7hVFdEIZwytl9j_DVoh7vDwgUi0D3gu_ArliQZQbJaOgadOSsCvfyC4FDs0zFzh5gJEl4CTM9fYPZWGJPQPaH1nAoBwgqHZE1WF0uh4144LhpYs9GlduCWQ3jQeVjXsFsZdZPSYXdPojWuL34Voqf1gb07y4lB4vNsjgX0MCWgmfG4Jm7I_MwoL3FGM3SQN_84HB4tHG58f3-ztGcxleLHe1VBfPj-Efh6FPeHNFg7Lyc28aIJf6Lti8Bv9FjBGl_x8j5VVCMC3OI6aRMl9fqjNw4qBFbYmAY9f42CiaGsbnlC2k4FIKuYBkHw9mEe9pG9jKYsbU8WWhYfmRSvsH_TDoUW9GnH_HA&s=1xKuCz2Q2xlrAqhAZHM8pamWFeh543argy38ZNbQpQD6ekAQ447D7chNnobbuZD1wIo_6cZ7bU3qxE2_YuhKzpIRuqyj0b4URKMwVUwQgkrojfJC75rZFXGmDj9bYyYxfEMoP-LzW3DEk7olHvp1YjvM63w0XQc1nGPa2HS9YWj0XmP_vmvukDQ-s3_4T7vXI72ol_wcsZbZ6T6yFkB98EzIbSz3NYQN7er1JTuAnqHdjaO8MXzrYERMX-SDq0r3E5ZwAYHkwP-cHyGdYMl_IC4vMzGmYEpftfSe1OzM5eAgmtGrzxj5V0Mxzq73gLkALdez3w2X26fOQTLbv6q8wA&h=O4uJ4YSh65vBpaRGbqq7rGslVKjr8CuO1X1grn0GpNU response: body: string: '{"status":"TestSucceeded","error":null,"diagnostics":null}' @@ -447,7 +447,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs?api-version=2021-10-01-preview response: body: string: "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output\",\r\n @@ -515,7 +515,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output\",\r\n @@ -577,7 +577,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output\",\r\n @@ -639,7 +639,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: '' @@ -2289,7 +2289,7 @@ interactions: User-Agent: - AZURECLI/2.77.0 azsdk-python-core/1.35.0 Python/3.12.10 (Windows-11-10.0.26100-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2020-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview response: body: string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output\",\r\n From ac0ca431ea29185aa9f076cebf5a04c0c7889401 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Aug 2026 07:14:43 +0000 Subject: [PATCH 3/5] Regenerate stream-analytics output commands Co-authored-by: huiii99 <243723033+huiii99@users.noreply.github.com> --- src/stream-analytics/HISTORY.rst | 4 + .../stream_analytics/output/__cmd_group.py | 2 +- .../latest/stream_analytics/output/_create.py | 1542 ++++++++++++- .../latest/stream_analytics/output/_delete.py | 3 + .../latest/stream_analytics/output/_list.py | 512 ++++- .../latest/stream_analytics/output/_show.py | 545 ++++- .../latest/stream_analytics/output/_test.py | 1003 ++++++++- .../latest/stream_analytics/output/_update.py | 1965 ++++++++++++++++- ...output_documentdb_authentication_mode.yaml | 234 ++ .../latest/test_stream_analytics_commands.py | 56 + src/stream-analytics/setup.py | 2 +- 11 files changed, 5746 insertions(+), 122 deletions(-) create mode 100644 src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_documentdb_authentication_mode.yaml diff --git a/src/stream-analytics/HISTORY.rst b/src/stream-analytics/HISTORY.rst index 11ac8910100..60cbc218c55 100644 --- a/src/stream-analytics/HISTORY.rst +++ b/src/stream-analytics/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +1.0.6 ++++++++++++++++ +* Regenerate `stream-analytics output` AAZ commands for `2021-10-01-preview` and fix managed identity outputs such as Cosmos DB. + 1.0.5 +++++++++++++++ * Migrate ``stream-analytics input`` commands to the aaz framework, upgrading the input API version to 2021-10-01-preview. diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py index ffd5935708a..3c4b518a3cf 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py @@ -15,7 +15,7 @@ "stream-analytics output", ) class __CMDGroup(AAZCommandGroup): - """Manage output with stream analytics. + """Manage Output """ pass diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py index 49daacf6efa..ecf1ea34737 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py @@ -16,6 +16,51 @@ ) class Create(AAZCommand): """Create an output or replaces an already existing output under an existing streaming job. + + :example: Create an Azure SQL database output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 + + :example: Create an Azure Table output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 + + :example: Create a blob output with CSV serialization + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 + + :example: Create a DocumentDB output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create an Azure Data Warehouse output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput + + :example: Create an Azure Function output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 + + :example: Create an Event Hub output with JSON serialization + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 + + :example: Create a Service Bus Queue output with Avro serialization + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 + + :example: Create a Service Bus Topic output with CSV serialization + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 + + :example: Create a Power BI output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create an Azure Data Lake Store output with JSON serialization + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 + + :example: Create a Gateway Message Bus output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create a PostgreSQL output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,maxWriterCount:1,authenticationMode:Msi},microsoft-db-for-postgre-sql-servers-databases:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,max-writer-count:1,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create a Delta Lake output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,maxWriterCount:1,authenticationMode:Msi},microsoft-db-for-postgre-sql-servers-databases:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,max-writer-count:1,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:deltaoutput,pathPattern:null,dateFormat:null,timeFormat:null},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:deltaoutput,path-pattern:null,date-format:null,time-format:null}}" --serialization "{properties:{deltaTablePath:/folder1/table1,partitionColumns:[column1]},delta:{delta-table-path:/folder1/table1,partition-columns:[column1]}}" --resource-group sjrg --job-name sjName --output-name output1221 + + :example: Create an Azure Data Explorer output + az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,maxWriterCount:1,authenticationMode:Msi},microsoft-db-for-postgre-sql-servers-databases:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,max-writer-count:1,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:deltaoutput,pathPattern:null,dateFormat:null,timeFormat:null},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:deltaoutput,path-pattern:null,date-format:null,time-format:null}}" --serialization "{properties:{deltaTablePath:/folder1/table1,partitionColumns:[column1]},delta:{delta-table-path:/folder1/table1,partition-columns:[column1]}}" --resource-group sjrg --job-name sjName --output-name output1221 --datasource "{properties:{cluster:'https://asakustotest.eastus.kusto.windows.net',database:dbname,table:mytable,authenticationMode:Msi},microsoft-kusto-clusters-databases:{cluster:'https://asakustotest.eastus.kusto.windows.net',database:dbname,table:mytable,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name adxOutput """ _aaz_info = { @@ -62,30 +107,668 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.resource_group = AAZResourceGroupNameArg( required=True, ) - _args_schema.datasource = AAZDictArg( + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.datasource = AAZObjectArg( options=["--datasource"], + arg_group="Properties", help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", ) - _args_schema.serialization = AAZDictArg( + _args_schema.serialization = AAZObjectArg( options=["--serialization"], + arg_group="Properties", help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", ) _args_schema.size_window = AAZIntArg( options=["--size-window"], + arg_group="Properties", help="The size window to constrain a Stream Analytics output to.", ) _args_schema.time_window = AAZStrArg( options=["--time-window"], + arg_group="Properties", help="The time frame for filtering Stream Analytics job outputs.", ) + _args_schema.watermark_settings = AAZObjectArg( + options=["--watermark-settings"], + arg_group="Properties", + help="Settings which determine whether to send watermarks to downstream.", + ) datasource = cls._args_schema.datasource - datasource.Element = AAZAnyTypeArg() + datasource.gateway_message_bus = AAZObjectArg( + options=["gateway-message-bus"], + ) + datasource.microsoft_azure_function = AAZObjectArg( + options=["microsoft-azure-function"], + ) + datasource.microsoft_db_for_postgre_sql_servers_databases = AAZObjectArg( + options=["microsoft-db-for-postgre-sql-servers-databases"], + ) + datasource.microsoft_data_lake_accounts = AAZObjectArg( + options=["microsoft-data-lake-accounts"], + ) + datasource.microsoft_event_hub_event_hub = AAZObjectArg( + options=["microsoft-event-hub-event-hub"], + ) + datasource.microsoft_kusto_clusters_databases = AAZObjectArg( + options=["microsoft-kusto-clusters-databases"], + ) + datasource.microsoft_service_bus_event_hub = AAZObjectArg( + options=["microsoft-service-bus-event-hub"], + ) + datasource.microsoft_service_bus_queue = AAZObjectArg( + options=["microsoft-service-bus-queue"], + ) + datasource.microsoft_service_bus_topic = AAZObjectArg( + options=["microsoft-service-bus-topic"], + ) + datasource.microsoft_sql_server_data_warehouse = AAZObjectArg( + options=["microsoft-sql-server-data-warehouse"], + ) + datasource.microsoft_sql_server_database = AAZObjectArg( + options=["microsoft-sql-server-database"], + ) + datasource.microsoft_storage_blob = AAZObjectArg( + options=["microsoft-storage-blob"], + ) + datasource.microsoft_storage_document_db = AAZObjectArg( + options=["microsoft-storage-document-db"], + ) + datasource.microsoft_storage_table = AAZObjectArg( + options=["microsoft-storage-table"], + ) + datasource.power_bi = AAZObjectArg( + options=["power-bi"], + ) + datasource.raw = AAZObjectArg( + options=["raw"], + ) + + gateway_message_bus = cls._args_schema.datasource.gateway_message_bus + gateway_message_bus.topic = AAZStrArg( + options=["topic"], + help="The name of the Service Bus topic.", + ) + + microsoft_azure_function = cls._args_schema.datasource.microsoft_azure_function + microsoft_azure_function.api_key = AAZStrArg( + options=["api-key"], + help="If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", + ) + microsoft_azure_function.function_app_name = AAZStrArg( + options=["function-app-name"], + help="The name of your Azure Functions app.", + ) + microsoft_azure_function.function_name = AAZStrArg( + options=["function-name"], + help="The name of the function in your Azure Functions app.", + ) + microsoft_azure_function.max_batch_count = AAZFloatArg( + options=["max-batch-count"], + help="A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", + ) + microsoft_azure_function.max_batch_size = AAZFloatArg( + options=["max-batch-size"], + help="A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", + ) + + microsoft_db_for_postgre_sql_servers_databases = cls._args_schema.datasource.microsoft_db_for_postgre_sql_servers_databases + microsoft_db_for_postgre_sql_servers_databases.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_db_for_postgre_sql_servers_databases.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.max_writer_count = AAZFloatArg( + options=["max-writer-count"], + help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_data_lake_accounts = cls._args_schema.datasource.microsoft_data_lake_accounts + microsoft_data_lake_accounts.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_data_lake_accounts.date_format = AAZStrArg( + options=["date-format"], + help="The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.", + ) + microsoft_data_lake_accounts.file_path_prefix = AAZStrArg( + options=["file-path-prefix"], + help="The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.refresh_token = AAZStrArg( + options=["refresh-token"], + help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.tenant_id = AAZStrArg( + options=["tenant-id"], + help="The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.time_format = AAZStrArg( + options=["time-format"], + help="The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.", + ) + microsoft_data_lake_accounts.token_user_display_name = AAZStrArg( + options=["token-user-display-name"], + help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + microsoft_data_lake_accounts.token_user_principal_name = AAZStrArg( + options=["token-user-principal-name"], + help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + + microsoft_event_hub_event_hub = cls._args_schema.datasource.microsoft_event_hub_event_hub + microsoft_event_hub_event_hub.properties = AAZObjectArg( + options=["properties"], + help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", + ) + cls._build_args_event_hub_output_data_source_properties_create(microsoft_event_hub_event_hub.properties) + + microsoft_kusto_clusters_databases = cls._args_schema.datasource.microsoft_kusto_clusters_databases + microsoft_kusto_clusters_databases.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_kusto_clusters_databases.cluster = AAZStrArg( + options=["cluster"], + help="The name of the Azure Data Explorer cluster. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_kusto_clusters_databases.database = AAZStrArg( + options=["database"], + help="The name of the Azure Data Explorer database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_kusto_clusters_databases.table = AAZStrArg( + options=["table"], + help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_service_bus_event_hub = cls._args_schema.datasource.microsoft_service_bus_event_hub + microsoft_service_bus_event_hub.properties = AAZObjectArg( + options=["properties"], + help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", + ) + cls._build_args_event_hub_output_data_source_properties_create(microsoft_service_bus_event_hub.properties) + + microsoft_service_bus_queue = cls._args_schema.datasource.microsoft_service_bus_queue + microsoft_service_bus_queue.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_service_bus_queue.property_columns = AAZListArg( + options=["property-columns"], + help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + ) + microsoft_service_bus_queue.queue_name = AAZStrArg( + options=["queue-name"], + help="The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.system_property_columns = AAZDictArg( + options=["system-property-columns"], + help="The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", + ) + + property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.property_columns + property_columns.Element = AAZStrArg() + + system_property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.system_property_columns + system_property_columns.Element = AAZAnyTypeArg() + + microsoft_service_bus_topic = cls._args_schema.datasource.microsoft_service_bus_topic + microsoft_service_bus_topic.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_service_bus_topic.property_columns = AAZListArg( + options=["property-columns"], + help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + ) + microsoft_service_bus_topic.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_topic.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_topic.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_topic.system_property_columns = AAZDictArg( + options=["system-property-columns"], + help="The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", + ) + microsoft_service_bus_topic.topic_name = AAZStrArg( + options=["topic-name"], + help="The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", + ) + + property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.property_columns + property_columns.Element = AAZStrArg() + + system_property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.system_property_columns + system_property_columns.Element = AAZStrArg() + + microsoft_sql_server_data_warehouse = cls._args_schema.datasource.microsoft_sql_server_data_warehouse + microsoft_sql_server_data_warehouse.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_sql_server_data_warehouse.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_sql_server_database = cls._args_schema.datasource.microsoft_sql_server_database + microsoft_sql_server_database.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_sql_server_database.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.max_batch_count = AAZFloatArg( + options=["max-batch-count"], + help="Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", + ) + microsoft_sql_server_database.max_writer_count = AAZFloatArg( + options=["max-writer-count"], + help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + ) + microsoft_sql_server_database.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_storage_blob = cls._args_schema.datasource.microsoft_storage_blob + microsoft_storage_blob.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_storage_blob.blob_path_prefix = AAZStrArg( + options=["blob-path-prefix"], + help="Blob path prefix.", + ) + microsoft_storage_blob.blob_write_mode = AAZStrArg( + options=["blob-write-mode"], + help="Blob write mode.", + enum={"Append": "Append", "Once": "Once"}, + ) + microsoft_storage_blob.container = AAZStrArg( + options=["container"], + help="The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_blob.date_format = AAZStrArg( + options=["date-format"], + help="The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", + ) + microsoft_storage_blob.path_pattern = AAZStrArg( + options=["path-pattern"], + help="The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", + ) + microsoft_storage_blob.storage_accounts = AAZListArg( + options=["storage-accounts"], + help="A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_blob.time_format = AAZStrArg( + options=["time-format"], + help="The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", + ) + + storage_accounts = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts + storage_accounts.Element = AAZObjectArg() + + _element = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts.Element + _element.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + _element.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + _element.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + + microsoft_storage_document_db = cls._args_schema.datasource.microsoft_storage_document_db + microsoft_storage_document_db.account_id = AAZStrArg( + options=["account-id"], + help="The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_storage_document_db.collection_name_pattern = AAZStrArg( + options=["collection-name-pattern"], + help="The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.database = AAZStrArg( + options=["database"], + help="The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.document_id = AAZStrArg( + options=["document-id"], + help="The name of the field in output events used to specify the primary key which insert or update operations are based on.", + ) + microsoft_storage_document_db.partition_key = AAZStrArg( + options=["partition-key"], + help="The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.", + ) + + microsoft_storage_table = cls._args_schema.datasource.microsoft_storage_table + microsoft_storage_table.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.batch_size = AAZIntArg( + options=["batch-size"], + help="The number of rows to write to the Azure Table at a time.", + ) + microsoft_storage_table.columns_to_remove = AAZListArg( + options=["columns-to-remove"], + help="If specified, each item in the array is the name of a column to remove (if present) from output event entities.", + ) + microsoft_storage_table.partition_key = AAZStrArg( + options=["partition-key"], + help="This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.row_key = AAZStrArg( + options=["row-key"], + help="This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.table = AAZStrArg( + options=["table"], + help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + + columns_to_remove = cls._args_schema.datasource.microsoft_storage_table.columns_to_remove + columns_to_remove.Element = AAZStrArg() + + power_bi = cls._args_schema.datasource.power_bi + power_bi.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + power_bi.dataset = AAZStrArg( + options=["dataset"], + help="The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", + ) + power_bi.group_id = AAZStrArg( + options=["group-id"], + help="The ID of the Power BI group.", + ) + power_bi.group_name = AAZStrArg( + options=["group-name"], + help="The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", + ) + power_bi.refresh_token = AAZStrArg( + options=["refresh-token"], + help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + ) + power_bi.table = AAZStrArg( + options=["table"], + help="The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", + ) + power_bi.token_user_display_name = AAZStrArg( + options=["token-user-display-name"], + help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + power_bi.token_user_principal_name = AAZStrArg( + options=["token-user-principal-name"], + help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + + raw = cls._args_schema.datasource.raw + raw.payload_uri = AAZStrArg( + options=["payload-uri"], + help="The SAS URL to a blob where the output should be written. If this property is not set, output data will be written into a temporary storage, and a SAS URL to that temporary storage will be included in the result.", + ) serialization = cls._args_schema.serialization - serialization.Element = AAZAnyTypeArg() + serialization.avro = AAZObjectArg( + options=["avro"], + blank={}, + ) + serialization.csv = AAZObjectArg( + options=["csv"], + ) + serialization.custom_clr = AAZObjectArg( + options=["custom-clr"], + ) + serialization.delta = AAZObjectArg( + options=["delta"], + ) + serialization.json = AAZObjectArg( + options=["json"], + ) + serialization.parquet = AAZObjectArg( + options=["parquet"], + blank={}, + ) + + csv = cls._args_schema.serialization.csv + csv.encoding = AAZStrArg( + options=["encoding"], + help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + enum={"UTF8": "UTF8"}, + ) + csv.field_delimiter = AAZStrArg( + options=["field-delimiter"], + help="Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", + ) + + custom_clr = cls._args_schema.serialization.custom_clr + custom_clr.serialization_class_name = AAZStrArg( + options=["serialization-class-name"], + help="The serialization class name.", + ) + custom_clr.serialization_dll_path = AAZStrArg( + options=["serialization-dll-path"], + help="The serialization library path.", + ) + + delta = cls._args_schema.serialization.delta + delta.delta_table_path = AAZStrArg( + options=["delta-table-path"], + help="Specifies the path of the Delta Lake table that the output will be written to.", + ) + delta.partition_columns = AAZListArg( + options=["partition-columns"], + help="Specifies the names of the columns for which the Delta Lake table will be partitioned. We are only supporting 1 partition column, but keeping it as an array for extensibility.", + ) + + partition_columns = cls._args_schema.serialization.delta.partition_columns + partition_columns.Element = AAZStrArg() + + json = cls._args_schema.serialization.json + json.encoding = AAZStrArg( + options=["encoding"], + help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + enum={"UTF8": "UTF8"}, + ) + json.format = AAZStrArg( + options=["format"], + help="This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", + enum={"Array": "Array", "LineSeparated": "LineSeparated"}, + ) + + watermark_settings = cls._args_schema.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( + options=["max-watermark-difference-across-partitions"], + help="Describes the maximal delta between the fastest and slowest partitions, so the out of order window that catches all necessary events in downstream jobs is well defined.", + ) + watermark_settings.watermark_mode = AAZStrArg( + options=["watermark-mode"], + help="The output watermark mode.", + enum={"None": "None", "SendCurrentPartitionWatermark": "SendCurrentPartitionWatermark", "SendLowestWatermarkAcrossPartitions": "SendLowestWatermarkAcrossPartitions"}, + ) return cls._args_schema + _args_event_hub_output_data_source_properties_create = None + + @classmethod + def _build_args_event_hub_output_data_source_properties_create(cls, _schema): + if cls._args_event_hub_output_data_source_properties_create is not None: + _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_create.authentication_mode + _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_create.event_hub_name + _schema.partition_count = cls._args_event_hub_output_data_source_properties_create.partition_count + _schema.partition_key = cls._args_event_hub_output_data_source_properties_create.partition_key + _schema.property_columns = cls._args_event_hub_output_data_source_properties_create.property_columns + _schema.service_bus_namespace = cls._args_event_hub_output_data_source_properties_create.service_bus_namespace + _schema.shared_access_policy_key = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_key + _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_name + return + + cls._args_event_hub_output_data_source_properties_create = AAZObjectArg() + + event_hub_output_data_source_properties_create = cls._args_event_hub_output_data_source_properties_create + event_hub_output_data_source_properties_create.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + event_hub_output_data_source_properties_create.event_hub_name = AAZStrArg( + options=["event-hub-name"], + help="The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + ) + event_hub_output_data_source_properties_create.partition_count = AAZIntArg( + options=["partition-count"], + help="The partition count of the event hub data source. Range 1 - 256.", + ) + event_hub_output_data_source_properties_create.partition_key = AAZStrArg( + options=["partition-key"], + help="The key/column that is used to determine to which partition to send event data.", + ) + event_hub_output_data_source_properties_create.property_columns = AAZListArg( + options=["property-columns"], + help="The properties associated with this Event Hub output.", + ) + event_hub_output_data_source_properties_create.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + event_hub_output_data_source_properties_create.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + ) + event_hub_output_data_source_properties_create.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + + property_columns = cls._args_event_hub_output_data_source_properties_create.property_columns + property_columns.Element = AAZStrArg() + + _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_create.authentication_mode + _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_create.event_hub_name + _schema.partition_count = cls._args_event_hub_output_data_source_properties_create.partition_count + _schema.partition_key = cls._args_event_hub_output_data_source_properties_create.partition_key + _schema.property_columns = cls._args_event_hub_output_data_source_properties_create.property_columns + _schema.service_bus_namespace = cls._args_event_hub_output_data_source_properties_create.service_bus_namespace + _schema.shared_access_policy_key = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_key + _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_name + def _execute_operations(self): self.pre_operations() self.OutputsCreateOrReplace(ctx=self.ctx)() @@ -191,18 +874,335 @@ def content(self): properties = _builder.get(".properties") if properties is not None: - properties.set_prop("datasource", AAZDictType, ".datasource") - properties.set_prop("serialization", AAZDictType, ".serialization") + properties.set_prop("datasource", AAZObjectType, ".datasource") + properties.set_prop("serialization", AAZObjectType, ".serialization") properties.set_prop("sizeWindow", AAZIntType, ".size_window") properties.set_prop("timeWindow", AAZStrType, ".time_window") + properties.set_prop("watermarkSettings", AAZObjectType, ".watermark_settings") datasource = _builder.get(".properties.datasource") if datasource is not None: - datasource.set_elements(AAZAnyType, ".") + datasource.set_const("type", "GatewayMessageBus", AAZStrType, ".gateway_message_bus", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.AzureFunction", AAZStrType, ".microsoft_azure_function", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.DBForPostgreSQL/servers/databases", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.DataLake/Accounts", AAZStrType, ".microsoft_data_lake_accounts", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.EventHub/EventHub", AAZStrType, ".microsoft_event_hub_event_hub", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Kusto/clusters/databases", AAZStrType, ".microsoft_kusto_clusters_databases", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/EventHub", AAZStrType, ".microsoft_service_bus_event_hub", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/Queue", AAZStrType, ".microsoft_service_bus_queue", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/Topic", AAZStrType, ".microsoft_service_bus_topic", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Sql/Server/DataWarehouse", AAZStrType, ".microsoft_sql_server_data_warehouse", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Sql/Server/Database", AAZStrType, ".microsoft_sql_server_database", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/Blob", AAZStrType, ".microsoft_storage_blob", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/DocumentDB", AAZStrType, ".microsoft_storage_document_db", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/Table", AAZStrType, ".microsoft_storage_table", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "PowerBI", AAZStrType, ".power_bi", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Raw", AAZStrType, ".raw", typ_kwargs={"flags": {"required": True}}) + datasource.discriminate_by("type", "GatewayMessageBus") + datasource.discriminate_by("type", "Microsoft.AzureFunction") + datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + datasource.discriminate_by("type", "Microsoft.Storage/Blob") + datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + datasource.discriminate_by("type", "Microsoft.Storage/Table") + datasource.discriminate_by("type", "PowerBI") + datasource.discriminate_by("type", "Raw") + + disc_gateway_message_bus = _builder.get(".properties.datasource{type:GatewayMessageBus}") + if disc_gateway_message_bus is not None: + disc_gateway_message_bus.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:GatewayMessageBus}.properties") + if properties is not None: + properties.set_prop("topic", AAZStrType, ".gateway_message_bus.topic") + + disc_microsoft__azure_function = _builder.get(".properties.datasource{type:Microsoft.AzureFunction}") + if disc_microsoft__azure_function is not None: + disc_microsoft__azure_function.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.AzureFunction}.properties") + if properties is not None: + properties.set_prop("apiKey", AAZStrType, ".microsoft_azure_function.api_key") + properties.set_prop("functionAppName", AAZStrType, ".microsoft_azure_function.function_app_name") + properties.set_prop("functionName", AAZStrType, ".microsoft_azure_function.function_name") + properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_azure_function.max_batch_count") + properties.set_prop("maxBatchSize", AAZFloatType, ".microsoft_azure_function.max_batch_size") + + disc_microsoft_db_for_postgre_sql_servers_databases = _builder.get(".properties.datasource{type:Microsoft.DBForPostgreSQL/servers/databases}") + if disc_microsoft_db_for_postgre_sql_servers_databases is not None: + disc_microsoft_db_for_postgre_sql_servers_databases.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.DBForPostgreSQL/servers/databases}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.database") + properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_db_for_postgre_sql_servers_databases.max_writer_count") + properties.set_prop("password", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("server", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.server") + properties.set_prop("table", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.table") + properties.set_prop("user", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.user") + + disc_microsoft__data_lake__accounts = _builder.get(".properties.datasource{type:Microsoft.DataLake/Accounts}") + if disc_microsoft__data_lake__accounts is not None: + disc_microsoft__data_lake__accounts.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.DataLake/Accounts}.properties") + if properties is not None: + properties.set_prop("accountName", AAZStrType, ".microsoft_data_lake_accounts.account_name") + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_data_lake_accounts.authentication_mode") + properties.set_prop("dateFormat", AAZStrType, ".microsoft_data_lake_accounts.date_format") + properties.set_prop("filePathPrefix", AAZStrType, ".microsoft_data_lake_accounts.file_path_prefix") + properties.set_prop("refreshToken", AAZStrType, ".microsoft_data_lake_accounts.refresh_token") + properties.set_prop("tenantId", AAZStrType, ".microsoft_data_lake_accounts.tenant_id") + properties.set_prop("timeFormat", AAZStrType, ".microsoft_data_lake_accounts.time_format") + properties.set_prop("tokenUserDisplayName", AAZStrType, ".microsoft_data_lake_accounts.token_user_display_name") + properties.set_prop("tokenUserPrincipalName", AAZStrType, ".microsoft_data_lake_accounts.token_user_principal_name") + + disc_microsoft__event_hub__event_hub = _builder.get(".properties.datasource{type:Microsoft.EventHub/EventHub}") + if disc_microsoft__event_hub__event_hub is not None: + _CreateHelper._build_schema_event_hub_output_data_source_properties_create(disc_microsoft__event_hub__event_hub.set_prop("properties", AAZObjectType, ".microsoft_event_hub_event_hub.properties", typ_kwargs={"flags": {"client_flatten": True}})) + + disc_microsoft__kusto_clusters_databases = _builder.get(".properties.datasource{type:Microsoft.Kusto/clusters/databases}") + if disc_microsoft__kusto_clusters_databases is not None: + disc_microsoft__kusto_clusters_databases.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Kusto/clusters/databases}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_kusto_clusters_databases.authentication_mode") + properties.set_prop("cluster", AAZStrType, ".microsoft_kusto_clusters_databases.cluster") + properties.set_prop("database", AAZStrType, ".microsoft_kusto_clusters_databases.database") + properties.set_prop("table", AAZStrType, ".microsoft_kusto_clusters_databases.table") + + disc_microsoft__service_bus__event_hub = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/EventHub}") + if disc_microsoft__service_bus__event_hub is not None: + _CreateHelper._build_schema_event_hub_output_data_source_properties_create(disc_microsoft__service_bus__event_hub.set_prop("properties", AAZObjectType, ".microsoft_service_bus_event_hub.properties", typ_kwargs={"flags": {"client_flatten": True}})) + + disc_microsoft__service_bus__queue = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}") + if disc_microsoft__service_bus__queue is not None: + disc_microsoft__service_bus__queue.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_service_bus_queue.authentication_mode") + properties.set_prop("propertyColumns", AAZListType, ".microsoft_service_bus_queue.property_columns") + properties.set_prop("queueName", AAZStrType, ".microsoft_service_bus_queue.queue_name") + properties.set_prop("serviceBusNamespace", AAZStrType, ".microsoft_service_bus_queue.service_bus_namespace") + properties.set_prop("sharedAccessPolicyKey", AAZStrType, ".microsoft_service_bus_queue.shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("sharedAccessPolicyName", AAZStrType, ".microsoft_service_bus_queue.shared_access_policy_name") + properties.set_prop("systemPropertyColumns", AAZDictType, ".microsoft_service_bus_queue.system_property_columns") + + property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties.propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + system_property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties.systemPropertyColumns") + if system_property_columns is not None: + system_property_columns.set_elements(AAZAnyType, ".") + + disc_microsoft__service_bus__topic = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}") + if disc_microsoft__service_bus__topic is not None: + disc_microsoft__service_bus__topic.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_service_bus_topic.authentication_mode") + properties.set_prop("propertyColumns", AAZListType, ".microsoft_service_bus_topic.property_columns") + properties.set_prop("serviceBusNamespace", AAZStrType, ".microsoft_service_bus_topic.service_bus_namespace") + properties.set_prop("sharedAccessPolicyKey", AAZStrType, ".microsoft_service_bus_topic.shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("sharedAccessPolicyName", AAZStrType, ".microsoft_service_bus_topic.shared_access_policy_name") + properties.set_prop("systemPropertyColumns", AAZDictType, ".microsoft_service_bus_topic.system_property_columns") + properties.set_prop("topicName", AAZStrType, ".microsoft_service_bus_topic.topic_name") + + property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties.propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + system_property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties.systemPropertyColumns") + if system_property_columns is not None: + system_property_columns.set_elements(AAZStrType, ".") + + disc_microsoft__sql__server__data_warehouse = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/DataWarehouse}") + if disc_microsoft__sql__server__data_warehouse is not None: + disc_microsoft__sql__server__data_warehouse.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/DataWarehouse}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_sql_server_data_warehouse.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_sql_server_data_warehouse.database") + properties.set_prop("password", AAZStrType, ".microsoft_sql_server_data_warehouse.password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("server", AAZStrType, ".microsoft_sql_server_data_warehouse.server") + properties.set_prop("table", AAZStrType, ".microsoft_sql_server_data_warehouse.table") + properties.set_prop("user", AAZStrType, ".microsoft_sql_server_data_warehouse.user") + + disc_microsoft__sql__server__database = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/Database}") + if disc_microsoft__sql__server__database is not None: + disc_microsoft__sql__server__database.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/Database}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_sql_server_database.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_sql_server_database.database") + properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_sql_server_database.max_batch_count") + properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_sql_server_database.max_writer_count") + properties.set_prop("password", AAZStrType, ".microsoft_sql_server_database.password") + properties.set_prop("server", AAZStrType, ".microsoft_sql_server_database.server") + properties.set_prop("table", AAZStrType, ".microsoft_sql_server_database.table") + properties.set_prop("user", AAZStrType, ".microsoft_sql_server_database.user") + + disc_microsoft__storage__blob = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}") + if disc_microsoft__storage__blob is not None: + disc_microsoft__storage__blob.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_storage_blob.authentication_mode") + properties.set_prop("blobPathPrefix", AAZStrType, ".microsoft_storage_blob.blob_path_prefix") + properties.set_prop("blobWriteMode", AAZStrType, ".microsoft_storage_blob.blob_write_mode") + properties.set_prop("container", AAZStrType, ".microsoft_storage_blob.container") + properties.set_prop("dateFormat", AAZStrType, ".microsoft_storage_blob.date_format") + properties.set_prop("pathPattern", AAZStrType, ".microsoft_storage_blob.path_pattern") + properties.set_prop("storageAccounts", AAZListType, ".microsoft_storage_blob.storage_accounts") + properties.set_prop("timeFormat", AAZStrType, ".microsoft_storage_blob.time_format") + + storage_accounts = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties.storageAccounts") + if storage_accounts is not None: + storage_accounts.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties.storageAccounts[]") + if _elements is not None: + _elements.set_prop("accountKey", AAZStrType, ".account_key", typ_kwargs={"flags": {"secret": True}}) + _elements.set_prop("accountName", AAZStrType, ".account_name") + _elements.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + + disc_microsoft__storage__document_db = _builder.get(".properties.datasource{type:Microsoft.Storage/DocumentDB}") + if disc_microsoft__storage__document_db is not None: + disc_microsoft__storage__document_db.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/DocumentDB}.properties") + if properties is not None: + properties.set_prop("accountId", AAZStrType, ".microsoft_storage_document_db.account_id") + properties.set_prop("accountKey", AAZStrType, ".microsoft_storage_document_db.account_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_storage_document_db.authentication_mode") + properties.set_prop("collectionNamePattern", AAZStrType, ".microsoft_storage_document_db.collection_name_pattern") + properties.set_prop("database", AAZStrType, ".microsoft_storage_document_db.database") + properties.set_prop("documentId", AAZStrType, ".microsoft_storage_document_db.document_id") + properties.set_prop("partitionKey", AAZStrType, ".microsoft_storage_document_db.partition_key") + + disc_microsoft__storage__table = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}") + if disc_microsoft__storage__table is not None: + disc_microsoft__storage__table.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}.properties") + if properties is not None: + properties.set_prop("accountKey", AAZStrType, ".microsoft_storage_table.account_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("accountName", AAZStrType, ".microsoft_storage_table.account_name") + properties.set_prop("batchSize", AAZIntType, ".microsoft_storage_table.batch_size") + properties.set_prop("columnsToRemove", AAZListType, ".microsoft_storage_table.columns_to_remove") + properties.set_prop("partitionKey", AAZStrType, ".microsoft_storage_table.partition_key") + properties.set_prop("rowKey", AAZStrType, ".microsoft_storage_table.row_key") + properties.set_prop("table", AAZStrType, ".microsoft_storage_table.table") + + columns_to_remove = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}.properties.columnsToRemove") + if columns_to_remove is not None: + columns_to_remove.set_elements(AAZStrType, ".") + + disc_power_bi = _builder.get(".properties.datasource{type:PowerBI}") + if disc_power_bi is not None: + disc_power_bi.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:PowerBI}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".power_bi.authentication_mode") + properties.set_prop("dataset", AAZStrType, ".power_bi.dataset") + properties.set_prop("groupId", AAZStrType, ".power_bi.group_id") + properties.set_prop("groupName", AAZStrType, ".power_bi.group_name") + properties.set_prop("refreshToken", AAZStrType, ".power_bi.refresh_token") + properties.set_prop("table", AAZStrType, ".power_bi.table") + properties.set_prop("tokenUserDisplayName", AAZStrType, ".power_bi.token_user_display_name") + properties.set_prop("tokenUserPrincipalName", AAZStrType, ".power_bi.token_user_principal_name") + + disc_raw = _builder.get(".properties.datasource{type:Raw}") + if disc_raw is not None: + disc_raw.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Raw}.properties") + if properties is not None: + properties.set_prop("payloadUri", AAZStrType, ".raw.payload_uri") serialization = _builder.get(".properties.serialization") if serialization is not None: - serialization.set_elements(AAZAnyType, ".") + serialization.set_const("type", "Avro", AAZStrType, ".avro", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Csv", AAZStrType, ".csv", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "CustomClr", AAZStrType, ".custom_clr", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Delta", AAZStrType, ".delta", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Json", AAZStrType, ".json", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Parquet", AAZStrType, ".parquet", typ_kwargs={"flags": {"required": True}}) + serialization.discriminate_by("type", "Avro") + serialization.discriminate_by("type", "Csv") + serialization.discriminate_by("type", "CustomClr") + serialization.discriminate_by("type", "Delta") + serialization.discriminate_by("type", "Json") + serialization.discriminate_by("type", "Parquet") + + disc_avro = _builder.get(".properties.serialization{type:Avro}") + if disc_avro is not None: + disc_avro.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + disc_csv = _builder.get(".properties.serialization{type:Csv}") + if disc_csv is not None: + disc_csv.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Csv}.properties") + if properties is not None: + properties.set_prop("encoding", AAZStrType, ".csv.encoding") + properties.set_prop("fieldDelimiter", AAZStrType, ".csv.field_delimiter") + + disc_custom_clr = _builder.get(".properties.serialization{type:CustomClr}") + if disc_custom_clr is not None: + disc_custom_clr.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:CustomClr}.properties") + if properties is not None: + properties.set_prop("serializationClassName", AAZStrType, ".custom_clr.serialization_class_name") + properties.set_prop("serializationDllPath", AAZStrType, ".custom_clr.serialization_dll_path") + + disc_delta = _builder.get(".properties.serialization{type:Delta}") + if disc_delta is not None: + disc_delta.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Delta}.properties") + if properties is not None: + properties.set_prop("deltaTablePath", AAZStrType, ".delta.delta_table_path", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("partitionColumns", AAZListType, ".delta.partition_columns") + + partition_columns = _builder.get(".properties.serialization{type:Delta}.properties.partitionColumns") + if partition_columns is not None: + partition_columns.set_elements(AAZStrType, ".") + + disc_json = _builder.get(".properties.serialization{type:Json}") + if disc_json is not None: + disc_json.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Json}.properties") + if properties is not None: + properties.set_prop("encoding", AAZStrType, ".json.encoding") + properties.set_prop("format", AAZStrType, ".json.format") + + disc_parquet = _builder.get(".properties.serialization{type:Parquet}") + if disc_parquet is not None: + disc_parquet.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + watermark_settings = _builder.get(".properties.watermarkSettings") + if watermark_settings is not None: + watermark_settings.set_prop("maxWatermarkDifferenceAcrossPartitions", AAZStrType, ".max_watermark_difference_across_partitions") + watermark_settings.set_prop("watermarkMode", AAZStrType, ".watermark_mode") return self.serialize_content(_content_value) @@ -236,23 +1236,387 @@ def _build_schema_on_200_201(cls): ) properties = cls._schema_on_200_201.properties - properties.datasource = AAZDictType() + properties.datasource = AAZObjectType() properties.diagnostics = AAZObjectType( flags={"read_only": True}, ) properties.etag = AAZStrType( flags={"read_only": True}, ) - properties.serialization = AAZDictType() + properties.last_output_event_timestamps = AAZListType( + serialized_name="lastOutputEventTimestamps", + flags={"read_only": True}, + ) + properties.serialization = AAZObjectType() properties.size_window = AAZIntType( serialized_name="sizeWindow", ) properties.time_window = AAZStrType( serialized_name="timeWindow", ) + properties.watermark_settings = AAZObjectType( + serialized_name="watermarkSettings", + ) datasource = cls._schema_on_200_201.properties.datasource - datasource.Element = AAZAnyType() + datasource.type = AAZStrType( + flags={"required": True}, + ) + + disc_gateway_message_bus = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "GatewayMessageBus") + disc_gateway_message_bus.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "GatewayMessageBus").properties + properties.topic = AAZStrType() + + disc_microsoft__azure_function = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction") + disc_microsoft__azure_function.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction").properties + properties.api_key = AAZStrType( + serialized_name="apiKey", + ) + properties.function_app_name = AAZStrType( + serialized_name="functionAppName", + ) + properties.function_name = AAZStrType( + serialized_name="functionName", + ) + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_batch_size = AAZFloatType( + serialized_name="maxBatchSize", + ) + + disc_microsoft_db_for_postgre_sql_servers_databases = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + disc_microsoft_db_for_postgre_sql_servers_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__data_lake__accounts = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + disc_microsoft__data_lake__accounts.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts").properties + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.file_path_prefix = AAZStrType( + serialized_name="filePathPrefix", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.tenant_id = AAZStrType( + serialized_name="tenantId", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_microsoft__event_hub__event_hub = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + disc_microsoft__event_hub__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _CreateHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__event_hub__event_hub.properties) + + disc_microsoft__kusto_clusters_databases = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + disc_microsoft__kusto_clusters_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.cluster = AAZStrType() + properties.database = AAZStrType() + properties.table = AAZStrType() + + disc_microsoft__service_bus__event_hub = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + disc_microsoft__service_bus__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _CreateHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__service_bus__event_hub.properties) + + disc_microsoft__service_bus__queue = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + disc_microsoft__service_bus__queue.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.queue_name = AAZStrType( + serialized_name="queueName", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + + property_columns = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.system_property_columns + system_property_columns.Element = AAZAnyType() + + disc_microsoft__service_bus__topic = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + disc_microsoft__service_bus__topic.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + properties.topic_name = AAZStrType( + serialized_name="topicName", + ) + + property_columns = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.system_property_columns + system_property_columns.Element = AAZStrType() + + disc_microsoft__sql__server__data_warehouse = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + disc_microsoft__sql__server__data_warehouse.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__sql__server__database = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + disc_microsoft__sql__server__database.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType() + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__storage__blob = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob") + disc_microsoft__storage__blob.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.blob_path_prefix = AAZStrType( + serialized_name="blobPathPrefix", + ) + properties.blob_write_mode = AAZStrType( + serialized_name="blobWriteMode", + ) + properties.container = AAZStrType() + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.path_pattern = AAZStrType( + serialized_name="pathPattern", + ) + properties.storage_accounts = AAZListType( + serialized_name="storageAccounts", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + + storage_accounts = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts + storage_accounts.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts.Element + _element.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + _element.account_name = AAZStrType( + serialized_name="accountName", + ) + _element.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + + disc_microsoft__storage__document_db = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + disc_microsoft__storage__document_db.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB").properties + properties.account_id = AAZStrType( + serialized_name="accountId", + ) + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.collection_name_pattern = AAZStrType( + serialized_name="collectionNamePattern", + ) + properties.database = AAZStrType() + properties.document_id = AAZStrType( + serialized_name="documentId", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + + disc_microsoft__storage__table = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table") + disc_microsoft__storage__table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.batch_size = AAZIntType( + serialized_name="batchSize", + ) + properties.columns_to_remove = AAZListType( + serialized_name="columnsToRemove", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + properties.row_key = AAZStrType( + serialized_name="rowKey", + ) + properties.table = AAZStrType() + + columns_to_remove = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties.columns_to_remove + columns_to_remove.Element = AAZStrType() + + disc_power_bi = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "PowerBI") + disc_power_bi.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "PowerBI").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.dataset = AAZStrType() + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.group_name = AAZStrType( + serialized_name="groupName", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.table = AAZStrType() + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_raw = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Raw") + disc_raw.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.datasource.discriminate_by("type", "Raw").properties + properties.payload_uri = AAZStrType( + serialized_name="payloadUri", + ) diagnostics = cls._schema_on_200_201.properties.diagnostics diagnostics.conditions = AAZListType( @@ -273,8 +1637,89 @@ def _build_schema_on_200_201(cls): flags={"read_only": True}, ) + last_output_event_timestamps = cls._schema_on_200_201.properties.last_output_event_timestamps + last_output_event_timestamps.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.last_output_event_timestamps.Element + _element.last_output_event_time = AAZStrType( + serialized_name="lastOutputEventTime", + ) + _element.last_update_time = AAZStrType( + serialized_name="lastUpdateTime", + ) + serialization = cls._schema_on_200_201.properties.serialization - serialization.Element = AAZAnyType() + serialization.type = AAZStrType( + flags={"required": True}, + ) + + disc_avro = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Avro") + disc_avro.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + disc_csv = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Csv") + disc_csv.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Csv").properties + properties.encoding = AAZStrType() + properties.field_delimiter = AAZStrType( + serialized_name="fieldDelimiter", + ) + + disc_custom_clr = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "CustomClr") + disc_custom_clr.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "CustomClr").properties + properties.serialization_class_name = AAZStrType( + serialized_name="serializationClassName", + ) + properties.serialization_dll_path = AAZStrType( + serialized_name="serializationDllPath", + ) + + disc_delta = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Delta") + disc_delta.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Delta").properties + properties.delta_table_path = AAZStrType( + serialized_name="deltaTablePath", + flags={"required": True}, + ) + properties.partition_columns = AAZListType( + serialized_name="partitionColumns", + ) + + partition_columns = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Delta").properties.partition_columns + partition_columns.Element = AAZStrType() + + disc_json = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Json") + disc_json.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Json").properties + properties.encoding = AAZStrType() + properties.format = AAZStrType() + + disc_parquet = cls._schema_on_200_201.properties.serialization.discriminate_by("type", "Parquet") + disc_parquet.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + watermark_settings = cls._schema_on_200_201.properties.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrType( + serialized_name="maxWatermarkDifferenceAcrossPartitions", + ) + watermark_settings.watermark_mode = AAZStrType( + serialized_name="watermarkMode", + ) return cls._schema_on_200_201 @@ -282,5 +1727,78 @@ def _build_schema_on_200_201(cls): class _CreateHelper: """Helper class for Create""" + @classmethod + def _build_schema_event_hub_output_data_source_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + _builder.set_prop("eventHubName", AAZStrType, ".event_hub_name") + _builder.set_prop("partitionCount", AAZIntType, ".partition_count") + _builder.set_prop("partitionKey", AAZStrType, ".partition_key") + _builder.set_prop("propertyColumns", AAZListType, ".property_columns") + _builder.set_prop("serviceBusNamespace", AAZStrType, ".service_bus_namespace") + _builder.set_prop("sharedAccessPolicyKey", AAZStrType, ".shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + _builder.set_prop("sharedAccessPolicyName", AAZStrType, ".shared_access_policy_name") + + property_columns = _builder.get(".propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + _schema_event_hub_output_data_source_properties_read = None + + @classmethod + def _build_schema_event_hub_output_data_source_properties_read(cls, _schema): + if cls._schema_event_hub_output_data_source_properties_read is not None: + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + return + + cls._schema_event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read = AAZObjectType() + + event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read + event_hub_output_data_source_properties_read.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + event_hub_output_data_source_properties_read.event_hub_name = AAZStrType( + serialized_name="eventHubName", + ) + event_hub_output_data_source_properties_read.partition_count = AAZIntType( + serialized_name="partitionCount", + ) + event_hub_output_data_source_properties_read.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + event_hub_output_data_source_properties_read.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + event_hub_output_data_source_properties_read.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + event_hub_output_data_source_properties_read.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + event_hub_output_data_source_properties_read.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + + property_columns = _schema_event_hub_output_data_source_properties_read.property_columns + property_columns.Element = AAZStrType() + + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + __all__ = ["Create"] diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py index 2da6b318dcf..febec615cdf 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py @@ -17,6 +17,9 @@ ) class Delete(AAZCommand): """Delete an output from the streaming job. + + :example: Delete an output + az stream-analytics output delete --resource-group sjrg2157 --job-name sj6458 --output-name output1755 """ _aaz_info = { diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py index e39677b91b3..8cb6c8ecae3 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List all of the outputs under the specified streaming job. + + :example: List all outputs in a streaming job + az stream-analytics output list --resource-group sjrg2157 --job-name sj6458 """ _aaz_info = { @@ -182,23 +185,387 @@ def _build_schema_on_200(cls): ) properties = cls._schema_on_200.value.Element.properties - properties.datasource = AAZDictType() + properties.datasource = AAZObjectType() properties.diagnostics = AAZObjectType( flags={"read_only": True}, ) properties.etag = AAZStrType( flags={"read_only": True}, ) - properties.serialization = AAZDictType() + properties.last_output_event_timestamps = AAZListType( + serialized_name="lastOutputEventTimestamps", + flags={"read_only": True}, + ) + properties.serialization = AAZObjectType() properties.size_window = AAZIntType( serialized_name="sizeWindow", ) properties.time_window = AAZStrType( serialized_name="timeWindow", ) + properties.watermark_settings = AAZObjectType( + serialized_name="watermarkSettings", + ) datasource = cls._schema_on_200.value.Element.properties.datasource - datasource.Element = AAZAnyType() + datasource.type = AAZStrType( + flags={"required": True}, + ) + + disc_gateway_message_bus = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "GatewayMessageBus") + disc_gateway_message_bus.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "GatewayMessageBus").properties + properties.topic = AAZStrType() + + disc_microsoft__azure_function = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction") + disc_microsoft__azure_function.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction").properties + properties.api_key = AAZStrType( + serialized_name="apiKey", + ) + properties.function_app_name = AAZStrType( + serialized_name="functionAppName", + ) + properties.function_name = AAZStrType( + serialized_name="functionName", + ) + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_batch_size = AAZFloatType( + serialized_name="maxBatchSize", + ) + + disc_microsoft_db_for_postgre_sql_servers_databases = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + disc_microsoft_db_for_postgre_sql_servers_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__data_lake__accounts = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + disc_microsoft__data_lake__accounts.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts").properties + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.file_path_prefix = AAZStrType( + serialized_name="filePathPrefix", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.tenant_id = AAZStrType( + serialized_name="tenantId", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_microsoft__event_hub__event_hub = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + disc_microsoft__event_hub__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _ListHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__event_hub__event_hub.properties) + + disc_microsoft__kusto_clusters_databases = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + disc_microsoft__kusto_clusters_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.cluster = AAZStrType() + properties.database = AAZStrType() + properties.table = AAZStrType() + + disc_microsoft__service_bus__event_hub = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + disc_microsoft__service_bus__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _ListHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__service_bus__event_hub.properties) + + disc_microsoft__service_bus__queue = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + disc_microsoft__service_bus__queue.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.queue_name = AAZStrType( + serialized_name="queueName", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + + property_columns = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.system_property_columns + system_property_columns.Element = AAZAnyType() + + disc_microsoft__service_bus__topic = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + disc_microsoft__service_bus__topic.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + properties.topic_name = AAZStrType( + serialized_name="topicName", + ) + + property_columns = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.system_property_columns + system_property_columns.Element = AAZStrType() + + disc_microsoft__sql__server__data_warehouse = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + disc_microsoft__sql__server__data_warehouse.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__sql__server__database = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + disc_microsoft__sql__server__database.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType() + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__storage__blob = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob") + disc_microsoft__storage__blob.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.blob_path_prefix = AAZStrType( + serialized_name="blobPathPrefix", + ) + properties.blob_write_mode = AAZStrType( + serialized_name="blobWriteMode", + ) + properties.container = AAZStrType() + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.path_pattern = AAZStrType( + serialized_name="pathPattern", + ) + properties.storage_accounts = AAZListType( + serialized_name="storageAccounts", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + + storage_accounts = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts + storage_accounts.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts.Element + _element.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + _element.account_name = AAZStrType( + serialized_name="accountName", + ) + _element.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + + disc_microsoft__storage__document_db = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + disc_microsoft__storage__document_db.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB").properties + properties.account_id = AAZStrType( + serialized_name="accountId", + ) + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.collection_name_pattern = AAZStrType( + serialized_name="collectionNamePattern", + ) + properties.database = AAZStrType() + properties.document_id = AAZStrType( + serialized_name="documentId", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + + disc_microsoft__storage__table = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table") + disc_microsoft__storage__table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.batch_size = AAZIntType( + serialized_name="batchSize", + ) + properties.columns_to_remove = AAZListType( + serialized_name="columnsToRemove", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + properties.row_key = AAZStrType( + serialized_name="rowKey", + ) + properties.table = AAZStrType() + + columns_to_remove = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties.columns_to_remove + columns_to_remove.Element = AAZStrType() + + disc_power_bi = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "PowerBI") + disc_power_bi.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "PowerBI").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.dataset = AAZStrType() + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.group_name = AAZStrType( + serialized_name="groupName", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.table = AAZStrType() + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_raw = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Raw") + disc_raw.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.datasource.discriminate_by("type", "Raw").properties + properties.payload_uri = AAZStrType( + serialized_name="payloadUri", + ) diagnostics = cls._schema_on_200.value.Element.properties.diagnostics diagnostics.conditions = AAZListType( @@ -219,8 +586,89 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) + last_output_event_timestamps = cls._schema_on_200.value.Element.properties.last_output_event_timestamps + last_output_event_timestamps.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.last_output_event_timestamps.Element + _element.last_output_event_time = AAZStrType( + serialized_name="lastOutputEventTime", + ) + _element.last_update_time = AAZStrType( + serialized_name="lastUpdateTime", + ) + serialization = cls._schema_on_200.value.Element.properties.serialization - serialization.Element = AAZAnyType() + serialization.type = AAZStrType( + flags={"required": True}, + ) + + disc_avro = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Avro") + disc_avro.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + disc_csv = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Csv") + disc_csv.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Csv").properties + properties.encoding = AAZStrType() + properties.field_delimiter = AAZStrType( + serialized_name="fieldDelimiter", + ) + + disc_custom_clr = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "CustomClr") + disc_custom_clr.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "CustomClr").properties + properties.serialization_class_name = AAZStrType( + serialized_name="serializationClassName", + ) + properties.serialization_dll_path = AAZStrType( + serialized_name="serializationDllPath", + ) + + disc_delta = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Delta") + disc_delta.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Delta").properties + properties.delta_table_path = AAZStrType( + serialized_name="deltaTablePath", + flags={"required": True}, + ) + properties.partition_columns = AAZListType( + serialized_name="partitionColumns", + ) + + partition_columns = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Delta").properties.partition_columns + partition_columns.Element = AAZStrType() + + disc_json = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Json") + disc_json.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Json").properties + properties.encoding = AAZStrType() + properties.format = AAZStrType() + + disc_parquet = cls._schema_on_200.value.Element.properties.serialization.discriminate_by("type", "Parquet") + disc_parquet.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + watermark_settings = cls._schema_on_200.value.Element.properties.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrType( + serialized_name="maxWatermarkDifferenceAcrossPartitions", + ) + watermark_settings.watermark_mode = AAZStrType( + serialized_name="watermarkMode", + ) return cls._schema_on_200 @@ -228,5 +676,61 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" + _schema_event_hub_output_data_source_properties_read = None + + @classmethod + def _build_schema_event_hub_output_data_source_properties_read(cls, _schema): + if cls._schema_event_hub_output_data_source_properties_read is not None: + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + return + + cls._schema_event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read = AAZObjectType() + + event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read + event_hub_output_data_source_properties_read.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + event_hub_output_data_source_properties_read.event_hub_name = AAZStrType( + serialized_name="eventHubName", + ) + event_hub_output_data_source_properties_read.partition_count = AAZIntType( + serialized_name="partitionCount", + ) + event_hub_output_data_source_properties_read.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + event_hub_output_data_source_properties_read.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + event_hub_output_data_source_properties_read.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + event_hub_output_data_source_properties_read.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + event_hub_output_data_source_properties_read.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + + property_columns = _schema_event_hub_output_data_source_properties_read.property_columns + property_columns.Element = AAZStrType() + + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + __all__ = ["List"] diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py index 5e8d1ba25d1..35b105cd125 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py @@ -16,6 +16,42 @@ ) class Show(AAZCommand): """Get details about the specified output. + + :example: Get an Azure SQL database output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 + + :example: Get an Azure Table output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 + + :example: Get a blob output with CSV serialization + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 + + :example: Get a DocumentDB output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Get an Azure Data Warehouse output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput + + :example: Get an Azure Function output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 + + :example: Get an Event Hub output with JSON serialization + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 + + :example: Get a Service Bus Queue output with Avro serialization + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 + + :example: Get a Service Bus Topic output with CSV serialization + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 + + :example: Get a Power BI output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Get an Azure Data Lake Store output with JSON serialization + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 + + :example: Get a Delta Lake output + az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg --job-name sjName --output-name output1221 """ _aaz_info = { @@ -172,23 +208,387 @@ def _build_schema_on_200(cls): ) properties = cls._schema_on_200.properties - properties.datasource = AAZDictType() + properties.datasource = AAZObjectType() properties.diagnostics = AAZObjectType( flags={"read_only": True}, ) properties.etag = AAZStrType( flags={"read_only": True}, ) - properties.serialization = AAZDictType() + properties.last_output_event_timestamps = AAZListType( + serialized_name="lastOutputEventTimestamps", + flags={"read_only": True}, + ) + properties.serialization = AAZObjectType() properties.size_window = AAZIntType( serialized_name="sizeWindow", ) properties.time_window = AAZStrType( serialized_name="timeWindow", ) + properties.watermark_settings = AAZObjectType( + serialized_name="watermarkSettings", + ) datasource = cls._schema_on_200.properties.datasource - datasource.Element = AAZAnyType() + datasource.type = AAZStrType( + flags={"required": True}, + ) + + disc_gateway_message_bus = cls._schema_on_200.properties.datasource.discriminate_by("type", "GatewayMessageBus") + disc_gateway_message_bus.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "GatewayMessageBus").properties + properties.topic = AAZStrType() + + disc_microsoft__azure_function = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction") + disc_microsoft__azure_function.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction").properties + properties.api_key = AAZStrType( + serialized_name="apiKey", + ) + properties.function_app_name = AAZStrType( + serialized_name="functionAppName", + ) + properties.function_name = AAZStrType( + serialized_name="functionName", + ) + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_batch_size = AAZFloatType( + serialized_name="maxBatchSize", + ) + + disc_microsoft_db_for_postgre_sql_servers_databases = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + disc_microsoft_db_for_postgre_sql_servers_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__data_lake__accounts = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + disc_microsoft__data_lake__accounts.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts").properties + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.file_path_prefix = AAZStrType( + serialized_name="filePathPrefix", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.tenant_id = AAZStrType( + serialized_name="tenantId", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_microsoft__event_hub__event_hub = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + disc_microsoft__event_hub__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _ShowHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__event_hub__event_hub.properties) + + disc_microsoft__kusto_clusters_databases = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + disc_microsoft__kusto_clusters_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.cluster = AAZStrType() + properties.database = AAZStrType() + properties.table = AAZStrType() + + disc_microsoft__service_bus__event_hub = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + disc_microsoft__service_bus__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _ShowHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__service_bus__event_hub.properties) + + disc_microsoft__service_bus__queue = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + disc_microsoft__service_bus__queue.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.queue_name = AAZStrType( + serialized_name="queueName", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + + property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.system_property_columns + system_property_columns.Element = AAZAnyType() + + disc_microsoft__service_bus__topic = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + disc_microsoft__service_bus__topic.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + properties.topic_name = AAZStrType( + serialized_name="topicName", + ) + + property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.system_property_columns + system_property_columns.Element = AAZStrType() + + disc_microsoft__sql__server__data_warehouse = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + disc_microsoft__sql__server__data_warehouse.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__sql__server__database = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + disc_microsoft__sql__server__database.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType() + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__storage__blob = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob") + disc_microsoft__storage__blob.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.blob_path_prefix = AAZStrType( + serialized_name="blobPathPrefix", + ) + properties.blob_write_mode = AAZStrType( + serialized_name="blobWriteMode", + ) + properties.container = AAZStrType() + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.path_pattern = AAZStrType( + serialized_name="pathPattern", + ) + properties.storage_accounts = AAZListType( + serialized_name="storageAccounts", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + + storage_accounts = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts + storage_accounts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts.Element + _element.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + _element.account_name = AAZStrType( + serialized_name="accountName", + ) + _element.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + + disc_microsoft__storage__document_db = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + disc_microsoft__storage__document_db.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB").properties + properties.account_id = AAZStrType( + serialized_name="accountId", + ) + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.collection_name_pattern = AAZStrType( + serialized_name="collectionNamePattern", + ) + properties.database = AAZStrType() + properties.document_id = AAZStrType( + serialized_name="documentId", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + + disc_microsoft__storage__table = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table") + disc_microsoft__storage__table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.batch_size = AAZIntType( + serialized_name="batchSize", + ) + properties.columns_to_remove = AAZListType( + serialized_name="columnsToRemove", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + properties.row_key = AAZStrType( + serialized_name="rowKey", + ) + properties.table = AAZStrType() + + columns_to_remove = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties.columns_to_remove + columns_to_remove.Element = AAZStrType() + + disc_power_bi = cls._schema_on_200.properties.datasource.discriminate_by("type", "PowerBI") + disc_power_bi.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "PowerBI").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.dataset = AAZStrType() + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.group_name = AAZStrType( + serialized_name="groupName", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.table = AAZStrType() + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_raw = cls._schema_on_200.properties.datasource.discriminate_by("type", "Raw") + disc_raw.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Raw").properties + properties.payload_uri = AAZStrType( + serialized_name="payloadUri", + ) diagnostics = cls._schema_on_200.properties.diagnostics diagnostics.conditions = AAZListType( @@ -209,8 +609,89 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) + last_output_event_timestamps = cls._schema_on_200.properties.last_output_event_timestamps + last_output_event_timestamps.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.last_output_event_timestamps.Element + _element.last_output_event_time = AAZStrType( + serialized_name="lastOutputEventTime", + ) + _element.last_update_time = AAZStrType( + serialized_name="lastUpdateTime", + ) + serialization = cls._schema_on_200.properties.serialization - serialization.Element = AAZAnyType() + serialization.type = AAZStrType( + flags={"required": True}, + ) + + disc_avro = cls._schema_on_200.properties.serialization.discriminate_by("type", "Avro") + disc_avro.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + disc_csv = cls._schema_on_200.properties.serialization.discriminate_by("type", "Csv") + disc_csv.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "Csv").properties + properties.encoding = AAZStrType() + properties.field_delimiter = AAZStrType( + serialized_name="fieldDelimiter", + ) + + disc_custom_clr = cls._schema_on_200.properties.serialization.discriminate_by("type", "CustomClr") + disc_custom_clr.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "CustomClr").properties + properties.serialization_class_name = AAZStrType( + serialized_name="serializationClassName", + ) + properties.serialization_dll_path = AAZStrType( + serialized_name="serializationDllPath", + ) + + disc_delta = cls._schema_on_200.properties.serialization.discriminate_by("type", "Delta") + disc_delta.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "Delta").properties + properties.delta_table_path = AAZStrType( + serialized_name="deltaTablePath", + flags={"required": True}, + ) + properties.partition_columns = AAZListType( + serialized_name="partitionColumns", + ) + + partition_columns = cls._schema_on_200.properties.serialization.discriminate_by("type", "Delta").properties.partition_columns + partition_columns.Element = AAZStrType() + + disc_json = cls._schema_on_200.properties.serialization.discriminate_by("type", "Json") + disc_json.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "Json").properties + properties.encoding = AAZStrType() + properties.format = AAZStrType() + + disc_parquet = cls._schema_on_200.properties.serialization.discriminate_by("type", "Parquet") + disc_parquet.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + watermark_settings = cls._schema_on_200.properties.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrType( + serialized_name="maxWatermarkDifferenceAcrossPartitions", + ) + watermark_settings.watermark_mode = AAZStrType( + serialized_name="watermarkMode", + ) return cls._schema_on_200 @@ -218,5 +699,61 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" + _schema_event_hub_output_data_source_properties_read = None + + @classmethod + def _build_schema_event_hub_output_data_source_properties_read(cls, _schema): + if cls._schema_event_hub_output_data_source_properties_read is not None: + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + return + + cls._schema_event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read = AAZObjectType() + + event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read + event_hub_output_data_source_properties_read.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + event_hub_output_data_source_properties_read.event_hub_name = AAZStrType( + serialized_name="eventHubName", + ) + event_hub_output_data_source_properties_read.partition_count = AAZIntType( + serialized_name="partitionCount", + ) + event_hub_output_data_source_properties_read.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + event_hub_output_data_source_properties_read.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + event_hub_output_data_source_properties_read.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + event_hub_output_data_source_properties_read.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + event_hub_output_data_source_properties_read.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + + property_columns = _schema_event_hub_output_data_source_properties_read.property_columns + property_columns.Element = AAZStrType() + + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + __all__ = ["Show"] diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py index 3e9239cb609..8370491505e 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py @@ -16,6 +16,9 @@ ) class Test(AAZCommand): """Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + + :example: Test the connection for an output + az stream-analytics output test --resource-group sjrg2157 --job-name sj6458 --output-name output1755 """ _aaz_info = { @@ -49,7 +52,7 @@ def _build_arguments_schema(cls, *args, **kwargs): id_part="name", ) _args_schema.output_name = AAZStrArg( - options=["-n", "--name", "--output-name"], + options=["--output-name"], help="The name of the output.", required=True, id_part="child_name_1", @@ -57,32 +60,677 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.resource_group = AAZResourceGroupNameArg( required=True, ) - _args_schema.datasource = AAZDictArg( + + # define Arg Group "Output" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["--name"], + arg_group="Output", + help="Resource name", + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.datasource = AAZObjectArg( options=["--datasource"], + arg_group="Properties", help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", ) - _args_schema.serialization = AAZDictArg( + _args_schema.serialization = AAZObjectArg( options=["--serialization"], + arg_group="Properties", help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", ) _args_schema.size_window = AAZIntArg( options=["--size-window"], + arg_group="Properties", help="The size window to constrain a Stream Analytics output to.", ) _args_schema.time_window = AAZStrArg( options=["--time-window"], + arg_group="Properties", help="The time frame for filtering Stream Analytics job outputs.", ) + _args_schema.watermark_settings = AAZObjectArg( + options=["--watermark-settings"], + arg_group="Properties", + help="Settings which determine whether to send watermarks to downstream.", + ) datasource = cls._args_schema.datasource - datasource.Element = AAZAnyTypeArg() + datasource.gateway_message_bus = AAZObjectArg( + options=["gateway-message-bus"], + ) + datasource.microsoft_azure_function = AAZObjectArg( + options=["microsoft-azure-function"], + ) + datasource.microsoft_db_for_postgre_sql_servers_databases = AAZObjectArg( + options=["microsoft-db-for-postgre-sql-servers-databases"], + ) + datasource.microsoft_data_lake_accounts = AAZObjectArg( + options=["microsoft-data-lake-accounts"], + ) + datasource.microsoft_event_hub_event_hub = AAZObjectArg( + options=["microsoft-event-hub-event-hub"], + ) + datasource.microsoft_kusto_clusters_databases = AAZObjectArg( + options=["microsoft-kusto-clusters-databases"], + ) + datasource.microsoft_service_bus_event_hub = AAZObjectArg( + options=["microsoft-service-bus-event-hub"], + ) + datasource.microsoft_service_bus_queue = AAZObjectArg( + options=["microsoft-service-bus-queue"], + ) + datasource.microsoft_service_bus_topic = AAZObjectArg( + options=["microsoft-service-bus-topic"], + ) + datasource.microsoft_sql_server_data_warehouse = AAZObjectArg( + options=["microsoft-sql-server-data-warehouse"], + ) + datasource.microsoft_sql_server_database = AAZObjectArg( + options=["microsoft-sql-server-database"], + ) + datasource.microsoft_storage_blob = AAZObjectArg( + options=["microsoft-storage-blob"], + ) + datasource.microsoft_storage_document_db = AAZObjectArg( + options=["microsoft-storage-document-db"], + ) + datasource.microsoft_storage_table = AAZObjectArg( + options=["microsoft-storage-table"], + ) + datasource.power_bi = AAZObjectArg( + options=["power-bi"], + ) + datasource.raw = AAZObjectArg( + options=["raw"], + ) + + gateway_message_bus = cls._args_schema.datasource.gateway_message_bus + gateway_message_bus.topic = AAZStrArg( + options=["topic"], + help="The name of the Service Bus topic.", + ) + + microsoft_azure_function = cls._args_schema.datasource.microsoft_azure_function + microsoft_azure_function.api_key = AAZStrArg( + options=["api-key"], + help="If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", + ) + microsoft_azure_function.function_app_name = AAZStrArg( + options=["function-app-name"], + help="The name of your Azure Functions app.", + ) + microsoft_azure_function.function_name = AAZStrArg( + options=["function-name"], + help="The name of the function in your Azure Functions app.", + ) + microsoft_azure_function.max_batch_count = AAZFloatArg( + options=["max-batch-count"], + help="A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", + ) + microsoft_azure_function.max_batch_size = AAZFloatArg( + options=["max-batch-size"], + help="A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", + ) + + microsoft_db_for_postgre_sql_servers_databases = cls._args_schema.datasource.microsoft_db_for_postgre_sql_servers_databases + microsoft_db_for_postgre_sql_servers_databases.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_db_for_postgre_sql_servers_databases.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.max_writer_count = AAZFloatArg( + options=["max-writer-count"], + help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_db_for_postgre_sql_servers_databases.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_data_lake_accounts = cls._args_schema.datasource.microsoft_data_lake_accounts + microsoft_data_lake_accounts.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_data_lake_accounts.date_format = AAZStrArg( + options=["date-format"], + help="The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.", + ) + microsoft_data_lake_accounts.file_path_prefix = AAZStrArg( + options=["file-path-prefix"], + help="The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.refresh_token = AAZStrArg( + options=["refresh-token"], + help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.tenant_id = AAZStrArg( + options=["tenant-id"], + help="The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_data_lake_accounts.time_format = AAZStrArg( + options=["time-format"], + help="The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.", + ) + microsoft_data_lake_accounts.token_user_display_name = AAZStrArg( + options=["token-user-display-name"], + help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + microsoft_data_lake_accounts.token_user_principal_name = AAZStrArg( + options=["token-user-principal-name"], + help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + + microsoft_event_hub_event_hub = cls._args_schema.datasource.microsoft_event_hub_event_hub + microsoft_event_hub_event_hub.properties = AAZObjectArg( + options=["properties"], + help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", + ) + cls._build_args_event_hub_output_data_source_properties_create(microsoft_event_hub_event_hub.properties) + + microsoft_kusto_clusters_databases = cls._args_schema.datasource.microsoft_kusto_clusters_databases + microsoft_kusto_clusters_databases.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_kusto_clusters_databases.cluster = AAZStrArg( + options=["cluster"], + help="The name of the Azure Data Explorer cluster. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_kusto_clusters_databases.database = AAZStrArg( + options=["database"], + help="The name of the Azure Data Explorer database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_kusto_clusters_databases.table = AAZStrArg( + options=["table"], + help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_service_bus_event_hub = cls._args_schema.datasource.microsoft_service_bus_event_hub + microsoft_service_bus_event_hub.properties = AAZObjectArg( + options=["properties"], + help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", + ) + cls._build_args_event_hub_output_data_source_properties_create(microsoft_service_bus_event_hub.properties) + + microsoft_service_bus_queue = cls._args_schema.datasource.microsoft_service_bus_queue + microsoft_service_bus_queue.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_service_bus_queue.property_columns = AAZListArg( + options=["property-columns"], + help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + ) + microsoft_service_bus_queue.queue_name = AAZStrArg( + options=["queue-name"], + help="The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_queue.system_property_columns = AAZDictArg( + options=["system-property-columns"], + help="The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", + ) + + property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.property_columns + property_columns.Element = AAZStrArg() + + system_property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.system_property_columns + system_property_columns.Element = AAZAnyTypeArg() + + microsoft_service_bus_topic = cls._args_schema.datasource.microsoft_service_bus_topic + microsoft_service_bus_topic.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_service_bus_topic.property_columns = AAZListArg( + options=["property-columns"], + help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + ) + microsoft_service_bus_topic.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_topic.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_topic.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_service_bus_topic.system_property_columns = AAZDictArg( + options=["system-property-columns"], + help="The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", + ) + microsoft_service_bus_topic.topic_name = AAZStrArg( + options=["topic-name"], + help="The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", + ) + + property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.property_columns + property_columns.Element = AAZStrArg() + + system_property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.system_property_columns + system_property_columns.Element = AAZStrArg() + + microsoft_sql_server_data_warehouse = cls._args_schema.datasource.microsoft_sql_server_data_warehouse + microsoft_sql_server_data_warehouse.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_sql_server_data_warehouse.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_data_warehouse.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_sql_server_database = cls._args_schema.datasource.microsoft_sql_server_database + microsoft_sql_server_database.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_sql_server_database.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.max_batch_count = AAZFloatArg( + options=["max-batch-count"], + help="Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", + ) + microsoft_sql_server_database.max_writer_count = AAZFloatArg( + options=["max-writer-count"], + help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + ) + microsoft_sql_server_database.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_sql_server_database.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + ) + + microsoft_storage_blob = cls._args_schema.datasource.microsoft_storage_blob + microsoft_storage_blob.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_storage_blob.blob_path_prefix = AAZStrArg( + options=["blob-path-prefix"], + help="Blob path prefix.", + ) + microsoft_storage_blob.blob_write_mode = AAZStrArg( + options=["blob-write-mode"], + help="Blob write mode.", + enum={"Append": "Append", "Once": "Once"}, + ) + microsoft_storage_blob.container = AAZStrArg( + options=["container"], + help="The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_blob.date_format = AAZStrArg( + options=["date-format"], + help="The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", + ) + microsoft_storage_blob.path_pattern = AAZStrArg( + options=["path-pattern"], + help="The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", + ) + microsoft_storage_blob.storage_accounts = AAZListArg( + options=["storage-accounts"], + help="A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_blob.time_format = AAZStrArg( + options=["time-format"], + help="The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", + ) + + storage_accounts = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts + storage_accounts.Element = AAZObjectArg() + + _element = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts.Element + _element.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + _element.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + _element.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + + microsoft_storage_document_db = cls._args_schema.datasource.microsoft_storage_document_db + microsoft_storage_document_db.account_id = AAZStrArg( + options=["account-id"], + help="The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_storage_document_db.collection_name_pattern = AAZStrArg( + options=["collection-name-pattern"], + help="The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.database = AAZStrArg( + options=["database"], + help="The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_document_db.document_id = AAZStrArg( + options=["document-id"], + help="The name of the field in output events used to specify the primary key which insert or update operations are based on.", + ) + microsoft_storage_document_db.partition_key = AAZStrArg( + options=["partition-key"], + help="The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.", + ) + + microsoft_storage_table = cls._args_schema.datasource.microsoft_storage_table + microsoft_storage_table.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.batch_size = AAZIntArg( + options=["batch-size"], + help="The number of rows to write to the Azure Table at a time.", + ) + microsoft_storage_table.columns_to_remove = AAZListArg( + options=["columns-to-remove"], + help="If specified, each item in the array is the name of a column to remove (if present) from output event entities.", + ) + microsoft_storage_table.partition_key = AAZStrArg( + options=["partition-key"], + help="This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.row_key = AAZStrArg( + options=["row-key"], + help="This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + microsoft_storage_table.table = AAZStrArg( + options=["table"], + help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + ) + + columns_to_remove = cls._args_schema.datasource.microsoft_storage_table.columns_to_remove + columns_to_remove.Element = AAZStrArg() + + power_bi = cls._args_schema.datasource.power_bi + power_bi.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + power_bi.dataset = AAZStrArg( + options=["dataset"], + help="The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", + ) + power_bi.group_id = AAZStrArg( + options=["group-id"], + help="The ID of the Power BI group.", + ) + power_bi.group_name = AAZStrArg( + options=["group-name"], + help="The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", + ) + power_bi.refresh_token = AAZStrArg( + options=["refresh-token"], + help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + ) + power_bi.table = AAZStrArg( + options=["table"], + help="The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", + ) + power_bi.token_user_display_name = AAZStrArg( + options=["token-user-display-name"], + help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + power_bi.token_user_principal_name = AAZStrArg( + options=["token-user-principal-name"], + help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + ) + + raw = cls._args_schema.datasource.raw + raw.payload_uri = AAZStrArg( + options=["payload-uri"], + help="The SAS URL to a blob where the output should be written. If this property is not set, output data will be written into a temporary storage, and a SAS URL to that temporary storage will be included in the result.", + ) serialization = cls._args_schema.serialization - serialization.Element = AAZAnyTypeArg() + serialization.avro = AAZObjectArg( + options=["avro"], + blank={}, + ) + serialization.csv = AAZObjectArg( + options=["csv"], + ) + serialization.custom_clr = AAZObjectArg( + options=["custom-clr"], + ) + serialization.delta = AAZObjectArg( + options=["delta"], + ) + serialization.json = AAZObjectArg( + options=["json"], + ) + serialization.parquet = AAZObjectArg( + options=["parquet"], + blank={}, + ) - # define Arg Group "Output" + csv = cls._args_schema.serialization.csv + csv.encoding = AAZStrArg( + options=["encoding"], + help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + enum={"UTF8": "UTF8"}, + ) + csv.field_delimiter = AAZStrArg( + options=["field-delimiter"], + help="Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", + ) + + custom_clr = cls._args_schema.serialization.custom_clr + custom_clr.serialization_class_name = AAZStrArg( + options=["serialization-class-name"], + help="The serialization class name.", + ) + custom_clr.serialization_dll_path = AAZStrArg( + options=["serialization-dll-path"], + help="The serialization library path.", + ) + + delta = cls._args_schema.serialization.delta + delta.delta_table_path = AAZStrArg( + options=["delta-table-path"], + help="Specifies the path of the Delta Lake table that the output will be written to.", + ) + delta.partition_columns = AAZListArg( + options=["partition-columns"], + help="Specifies the names of the columns for which the Delta Lake table will be partitioned. We are only supporting 1 partition column, but keeping it as an array for extensibility.", + ) + + partition_columns = cls._args_schema.serialization.delta.partition_columns + partition_columns.Element = AAZStrArg() + + json = cls._args_schema.serialization.json + json.encoding = AAZStrArg( + options=["encoding"], + help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + enum={"UTF8": "UTF8"}, + ) + json.format = AAZStrArg( + options=["format"], + help="This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", + enum={"Array": "Array", "LineSeparated": "LineSeparated"}, + ) + + watermark_settings = cls._args_schema.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( + options=["max-watermark-difference-across-partitions"], + help="Describes the maximal delta between the fastest and slowest partitions, so the out of order window that catches all necessary events in downstream jobs is well defined.", + ) + watermark_settings.watermark_mode = AAZStrArg( + options=["watermark-mode"], + help="The output watermark mode.", + enum={"None": "None", "SendCurrentPartitionWatermark": "SendCurrentPartitionWatermark", "SendLowestWatermarkAcrossPartitions": "SendLowestWatermarkAcrossPartitions"}, + ) return cls._args_schema + _args_event_hub_output_data_source_properties_create = None + + @classmethod + def _build_args_event_hub_output_data_source_properties_create(cls, _schema): + if cls._args_event_hub_output_data_source_properties_create is not None: + _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_create.authentication_mode + _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_create.event_hub_name + _schema.partition_count = cls._args_event_hub_output_data_source_properties_create.partition_count + _schema.partition_key = cls._args_event_hub_output_data_source_properties_create.partition_key + _schema.property_columns = cls._args_event_hub_output_data_source_properties_create.property_columns + _schema.service_bus_namespace = cls._args_event_hub_output_data_source_properties_create.service_bus_namespace + _schema.shared_access_policy_key = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_key + _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_name + return + + cls._args_event_hub_output_data_source_properties_create = AAZObjectArg() + + event_hub_output_data_source_properties_create = cls._args_event_hub_output_data_source_properties_create + event_hub_output_data_source_properties_create.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + default="ConnectionString", + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + event_hub_output_data_source_properties_create.event_hub_name = AAZStrArg( + options=["event-hub-name"], + help="The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + ) + event_hub_output_data_source_properties_create.partition_count = AAZIntArg( + options=["partition-count"], + help="The partition count of the event hub data source. Range 1 - 256.", + ) + event_hub_output_data_source_properties_create.partition_key = AAZStrArg( + options=["partition-key"], + help="The key/column that is used to determine to which partition to send event data.", + ) + event_hub_output_data_source_properties_create.property_columns = AAZListArg( + options=["property-columns"], + help="The properties associated with this Event Hub output.", + ) + event_hub_output_data_source_properties_create.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + event_hub_output_data_source_properties_create.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + ) + event_hub_output_data_source_properties_create.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + ) + + property_columns = cls._args_event_hub_output_data_source_properties_create.property_columns + property_columns.Element = AAZStrArg() + + _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_create.authentication_mode + _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_create.event_hub_name + _schema.partition_count = cls._args_event_hub_output_data_source_properties_create.partition_count + _schema.partition_key = cls._args_event_hub_output_data_source_properties_create.partition_key + _schema.property_columns = cls._args_event_hub_output_data_source_properties_create.property_columns + _schema.service_bus_namespace = cls._args_event_hub_output_data_source_properties_create.service_bus_namespace + _schema.shared_access_policy_key = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_key + _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_create.shared_access_policy_name + def _execute_operations(self): self.pre_operations() yield self.OutputsTest(ctx=self.ctx)() @@ -193,22 +841,340 @@ def content(self): typ=AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}} ) + _builder.set_prop("name", AAZStrType, ".name") _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: - properties.set_prop("datasource", AAZDictType, ".datasource") - properties.set_prop("serialization", AAZDictType, ".serialization") + properties.set_prop("datasource", AAZObjectType, ".datasource") + properties.set_prop("serialization", AAZObjectType, ".serialization") properties.set_prop("sizeWindow", AAZIntType, ".size_window") properties.set_prop("timeWindow", AAZStrType, ".time_window") + properties.set_prop("watermarkSettings", AAZObjectType, ".watermark_settings") datasource = _builder.get(".properties.datasource") if datasource is not None: - datasource.set_elements(AAZAnyType, ".") + datasource.set_const("type", "GatewayMessageBus", AAZStrType, ".gateway_message_bus", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.AzureFunction", AAZStrType, ".microsoft_azure_function", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.DBForPostgreSQL/servers/databases", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.DataLake/Accounts", AAZStrType, ".microsoft_data_lake_accounts", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.EventHub/EventHub", AAZStrType, ".microsoft_event_hub_event_hub", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Kusto/clusters/databases", AAZStrType, ".microsoft_kusto_clusters_databases", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/EventHub", AAZStrType, ".microsoft_service_bus_event_hub", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/Queue", AAZStrType, ".microsoft_service_bus_queue", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/Topic", AAZStrType, ".microsoft_service_bus_topic", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Sql/Server/DataWarehouse", AAZStrType, ".microsoft_sql_server_data_warehouse", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Sql/Server/Database", AAZStrType, ".microsoft_sql_server_database", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/Blob", AAZStrType, ".microsoft_storage_blob", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/DocumentDB", AAZStrType, ".microsoft_storage_document_db", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/Table", AAZStrType, ".microsoft_storage_table", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "PowerBI", AAZStrType, ".power_bi", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Raw", AAZStrType, ".raw", typ_kwargs={"flags": {"required": True}}) + datasource.discriminate_by("type", "GatewayMessageBus") + datasource.discriminate_by("type", "Microsoft.AzureFunction") + datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + datasource.discriminate_by("type", "Microsoft.Storage/Blob") + datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + datasource.discriminate_by("type", "Microsoft.Storage/Table") + datasource.discriminate_by("type", "PowerBI") + datasource.discriminate_by("type", "Raw") + + disc_gateway_message_bus = _builder.get(".properties.datasource{type:GatewayMessageBus}") + if disc_gateway_message_bus is not None: + disc_gateway_message_bus.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:GatewayMessageBus}.properties") + if properties is not None: + properties.set_prop("topic", AAZStrType, ".gateway_message_bus.topic") + + disc_microsoft__azure_function = _builder.get(".properties.datasource{type:Microsoft.AzureFunction}") + if disc_microsoft__azure_function is not None: + disc_microsoft__azure_function.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.AzureFunction}.properties") + if properties is not None: + properties.set_prop("apiKey", AAZStrType, ".microsoft_azure_function.api_key") + properties.set_prop("functionAppName", AAZStrType, ".microsoft_azure_function.function_app_name") + properties.set_prop("functionName", AAZStrType, ".microsoft_azure_function.function_name") + properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_azure_function.max_batch_count") + properties.set_prop("maxBatchSize", AAZFloatType, ".microsoft_azure_function.max_batch_size") + + disc_microsoft_db_for_postgre_sql_servers_databases = _builder.get(".properties.datasource{type:Microsoft.DBForPostgreSQL/servers/databases}") + if disc_microsoft_db_for_postgre_sql_servers_databases is not None: + disc_microsoft_db_for_postgre_sql_servers_databases.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.DBForPostgreSQL/servers/databases}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.database") + properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_db_for_postgre_sql_servers_databases.max_writer_count") + properties.set_prop("password", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("server", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.server") + properties.set_prop("table", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.table") + properties.set_prop("user", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.user") + + disc_microsoft__data_lake__accounts = _builder.get(".properties.datasource{type:Microsoft.DataLake/Accounts}") + if disc_microsoft__data_lake__accounts is not None: + disc_microsoft__data_lake__accounts.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.DataLake/Accounts}.properties") + if properties is not None: + properties.set_prop("accountName", AAZStrType, ".microsoft_data_lake_accounts.account_name") + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_data_lake_accounts.authentication_mode") + properties.set_prop("dateFormat", AAZStrType, ".microsoft_data_lake_accounts.date_format") + properties.set_prop("filePathPrefix", AAZStrType, ".microsoft_data_lake_accounts.file_path_prefix") + properties.set_prop("refreshToken", AAZStrType, ".microsoft_data_lake_accounts.refresh_token") + properties.set_prop("tenantId", AAZStrType, ".microsoft_data_lake_accounts.tenant_id") + properties.set_prop("timeFormat", AAZStrType, ".microsoft_data_lake_accounts.time_format") + properties.set_prop("tokenUserDisplayName", AAZStrType, ".microsoft_data_lake_accounts.token_user_display_name") + properties.set_prop("tokenUserPrincipalName", AAZStrType, ".microsoft_data_lake_accounts.token_user_principal_name") + + disc_microsoft__event_hub__event_hub = _builder.get(".properties.datasource{type:Microsoft.EventHub/EventHub}") + if disc_microsoft__event_hub__event_hub is not None: + _TestHelper._build_schema_event_hub_output_data_source_properties_create(disc_microsoft__event_hub__event_hub.set_prop("properties", AAZObjectType, ".microsoft_event_hub_event_hub.properties", typ_kwargs={"flags": {"client_flatten": True}})) + + disc_microsoft__kusto_clusters_databases = _builder.get(".properties.datasource{type:Microsoft.Kusto/clusters/databases}") + if disc_microsoft__kusto_clusters_databases is not None: + disc_microsoft__kusto_clusters_databases.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Kusto/clusters/databases}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_kusto_clusters_databases.authentication_mode") + properties.set_prop("cluster", AAZStrType, ".microsoft_kusto_clusters_databases.cluster") + properties.set_prop("database", AAZStrType, ".microsoft_kusto_clusters_databases.database") + properties.set_prop("table", AAZStrType, ".microsoft_kusto_clusters_databases.table") + + disc_microsoft__service_bus__event_hub = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/EventHub}") + if disc_microsoft__service_bus__event_hub is not None: + _TestHelper._build_schema_event_hub_output_data_source_properties_create(disc_microsoft__service_bus__event_hub.set_prop("properties", AAZObjectType, ".microsoft_service_bus_event_hub.properties", typ_kwargs={"flags": {"client_flatten": True}})) + + disc_microsoft__service_bus__queue = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}") + if disc_microsoft__service_bus__queue is not None: + disc_microsoft__service_bus__queue.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_service_bus_queue.authentication_mode") + properties.set_prop("propertyColumns", AAZListType, ".microsoft_service_bus_queue.property_columns") + properties.set_prop("queueName", AAZStrType, ".microsoft_service_bus_queue.queue_name") + properties.set_prop("serviceBusNamespace", AAZStrType, ".microsoft_service_bus_queue.service_bus_namespace") + properties.set_prop("sharedAccessPolicyKey", AAZStrType, ".microsoft_service_bus_queue.shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("sharedAccessPolicyName", AAZStrType, ".microsoft_service_bus_queue.shared_access_policy_name") + properties.set_prop("systemPropertyColumns", AAZDictType, ".microsoft_service_bus_queue.system_property_columns") + + property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties.propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + system_property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties.systemPropertyColumns") + if system_property_columns is not None: + system_property_columns.set_elements(AAZAnyType, ".") + + disc_microsoft__service_bus__topic = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}") + if disc_microsoft__service_bus__topic is not None: + disc_microsoft__service_bus__topic.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_service_bus_topic.authentication_mode") + properties.set_prop("propertyColumns", AAZListType, ".microsoft_service_bus_topic.property_columns") + properties.set_prop("serviceBusNamespace", AAZStrType, ".microsoft_service_bus_topic.service_bus_namespace") + properties.set_prop("sharedAccessPolicyKey", AAZStrType, ".microsoft_service_bus_topic.shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("sharedAccessPolicyName", AAZStrType, ".microsoft_service_bus_topic.shared_access_policy_name") + properties.set_prop("systemPropertyColumns", AAZDictType, ".microsoft_service_bus_topic.system_property_columns") + properties.set_prop("topicName", AAZStrType, ".microsoft_service_bus_topic.topic_name") + + property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties.propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + system_property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties.systemPropertyColumns") + if system_property_columns is not None: + system_property_columns.set_elements(AAZStrType, ".") + + disc_microsoft__sql__server__data_warehouse = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/DataWarehouse}") + if disc_microsoft__sql__server__data_warehouse is not None: + disc_microsoft__sql__server__data_warehouse.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/DataWarehouse}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_sql_server_data_warehouse.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_sql_server_data_warehouse.database") + properties.set_prop("password", AAZStrType, ".microsoft_sql_server_data_warehouse.password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("server", AAZStrType, ".microsoft_sql_server_data_warehouse.server") + properties.set_prop("table", AAZStrType, ".microsoft_sql_server_data_warehouse.table") + properties.set_prop("user", AAZStrType, ".microsoft_sql_server_data_warehouse.user") + + disc_microsoft__sql__server__database = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/Database}") + if disc_microsoft__sql__server__database is not None: + disc_microsoft__sql__server__database.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/Database}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_sql_server_database.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_sql_server_database.database") + properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_sql_server_database.max_batch_count") + properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_sql_server_database.max_writer_count") + properties.set_prop("password", AAZStrType, ".microsoft_sql_server_database.password") + properties.set_prop("server", AAZStrType, ".microsoft_sql_server_database.server") + properties.set_prop("table", AAZStrType, ".microsoft_sql_server_database.table") + properties.set_prop("user", AAZStrType, ".microsoft_sql_server_database.user") + + disc_microsoft__storage__blob = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}") + if disc_microsoft__storage__blob is not None: + disc_microsoft__storage__blob.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_storage_blob.authentication_mode") + properties.set_prop("blobPathPrefix", AAZStrType, ".microsoft_storage_blob.blob_path_prefix") + properties.set_prop("blobWriteMode", AAZStrType, ".microsoft_storage_blob.blob_write_mode") + properties.set_prop("container", AAZStrType, ".microsoft_storage_blob.container") + properties.set_prop("dateFormat", AAZStrType, ".microsoft_storage_blob.date_format") + properties.set_prop("pathPattern", AAZStrType, ".microsoft_storage_blob.path_pattern") + properties.set_prop("storageAccounts", AAZListType, ".microsoft_storage_blob.storage_accounts") + properties.set_prop("timeFormat", AAZStrType, ".microsoft_storage_blob.time_format") + + storage_accounts = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties.storageAccounts") + if storage_accounts is not None: + storage_accounts.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties.storageAccounts[]") + if _elements is not None: + _elements.set_prop("accountKey", AAZStrType, ".account_key", typ_kwargs={"flags": {"secret": True}}) + _elements.set_prop("accountName", AAZStrType, ".account_name") + _elements.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + + disc_microsoft__storage__document_db = _builder.get(".properties.datasource{type:Microsoft.Storage/DocumentDB}") + if disc_microsoft__storage__document_db is not None: + disc_microsoft__storage__document_db.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/DocumentDB}.properties") + if properties is not None: + properties.set_prop("accountId", AAZStrType, ".microsoft_storage_document_db.account_id") + properties.set_prop("accountKey", AAZStrType, ".microsoft_storage_document_db.account_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_storage_document_db.authentication_mode") + properties.set_prop("collectionNamePattern", AAZStrType, ".microsoft_storage_document_db.collection_name_pattern") + properties.set_prop("database", AAZStrType, ".microsoft_storage_document_db.database") + properties.set_prop("documentId", AAZStrType, ".microsoft_storage_document_db.document_id") + properties.set_prop("partitionKey", AAZStrType, ".microsoft_storage_document_db.partition_key") + + disc_microsoft__storage__table = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}") + if disc_microsoft__storage__table is not None: + disc_microsoft__storage__table.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}.properties") + if properties is not None: + properties.set_prop("accountKey", AAZStrType, ".microsoft_storage_table.account_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("accountName", AAZStrType, ".microsoft_storage_table.account_name") + properties.set_prop("batchSize", AAZIntType, ".microsoft_storage_table.batch_size") + properties.set_prop("columnsToRemove", AAZListType, ".microsoft_storage_table.columns_to_remove") + properties.set_prop("partitionKey", AAZStrType, ".microsoft_storage_table.partition_key") + properties.set_prop("rowKey", AAZStrType, ".microsoft_storage_table.row_key") + properties.set_prop("table", AAZStrType, ".microsoft_storage_table.table") + + columns_to_remove = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}.properties.columnsToRemove") + if columns_to_remove is not None: + columns_to_remove.set_elements(AAZStrType, ".") + + disc_power_bi = _builder.get(".properties.datasource{type:PowerBI}") + if disc_power_bi is not None: + disc_power_bi.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:PowerBI}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".power_bi.authentication_mode") + properties.set_prop("dataset", AAZStrType, ".power_bi.dataset") + properties.set_prop("groupId", AAZStrType, ".power_bi.group_id") + properties.set_prop("groupName", AAZStrType, ".power_bi.group_name") + properties.set_prop("refreshToken", AAZStrType, ".power_bi.refresh_token") + properties.set_prop("table", AAZStrType, ".power_bi.table") + properties.set_prop("tokenUserDisplayName", AAZStrType, ".power_bi.token_user_display_name") + properties.set_prop("tokenUserPrincipalName", AAZStrType, ".power_bi.token_user_principal_name") + + disc_raw = _builder.get(".properties.datasource{type:Raw}") + if disc_raw is not None: + disc_raw.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Raw}.properties") + if properties is not None: + properties.set_prop("payloadUri", AAZStrType, ".raw.payload_uri") serialization = _builder.get(".properties.serialization") if serialization is not None: - serialization.set_elements(AAZAnyType, ".") + serialization.set_const("type", "Avro", AAZStrType, ".avro", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Csv", AAZStrType, ".csv", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "CustomClr", AAZStrType, ".custom_clr", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Delta", AAZStrType, ".delta", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Json", AAZStrType, ".json", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Parquet", AAZStrType, ".parquet", typ_kwargs={"flags": {"required": True}}) + serialization.discriminate_by("type", "Avro") + serialization.discriminate_by("type", "Csv") + serialization.discriminate_by("type", "CustomClr") + serialization.discriminate_by("type", "Delta") + serialization.discriminate_by("type", "Json") + serialization.discriminate_by("type", "Parquet") + + disc_avro = _builder.get(".properties.serialization{type:Avro}") + if disc_avro is not None: + disc_avro.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + disc_csv = _builder.get(".properties.serialization{type:Csv}") + if disc_csv is not None: + disc_csv.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Csv}.properties") + if properties is not None: + properties.set_prop("encoding", AAZStrType, ".csv.encoding") + properties.set_prop("fieldDelimiter", AAZStrType, ".csv.field_delimiter") + + disc_custom_clr = _builder.get(".properties.serialization{type:CustomClr}") + if disc_custom_clr is not None: + disc_custom_clr.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:CustomClr}.properties") + if properties is not None: + properties.set_prop("serializationClassName", AAZStrType, ".custom_clr.serialization_class_name") + properties.set_prop("serializationDllPath", AAZStrType, ".custom_clr.serialization_dll_path") + + disc_delta = _builder.get(".properties.serialization{type:Delta}") + if disc_delta is not None: + disc_delta.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Delta}.properties") + if properties is not None: + properties.set_prop("deltaTablePath", AAZStrType, ".delta.delta_table_path", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("partitionColumns", AAZListType, ".delta.partition_columns") + + partition_columns = _builder.get(".properties.serialization{type:Delta}.properties.partitionColumns") + if partition_columns is not None: + partition_columns.set_elements(AAZStrType, ".") + + disc_json = _builder.get(".properties.serialization{type:Json}") + if disc_json is not None: + disc_json.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Json}.properties") + if properties is not None: + properties.set_prop("encoding", AAZStrType, ".json.encoding") + properties.set_prop("format", AAZStrType, ".json.format") + + disc_parquet = _builder.get(".properties.serialization{type:Parquet}") + if disc_parquet is not None: + disc_parquet.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + watermark_settings = _builder.get(".properties.watermarkSettings") + if watermark_settings is not None: + watermark_settings.set_prop("maxWatermarkDifferenceAcrossPartitions", AAZStrType, ".max_watermark_difference_across_partitions") + watermark_settings.set_prop("watermarkMode", AAZStrType, ".watermark_mode") return self.serialize_content(_content_value) @@ -251,5 +1217,22 @@ def _build_schema_on_200(cls): class _TestHelper: """Helper class for Test""" + @classmethod + def _build_schema_event_hub_output_data_source_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + _builder.set_prop("eventHubName", AAZStrType, ".event_hub_name") + _builder.set_prop("partitionCount", AAZIntType, ".partition_count") + _builder.set_prop("partitionKey", AAZStrType, ".partition_key") + _builder.set_prop("propertyColumns", AAZListType, ".property_columns") + _builder.set_prop("serviceBusNamespace", AAZStrType, ".service_bus_namespace") + _builder.set_prop("sharedAccessPolicyKey", AAZStrType, ".shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + _builder.set_prop("sharedAccessPolicyName", AAZStrType, ".shared_access_policy_name") + + property_columns = _builder.get(".propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + __all__ = ["Test"] diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py index d6d08b83fd4..61ce868d8ff 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py @@ -15,7 +15,52 @@ "stream-analytics output update", ) class Update(AAZCommand): - """Update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. + """Update an output or replaces an already existing output under an existing streaming job. + + :example: Create an Azure SQL database output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 + + :example: Create an Azure Table output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 + + :example: Create a blob output with CSV serialization + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 + + :example: Create a DocumentDB output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create an Azure Data Warehouse output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput + + :example: Create an Azure Function output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 + + :example: Create an Event Hub output with JSON serialization + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 + + :example: Create a Service Bus Queue output with Avro serialization + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 + + :example: Create a Service Bus Topic output with CSV serialization + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 + + :example: Create a Power BI output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create an Azure Data Lake Store output with JSON serialization + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 + + :example: Create a Gateway Message Bus output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create a PostgreSQL output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 + + :example: Create a Delta Lake output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name output1221 + + :example: Create an Azure Data Explorer output + az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name output1221 --resource-group sjrg --job-name sjName --output-name adxOutput """ _aaz_info = { @@ -25,6 +70,8 @@ class Update(AAZCommand): ] } + AZ_SUPPORT_GENERIC_UPDATE = True + def _handler(self, command_args): super()._handler(command_args) self._execute_operations() @@ -45,6 +92,10 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--if-match"], help="The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", ) + _args_schema.if_none_match = AAZStrArg( + options=["--if-none-match"], + help="Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.", + ) _args_schema.job_name = AAZStrArg( options=["--job-name"], help="The name of the streaming job.", @@ -60,33 +111,794 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.resource_group = AAZResourceGroupNameArg( required=True, ) - _args_schema.datasource = AAZDictArg( + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.datasource = AAZObjectArg( options=["--datasource"], + arg_group="Properties", help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", + nullable=True, ) - _args_schema.serialization = AAZDictArg( + _args_schema.serialization = AAZObjectArg( options=["--serialization"], + arg_group="Properties", help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", + nullable=True, ) _args_schema.size_window = AAZIntArg( options=["--size-window"], + arg_group="Properties", help="The size window to constrain a Stream Analytics output to.", + nullable=True, ) _args_schema.time_window = AAZStrArg( options=["--time-window"], + arg_group="Properties", help="The time frame for filtering Stream Analytics job outputs.", + nullable=True, + ) + _args_schema.watermark_settings = AAZObjectArg( + options=["--watermark-settings"], + arg_group="Properties", + help="Settings which determine whether to send watermarks to downstream.", + nullable=True, ) datasource = cls._args_schema.datasource - datasource.Element = AAZAnyTypeArg() + datasource.gateway_message_bus = AAZObjectArg( + options=["gateway-message-bus"], + ) + datasource.microsoft_azure_function = AAZObjectArg( + options=["microsoft-azure-function"], + ) + datasource.microsoft_db_for_postgre_sql_servers_databases = AAZObjectArg( + options=["microsoft-db-for-postgre-sql-servers-databases"], + ) + datasource.microsoft_data_lake_accounts = AAZObjectArg( + options=["microsoft-data-lake-accounts"], + ) + datasource.microsoft_event_hub_event_hub = AAZObjectArg( + options=["microsoft-event-hub-event-hub"], + ) + datasource.microsoft_kusto_clusters_databases = AAZObjectArg( + options=["microsoft-kusto-clusters-databases"], + ) + datasource.microsoft_service_bus_event_hub = AAZObjectArg( + options=["microsoft-service-bus-event-hub"], + ) + datasource.microsoft_service_bus_queue = AAZObjectArg( + options=["microsoft-service-bus-queue"], + ) + datasource.microsoft_service_bus_topic = AAZObjectArg( + options=["microsoft-service-bus-topic"], + ) + datasource.microsoft_sql_server_data_warehouse = AAZObjectArg( + options=["microsoft-sql-server-data-warehouse"], + ) + datasource.microsoft_sql_server_database = AAZObjectArg( + options=["microsoft-sql-server-database"], + ) + datasource.microsoft_storage_blob = AAZObjectArg( + options=["microsoft-storage-blob"], + ) + datasource.microsoft_storage_document_db = AAZObjectArg( + options=["microsoft-storage-document-db"], + ) + datasource.microsoft_storage_table = AAZObjectArg( + options=["microsoft-storage-table"], + ) + datasource.power_bi = AAZObjectArg( + options=["power-bi"], + ) + datasource.raw = AAZObjectArg( + options=["raw"], + ) + + gateway_message_bus = cls._args_schema.datasource.gateway_message_bus + gateway_message_bus.topic = AAZStrArg( + options=["topic"], + help="The name of the Service Bus topic.", + nullable=True, + ) + + microsoft_azure_function = cls._args_schema.datasource.microsoft_azure_function + microsoft_azure_function.api_key = AAZStrArg( + options=["api-key"], + help="If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", + nullable=True, + ) + microsoft_azure_function.function_app_name = AAZStrArg( + options=["function-app-name"], + help="The name of your Azure Functions app.", + nullable=True, + ) + microsoft_azure_function.function_name = AAZStrArg( + options=["function-name"], + help="The name of the function in your Azure Functions app.", + nullable=True, + ) + microsoft_azure_function.max_batch_count = AAZFloatArg( + options=["max-batch-count"], + help="A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", + nullable=True, + ) + microsoft_azure_function.max_batch_size = AAZFloatArg( + options=["max-batch-size"], + help="A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", + nullable=True, + ) + + microsoft_db_for_postgre_sql_servers_databases = cls._args_schema.datasource.microsoft_db_for_postgre_sql_servers_databases + microsoft_db_for_postgre_sql_servers_databases.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_db_for_postgre_sql_servers_databases.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_db_for_postgre_sql_servers_databases.max_writer_count = AAZFloatArg( + options=["max-writer-count"], + help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + nullable=True, + ) + microsoft_db_for_postgre_sql_servers_databases.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_db_for_postgre_sql_servers_databases.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_db_for_postgre_sql_servers_databases.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_db_for_postgre_sql_servers_databases.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + microsoft_data_lake_accounts = cls._args_schema.datasource.microsoft_data_lake_accounts + microsoft_data_lake_accounts.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_data_lake_accounts.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_data_lake_accounts.date_format = AAZStrArg( + options=["date-format"], + help="The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.", + nullable=True, + ) + microsoft_data_lake_accounts.file_path_prefix = AAZStrArg( + options=["file-path-prefix"], + help="The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_data_lake_accounts.refresh_token = AAZStrArg( + options=["refresh-token"], + help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_data_lake_accounts.tenant_id = AAZStrArg( + options=["tenant-id"], + help="The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_data_lake_accounts.time_format = AAZStrArg( + options=["time-format"], + help="The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.", + nullable=True, + ) + microsoft_data_lake_accounts.token_user_display_name = AAZStrArg( + options=["token-user-display-name"], + help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + nullable=True, + ) + microsoft_data_lake_accounts.token_user_principal_name = AAZStrArg( + options=["token-user-principal-name"], + help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + nullable=True, + ) + + microsoft_event_hub_event_hub = cls._args_schema.datasource.microsoft_event_hub_event_hub + microsoft_event_hub_event_hub.properties = AAZObjectArg( + options=["properties"], + help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + cls._build_args_event_hub_output_data_source_properties_update(microsoft_event_hub_event_hub.properties) + + microsoft_kusto_clusters_databases = cls._args_schema.datasource.microsoft_kusto_clusters_databases + microsoft_kusto_clusters_databases.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_kusto_clusters_databases.cluster = AAZStrArg( + options=["cluster"], + help="The name of the Azure Data Explorer cluster. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_kusto_clusters_databases.database = AAZStrArg( + options=["database"], + help="The name of the Azure Data Explorer database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_kusto_clusters_databases.table = AAZStrArg( + options=["table"], + help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + microsoft_service_bus_event_hub = cls._args_schema.datasource.microsoft_service_bus_event_hub + microsoft_service_bus_event_hub.properties = AAZObjectArg( + options=["properties"], + help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + cls._build_args_event_hub_output_data_source_properties_update(microsoft_service_bus_event_hub.properties) + + microsoft_service_bus_queue = cls._args_schema.datasource.microsoft_service_bus_queue + microsoft_service_bus_queue.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_service_bus_queue.property_columns = AAZListArg( + options=["property-columns"], + help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + nullable=True, + ) + microsoft_service_bus_queue.queue_name = AAZStrArg( + options=["queue-name"], + help="The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_queue.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_queue.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_queue.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_queue.system_property_columns = AAZDictArg( + options=["system-property-columns"], + help="The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", + nullable=True, + ) + + property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.property_columns + property_columns.Element = AAZStrArg( + nullable=True, + ) + + system_property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.system_property_columns + system_property_columns.Element = AAZAnyTypeArg( + nullable=True, + ) + + microsoft_service_bus_topic = cls._args_schema.datasource.microsoft_service_bus_topic + microsoft_service_bus_topic.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_service_bus_topic.property_columns = AAZListArg( + options=["property-columns"], + help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + nullable=True, + ) + microsoft_service_bus_topic.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_topic.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_topic.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_service_bus_topic.system_property_columns = AAZDictArg( + options=["system-property-columns"], + help="The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", + nullable=True, + ) + microsoft_service_bus_topic.topic_name = AAZStrArg( + options=["topic-name"], + help="The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.property_columns + property_columns.Element = AAZStrArg( + nullable=True, + ) + + system_property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.system_property_columns + system_property_columns.Element = AAZStrArg( + nullable=True, + ) + + microsoft_sql_server_data_warehouse = cls._args_schema.datasource.microsoft_sql_server_data_warehouse + microsoft_sql_server_data_warehouse.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_sql_server_data_warehouse.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_data_warehouse.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_data_warehouse.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_data_warehouse.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_data_warehouse.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + microsoft_sql_server_database = cls._args_schema.datasource.microsoft_sql_server_database + microsoft_sql_server_database.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_sql_server_database.database = AAZStrArg( + options=["database"], + help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_database.max_batch_count = AAZFloatArg( + options=["max-batch-count"], + help="Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", + nullable=True, + ) + microsoft_sql_server_database.max_writer_count = AAZFloatArg( + options=["max-writer-count"], + help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + nullable=True, + ) + microsoft_sql_server_database.password = AAZStrArg( + options=["password"], + help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_database.server = AAZStrArg( + options=["server"], + help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_database.table = AAZStrArg( + options=["table"], + help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_sql_server_database.user = AAZStrArg( + options=["user"], + help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + microsoft_storage_blob = cls._args_schema.datasource.microsoft_storage_blob + microsoft_storage_blob.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_storage_blob.blob_path_prefix = AAZStrArg( + options=["blob-path-prefix"], + help="Blob path prefix.", + nullable=True, + ) + microsoft_storage_blob.blob_write_mode = AAZStrArg( + options=["blob-write-mode"], + help="Blob write mode.", + nullable=True, + enum={"Append": "Append", "Once": "Once"}, + ) + microsoft_storage_blob.container = AAZStrArg( + options=["container"], + help="The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_blob.date_format = AAZStrArg( + options=["date-format"], + help="The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", + nullable=True, + ) + microsoft_storage_blob.path_pattern = AAZStrArg( + options=["path-pattern"], + help="The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", + nullable=True, + ) + microsoft_storage_blob.storage_accounts = AAZListArg( + options=["storage-accounts"], + help="A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_blob.time_format = AAZStrArg( + options=["time-format"], + help="The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", + nullable=True, + ) + + storage_accounts = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts + storage_accounts.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts.Element + _element.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + _element.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + _element.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + + microsoft_storage_document_db = cls._args_schema.datasource.microsoft_storage_document_db + microsoft_storage_document_db.account_id = AAZStrArg( + options=["account-id"], + help="The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_document_db.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_document_db.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + microsoft_storage_document_db.collection_name_pattern = AAZStrArg( + options=["collection-name-pattern"], + help="The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_document_db.database = AAZStrArg( + options=["database"], + help="The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_document_db.document_id = AAZStrArg( + options=["document-id"], + help="The name of the field in output events used to specify the primary key which insert or update operations are based on.", + nullable=True, + ) + microsoft_storage_document_db.partition_key = AAZStrArg( + options=["partition-key"], + help="The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.", + nullable=True, + ) + + microsoft_storage_table = cls._args_schema.datasource.microsoft_storage_table + microsoft_storage_table.account_key = AAZStrArg( + options=["account-key"], + help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_table.account_name = AAZStrArg( + options=["account-name"], + help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_table.batch_size = AAZIntArg( + options=["batch-size"], + help="The number of rows to write to the Azure Table at a time.", + nullable=True, + ) + microsoft_storage_table.columns_to_remove = AAZListArg( + options=["columns-to-remove"], + help="If specified, each item in the array is the name of a column to remove (if present) from output event entities.", + nullable=True, + ) + microsoft_storage_table.partition_key = AAZStrArg( + options=["partition-key"], + help="This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_table.row_key = AAZStrArg( + options=["row-key"], + help="This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + microsoft_storage_table.table = AAZStrArg( + options=["table"], + help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + columns_to_remove = cls._args_schema.datasource.microsoft_storage_table.columns_to_remove + columns_to_remove.Element = AAZStrArg( + nullable=True, + ) + + power_bi = cls._args_schema.datasource.power_bi + power_bi.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + power_bi.dataset = AAZStrArg( + options=["dataset"], + help="The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + power_bi.group_id = AAZStrArg( + options=["group-id"], + help="The ID of the Power BI group.", + nullable=True, + ) + power_bi.group_name = AAZStrArg( + options=["group-name"], + help="The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", + nullable=True, + ) + power_bi.refresh_token = AAZStrArg( + options=["refresh-token"], + help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + power_bi.table = AAZStrArg( + options=["table"], + help="The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + power_bi.token_user_display_name = AAZStrArg( + options=["token-user-display-name"], + help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + nullable=True, + ) + power_bi.token_user_principal_name = AAZStrArg( + options=["token-user-principal-name"], + help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + nullable=True, + ) + + raw = cls._args_schema.datasource.raw + raw.payload_uri = AAZStrArg( + options=["payload-uri"], + help="The SAS URL to a blob where the output should be written. If this property is not set, output data will be written into a temporary storage, and a SAS URL to that temporary storage will be included in the result.", + nullable=True, + ) serialization = cls._args_schema.serialization - serialization.Element = AAZAnyTypeArg() + serialization.avro = AAZObjectArg( + options=["avro"], + blank={}, + ) + serialization.csv = AAZObjectArg( + options=["csv"], + ) + serialization.custom_clr = AAZObjectArg( + options=["custom-clr"], + ) + serialization.delta = AAZObjectArg( + options=["delta"], + ) + serialization.json = AAZObjectArg( + options=["json"], + ) + serialization.parquet = AAZObjectArg( + options=["parquet"], + blank={}, + ) + + csv = cls._args_schema.serialization.csv + csv.encoding = AAZStrArg( + options=["encoding"], + help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + nullable=True, + enum={"UTF8": "UTF8"}, + ) + csv.field_delimiter = AAZStrArg( + options=["field-delimiter"], + help="Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + custom_clr = cls._args_schema.serialization.custom_clr + custom_clr.serialization_class_name = AAZStrArg( + options=["serialization-class-name"], + help="The serialization class name.", + nullable=True, + ) + custom_clr.serialization_dll_path = AAZStrArg( + options=["serialization-dll-path"], + help="The serialization library path.", + nullable=True, + ) + + delta = cls._args_schema.serialization.delta + delta.delta_table_path = AAZStrArg( + options=["delta-table-path"], + help="Specifies the path of the Delta Lake table that the output will be written to.", + ) + delta.partition_columns = AAZListArg( + options=["partition-columns"], + help="Specifies the names of the columns for which the Delta Lake table will be partitioned. We are only supporting 1 partition column, but keeping it as an array for extensibility.", + nullable=True, + ) + + partition_columns = cls._args_schema.serialization.delta.partition_columns + partition_columns.Element = AAZStrArg( + nullable=True, + ) + + json = cls._args_schema.serialization.json + json.encoding = AAZStrArg( + options=["encoding"], + help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + nullable=True, + enum={"UTF8": "UTF8"}, + ) + json.format = AAZStrArg( + options=["format"], + help="This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", + nullable=True, + enum={"Array": "Array", "LineSeparated": "LineSeparated"}, + ) + + watermark_settings = cls._args_schema.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( + options=["max-watermark-difference-across-partitions"], + help="Describes the maximal delta between the fastest and slowest partitions, so the out of order window that catches all necessary events in downstream jobs is well defined.", + nullable=True, + ) + watermark_settings.watermark_mode = AAZStrArg( + options=["watermark-mode"], + help="The output watermark mode.", + nullable=True, + enum={"None": "None", "SendCurrentPartitionWatermark": "SendCurrentPartitionWatermark", "SendLowestWatermarkAcrossPartitions": "SendLowestWatermarkAcrossPartitions"}, + ) return cls._args_schema + _args_event_hub_output_data_source_properties_update = None + + @classmethod + def _build_args_event_hub_output_data_source_properties_update(cls, _schema): + if cls._args_event_hub_output_data_source_properties_update is not None: + _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_update.authentication_mode + _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_update.event_hub_name + _schema.partition_count = cls._args_event_hub_output_data_source_properties_update.partition_count + _schema.partition_key = cls._args_event_hub_output_data_source_properties_update.partition_key + _schema.property_columns = cls._args_event_hub_output_data_source_properties_update.property_columns + _schema.service_bus_namespace = cls._args_event_hub_output_data_source_properties_update.service_bus_namespace + _schema.shared_access_policy_key = cls._args_event_hub_output_data_source_properties_update.shared_access_policy_key + _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_update.shared_access_policy_name + return + + cls._args_event_hub_output_data_source_properties_update = AAZObjectArg( + nullable=True, + ) + + event_hub_output_data_source_properties_update = cls._args_event_hub_output_data_source_properties_update + event_hub_output_data_source_properties_update.authentication_mode = AAZStrArg( + options=["authentication-mode"], + help="Authentication Mode.", + nullable=True, + enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, + ) + event_hub_output_data_source_properties_update.event_hub_name = AAZStrArg( + options=["event-hub-name"], + help="The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + event_hub_output_data_source_properties_update.partition_count = AAZIntArg( + options=["partition-count"], + help="The partition count of the event hub data source. Range 1 - 256.", + nullable=True, + ) + event_hub_output_data_source_properties_update.partition_key = AAZStrArg( + options=["partition-key"], + help="The key/column that is used to determine to which partition to send event data.", + nullable=True, + ) + event_hub_output_data_source_properties_update.property_columns = AAZListArg( + options=["property-columns"], + help="The properties associated with this Event Hub output.", + nullable=True, + ) + event_hub_output_data_source_properties_update.service_bus_namespace = AAZStrArg( + options=["service-bus-namespace"], + help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + event_hub_output_data_source_properties_update.shared_access_policy_key = AAZStrArg( + options=["shared-access-policy-key"], + help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + event_hub_output_data_source_properties_update.shared_access_policy_name = AAZStrArg( + options=["shared-access-policy-name"], + help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + nullable=True, + ) + + property_columns = cls._args_event_hub_output_data_source_properties_update.property_columns + property_columns.Element = AAZStrArg( + nullable=True, + ) + + _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_update.authentication_mode + _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_update.event_hub_name + _schema.partition_count = cls._args_event_hub_output_data_source_properties_update.partition_count + _schema.partition_key = cls._args_event_hub_output_data_source_properties_update.partition_key + _schema.property_columns = cls._args_event_hub_output_data_source_properties_update.property_columns + _schema.service_bus_namespace = cls._args_event_hub_output_data_source_properties_update.service_bus_namespace + _schema.shared_access_policy_key = cls._args_event_hub_output_data_source_properties_update.shared_access_policy_key + _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_update.shared_access_policy_name + def _execute_operations(self): self.pre_operations() - self.OutputsUpdate(ctx=self.ctx)() + self.OutputsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.OutputsCreateOrReplace(ctx=self.ctx)() self.post_operations() @register_callback @@ -97,11 +909,19 @@ def pre_operations(self): def post_operations(self): pass + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + def _output(self, *args, **kwargs): result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) return result - class OutputsUpdate(AAZHttpOperation): + class OutputsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -121,7 +941,7 @@ def url(self): @property def method(self): - return "PATCH" + return "GET" @property def error_format(self): @@ -162,45 +982,12 @@ def query_parameters(self): @property def header_parameters(self): parameters = { - **self.serialize_header_param( - "If-Match", self.ctx.args.if_match, - ), - **self.serialize_header_param( - "Content-Type", "application/json", - ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("name", AAZStrType, ".output_name") - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("datasource", AAZDictType, ".datasource") - properties.set_prop("serialization", AAZDictType, ".serialization") - properties.set_prop("sizeWindow", AAZIntType, ".size_window") - properties.set_prop("timeWindow", AAZStrType, ".time_window") - - datasource = _builder.get(".properties.datasource") - if datasource is not None: - datasource.set_elements(AAZAnyType, ".") - - serialization = _builder.get(".properties.serialization") - if serialization is not None: - serialization.set_elements(AAZAnyType, ".") - - return self.serialize_content(_content_value) - def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( @@ -217,65 +1004,1063 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_output_read(cls._schema_on_200) - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType() - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.datasource = AAZDictType() - properties.diagnostics = AAZObjectType( - flags={"read_only": True}, - ) - properties.etag = AAZStrType( - flags={"read_only": True}, - ) - properties.serialization = AAZDictType() - properties.size_window = AAZIntType( - serialized_name="sizeWindow", - ) - properties.time_window = AAZStrType( - serialized_name="timeWindow", - ) + return cls._schema_on_200 - datasource = cls._schema_on_200.properties.datasource - datasource.Element = AAZAnyType() + class OutputsCreateOrReplace(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" - diagnostics = cls._schema_on_200.properties.diagnostics - diagnostics.conditions = AAZListType( - flags={"read_only": True}, - ) + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) - conditions = cls._schema_on_200.properties.diagnostics.conditions - conditions.Element = AAZObjectType() + return self.on_error(session.http_response) - _element = cls._schema_on_200.properties.diagnostics.conditions.Element - _element.code = AAZStrType( - flags={"read_only": True}, - ) - _element.message = AAZStrType( - flags={"read_only": True}, - ) - _element.since = AAZStrType( - flags={"read_only": True}, + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "jobName", self.ctx.args.job_name, + required=True, + ), + **self.serialize_url_param( + "outputName", self.ctx.args.output_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2021-10-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "If-Match", self.ctx.args.if_match, + ), + **self.serialize_header_param( + "If-None-Match", self.ctx.args.if_none_match, + ), + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_output_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("name", AAZStrType, ".output_name") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("datasource", AAZObjectType, ".datasource") + properties.set_prop("serialization", AAZObjectType, ".serialization") + properties.set_prop("sizeWindow", AAZIntType, ".size_window") + properties.set_prop("timeWindow", AAZStrType, ".time_window") + properties.set_prop("watermarkSettings", AAZObjectType, ".watermark_settings") + + datasource = _builder.get(".properties.datasource") + if datasource is not None: + datasource.set_const("type", "GatewayMessageBus", AAZStrType, ".gateway_message_bus", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.AzureFunction", AAZStrType, ".microsoft_azure_function", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.DBForPostgreSQL/servers/databases", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.DataLake/Accounts", AAZStrType, ".microsoft_data_lake_accounts", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.EventHub/EventHub", AAZStrType, ".microsoft_event_hub_event_hub", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Kusto/clusters/databases", AAZStrType, ".microsoft_kusto_clusters_databases", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/EventHub", AAZStrType, ".microsoft_service_bus_event_hub", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/Queue", AAZStrType, ".microsoft_service_bus_queue", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.ServiceBus/Topic", AAZStrType, ".microsoft_service_bus_topic", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Sql/Server/DataWarehouse", AAZStrType, ".microsoft_sql_server_data_warehouse", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Sql/Server/Database", AAZStrType, ".microsoft_sql_server_database", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/Blob", AAZStrType, ".microsoft_storage_blob", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/DocumentDB", AAZStrType, ".microsoft_storage_document_db", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Microsoft.Storage/Table", AAZStrType, ".microsoft_storage_table", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "PowerBI", AAZStrType, ".power_bi", typ_kwargs={"flags": {"required": True}}) + datasource.set_const("type", "Raw", AAZStrType, ".raw", typ_kwargs={"flags": {"required": True}}) + datasource.discriminate_by("type", "GatewayMessageBus") + datasource.discriminate_by("type", "Microsoft.AzureFunction") + datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + datasource.discriminate_by("type", "Microsoft.Storage/Blob") + datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + datasource.discriminate_by("type", "Microsoft.Storage/Table") + datasource.discriminate_by("type", "PowerBI") + datasource.discriminate_by("type", "Raw") + + disc_gateway_message_bus = _builder.get(".properties.datasource{type:GatewayMessageBus}") + if disc_gateway_message_bus is not None: + disc_gateway_message_bus.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:GatewayMessageBus}.properties") + if properties is not None: + properties.set_prop("topic", AAZStrType, ".gateway_message_bus.topic") + + disc_microsoft__azure_function = _builder.get(".properties.datasource{type:Microsoft.AzureFunction}") + if disc_microsoft__azure_function is not None: + disc_microsoft__azure_function.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.AzureFunction}.properties") + if properties is not None: + properties.set_prop("apiKey", AAZStrType, ".microsoft_azure_function.api_key") + properties.set_prop("functionAppName", AAZStrType, ".microsoft_azure_function.function_app_name") + properties.set_prop("functionName", AAZStrType, ".microsoft_azure_function.function_name") + properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_azure_function.max_batch_count") + properties.set_prop("maxBatchSize", AAZFloatType, ".microsoft_azure_function.max_batch_size") + + disc_microsoft_db_for_postgre_sql_servers_databases = _builder.get(".properties.datasource{type:Microsoft.DBForPostgreSQL/servers/databases}") + if disc_microsoft_db_for_postgre_sql_servers_databases is not None: + disc_microsoft_db_for_postgre_sql_servers_databases.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.DBForPostgreSQL/servers/databases}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.database") + properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_db_for_postgre_sql_servers_databases.max_writer_count") + properties.set_prop("password", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("server", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.server") + properties.set_prop("table", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.table") + properties.set_prop("user", AAZStrType, ".microsoft_db_for_postgre_sql_servers_databases.user") + + disc_microsoft__data_lake__accounts = _builder.get(".properties.datasource{type:Microsoft.DataLake/Accounts}") + if disc_microsoft__data_lake__accounts is not None: + disc_microsoft__data_lake__accounts.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.DataLake/Accounts}.properties") + if properties is not None: + properties.set_prop("accountName", AAZStrType, ".microsoft_data_lake_accounts.account_name") + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_data_lake_accounts.authentication_mode") + properties.set_prop("dateFormat", AAZStrType, ".microsoft_data_lake_accounts.date_format") + properties.set_prop("filePathPrefix", AAZStrType, ".microsoft_data_lake_accounts.file_path_prefix") + properties.set_prop("refreshToken", AAZStrType, ".microsoft_data_lake_accounts.refresh_token") + properties.set_prop("tenantId", AAZStrType, ".microsoft_data_lake_accounts.tenant_id") + properties.set_prop("timeFormat", AAZStrType, ".microsoft_data_lake_accounts.time_format") + properties.set_prop("tokenUserDisplayName", AAZStrType, ".microsoft_data_lake_accounts.token_user_display_name") + properties.set_prop("tokenUserPrincipalName", AAZStrType, ".microsoft_data_lake_accounts.token_user_principal_name") + + disc_microsoft__event_hub__event_hub = _builder.get(".properties.datasource{type:Microsoft.EventHub/EventHub}") + if disc_microsoft__event_hub__event_hub is not None: + _UpdateHelper._build_schema_event_hub_output_data_source_properties_update(disc_microsoft__event_hub__event_hub.set_prop("properties", AAZObjectType, ".microsoft_event_hub_event_hub.properties", typ_kwargs={"flags": {"client_flatten": True}})) + + disc_microsoft__kusto_clusters_databases = _builder.get(".properties.datasource{type:Microsoft.Kusto/clusters/databases}") + if disc_microsoft__kusto_clusters_databases is not None: + disc_microsoft__kusto_clusters_databases.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Kusto/clusters/databases}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_kusto_clusters_databases.authentication_mode") + properties.set_prop("cluster", AAZStrType, ".microsoft_kusto_clusters_databases.cluster") + properties.set_prop("database", AAZStrType, ".microsoft_kusto_clusters_databases.database") + properties.set_prop("table", AAZStrType, ".microsoft_kusto_clusters_databases.table") + + disc_microsoft__service_bus__event_hub = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/EventHub}") + if disc_microsoft__service_bus__event_hub is not None: + _UpdateHelper._build_schema_event_hub_output_data_source_properties_update(disc_microsoft__service_bus__event_hub.set_prop("properties", AAZObjectType, ".microsoft_service_bus_event_hub.properties", typ_kwargs={"flags": {"client_flatten": True}})) + + disc_microsoft__service_bus__queue = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}") + if disc_microsoft__service_bus__queue is not None: + disc_microsoft__service_bus__queue.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_service_bus_queue.authentication_mode") + properties.set_prop("propertyColumns", AAZListType, ".microsoft_service_bus_queue.property_columns") + properties.set_prop("queueName", AAZStrType, ".microsoft_service_bus_queue.queue_name") + properties.set_prop("serviceBusNamespace", AAZStrType, ".microsoft_service_bus_queue.service_bus_namespace") + properties.set_prop("sharedAccessPolicyKey", AAZStrType, ".microsoft_service_bus_queue.shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("sharedAccessPolicyName", AAZStrType, ".microsoft_service_bus_queue.shared_access_policy_name") + properties.set_prop("systemPropertyColumns", AAZDictType, ".microsoft_service_bus_queue.system_property_columns") + + property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties.propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + system_property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Queue}.properties.systemPropertyColumns") + if system_property_columns is not None: + system_property_columns.set_elements(AAZAnyType, ".") + + disc_microsoft__service_bus__topic = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}") + if disc_microsoft__service_bus__topic is not None: + disc_microsoft__service_bus__topic.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_service_bus_topic.authentication_mode") + properties.set_prop("propertyColumns", AAZListType, ".microsoft_service_bus_topic.property_columns") + properties.set_prop("serviceBusNamespace", AAZStrType, ".microsoft_service_bus_topic.service_bus_namespace") + properties.set_prop("sharedAccessPolicyKey", AAZStrType, ".microsoft_service_bus_topic.shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("sharedAccessPolicyName", AAZStrType, ".microsoft_service_bus_topic.shared_access_policy_name") + properties.set_prop("systemPropertyColumns", AAZDictType, ".microsoft_service_bus_topic.system_property_columns") + properties.set_prop("topicName", AAZStrType, ".microsoft_service_bus_topic.topic_name") + + property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties.propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + system_property_columns = _builder.get(".properties.datasource{type:Microsoft.ServiceBus/Topic}.properties.systemPropertyColumns") + if system_property_columns is not None: + system_property_columns.set_elements(AAZStrType, ".") + + disc_microsoft__sql__server__data_warehouse = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/DataWarehouse}") + if disc_microsoft__sql__server__data_warehouse is not None: + disc_microsoft__sql__server__data_warehouse.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/DataWarehouse}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_sql_server_data_warehouse.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_sql_server_data_warehouse.database") + properties.set_prop("password", AAZStrType, ".microsoft_sql_server_data_warehouse.password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("server", AAZStrType, ".microsoft_sql_server_data_warehouse.server") + properties.set_prop("table", AAZStrType, ".microsoft_sql_server_data_warehouse.table") + properties.set_prop("user", AAZStrType, ".microsoft_sql_server_data_warehouse.user") + + disc_microsoft__sql__server__database = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/Database}") + if disc_microsoft__sql__server__database is not None: + disc_microsoft__sql__server__database.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Sql/Server/Database}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_sql_server_database.authentication_mode") + properties.set_prop("database", AAZStrType, ".microsoft_sql_server_database.database") + properties.set_prop("maxBatchCount", AAZFloatType, ".microsoft_sql_server_database.max_batch_count") + properties.set_prop("maxWriterCount", AAZFloatType, ".microsoft_sql_server_database.max_writer_count") + properties.set_prop("password", AAZStrType, ".microsoft_sql_server_database.password") + properties.set_prop("server", AAZStrType, ".microsoft_sql_server_database.server") + properties.set_prop("table", AAZStrType, ".microsoft_sql_server_database.table") + properties.set_prop("user", AAZStrType, ".microsoft_sql_server_database.user") + + disc_microsoft__storage__blob = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}") + if disc_microsoft__storage__blob is not None: + disc_microsoft__storage__blob.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_storage_blob.authentication_mode") + properties.set_prop("blobPathPrefix", AAZStrType, ".microsoft_storage_blob.blob_path_prefix") + properties.set_prop("blobWriteMode", AAZStrType, ".microsoft_storage_blob.blob_write_mode") + properties.set_prop("container", AAZStrType, ".microsoft_storage_blob.container") + properties.set_prop("dateFormat", AAZStrType, ".microsoft_storage_blob.date_format") + properties.set_prop("pathPattern", AAZStrType, ".microsoft_storage_blob.path_pattern") + properties.set_prop("storageAccounts", AAZListType, ".microsoft_storage_blob.storage_accounts") + properties.set_prop("timeFormat", AAZStrType, ".microsoft_storage_blob.time_format") + + storage_accounts = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties.storageAccounts") + if storage_accounts is not None: + storage_accounts.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.datasource{type:Microsoft.Storage/Blob}.properties.storageAccounts[]") + if _elements is not None: + _elements.set_prop("accountKey", AAZStrType, ".account_key", typ_kwargs={"flags": {"secret": True}}) + _elements.set_prop("accountName", AAZStrType, ".account_name") + _elements.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + + disc_microsoft__storage__document_db = _builder.get(".properties.datasource{type:Microsoft.Storage/DocumentDB}") + if disc_microsoft__storage__document_db is not None: + disc_microsoft__storage__document_db.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/DocumentDB}.properties") + if properties is not None: + properties.set_prop("accountId", AAZStrType, ".microsoft_storage_document_db.account_id") + properties.set_prop("accountKey", AAZStrType, ".microsoft_storage_document_db.account_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("authenticationMode", AAZStrType, ".microsoft_storage_document_db.authentication_mode") + properties.set_prop("collectionNamePattern", AAZStrType, ".microsoft_storage_document_db.collection_name_pattern") + properties.set_prop("database", AAZStrType, ".microsoft_storage_document_db.database") + properties.set_prop("documentId", AAZStrType, ".microsoft_storage_document_db.document_id") + properties.set_prop("partitionKey", AAZStrType, ".microsoft_storage_document_db.partition_key") + + disc_microsoft__storage__table = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}") + if disc_microsoft__storage__table is not None: + disc_microsoft__storage__table.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}.properties") + if properties is not None: + properties.set_prop("accountKey", AAZStrType, ".microsoft_storage_table.account_key", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("accountName", AAZStrType, ".microsoft_storage_table.account_name") + properties.set_prop("batchSize", AAZIntType, ".microsoft_storage_table.batch_size") + properties.set_prop("columnsToRemove", AAZListType, ".microsoft_storage_table.columns_to_remove") + properties.set_prop("partitionKey", AAZStrType, ".microsoft_storage_table.partition_key") + properties.set_prop("rowKey", AAZStrType, ".microsoft_storage_table.row_key") + properties.set_prop("table", AAZStrType, ".microsoft_storage_table.table") + + columns_to_remove = _builder.get(".properties.datasource{type:Microsoft.Storage/Table}.properties.columnsToRemove") + if columns_to_remove is not None: + columns_to_remove.set_elements(AAZStrType, ".") + + disc_power_bi = _builder.get(".properties.datasource{type:PowerBI}") + if disc_power_bi is not None: + disc_power_bi.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:PowerBI}.properties") + if properties is not None: + properties.set_prop("authenticationMode", AAZStrType, ".power_bi.authentication_mode") + properties.set_prop("dataset", AAZStrType, ".power_bi.dataset") + properties.set_prop("groupId", AAZStrType, ".power_bi.group_id") + properties.set_prop("groupName", AAZStrType, ".power_bi.group_name") + properties.set_prop("refreshToken", AAZStrType, ".power_bi.refresh_token") + properties.set_prop("table", AAZStrType, ".power_bi.table") + properties.set_prop("tokenUserDisplayName", AAZStrType, ".power_bi.token_user_display_name") + properties.set_prop("tokenUserPrincipalName", AAZStrType, ".power_bi.token_user_principal_name") + + disc_raw = _builder.get(".properties.datasource{type:Raw}") + if disc_raw is not None: + disc_raw.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.datasource{type:Raw}.properties") + if properties is not None: + properties.set_prop("payloadUri", AAZStrType, ".raw.payload_uri") + + serialization = _builder.get(".properties.serialization") + if serialization is not None: + serialization.set_const("type", "Avro", AAZStrType, ".avro", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Csv", AAZStrType, ".csv", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "CustomClr", AAZStrType, ".custom_clr", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Delta", AAZStrType, ".delta", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Json", AAZStrType, ".json", typ_kwargs={"flags": {"required": True}}) + serialization.set_const("type", "Parquet", AAZStrType, ".parquet", typ_kwargs={"flags": {"required": True}}) + serialization.discriminate_by("type", "Avro") + serialization.discriminate_by("type", "Csv") + serialization.discriminate_by("type", "CustomClr") + serialization.discriminate_by("type", "Delta") + serialization.discriminate_by("type", "Json") + serialization.discriminate_by("type", "Parquet") + + disc_avro = _builder.get(".properties.serialization{type:Avro}") + if disc_avro is not None: + disc_avro.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + disc_csv = _builder.get(".properties.serialization{type:Csv}") + if disc_csv is not None: + disc_csv.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Csv}.properties") + if properties is not None: + properties.set_prop("encoding", AAZStrType, ".csv.encoding") + properties.set_prop("fieldDelimiter", AAZStrType, ".csv.field_delimiter") + + disc_custom_clr = _builder.get(".properties.serialization{type:CustomClr}") + if disc_custom_clr is not None: + disc_custom_clr.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:CustomClr}.properties") + if properties is not None: + properties.set_prop("serializationClassName", AAZStrType, ".custom_clr.serialization_class_name") + properties.set_prop("serializationDllPath", AAZStrType, ".custom_clr.serialization_dll_path") + + disc_delta = _builder.get(".properties.serialization{type:Delta}") + if disc_delta is not None: + disc_delta.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Delta}.properties") + if properties is not None: + properties.set_prop("deltaTablePath", AAZStrType, ".delta.delta_table_path", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("partitionColumns", AAZListType, ".delta.partition_columns") + + partition_columns = _builder.get(".properties.serialization{type:Delta}.properties.partitionColumns") + if partition_columns is not None: + partition_columns.set_elements(AAZStrType, ".") + + disc_json = _builder.get(".properties.serialization{type:Json}") + if disc_json is not None: + disc_json.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties.serialization{type:Json}.properties") + if properties is not None: + properties.set_prop("encoding", AAZStrType, ".json.encoding") + properties.set_prop("format", AAZStrType, ".json.format") + + disc_parquet = _builder.get(".properties.serialization{type:Parquet}") + if disc_parquet is not None: + disc_parquet.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + watermark_settings = _builder.get(".properties.watermarkSettings") + if watermark_settings is not None: + watermark_settings.set_prop("maxWatermarkDifferenceAcrossPartitions", AAZStrType, ".max_watermark_difference_across_partitions") + watermark_settings.set_prop("watermarkMode", AAZStrType, ".watermark_mode") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args ) - serialization = cls._schema_on_200.properties.serialization - serialization.Element = AAZAnyType() - - return cls._schema_on_200 - class _UpdateHelper: """Helper class for Update""" + @classmethod + def _build_schema_event_hub_output_data_source_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + _builder.set_prop("eventHubName", AAZStrType, ".event_hub_name") + _builder.set_prop("partitionCount", AAZIntType, ".partition_count") + _builder.set_prop("partitionKey", AAZStrType, ".partition_key") + _builder.set_prop("propertyColumns", AAZListType, ".property_columns") + _builder.set_prop("serviceBusNamespace", AAZStrType, ".service_bus_namespace") + _builder.set_prop("sharedAccessPolicyKey", AAZStrType, ".shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + _builder.set_prop("sharedAccessPolicyName", AAZStrType, ".shared_access_policy_name") + + property_columns = _builder.get(".propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") + + _schema_event_hub_output_data_source_properties_read = None + + @classmethod + def _build_schema_event_hub_output_data_source_properties_read(cls, _schema): + if cls._schema_event_hub_output_data_source_properties_read is not None: + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + return + + cls._schema_event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read = AAZObjectType() + + event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read + event_hub_output_data_source_properties_read.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + event_hub_output_data_source_properties_read.event_hub_name = AAZStrType( + serialized_name="eventHubName", + ) + event_hub_output_data_source_properties_read.partition_count = AAZIntType( + serialized_name="partitionCount", + ) + event_hub_output_data_source_properties_read.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + event_hub_output_data_source_properties_read.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + event_hub_output_data_source_properties_read.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + event_hub_output_data_source_properties_read.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + event_hub_output_data_source_properties_read.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + + property_columns = _schema_event_hub_output_data_source_properties_read.property_columns + property_columns.Element = AAZStrType() + + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + + _schema_output_read = None + + @classmethod + def _build_schema_output_read(cls, _schema): + if cls._schema_output_read is not None: + _schema.id = cls._schema_output_read.id + _schema.name = cls._schema_output_read.name + _schema.properties = cls._schema_output_read.properties + _schema.type = cls._schema_output_read.type + return + + cls._schema_output_read = _schema_output_read = AAZObjectType() + + output_read = _schema_output_read + output_read.id = AAZStrType( + flags={"read_only": True}, + ) + output_read.name = AAZStrType() + output_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + output_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_output_read.properties + properties.datasource = AAZObjectType() + properties.diagnostics = AAZObjectType( + flags={"read_only": True}, + ) + properties.etag = AAZStrType( + flags={"read_only": True}, + ) + properties.last_output_event_timestamps = AAZListType( + serialized_name="lastOutputEventTimestamps", + flags={"read_only": True}, + ) + properties.serialization = AAZObjectType() + properties.size_window = AAZIntType( + serialized_name="sizeWindow", + ) + properties.time_window = AAZStrType( + serialized_name="timeWindow", + ) + properties.watermark_settings = AAZObjectType( + serialized_name="watermarkSettings", + ) + + datasource = _schema_output_read.properties.datasource + datasource.type = AAZStrType( + flags={"required": True}, + ) + + disc_gateway_message_bus = _schema_output_read.properties.datasource.discriminate_by("type", "GatewayMessageBus") + disc_gateway_message_bus.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "GatewayMessageBus").properties + properties.topic = AAZStrType() + + disc_microsoft__azure_function = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction") + disc_microsoft__azure_function.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction").properties + properties.api_key = AAZStrType( + serialized_name="apiKey", + ) + properties.function_app_name = AAZStrType( + serialized_name="functionAppName", + ) + properties.function_name = AAZStrType( + serialized_name="functionName", + ) + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_batch_size = AAZFloatType( + serialized_name="maxBatchSize", + ) + + disc_microsoft_db_for_postgre_sql_servers_databases = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + disc_microsoft_db_for_postgre_sql_servers_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__data_lake__accounts = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + disc_microsoft__data_lake__accounts.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts").properties + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.file_path_prefix = AAZStrType( + serialized_name="filePathPrefix", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.tenant_id = AAZStrType( + serialized_name="tenantId", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_microsoft__event_hub__event_hub = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + disc_microsoft__event_hub__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + cls._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__event_hub__event_hub.properties) + + disc_microsoft__kusto_clusters_databases = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + disc_microsoft__kusto_clusters_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.cluster = AAZStrType() + properties.database = AAZStrType() + properties.table = AAZStrType() + + disc_microsoft__service_bus__event_hub = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + disc_microsoft__service_bus__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + cls._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__service_bus__event_hub.properties) + + disc_microsoft__service_bus__queue = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + disc_microsoft__service_bus__queue.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.queue_name = AAZStrType( + serialized_name="queueName", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + + property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.system_property_columns + system_property_columns.Element = AAZAnyType() + + disc_microsoft__service_bus__topic = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + disc_microsoft__service_bus__topic.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + properties.topic_name = AAZStrType( + serialized_name="topicName", + ) + + property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.property_columns + property_columns.Element = AAZStrType() + + system_property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.system_property_columns + system_property_columns.Element = AAZStrType() + + disc_microsoft__sql__server__data_warehouse = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + disc_microsoft__sql__server__data_warehouse.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__sql__server__database = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + disc_microsoft__sql__server__database.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType() + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__storage__blob = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob") + disc_microsoft__storage__blob.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.blob_path_prefix = AAZStrType( + serialized_name="blobPathPrefix", + ) + properties.blob_write_mode = AAZStrType( + serialized_name="blobWriteMode", + ) + properties.container = AAZStrType() + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.path_pattern = AAZStrType( + serialized_name="pathPattern", + ) + properties.storage_accounts = AAZListType( + serialized_name="storageAccounts", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + + storage_accounts = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts + storage_accounts.Element = AAZObjectType() + + _element = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts.Element + _element.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + _element.account_name = AAZStrType( + serialized_name="accountName", + ) + _element.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + + disc_microsoft__storage__document_db = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + disc_microsoft__storage__document_db.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB").properties + properties.account_id = AAZStrType( + serialized_name="accountId", + ) + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.collection_name_pattern = AAZStrType( + serialized_name="collectionNamePattern", + ) + properties.database = AAZStrType() + properties.document_id = AAZStrType( + serialized_name="documentId", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + + disc_microsoft__storage__table = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table") + disc_microsoft__storage__table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.batch_size = AAZIntType( + serialized_name="batchSize", + ) + properties.columns_to_remove = AAZListType( + serialized_name="columnsToRemove", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + properties.row_key = AAZStrType( + serialized_name="rowKey", + ) + properties.table = AAZStrType() + + columns_to_remove = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties.columns_to_remove + columns_to_remove.Element = AAZStrType() + + disc_power_bi = _schema_output_read.properties.datasource.discriminate_by("type", "PowerBI") + disc_power_bi.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "PowerBI").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.dataset = AAZStrType() + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.group_name = AAZStrType( + serialized_name="groupName", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.table = AAZStrType() + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) + + disc_raw = _schema_output_read.properties.datasource.discriminate_by("type", "Raw") + disc_raw.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.datasource.discriminate_by("type", "Raw").properties + properties.payload_uri = AAZStrType( + serialized_name="payloadUri", + ) + + diagnostics = _schema_output_read.properties.diagnostics + diagnostics.conditions = AAZListType( + flags={"read_only": True}, + ) + + conditions = _schema_output_read.properties.diagnostics.conditions + conditions.Element = AAZObjectType() + + _element = _schema_output_read.properties.diagnostics.conditions.Element + _element.code = AAZStrType( + flags={"read_only": True}, + ) + _element.message = AAZStrType( + flags={"read_only": True}, + ) + _element.since = AAZStrType( + flags={"read_only": True}, + ) + + last_output_event_timestamps = _schema_output_read.properties.last_output_event_timestamps + last_output_event_timestamps.Element = AAZObjectType() + + _element = _schema_output_read.properties.last_output_event_timestamps.Element + _element.last_output_event_time = AAZStrType( + serialized_name="lastOutputEventTime", + ) + _element.last_update_time = AAZStrType( + serialized_name="lastUpdateTime", + ) + + serialization = _schema_output_read.properties.serialization + serialization.type = AAZStrType( + flags={"required": True}, + ) + + disc_avro = _schema_output_read.properties.serialization.discriminate_by("type", "Avro") + disc_avro.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + disc_csv = _schema_output_read.properties.serialization.discriminate_by("type", "Csv") + disc_csv.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.serialization.discriminate_by("type", "Csv").properties + properties.encoding = AAZStrType() + properties.field_delimiter = AAZStrType( + serialized_name="fieldDelimiter", + ) + + disc_custom_clr = _schema_output_read.properties.serialization.discriminate_by("type", "CustomClr") + disc_custom_clr.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.serialization.discriminate_by("type", "CustomClr").properties + properties.serialization_class_name = AAZStrType( + serialized_name="serializationClassName", + ) + properties.serialization_dll_path = AAZStrType( + serialized_name="serializationDllPath", + ) + + disc_delta = _schema_output_read.properties.serialization.discriminate_by("type", "Delta") + disc_delta.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.serialization.discriminate_by("type", "Delta").properties + properties.delta_table_path = AAZStrType( + serialized_name="deltaTablePath", + flags={"required": True}, + ) + properties.partition_columns = AAZListType( + serialized_name="partitionColumns", + ) + + partition_columns = _schema_output_read.properties.serialization.discriminate_by("type", "Delta").properties.partition_columns + partition_columns.Element = AAZStrType() + + disc_json = _schema_output_read.properties.serialization.discriminate_by("type", "Json") + disc_json.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + properties = _schema_output_read.properties.serialization.discriminate_by("type", "Json").properties + properties.encoding = AAZStrType() + properties.format = AAZStrType() + + disc_parquet = _schema_output_read.properties.serialization.discriminate_by("type", "Parquet") + disc_parquet.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + + watermark_settings = _schema_output_read.properties.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrType( + serialized_name="maxWatermarkDifferenceAcrossPartitions", + ) + watermark_settings.watermark_mode = AAZStrType( + serialized_name="watermarkMode", + ) + + _schema.id = cls._schema_output_read.id + _schema.name = cls._schema_output_read.name + _schema.properties = cls._schema_output_read.properties + _schema.type = cls._schema_output_read.type + __all__ = ["Update"] diff --git a/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_documentdb_authentication_mode.yaml b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_documentdb_authentication_mode.yaml new file mode 100644 index 00000000000..ad40e50dfe4 --- /dev/null +++ b/src/stream-analytics/azext_stream_analytics/tests/latest/recordings/test_output_documentdb_authentication_mode.yaml @@ -0,0 +1,234 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stream-analytics job create + Connection: + - keep-alive + ParameterSetName: + - -n -g --data-locale --output-error-policy --out-of-order-policy --order-max-delay --arrival-max-delay + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001?api-version=2024-11-01 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001", "name": "cli_test_stream_analytics_000001", "type": "Microsoft.Resources/resourceGroups", "location": "westus", "tags": {"product": "azurecli", "cause": "automation", "test": "test_output_documentdb_authentication_mode", "date": "2026-08-17T07:00:00Z", "module": "stream-analytics"}, "properties": {"provisioningState": "Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2026 07:00:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"sku": {"name": "Standard"}, "eventsOutOfOrderPolicy": "Drop", "outputErrorPolicy": "Drop", "eventsOutOfOrderMaxDelayInSeconds": 0, "eventsLateArrivalMaxDelayInSeconds": 5, "dataLocale": "en-US"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stream-analytics job create + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/json + ParameterSetName: + - -n -g --data-locale --output-error-policy --out-of-order-policy --order-max-delay --arrival-max-delay + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job?api-version=2020-03-01 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job", "name": "job", "type": "Microsoft.StreamAnalytics/streamingjobs", "location": "West US", "properties": {"sku": {"name": "Standard"}, "jobId": "2e4a4dbb-77cb-47df-9bc3-8be7aa6b75c2", "provisioningState": "Succeeded", "jobState": "Created", "eventsOutOfOrderPolicy": "Drop", "outputErrorPolicy": "Drop", "eventsOutOfOrderMaxDelayInSeconds": 0, "eventsLateArrivalMaxDelayInSeconds": 5, "dataLocale": "en-US", "createdDate": "2026-08-17T07:00:02.000Z", "compatibilityLevel": "1.0", "jobStorageAccount": null, "contentStoragePolicy": "SystemAccount", "inputs": [], "functions": [], "outputs": [], "jobType": "Cloud", "cluster": null}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '919' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2026 07:00:02 GMT + etag: + - 5f5db02a-ef90-4f7b-93f4-6fd0e7398afd + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + status: + code: 200 + message: OK +- request: + body: '{"name": "output", "properties": {"datasource": {"type": "Microsoft.Storage/DocumentDB", "properties": {"accountId": "babocosmosnosql", "accountKey": null, "database": "Transactional", "collectionNamePattern": "1", "authenticationMode": "Msi"}}, "serialization": {"type": "Json", "properties": {"encoding": "UTF8"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stream-analytics output create + Connection: + - keep-alive + Content-Length: + - '325' + Content-Type: + - application/json + ParameterSetName: + - -n -g --job-name --datasource --serialization + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output", "name": "output", "type": "Microsoft.StreamAnalytics/streamingjobs/outputs", "properties": {"datasource": {"type": "Microsoft.Storage/DocumentDB", "properties": {"accountId": "babocosmosnosql", "database": "Transactional", "collectionNamePattern": "1", "authenticationMode": "Msi"}}, "serialization": {"type": "Json", "properties": {"encoding": "UTF8", "format": "LineSeparated"}}, "messagingCatalogConfiguration": null}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '839' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2026 07:00:03 GMT + etag: + - 51fa8b51-67bb-444f-b122-f09ca4ad1d1a + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stream-analytics output show + Connection: + - keep-alive + ParameterSetName: + - -n -g --job-name + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output", "name": "output", "type": "Microsoft.StreamAnalytics/streamingjobs/outputs", "properties": {"datasource": {"type": "Microsoft.Storage/DocumentDB", "properties": {"accountId": "babocosmosnosql", "database": "Transactional", "collectionNamePattern": "1", "authenticationMode": "Msi"}}, "serialization": {"type": "Json", "properties": {"encoding": "UTF8", "format": "LineSeparated"}}, "messagingCatalogConfiguration": null}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '839' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 17 Aug 2026 07:00:04 GMT + etag: + - 51fa8b51-67bb-444f-b122-f09ca4ad1d1a + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1099' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stream-analytics output delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g --job-name --yes + User-Agent: + - AZURECLI/2.87.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stream_analytics_000001/providers/Microsoft.StreamAnalytics/streamingjobs/job/outputs/output?api-version=2021-10-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-store, no-cache + content-length: + - '0' + date: + - Mon, 17 Aug 2026 07:00:05 GMT + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + status: + code: 200 + message: OK +version: 1 diff --git a/src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py b/src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py index 2cabdd9b5e4..39dece67bc1 100644 --- a/src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py +++ b/src/stream-analytics/azext_stream_analytics/tests/latest/test_stream_analytics_commands.py @@ -537,6 +537,62 @@ def test_output_crud(self, storage_account): self.check("datasource.type", "Microsoft.AzureFunction") ]) + @ResourceGroupPreparer(name_prefix="cli_test_stream_analytics_", location="westus") + def test_output_documentdb_authentication_mode(self): + self.kwargs.update({ + "job_name": "job", + "output_name": "output", + "locale": "en-US" + }) + + self.cmd( + "stream-analytics job create -n {job_name} -g {rg} \ + --data-locale {locale} \ + --output-error-policy Drop --out-of-order-policy Drop \ + --order-max-delay 0 --arrival-max-delay 5" + ) + + datasource_props = { + "type": "Microsoft.Storage/DocumentDB", + "properties": { + "accountId": "babocosmosnosql", + "accountKey": None, + "database": "Transactional", + "collectionNamePattern": "1", + "authenticationMode": "Msi" + } + } + serialization_props = { + "type": "Json", + "properties": { + "encoding": "UTF8" + } + } + self.kwargs["datasource"] = json.dumps(datasource_props) + self.kwargs["serialization"] = json.dumps(serialization_props) + + self.cmd( + "stream-analytics output create -n {output_name} -g {rg} \ + --job-name {job_name} \ + --datasource '{datasource}' --serialization '{serialization}'", + checks=[ + self.check("name", "{output_name}"), + self.check("type", "Microsoft.StreamAnalytics/streamingjobs/outputs"), + self.check("datasource.type", "Microsoft.Storage/DocumentDB"), + self.check("datasource.authenticationMode", "Msi") + ] + ) + self.cmd( + "stream-analytics output show -n {output_name} -g {rg} --job-name {job_name}", + checks=[ + self.check("name", "{output_name}"), + self.check("datasource.type", "Microsoft.Storage/DocumentDB"), + self.check("datasource.authenticationMode", "Msi") + ] + ) + + self.cmd("stream-analytics output delete -n {output_name} -g {rg} --job-name {job_name} --yes") + @ResourceGroupPreparer(name_prefix="cli_test_stream_analytics_") @StorageAccountPreparer(parameter_name="storage_account") def test_output_create_policy_violation(self, storage_account): diff --git a/src/stream-analytics/setup.py b/src/stream-analytics/setup.py index 9b75d735c57..a101c240e11 100644 --- a/src/stream-analytics/setup.py +++ b/src/stream-analytics/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '1.0.5' +VERSION = '1.0.6' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From 40af2dbce26189068e7aabd9198c63e26324aafa Mon Sep 17 00:00:00 2001 From: Jian Hui Date: Tue, 18 Aug 2026 14:31:32 +0800 Subject: [PATCH 4/5] upgrade api version to 2021-10-01-preview with aaz --- .../stream_analytics/output/__cmd_group.py | 2 +- .../latest/stream_analytics/output/_create.py | 67 +- .../latest/stream_analytics/output/_delete.py | 3 - .../latest/stream_analytics/output/_list.py | 3 - .../latest/stream_analytics/output/_show.py | 36 - .../latest/stream_analytics/output/_test.py | 39 +- .../latest/stream_analytics/output/_update.py | 1428 +++++++---------- 7 files changed, 578 insertions(+), 1000 deletions(-) diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py index 3c4b518a3cf..ffd5935708a 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/__cmd_group.py @@ -15,7 +15,7 @@ "stream-analytics output", ) class __CMDGroup(AAZCommandGroup): - """Manage Output + """Manage output with stream analytics. """ pass diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py index ecf1ea34737..811572226e8 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_create.py @@ -16,51 +16,6 @@ ) class Create(AAZCommand): """Create an output or replaces an already existing output under an existing streaming job. - - :example: Create an Azure SQL database output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 - - :example: Create an Azure Table output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 - - :example: Create a blob output with CSV serialization - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 - - :example: Create a DocumentDB output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create an Azure Data Warehouse output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput - - :example: Create an Azure Function output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 - - :example: Create an Event Hub output with JSON serialization - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 - - :example: Create a Service Bus Queue output with Avro serialization - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 - - :example: Create a Service Bus Topic output with CSV serialization - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 - - :example: Create a Power BI output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create an Azure Data Lake Store output with JSON serialization - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 - - :example: Create a Gateway Message Bus output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create a PostgreSQL output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,maxWriterCount:1,authenticationMode:Msi},microsoft-db-for-postgre-sql-servers-databases:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,max-writer-count:1,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create a Delta Lake output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,maxWriterCount:1,authenticationMode:Msi},microsoft-db-for-postgre-sql-servers-databases:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,max-writer-count:1,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:deltaoutput,pathPattern:null,dateFormat:null,timeFormat:null},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:deltaoutput,path-pattern:null,date-format:null,time-format:null}}" --serialization "{properties:{deltaTablePath:/folder1/table1,partitionColumns:[column1]},delta:{delta-table-path:/folder1/table1,partition-columns:[column1]}}" --resource-group sjrg --job-name sjName --output-name output1221 - - :example: Create an Azure Data Explorer output - az stream-analytics output create --datasource "{properties:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable},microsoft-sql-server-database:{server:someServer,database:someDatabase,user:,password:somePassword,table:someTable}}" --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --datasource "{properties:{accountName:someAccountName,accountKey:accountKey==,table:samples,partitionKey:partitionKey,rowKey:rowKey,columnsToRemove:[column1,column2],batchSize:25},microsoft-storage-table:{account-name:someAccountName,account-key:accountKey==,table:samples,partition-key:partitionKey,row-key:rowKey,columns-to-remove:[column1,column2],batch-size:25}}" --resource-group sjrg5176 --job-name sj2790 --output-name output958 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:state,pathPattern:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH,blobPathPrefix:my/path,blobWriteMode:Once},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:state,path-pattern:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH,blob-path-prefix:my/path,blob-write-mode:Once}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg5023 --job-name sj900 --output-name output1623 --datasource "{properties:{accountId:someAccountId,accountKey:accountKey==,database:db01,collectionNamePattern:collection,partitionKey:key,documentId:documentId,authenticationMode:Msi},microsoft-storage-document-db:{account-id:someAccountId,account-key:accountKey==,database:db01,collection-name-pattern:collection,partition-key:key,document-id:documentId,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authenticationMode:Msi},microsoft-sql-server-data-warehouse:{table:test2,server:asatestserver,database:zhayaSQLpool,user:tolladmin,password:password123,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name dwOutput --datasource "{properties:{functionAppName:functionappforasaautomation,functionName:HttpTrigger2,apiKey:null,maxBatchSize:256,maxBatchCount:100},microsoft-azure-function:{function-app-name:functionappforasaautomation,function-name:HttpTrigger2,api-key:null,max-batch-size:256,max-batch-count:100}}" --resource-group sjrg --job-name sjName --output-name azureFunction1 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey},microsoft-service-bus-event-hub:{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,eventHubName:sdkeventhub,partitionKey:partitionKey}}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --watermark-settings "{watermark-mode:SendCurrentPartitionWatermark,max-watermark-difference-across-partitions:'16:14:30'}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,queueName:sdkqueue,propertyColumns:[column1,column2],systemPropertyColumns:{MessageId:col3,PartitionKey:col4}},microsoft-service-bus-queue:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,queue-name:sdkqueue,property-columns:[column1,column2],system-property-columns:{MessageId:col3,PartitionKey:col4}}}" --serialization "{avro:{}}" --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --datasource "{properties:{serviceBusNamespace:sdktest,sharedAccessPolicyName:RootManageSharedAccessKey,sharedAccessPolicyKey:sharedAccessPolicyKey=,topicName:sdktopic,propertyColumns:[column1,column2]},microsoft-service-bus-topic:{service-bus-namespace:sdktest,shared-access-policy-name:RootManageSharedAccessKey,shared-access-policy-key:sharedAccessPolicyKey=,topic-name:sdktopic,property-columns:[column1,column2]}}" --serialization "{properties:{fieldDelimiter:',',encoding:UTF8},csv:{field-delimiter:',',encoding:UTF8}}" --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --datasource "{properties:{dataset:someDataset,table:someTable,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',groupId:ac40305e-3e8d-43ac-8161-c33799f43e95,groupName:MyPowerBIGroup},power-bi:{dataset:someDataset,table:someTable,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',group-id:ac40305e-3e8d-43ac-8161-c33799f43e95,group-name:MyPowerBIGroup}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{accountName:someaccount,tenantId:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refreshToken:someRefreshToken==,tokenUserPrincipalName:bobsmith@contoso.com,tokenUserDisplayName:'Bob Smith',filePathPrefix:'{date}/{time}',dateFormat:yyyy/MM/dd,timeFormat:HH},microsoft-data-lake-accounts:{account-name:someaccount,tenant-id:cea4e98b-c798-49e7-8c40-4a2b3beb47dd,refresh-token:someRefreshToken==,token-user-principal-name:bobsmith@contoso.com,token-user-display-name:'Bob Smith',file-path-prefix:'{date}/{time}',date-format:yyyy/MM/dd,time-format:HH}}" --serialization "{properties:{encoding:UTF8,format:Array},json:{encoding:UTF8,format:Array}}" --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --datasource "{properties:{topic:EdgeTopic1},gateway-message-bus:{topic:EdgeTopic1}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,maxWriterCount:1,authenticationMode:Msi},microsoft-db-for-postgre-sql-servers-databases:{server:someServer,database:someDatabase,user:user,password:somePassword,table:someTable,max-writer-count:1,authentication-mode:Msi}}" --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --datasource "{properties:{storageAccounts:[{accountName:someAccountName,accountKey:accountKey==}],container:deltaoutput,pathPattern:null,dateFormat:null,timeFormat:null},microsoft-storage-blob:{storage-accounts:[{account-name:someAccountName,account-key:accountKey==}],container:deltaoutput,path-pattern:null,date-format:null,time-format:null}}" --serialization "{properties:{deltaTablePath:/folder1/table1,partitionColumns:[column1]},delta:{delta-table-path:/folder1/table1,partition-columns:[column1]}}" --resource-group sjrg --job-name sjName --output-name output1221 --datasource "{properties:{cluster:'https://asakustotest.eastus.kusto.windows.net',database:dbname,table:mytable,authenticationMode:Msi},microsoft-kusto-clusters-databases:{cluster:'https://asakustotest.eastus.kusto.windows.net',database:dbname,table:mytable,authentication-mode:Msi}}" --resource-group sjrg --job-name sjName --output-name adxOutput """ _aaz_info = { @@ -107,35 +62,22 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.resource_group = AAZResourceGroupNameArg( required=True, ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema _args_schema.datasource = AAZObjectArg( options=["--datasource"], - arg_group="Properties", help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", ) _args_schema.serialization = AAZObjectArg( options=["--serialization"], - arg_group="Properties", help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", ) _args_schema.size_window = AAZIntArg( options=["--size-window"], - arg_group="Properties", help="The size window to constrain a Stream Analytics output to.", ) _args_schema.time_window = AAZStrArg( options=["--time-window"], - arg_group="Properties", help="The time frame for filtering Stream Analytics job outputs.", ) - _args_schema.watermark_settings = AAZObjectArg( - options=["--watermark-settings"], - arg_group="Properties", - help="Settings which determine whether to send watermarks to downstream.", - ) datasource = cls._args_schema.datasource datasource.gateway_message_bus = AAZObjectArg( @@ -692,6 +634,15 @@ def _build_arguments_schema(cls, *args, **kwargs): enum={"Array": "Array", "LineSeparated": "LineSeparated"}, ) + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.watermark_settings = AAZObjectArg( + options=["--watermark-settings"], + arg_group="Properties", + help="Settings which determine whether to send watermarks to downstream.", + ) + watermark_settings = cls._args_schema.watermark_settings watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( options=["max-watermark-difference-across-partitions"], diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py index febec615cdf..2da6b318dcf 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_delete.py @@ -17,9 +17,6 @@ ) class Delete(AAZCommand): """Delete an output from the streaming job. - - :example: Delete an output - az stream-analytics output delete --resource-group sjrg2157 --job-name sj6458 --output-name output1755 """ _aaz_info = { diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py index 8cb6c8ecae3..8dd38bacffd 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_list.py @@ -16,9 +16,6 @@ ) class List(AAZCommand): """List all of the outputs under the specified streaming job. - - :example: List all outputs in a streaming job - az stream-analytics output list --resource-group sjrg2157 --job-name sj6458 """ _aaz_info = { diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py index 35b105cd125..fc7744a134e 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_show.py @@ -16,42 +16,6 @@ ) class Show(AAZCommand): """Get details about the specified output. - - :example: Get an Azure SQL database output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 - - :example: Get an Azure Table output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 - - :example: Get a blob output with CSV serialization - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 - - :example: Get a DocumentDB output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Get an Azure Data Warehouse output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput - - :example: Get an Azure Function output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 - - :example: Get an Event Hub output with JSON serialization - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 - - :example: Get a Service Bus Queue output with Avro serialization - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 - - :example: Get a Service Bus Topic output with CSV serialization - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 - - :example: Get a Power BI output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Get an Azure Data Lake Store output with JSON serialization - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 - - :example: Get a Delta Lake output - az stream-analytics output show --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg --job-name sjName --output-name output1221 """ _aaz_info = { diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py index 8370491505e..3ad4735397a 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_test.py @@ -16,9 +16,6 @@ ) class Test(AAZCommand): """Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - - :example: Test the connection for an output - az stream-analytics output test --resource-group sjrg2157 --job-name sj6458 --output-name output1755 """ _aaz_info = { @@ -52,7 +49,7 @@ def _build_arguments_schema(cls, *args, **kwargs): id_part="name", ) _args_schema.output_name = AAZStrArg( - options=["--output-name"], + options=["-n", "--name", "--output-name"], help="The name of the output.", required=True, id_part="child_name_1", @@ -60,44 +57,22 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.resource_group = AAZResourceGroupNameArg( required=True, ) - - # define Arg Group "Output" - - _args_schema = cls._args_schema - _args_schema.name = AAZStrArg( - options=["--name"], - arg_group="Output", - help="Resource name", - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema _args_schema.datasource = AAZObjectArg( options=["--datasource"], - arg_group="Properties", help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", ) _args_schema.serialization = AAZObjectArg( options=["--serialization"], - arg_group="Properties", help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", ) _args_schema.size_window = AAZIntArg( options=["--size-window"], - arg_group="Properties", help="The size window to constrain a Stream Analytics output to.", ) _args_schema.time_window = AAZStrArg( options=["--time-window"], - arg_group="Properties", help="The time frame for filtering Stream Analytics job outputs.", ) - _args_schema.watermark_settings = AAZObjectArg( - options=["--watermark-settings"], - arg_group="Properties", - help="Settings which determine whether to send watermarks to downstream.", - ) datasource = cls._args_schema.datasource datasource.gateway_message_bus = AAZObjectArg( @@ -654,6 +629,17 @@ def _build_arguments_schema(cls, *args, **kwargs): enum={"Array": "Array", "LineSeparated": "LineSeparated"}, ) + # define Arg Group "Output" + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.watermark_settings = AAZObjectArg( + options=["--watermark-settings"], + arg_group="Properties", + help="Settings which determine whether to send watermarks to downstream.", + ) + watermark_settings = cls._args_schema.watermark_settings watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( options=["max-watermark-difference-across-partitions"], @@ -841,7 +827,6 @@ def content(self): typ=AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}} ) - _builder.set_prop("name", AAZStrType, ".name") _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) properties = _builder.get(".properties") diff --git a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py index 61ce868d8ff..2295f1f4f46 100644 --- a/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py +++ b/src/stream-analytics/azext_stream_analytics/aaz/latest/stream_analytics/output/_update.py @@ -15,52 +15,7 @@ "stream-analytics output update", ) class Update(AAZCommand): - """Update an output or replaces an already existing output under an existing streaming job. - - :example: Create an Azure SQL database output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 - - :example: Create an Azure Table output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 - - :example: Create a blob output with CSV serialization - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 - - :example: Create a DocumentDB output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create an Azure Data Warehouse output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput - - :example: Create an Azure Function output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 - - :example: Create an Event Hub output with JSON serialization - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 - - :example: Create a Service Bus Queue output with Avro serialization - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 - - :example: Create a Service Bus Topic output with CSV serialization - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 - - :example: Create a Power BI output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create an Azure Data Lake Store output with JSON serialization - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 - - :example: Create a Gateway Message Bus output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create a PostgreSQL output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 - - :example: Create a Delta Lake output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name output1221 - - :example: Create an Azure Data Explorer output - az stream-analytics output update --resource-group sjrg2157 --job-name sj6458 --output-name output1755 --resource-group sjrg5176 --job-name sj2790 --output-name output958 --resource-group sjrg5023 --job-name sj900 --output-name output1623 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name dwOutput --resource-group sjrg --job-name sjName --output-name azureFunction1 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg3410 --job-name sj5095 --output-name output3456 --resource-group sjrg6450 --job-name sj7094 --output-name output7886 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg6912 --job-name sj3310 --output-name output5195 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg7983 --job-name sj2331 --output-name output3022 --resource-group sjrg --job-name sjName --output-name output1221 --resource-group sjrg --job-name sjName --output-name adxOutput + """Update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. """ _aaz_info = { @@ -70,8 +25,6 @@ class Update(AAZCommand): ] } - AZ_SUPPORT_GENERIC_UPDATE = True - def _handler(self, command_args): super()._handler(command_args) self._execute_operations() @@ -92,10 +45,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--if-match"], help="The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", ) - _args_schema.if_none_match = AAZStrArg( - options=["--if-none-match"], - help="Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.", - ) _args_schema.job_name = AAZStrArg( options=["--job-name"], help="The name of the streaming job.", @@ -111,39 +60,21 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.resource_group = AAZResourceGroupNameArg( required=True, ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema _args_schema.datasource = AAZObjectArg( options=["--datasource"], - arg_group="Properties", help="Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) _args_schema.serialization = AAZObjectArg( options=["--serialization"], - arg_group="Properties", help="Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) _args_schema.size_window = AAZIntArg( options=["--size-window"], - arg_group="Properties", help="The size window to constrain a Stream Analytics output to.", - nullable=True, ) _args_schema.time_window = AAZStrArg( options=["--time-window"], - arg_group="Properties", help="The time frame for filtering Stream Analytics job outputs.", - nullable=True, - ) - _args_schema.watermark_settings = AAZObjectArg( - options=["--watermark-settings"], - arg_group="Properties", - help="Settings which determine whether to send watermarks to downstream.", - nullable=True, ) datasource = cls._args_schema.datasource @@ -200,127 +131,106 @@ def _build_arguments_schema(cls, *args, **kwargs): gateway_message_bus.topic = AAZStrArg( options=["topic"], help="The name of the Service Bus topic.", - nullable=True, ) microsoft_azure_function = cls._args_schema.datasource.microsoft_azure_function microsoft_azure_function.api_key = AAZStrArg( options=["api-key"], help="If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", - nullable=True, ) microsoft_azure_function.function_app_name = AAZStrArg( options=["function-app-name"], help="The name of your Azure Functions app.", - nullable=True, ) microsoft_azure_function.function_name = AAZStrArg( options=["function-name"], help="The name of the function in your Azure Functions app.", - nullable=True, ) microsoft_azure_function.max_batch_count = AAZFloatArg( options=["max-batch-count"], help="A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", - nullable=True, ) microsoft_azure_function.max_batch_size = AAZFloatArg( options=["max-batch-size"], help="A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", - nullable=True, ) microsoft_db_for_postgre_sql_servers_databases = cls._args_schema.datasource.microsoft_db_for_postgre_sql_servers_databases microsoft_db_for_postgre_sql_servers_databases.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_db_for_postgre_sql_servers_databases.database = AAZStrArg( options=["database"], help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_db_for_postgre_sql_servers_databases.max_writer_count = AAZFloatArg( options=["max-writer-count"], help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", - nullable=True, ) microsoft_db_for_postgre_sql_servers_databases.password = AAZStrArg( options=["password"], help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_db_for_postgre_sql_servers_databases.server = AAZStrArg( options=["server"], help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_db_for_postgre_sql_servers_databases.table = AAZStrArg( options=["table"], help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_db_for_postgre_sql_servers_databases.user = AAZStrArg( options=["user"], help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_data_lake_accounts = cls._args_schema.datasource.microsoft_data_lake_accounts microsoft_data_lake_accounts.account_name = AAZStrArg( options=["account-name"], help="The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_data_lake_accounts.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_data_lake_accounts.date_format = AAZStrArg( options=["date-format"], help="The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.", - nullable=True, ) microsoft_data_lake_accounts.file_path_prefix = AAZStrArg( options=["file-path-prefix"], help="The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_data_lake_accounts.refresh_token = AAZStrArg( options=["refresh-token"], help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_data_lake_accounts.tenant_id = AAZStrArg( options=["tenant-id"], help="The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_data_lake_accounts.time_format = AAZStrArg( options=["time-format"], help="The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.", - nullable=True, ) microsoft_data_lake_accounts.token_user_display_name = AAZStrArg( options=["token-user-display-name"], help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", - nullable=True, ) microsoft_data_lake_accounts.token_user_principal_name = AAZStrArg( options=["token-user-principal-name"], help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", - nullable=True, ) microsoft_event_hub_event_hub = cls._args_schema.datasource.microsoft_event_hub_event_hub microsoft_event_hub_event_hub.properties = AAZObjectArg( options=["properties"], help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) cls._build_args_event_hub_output_data_source_properties_update(microsoft_event_hub_event_hub.properties) @@ -328,30 +238,26 @@ def _build_arguments_schema(cls, *args, **kwargs): microsoft_kusto_clusters_databases.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_kusto_clusters_databases.cluster = AAZStrArg( options=["cluster"], help="The name of the Azure Data Explorer cluster. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_kusto_clusters_databases.database = AAZStrArg( options=["database"], help="The name of the Azure Data Explorer database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_kusto_clusters_databases.table = AAZStrArg( options=["table"], help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_event_hub = cls._args_schema.datasource.microsoft_service_bus_event_hub microsoft_service_bus_event_hub.properties = AAZObjectArg( options=["properties"], help="The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) cls._build_args_event_hub_output_data_source_properties_update(microsoft_service_bus_event_hub.properties) @@ -359,238 +265,195 @@ def _build_arguments_schema(cls, *args, **kwargs): microsoft_service_bus_queue.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_service_bus_queue.property_columns = AAZListArg( options=["property-columns"], help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", - nullable=True, ) microsoft_service_bus_queue.queue_name = AAZStrArg( options=["queue-name"], help="The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_queue.service_bus_namespace = AAZStrArg( options=["service-bus-namespace"], help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_queue.shared_access_policy_key = AAZStrArg( options=["shared-access-policy-key"], help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_queue.shared_access_policy_name = AAZStrArg( options=["shared-access-policy-name"], help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_queue.system_property_columns = AAZDictArg( options=["system-property-columns"], help="The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", - nullable=True, ) property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.property_columns - property_columns.Element = AAZStrArg( - nullable=True, - ) + property_columns.Element = AAZStrArg() system_property_columns = cls._args_schema.datasource.microsoft_service_bus_queue.system_property_columns - system_property_columns.Element = AAZAnyTypeArg( - nullable=True, - ) + system_property_columns.Element = AAZAnyTypeArg() microsoft_service_bus_topic = cls._args_schema.datasource.microsoft_service_bus_topic microsoft_service_bus_topic.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_service_bus_topic.property_columns = AAZListArg( options=["property-columns"], help="A string array of the names of output columns to be attached to Service Bus messages as custom properties.", - nullable=True, ) microsoft_service_bus_topic.service_bus_namespace = AAZStrArg( options=["service-bus-namespace"], help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_topic.shared_access_policy_key = AAZStrArg( options=["shared-access-policy-key"], help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_topic.shared_access_policy_name = AAZStrArg( options=["shared-access-policy-name"], help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_service_bus_topic.system_property_columns = AAZDictArg( options=["system-property-columns"], help="The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc.", - nullable=True, ) microsoft_service_bus_topic.topic_name = AAZStrArg( options=["topic-name"], help="The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.property_columns - property_columns.Element = AAZStrArg( - nullable=True, - ) + property_columns.Element = AAZStrArg() system_property_columns = cls._args_schema.datasource.microsoft_service_bus_topic.system_property_columns - system_property_columns.Element = AAZStrArg( - nullable=True, - ) + system_property_columns.Element = AAZStrArg() microsoft_sql_server_data_warehouse = cls._args_schema.datasource.microsoft_sql_server_data_warehouse microsoft_sql_server_data_warehouse.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_sql_server_data_warehouse.database = AAZStrArg( options=["database"], help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_data_warehouse.password = AAZStrArg( options=["password"], help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_data_warehouse.server = AAZStrArg( options=["server"], help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_data_warehouse.table = AAZStrArg( options=["table"], help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_data_warehouse.user = AAZStrArg( options=["user"], help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_database = cls._args_schema.datasource.microsoft_sql_server_database microsoft_sql_server_database.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_sql_server_database.database = AAZStrArg( options=["database"], help="The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_database.max_batch_count = AAZFloatArg( options=["max-batch-count"], help="Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", - nullable=True, ) microsoft_sql_server_database.max_writer_count = AAZFloatArg( options=["max-writer-count"], help="Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", - nullable=True, ) microsoft_sql_server_database.password = AAZStrArg( options=["password"], help="The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_database.server = AAZStrArg( options=["server"], help="The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_database.table = AAZStrArg( options=["table"], help="The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_sql_server_database.user = AAZStrArg( options=["user"], help="The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_blob = cls._args_schema.datasource.microsoft_storage_blob microsoft_storage_blob.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_storage_blob.blob_path_prefix = AAZStrArg( options=["blob-path-prefix"], help="Blob path prefix.", - nullable=True, ) microsoft_storage_blob.blob_write_mode = AAZStrArg( options=["blob-write-mode"], help="Blob write mode.", - nullable=True, enum={"Append": "Append", "Once": "Once"}, ) microsoft_storage_blob.container = AAZStrArg( options=["container"], help="The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_blob.date_format = AAZStrArg( options=["date-format"], help="The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", - nullable=True, ) microsoft_storage_blob.path_pattern = AAZStrArg( options=["path-pattern"], help="The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", - nullable=True, ) microsoft_storage_blob.storage_accounts = AAZListArg( options=["storage-accounts"], help="A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_blob.time_format = AAZStrArg( options=["time-format"], help="The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", - nullable=True, ) storage_accounts = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts - storage_accounts.Element = AAZObjectArg( - nullable=True, - ) + storage_accounts.Element = AAZObjectArg() _element = cls._args_schema.datasource.microsoft_storage_blob.storage_accounts.Element _element.account_key = AAZStrArg( options=["account-key"], help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) _element.account_name = AAZStrArg( options=["account-name"], help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) _element.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) @@ -598,130 +461,107 @@ def _build_arguments_schema(cls, *args, **kwargs): microsoft_storage_document_db.account_id = AAZStrArg( options=["account-id"], help="The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_document_db.account_key = AAZStrArg( options=["account-key"], help="The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_document_db.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) microsoft_storage_document_db.collection_name_pattern = AAZStrArg( options=["collection-name-pattern"], help="The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_document_db.database = AAZStrArg( options=["database"], help="The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_document_db.document_id = AAZStrArg( options=["document-id"], help="The name of the field in output events used to specify the primary key which insert or update operations are based on.", - nullable=True, ) microsoft_storage_document_db.partition_key = AAZStrArg( options=["partition-key"], help="The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.", - nullable=True, ) microsoft_storage_table = cls._args_schema.datasource.microsoft_storage_table microsoft_storage_table.account_key = AAZStrArg( options=["account-key"], help="The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_table.account_name = AAZStrArg( options=["account-name"], help="The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_table.batch_size = AAZIntArg( options=["batch-size"], help="The number of rows to write to the Azure Table at a time.", - nullable=True, ) microsoft_storage_table.columns_to_remove = AAZListArg( options=["columns-to-remove"], help="If specified, each item in the array is the name of a column to remove (if present) from output event entities.", - nullable=True, ) microsoft_storage_table.partition_key = AAZStrArg( options=["partition-key"], help="This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_table.row_key = AAZStrArg( options=["row-key"], help="This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) microsoft_storage_table.table = AAZStrArg( options=["table"], help="The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) columns_to_remove = cls._args_schema.datasource.microsoft_storage_table.columns_to_remove - columns_to_remove.Element = AAZStrArg( - nullable=True, - ) + columns_to_remove.Element = AAZStrArg() power_bi = cls._args_schema.datasource.power_bi power_bi.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) power_bi.dataset = AAZStrArg( options=["dataset"], help="The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) power_bi.group_id = AAZStrArg( options=["group-id"], help="The ID of the Power BI group.", - nullable=True, ) power_bi.group_name = AAZStrArg( options=["group-name"], help="The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", - nullable=True, ) power_bi.refresh_token = AAZStrArg( options=["refresh-token"], help="A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) power_bi.table = AAZStrArg( options=["table"], help="The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) power_bi.token_user_display_name = AAZStrArg( options=["token-user-display-name"], help="The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", - nullable=True, ) power_bi.token_user_principal_name = AAZStrArg( options=["token-user-principal-name"], help="The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", - nullable=True, ) raw = cls._args_schema.datasource.raw raw.payload_uri = AAZStrArg( options=["payload-uri"], help="The SAS URL to a blob where the output should be written. If this property is not set, output data will be written into a temporary storage, and a SAS URL to that temporary storage will be included in the result.", - nullable=True, ) serialization = cls._args_schema.serialization @@ -750,25 +590,21 @@ def _build_arguments_schema(cls, *args, **kwargs): csv.encoding = AAZStrArg( options=["encoding"], help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", - nullable=True, enum={"UTF8": "UTF8"}, ) csv.field_delimiter = AAZStrArg( options=["field-delimiter"], help="Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) custom_clr = cls._args_schema.serialization.custom_clr custom_clr.serialization_class_name = AAZStrArg( options=["serialization-class-name"], help="The serialization class name.", - nullable=True, ) custom_clr.serialization_dll_path = AAZStrArg( options=["serialization-dll-path"], help="The serialization library path.", - nullable=True, ) delta = cls._args_schema.serialization.delta @@ -779,38 +615,40 @@ def _build_arguments_schema(cls, *args, **kwargs): delta.partition_columns = AAZListArg( options=["partition-columns"], help="Specifies the names of the columns for which the Delta Lake table will be partitioned. We are only supporting 1 partition column, but keeping it as an array for extensibility.", - nullable=True, ) partition_columns = cls._args_schema.serialization.delta.partition_columns - partition_columns.Element = AAZStrArg( - nullable=True, - ) + partition_columns.Element = AAZStrArg() json = cls._args_schema.serialization.json json.encoding = AAZStrArg( options=["encoding"], help="Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", - nullable=True, enum={"UTF8": "UTF8"}, ) json.format = AAZStrArg( options=["format"], help="This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", - nullable=True, enum={"Array": "Array", "LineSeparated": "LineSeparated"}, ) + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.watermark_settings = AAZObjectArg( + options=["--watermark-settings"], + arg_group="Properties", + help="Settings which determine whether to send watermarks to downstream.", + ) + watermark_settings = cls._args_schema.watermark_settings watermark_settings.max_watermark_difference_across_partitions = AAZStrArg( options=["max-watermark-difference-across-partitions"], help="Describes the maximal delta between the fastest and slowest partitions, so the out of order window that catches all necessary events in downstream jobs is well defined.", - nullable=True, ) watermark_settings.watermark_mode = AAZStrArg( options=["watermark-mode"], help="The output watermark mode.", - nullable=True, enum={"None": "None", "SendCurrentPartitionWatermark": "SendCurrentPartitionWatermark", "SendLowestWatermarkAcrossPartitions": "SendLowestWatermarkAcrossPartitions"}, ) return cls._args_schema @@ -830,57 +668,46 @@ def _build_args_event_hub_output_data_source_properties_update(cls, _schema): _schema.shared_access_policy_name = cls._args_event_hub_output_data_source_properties_update.shared_access_policy_name return - cls._args_event_hub_output_data_source_properties_update = AAZObjectArg( - nullable=True, - ) + cls._args_event_hub_output_data_source_properties_update = AAZObjectArg() event_hub_output_data_source_properties_update = cls._args_event_hub_output_data_source_properties_update event_hub_output_data_source_properties_update.authentication_mode = AAZStrArg( options=["authentication-mode"], help="Authentication Mode.", - nullable=True, + default="ConnectionString", enum={"ConnectionString": "ConnectionString", "Msi": "Msi", "UserToken": "UserToken"}, ) event_hub_output_data_source_properties_update.event_hub_name = AAZStrArg( options=["event-hub-name"], help="The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) event_hub_output_data_source_properties_update.partition_count = AAZIntArg( options=["partition-count"], help="The partition count of the event hub data source. Range 1 - 256.", - nullable=True, ) event_hub_output_data_source_properties_update.partition_key = AAZStrArg( options=["partition-key"], help="The key/column that is used to determine to which partition to send event data.", - nullable=True, ) event_hub_output_data_source_properties_update.property_columns = AAZListArg( options=["property-columns"], help="The properties associated with this Event Hub output.", - nullable=True, ) event_hub_output_data_source_properties_update.service_bus_namespace = AAZStrArg( options=["service-bus-namespace"], help="The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) event_hub_output_data_source_properties_update.shared_access_policy_key = AAZStrArg( options=["shared-access-policy-key"], help="The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) event_hub_output_data_source_properties_update.shared_access_policy_name = AAZStrArg( options=["shared-access-policy-name"], help="The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - nullable=True, ) property_columns = cls._args_event_hub_output_data_source_properties_update.property_columns - property_columns.Element = AAZStrArg( - nullable=True, - ) + property_columns.Element = AAZStrArg() _schema.authentication_mode = cls._args_event_hub_output_data_source_properties_update.authentication_mode _schema.event_hub_name = cls._args_event_hub_output_data_source_properties_update.event_hub_name @@ -893,12 +720,7 @@ def _build_args_event_hub_output_data_source_properties_update(cls, _schema): def _execute_operations(self): self.pre_operations() - self.OutputsGet(ctx=self.ctx)() - self.pre_instance_update(self.ctx.vars.instance) - self.InstanceUpdateByJson(ctx=self.ctx)() - self.InstanceUpdateByGeneric(ctx=self.ctx)() - self.post_instance_update(self.ctx.vars.instance) - self.OutputsCreateOrReplace(ctx=self.ctx)() + self.OutputsUpdate(ctx=self.ctx)() self.post_operations() @register_callback @@ -909,19 +731,11 @@ def pre_operations(self): def post_operations(self): pass - @register_callback - def pre_instance_update(self, instance): - pass - - @register_callback - def post_instance_update(self, instance): - pass - def _output(self, *args, **kwargs): result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) return result - class OutputsGet(AAZHttpOperation): + class OutputsUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -941,94 +755,7 @@ def url(self): @property def method(self): - return "GET" - - @property - def error_format(self): - return "ODataV4Format" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "jobName", self.ctx.args.job_name, - required=True, - ), - **self.serialize_url_param( - "outputName", self.ctx.args.output_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2021-10-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_output_read(cls._schema_on_200) - - return cls._schema_on_200 - - class OutputsCreateOrReplace(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200, 201]: - return self.on_200_201(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" + return "PATCH" @property def error_format(self): @@ -1072,9 +799,6 @@ def header_parameters(self): **self.serialize_header_param( "If-Match", self.ctx.args.if_match, ), - **self.serialize_header_param( - "If-None-Match", self.ctx.args.if_none_match, - ), **self.serialize_header_param( "Content-Type", "application/json", ), @@ -1088,41 +812,8 @@ def header_parameters(self): def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, - value=self.ctx.vars.instance, - ) - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_output_read(cls._schema_on_200_201) - - return cls._schema_on_200_201 - - class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): - - def __call__(self, *args, **kwargs): - self._update_instance(self.ctx.vars.instance) - - def _update_instance(self, instance): - _instance_value, _builder = self.new_content_builder( - self.ctx.args, - value=instance, - typ=AAZObjectType + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("name", AAZStrType, ".output_name") _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) @@ -1459,608 +1150,601 @@ def _update_instance(self, instance): watermark_settings.set_prop("maxWatermarkDifferenceAcrossPartitions", AAZStrType, ".max_watermark_difference_across_partitions") watermark_settings.set_prop("watermarkMode", AAZStrType, ".watermark_mode") - return _instance_value - - class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + return self.serialize_content(_content_value) - def __call__(self, *args, **kwargs): - self._update_instance_by_generic( - self.ctx.vars.instance, - self.ctx.generic_update_args + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 ) + _schema_on_200 = None -class _UpdateHelper: - """Helper class for Update""" + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 - @classmethod - def _build_schema_event_hub_output_data_source_properties_update(cls, _builder): - if _builder is None: - return - _builder.set_prop("authenticationMode", AAZStrType, ".authentication_mode") - _builder.set_prop("eventHubName", AAZStrType, ".event_hub_name") - _builder.set_prop("partitionCount", AAZIntType, ".partition_count") - _builder.set_prop("partitionKey", AAZStrType, ".partition_key") - _builder.set_prop("propertyColumns", AAZListType, ".property_columns") - _builder.set_prop("serviceBusNamespace", AAZStrType, ".service_bus_namespace") - _builder.set_prop("sharedAccessPolicyKey", AAZStrType, ".shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) - _builder.set_prop("sharedAccessPolicyName", AAZStrType, ".shared_access_policy_name") + cls._schema_on_200 = AAZObjectType() - property_columns = _builder.get(".propertyColumns") - if property_columns is not None: - property_columns.set_elements(AAZStrType, ".") + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType() + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) - _schema_event_hub_output_data_source_properties_read = None + properties = cls._schema_on_200.properties + properties.datasource = AAZObjectType() + properties.diagnostics = AAZObjectType( + flags={"read_only": True}, + ) + properties.etag = AAZStrType( + flags={"read_only": True}, + ) + properties.last_output_event_timestamps = AAZListType( + serialized_name="lastOutputEventTimestamps", + flags={"read_only": True}, + ) + properties.serialization = AAZObjectType() + properties.size_window = AAZIntType( + serialized_name="sizeWindow", + ) + properties.time_window = AAZStrType( + serialized_name="timeWindow", + ) + properties.watermark_settings = AAZObjectType( + serialized_name="watermarkSettings", + ) - @classmethod - def _build_schema_event_hub_output_data_source_properties_read(cls, _schema): - if cls._schema_event_hub_output_data_source_properties_read is not None: - _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode - _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name - _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count - _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key - _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns - _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace - _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key - _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name - return + datasource = cls._schema_on_200.properties.datasource + datasource.type = AAZStrType( + flags={"required": True}, + ) - cls._schema_event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read = AAZObjectType() + disc_gateway_message_bus = cls._schema_on_200.properties.datasource.discriminate_by("type", "GatewayMessageBus") + disc_gateway_message_bus.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read - event_hub_output_data_source_properties_read.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - event_hub_output_data_source_properties_read.event_hub_name = AAZStrType( - serialized_name="eventHubName", - ) - event_hub_output_data_source_properties_read.partition_count = AAZIntType( - serialized_name="partitionCount", - ) - event_hub_output_data_source_properties_read.partition_key = AAZStrType( - serialized_name="partitionKey", - ) - event_hub_output_data_source_properties_read.property_columns = AAZListType( - serialized_name="propertyColumns", - ) - event_hub_output_data_source_properties_read.service_bus_namespace = AAZStrType( - serialized_name="serviceBusNamespace", - ) - event_hub_output_data_source_properties_read.shared_access_policy_key = AAZStrType( - serialized_name="sharedAccessPolicyKey", - flags={"secret": True}, - ) - event_hub_output_data_source_properties_read.shared_access_policy_name = AAZStrType( - serialized_name="sharedAccessPolicyName", - ) + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "GatewayMessageBus").properties + properties.topic = AAZStrType() - property_columns = _schema_event_hub_output_data_source_properties_read.property_columns - property_columns.Element = AAZStrType() + disc_microsoft__azure_function = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction") + disc_microsoft__azure_function.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode - _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name - _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count - _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key - _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns - _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace - _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key - _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction").properties + properties.api_key = AAZStrType( + serialized_name="apiKey", + ) + properties.function_app_name = AAZStrType( + serialized_name="functionAppName", + ) + properties.function_name = AAZStrType( + serialized_name="functionName", + ) + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_batch_size = AAZFloatType( + serialized_name="maxBatchSize", + ) - _schema_output_read = None - - @classmethod - def _build_schema_output_read(cls, _schema): - if cls._schema_output_read is not None: - _schema.id = cls._schema_output_read.id - _schema.name = cls._schema_output_read.name - _schema.properties = cls._schema_output_read.properties - _schema.type = cls._schema_output_read.type - return + disc_microsoft_db_for_postgre_sql_servers_databases = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") + disc_microsoft_db_for_postgre_sql_servers_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - cls._schema_output_read = _schema_output_read = AAZObjectType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() - output_read = _schema_output_read - output_read.id = AAZStrType( - flags={"read_only": True}, - ) - output_read.name = AAZStrType() - output_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - output_read.type = AAZStrType( - flags={"read_only": True}, - ) + disc_microsoft__data_lake__accounts = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") + disc_microsoft__data_lake__accounts.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - properties = _schema_output_read.properties - properties.datasource = AAZObjectType() - properties.diagnostics = AAZObjectType( - flags={"read_only": True}, - ) - properties.etag = AAZStrType( - flags={"read_only": True}, - ) - properties.last_output_event_timestamps = AAZListType( - serialized_name="lastOutputEventTimestamps", - flags={"read_only": True}, - ) - properties.serialization = AAZObjectType() - properties.size_window = AAZIntType( - serialized_name="sizeWindow", - ) - properties.time_window = AAZStrType( - serialized_name="timeWindow", - ) - properties.watermark_settings = AAZObjectType( - serialized_name="watermarkSettings", - ) + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts").properties + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.file_path_prefix = AAZStrType( + serialized_name="filePathPrefix", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.tenant_id = AAZStrType( + serialized_name="tenantId", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) - datasource = _schema_output_read.properties.datasource - datasource.type = AAZStrType( - flags={"required": True}, - ) + disc_microsoft__event_hub__event_hub = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") + disc_microsoft__event_hub__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _UpdateHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__event_hub__event_hub.properties) - disc_gateway_message_bus = _schema_output_read.properties.datasource.discriminate_by("type", "GatewayMessageBus") - disc_gateway_message_bus.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + disc_microsoft__kusto_clusters_databases = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") + disc_microsoft__kusto_clusters_databases.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "GatewayMessageBus").properties - properties.topic = AAZStrType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.cluster = AAZStrType() + properties.database = AAZStrType() + properties.table = AAZStrType() - disc_microsoft__azure_function = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction") - disc_microsoft__azure_function.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + disc_microsoft__service_bus__event_hub = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") + disc_microsoft__service_bus__event_hub.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _UpdateHelper._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__service_bus__event_hub.properties) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.AzureFunction").properties - properties.api_key = AAZStrType( - serialized_name="apiKey", - ) - properties.function_app_name = AAZStrType( - serialized_name="functionAppName", - ) - properties.function_name = AAZStrType( - serialized_name="functionName", - ) - properties.max_batch_count = AAZFloatType( - serialized_name="maxBatchCount", - ) - properties.max_batch_size = AAZFloatType( - serialized_name="maxBatchSize", - ) + disc_microsoft__service_bus__queue = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") + disc_microsoft__service_bus__queue.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - disc_microsoft_db_for_postgre_sql_servers_databases = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases") - disc_microsoft_db_for_postgre_sql_servers_databases.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.queue_name = AAZStrType( + serialized_name="queueName", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DBForPostgreSQL/servers/databases").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.database = AAZStrType() - properties.max_writer_count = AAZFloatType( - serialized_name="maxWriterCount", - ) - properties.password = AAZStrType( - flags={"secret": True}, - ) - properties.server = AAZStrType() - properties.table = AAZStrType() - properties.user = AAZStrType() + property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.property_columns + property_columns.Element = AAZStrType() - disc_microsoft__data_lake__accounts = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts") - disc_microsoft__data_lake__accounts.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + system_property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.system_property_columns + system_property_columns.Element = AAZAnyType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.DataLake/Accounts").properties - properties.account_name = AAZStrType( - serialized_name="accountName", - ) - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.date_format = AAZStrType( - serialized_name="dateFormat", - ) - properties.file_path_prefix = AAZStrType( - serialized_name="filePathPrefix", - ) - properties.refresh_token = AAZStrType( - serialized_name="refreshToken", - ) - properties.tenant_id = AAZStrType( - serialized_name="tenantId", - ) - properties.time_format = AAZStrType( - serialized_name="timeFormat", - ) - properties.token_user_display_name = AAZStrType( - serialized_name="tokenUserDisplayName", - ) - properties.token_user_principal_name = AAZStrType( - serialized_name="tokenUserPrincipalName", - ) + disc_microsoft__service_bus__topic = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") + disc_microsoft__service_bus__topic.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - disc_microsoft__event_hub__event_hub = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.EventHub/EventHub") - disc_microsoft__event_hub__event_hub.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - cls._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__event_hub__event_hub.properties) + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + properties.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + properties.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, + ) + properties.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", + ) + properties.system_property_columns = AAZDictType( + serialized_name="systemPropertyColumns", + ) + properties.topic_name = AAZStrType( + serialized_name="topicName", + ) - disc_microsoft__kusto_clusters_databases = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases") - disc_microsoft__kusto_clusters_databases.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.property_columns + property_columns.Element = AAZStrType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Kusto/clusters/databases").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.cluster = AAZStrType() - properties.database = AAZStrType() - properties.table = AAZStrType() + system_property_columns = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.system_property_columns + system_property_columns.Element = AAZStrType() - disc_microsoft__service_bus__event_hub = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/EventHub") - disc_microsoft__service_bus__event_hub.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - cls._build_schema_event_hub_output_data_source_properties_read(disc_microsoft__service_bus__event_hub.properties) + disc_microsoft__sql__server__data_warehouse = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") + disc_microsoft__sql__server__data_warehouse.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - disc_microsoft__service_bus__queue = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue") - disc_microsoft__service_bus__queue.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.password = AAZStrType( + flags={"secret": True}, + ) + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.property_columns = AAZListType( - serialized_name="propertyColumns", - ) - properties.queue_name = AAZStrType( - serialized_name="queueName", - ) - properties.service_bus_namespace = AAZStrType( - serialized_name="serviceBusNamespace", - ) - properties.shared_access_policy_key = AAZStrType( - serialized_name="sharedAccessPolicyKey", - flags={"secret": True}, - ) - properties.shared_access_policy_name = AAZStrType( - serialized_name="sharedAccessPolicyName", - ) - properties.system_property_columns = AAZDictType( - serialized_name="systemPropertyColumns", - ) + disc_microsoft__sql__server__database = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") + disc_microsoft__sql__server__database.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.property_columns - property_columns.Element = AAZStrType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.database = AAZStrType() + properties.max_batch_count = AAZFloatType( + serialized_name="maxBatchCount", + ) + properties.max_writer_count = AAZFloatType( + serialized_name="maxWriterCount", + ) + properties.password = AAZStrType() + properties.server = AAZStrType() + properties.table = AAZStrType() + properties.user = AAZStrType() + + disc_microsoft__storage__blob = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob") + disc_microsoft__storage__blob.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - system_property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Queue").properties.system_property_columns - system_property_columns.Element = AAZAnyType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.blob_path_prefix = AAZStrType( + serialized_name="blobPathPrefix", + ) + properties.blob_write_mode = AAZStrType( + serialized_name="blobWriteMode", + ) + properties.container = AAZStrType() + properties.date_format = AAZStrType( + serialized_name="dateFormat", + ) + properties.path_pattern = AAZStrType( + serialized_name="pathPattern", + ) + properties.storage_accounts = AAZListType( + serialized_name="storageAccounts", + ) + properties.time_format = AAZStrType( + serialized_name="timeFormat", + ) - disc_microsoft__service_bus__topic = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic") - disc_microsoft__service_bus__topic.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + storage_accounts = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts + storage_accounts.Element = AAZObjectType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.property_columns = AAZListType( - serialized_name="propertyColumns", - ) - properties.service_bus_namespace = AAZStrType( - serialized_name="serviceBusNamespace", - ) - properties.shared_access_policy_key = AAZStrType( - serialized_name="sharedAccessPolicyKey", - flags={"secret": True}, - ) - properties.shared_access_policy_name = AAZStrType( - serialized_name="sharedAccessPolicyName", - ) - properties.system_property_columns = AAZDictType( - serialized_name="systemPropertyColumns", - ) - properties.topic_name = AAZStrType( - serialized_name="topicName", - ) + _element = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts.Element + _element.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + _element.account_name = AAZStrType( + serialized_name="accountName", + ) + _element.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) - property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.property_columns - property_columns.Element = AAZStrType() + disc_microsoft__storage__document_db = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") + disc_microsoft__storage__document_db.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - system_property_columns = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.ServiceBus/Topic").properties.system_property_columns - system_property_columns.Element = AAZStrType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB").properties + properties.account_id = AAZStrType( + serialized_name="accountId", + ) + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.collection_name_pattern = AAZStrType( + serialized_name="collectionNamePattern", + ) + properties.database = AAZStrType() + properties.document_id = AAZStrType( + serialized_name="documentId", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) - disc_microsoft__sql__server__data_warehouse = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse") - disc_microsoft__sql__server__data_warehouse.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + disc_microsoft__storage__table = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table") + disc_microsoft__storage__table.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/DataWarehouse").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.database = AAZStrType() - properties.password = AAZStrType( - flags={"secret": True}, - ) - properties.server = AAZStrType() - properties.table = AAZStrType() - properties.user = AAZStrType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties + properties.account_key = AAZStrType( + serialized_name="accountKey", + flags={"secret": True}, + ) + properties.account_name = AAZStrType( + serialized_name="accountName", + ) + properties.batch_size = AAZIntType( + serialized_name="batchSize", + ) + properties.columns_to_remove = AAZListType( + serialized_name="columnsToRemove", + ) + properties.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + properties.row_key = AAZStrType( + serialized_name="rowKey", + ) + properties.table = AAZStrType() - disc_microsoft__sql__server__database = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database") - disc_microsoft__sql__server__database.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + columns_to_remove = cls._schema_on_200.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties.columns_to_remove + columns_to_remove.Element = AAZStrType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Sql/Server/Database").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.database = AAZStrType() - properties.max_batch_count = AAZFloatType( - serialized_name="maxBatchCount", - ) - properties.max_writer_count = AAZFloatType( - serialized_name="maxWriterCount", - ) - properties.password = AAZStrType() - properties.server = AAZStrType() - properties.table = AAZStrType() - properties.user = AAZStrType() + disc_power_bi = cls._schema_on_200.properties.datasource.discriminate_by("type", "PowerBI") + disc_power_bi.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - disc_microsoft__storage__blob = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob") - disc_microsoft__storage__blob.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "PowerBI").properties + properties.authentication_mode = AAZStrType( + serialized_name="authenticationMode", + ) + properties.dataset = AAZStrType() + properties.group_id = AAZStrType( + serialized_name="groupId", + ) + properties.group_name = AAZStrType( + serialized_name="groupName", + ) + properties.refresh_token = AAZStrType( + serialized_name="refreshToken", + ) + properties.table = AAZStrType() + properties.token_user_display_name = AAZStrType( + serialized_name="tokenUserDisplayName", + ) + properties.token_user_principal_name = AAZStrType( + serialized_name="tokenUserPrincipalName", + ) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.blob_path_prefix = AAZStrType( - serialized_name="blobPathPrefix", - ) - properties.blob_write_mode = AAZStrType( - serialized_name="blobWriteMode", - ) - properties.container = AAZStrType() - properties.date_format = AAZStrType( - serialized_name="dateFormat", - ) - properties.path_pattern = AAZStrType( - serialized_name="pathPattern", - ) - properties.storage_accounts = AAZListType( - serialized_name="storageAccounts", - ) - properties.time_format = AAZStrType( - serialized_name="timeFormat", - ) + disc_raw = cls._schema_on_200.properties.datasource.discriminate_by("type", "Raw") + disc_raw.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - storage_accounts = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts - storage_accounts.Element = AAZObjectType() + properties = cls._schema_on_200.properties.datasource.discriminate_by("type", "Raw").properties + properties.payload_uri = AAZStrType( + serialized_name="payloadUri", + ) - _element = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Blob").properties.storage_accounts.Element - _element.account_key = AAZStrType( - serialized_name="accountKey", - flags={"secret": True}, - ) - _element.account_name = AAZStrType( - serialized_name="accountName", - ) - _element.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) + diagnostics = cls._schema_on_200.properties.diagnostics + diagnostics.conditions = AAZListType( + flags={"read_only": True}, + ) - disc_microsoft__storage__document_db = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB") - disc_microsoft__storage__document_db.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + conditions = cls._schema_on_200.properties.diagnostics.conditions + conditions.Element = AAZObjectType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/DocumentDB").properties - properties.account_id = AAZStrType( - serialized_name="accountId", - ) - properties.account_key = AAZStrType( - serialized_name="accountKey", - flags={"secret": True}, - ) - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.collection_name_pattern = AAZStrType( - serialized_name="collectionNamePattern", - ) - properties.database = AAZStrType() - properties.document_id = AAZStrType( - serialized_name="documentId", - ) - properties.partition_key = AAZStrType( - serialized_name="partitionKey", - ) + _element = cls._schema_on_200.properties.diagnostics.conditions.Element + _element.code = AAZStrType( + flags={"read_only": True}, + ) + _element.message = AAZStrType( + flags={"read_only": True}, + ) + _element.since = AAZStrType( + flags={"read_only": True}, + ) - disc_microsoft__storage__table = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table") - disc_microsoft__storage__table.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + last_output_event_timestamps = cls._schema_on_200.properties.last_output_event_timestamps + last_output_event_timestamps.Element = AAZObjectType() - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties - properties.account_key = AAZStrType( - serialized_name="accountKey", - flags={"secret": True}, - ) - properties.account_name = AAZStrType( - serialized_name="accountName", - ) - properties.batch_size = AAZIntType( - serialized_name="batchSize", - ) - properties.columns_to_remove = AAZListType( - serialized_name="columnsToRemove", - ) - properties.partition_key = AAZStrType( - serialized_name="partitionKey", - ) - properties.row_key = AAZStrType( - serialized_name="rowKey", - ) - properties.table = AAZStrType() + _element = cls._schema_on_200.properties.last_output_event_timestamps.Element + _element.last_output_event_time = AAZStrType( + serialized_name="lastOutputEventTime", + ) + _element.last_update_time = AAZStrType( + serialized_name="lastUpdateTime", + ) - columns_to_remove = _schema_output_read.properties.datasource.discriminate_by("type", "Microsoft.Storage/Table").properties.columns_to_remove - columns_to_remove.Element = AAZStrType() + serialization = cls._schema_on_200.properties.serialization + serialization.type = AAZStrType( + flags={"required": True}, + ) - disc_power_bi = _schema_output_read.properties.datasource.discriminate_by("type", "PowerBI") - disc_power_bi.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + disc_avro = cls._schema_on_200.properties.serialization.discriminate_by("type", "Avro") + disc_avro.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "PowerBI").properties - properties.authentication_mode = AAZStrType( - serialized_name="authenticationMode", - ) - properties.dataset = AAZStrType() - properties.group_id = AAZStrType( - serialized_name="groupId", - ) - properties.group_name = AAZStrType( - serialized_name="groupName", - ) - properties.refresh_token = AAZStrType( - serialized_name="refreshToken", - ) - properties.table = AAZStrType() - properties.token_user_display_name = AAZStrType( - serialized_name="tokenUserDisplayName", - ) - properties.token_user_principal_name = AAZStrType( - serialized_name="tokenUserPrincipalName", - ) + disc_csv = cls._schema_on_200.properties.serialization.discriminate_by("type", "Csv") + disc_csv.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - disc_raw = _schema_output_read.properties.datasource.discriminate_by("type", "Raw") - disc_raw.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "Csv").properties + properties.encoding = AAZStrType() + properties.field_delimiter = AAZStrType( + serialized_name="fieldDelimiter", + ) - properties = _schema_output_read.properties.datasource.discriminate_by("type", "Raw").properties - properties.payload_uri = AAZStrType( - serialized_name="payloadUri", - ) + disc_custom_clr = cls._schema_on_200.properties.serialization.discriminate_by("type", "CustomClr") + disc_custom_clr.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - diagnostics = _schema_output_read.properties.diagnostics - diagnostics.conditions = AAZListType( - flags={"read_only": True}, - ) + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "CustomClr").properties + properties.serialization_class_name = AAZStrType( + serialized_name="serializationClassName", + ) + properties.serialization_dll_path = AAZStrType( + serialized_name="serializationDllPath", + ) - conditions = _schema_output_read.properties.diagnostics.conditions - conditions.Element = AAZObjectType() + disc_delta = cls._schema_on_200.properties.serialization.discriminate_by("type", "Delta") + disc_delta.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - _element = _schema_output_read.properties.diagnostics.conditions.Element - _element.code = AAZStrType( - flags={"read_only": True}, - ) - _element.message = AAZStrType( - flags={"read_only": True}, - ) - _element.since = AAZStrType( - flags={"read_only": True}, - ) + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "Delta").properties + properties.delta_table_path = AAZStrType( + serialized_name="deltaTablePath", + flags={"required": True}, + ) + properties.partition_columns = AAZListType( + serialized_name="partitionColumns", + ) - last_output_event_timestamps = _schema_output_read.properties.last_output_event_timestamps - last_output_event_timestamps.Element = AAZObjectType() + partition_columns = cls._schema_on_200.properties.serialization.discriminate_by("type", "Delta").properties.partition_columns + partition_columns.Element = AAZStrType() - _element = _schema_output_read.properties.last_output_event_timestamps.Element - _element.last_output_event_time = AAZStrType( - serialized_name="lastOutputEventTime", - ) - _element.last_update_time = AAZStrType( - serialized_name="lastUpdateTime", - ) + disc_json = cls._schema_on_200.properties.serialization.discriminate_by("type", "Json") + disc_json.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - serialization = _schema_output_read.properties.serialization - serialization.type = AAZStrType( - flags={"required": True}, - ) + properties = cls._schema_on_200.properties.serialization.discriminate_by("type", "Json").properties + properties.encoding = AAZStrType() + properties.format = AAZStrType() - disc_avro = _schema_output_read.properties.serialization.discriminate_by("type", "Avro") - disc_avro.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + disc_parquet = cls._schema_on_200.properties.serialization.discriminate_by("type", "Parquet") + disc_parquet.properties = AAZObjectType( + flags={"client_flatten": True}, + ) - disc_csv = _schema_output_read.properties.serialization.discriminate_by("type", "Csv") - disc_csv.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + watermark_settings = cls._schema_on_200.properties.watermark_settings + watermark_settings.max_watermark_difference_across_partitions = AAZStrType( + serialized_name="maxWatermarkDifferenceAcrossPartitions", + ) + watermark_settings.watermark_mode = AAZStrType( + serialized_name="watermarkMode", + ) - properties = _schema_output_read.properties.serialization.discriminate_by("type", "Csv").properties - properties.encoding = AAZStrType() - properties.field_delimiter = AAZStrType( - serialized_name="fieldDelimiter", - ) + return cls._schema_on_200 - disc_custom_clr = _schema_output_read.properties.serialization.discriminate_by("type", "CustomClr") - disc_custom_clr.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - properties = _schema_output_read.properties.serialization.discriminate_by("type", "CustomClr").properties - properties.serialization_class_name = AAZStrType( - serialized_name="serializationClassName", - ) - properties.serialization_dll_path = AAZStrType( - serialized_name="serializationDllPath", - ) +class _UpdateHelper: + """Helper class for Update""" - disc_delta = _schema_output_read.properties.serialization.discriminate_by("type", "Delta") - disc_delta.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + @classmethod + def _build_schema_event_hub_output_data_source_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("authenticationMode", AAZStrType, ".authentication_mode") + _builder.set_prop("eventHubName", AAZStrType, ".event_hub_name") + _builder.set_prop("partitionCount", AAZIntType, ".partition_count") + _builder.set_prop("partitionKey", AAZStrType, ".partition_key") + _builder.set_prop("propertyColumns", AAZListType, ".property_columns") + _builder.set_prop("serviceBusNamespace", AAZStrType, ".service_bus_namespace") + _builder.set_prop("sharedAccessPolicyKey", AAZStrType, ".shared_access_policy_key", typ_kwargs={"flags": {"secret": True}}) + _builder.set_prop("sharedAccessPolicyName", AAZStrType, ".shared_access_policy_name") - properties = _schema_output_read.properties.serialization.discriminate_by("type", "Delta").properties - properties.delta_table_path = AAZStrType( - serialized_name="deltaTablePath", - flags={"required": True}, - ) - properties.partition_columns = AAZListType( - serialized_name="partitionColumns", - ) + property_columns = _builder.get(".propertyColumns") + if property_columns is not None: + property_columns.set_elements(AAZStrType, ".") - partition_columns = _schema_output_read.properties.serialization.discriminate_by("type", "Delta").properties.partition_columns - partition_columns.Element = AAZStrType() + _schema_event_hub_output_data_source_properties_read = None - disc_json = _schema_output_read.properties.serialization.discriminate_by("type", "Json") - disc_json.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + @classmethod + def _build_schema_event_hub_output_data_source_properties_read(cls, _schema): + if cls._schema_event_hub_output_data_source_properties_read is not None: + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name + return - properties = _schema_output_read.properties.serialization.discriminate_by("type", "Json").properties - properties.encoding = AAZStrType() - properties.format = AAZStrType() + cls._schema_event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read = AAZObjectType() - disc_parquet = _schema_output_read.properties.serialization.discriminate_by("type", "Parquet") - disc_parquet.properties = AAZObjectType( - flags={"client_flatten": True}, + event_hub_output_data_source_properties_read = _schema_event_hub_output_data_source_properties_read + event_hub_output_data_source_properties_read.authentication_mode = AAZStrType( + serialized_name="authenticationMode", ) - - watermark_settings = _schema_output_read.properties.watermark_settings - watermark_settings.max_watermark_difference_across_partitions = AAZStrType( - serialized_name="maxWatermarkDifferenceAcrossPartitions", + event_hub_output_data_source_properties_read.event_hub_name = AAZStrType( + serialized_name="eventHubName", + ) + event_hub_output_data_source_properties_read.partition_count = AAZIntType( + serialized_name="partitionCount", + ) + event_hub_output_data_source_properties_read.partition_key = AAZStrType( + serialized_name="partitionKey", + ) + event_hub_output_data_source_properties_read.property_columns = AAZListType( + serialized_name="propertyColumns", + ) + event_hub_output_data_source_properties_read.service_bus_namespace = AAZStrType( + serialized_name="serviceBusNamespace", + ) + event_hub_output_data_source_properties_read.shared_access_policy_key = AAZStrType( + serialized_name="sharedAccessPolicyKey", + flags={"secret": True}, ) - watermark_settings.watermark_mode = AAZStrType( - serialized_name="watermarkMode", + event_hub_output_data_source_properties_read.shared_access_policy_name = AAZStrType( + serialized_name="sharedAccessPolicyName", ) - _schema.id = cls._schema_output_read.id - _schema.name = cls._schema_output_read.name - _schema.properties = cls._schema_output_read.properties - _schema.type = cls._schema_output_read.type + property_columns = _schema_event_hub_output_data_source_properties_read.property_columns + property_columns.Element = AAZStrType() + + _schema.authentication_mode = cls._schema_event_hub_output_data_source_properties_read.authentication_mode + _schema.event_hub_name = cls._schema_event_hub_output_data_source_properties_read.event_hub_name + _schema.partition_count = cls._schema_event_hub_output_data_source_properties_read.partition_count + _schema.partition_key = cls._schema_event_hub_output_data_source_properties_read.partition_key + _schema.property_columns = cls._schema_event_hub_output_data_source_properties_read.property_columns + _schema.service_bus_namespace = cls._schema_event_hub_output_data_source_properties_read.service_bus_namespace + _schema.shared_access_policy_key = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_key + _schema.shared_access_policy_name = cls._schema_event_hub_output_data_source_properties_read.shared_access_policy_name __all__ = ["Update"] From eb2243000d78290c82e736cca8849324ca5ba575 Mon Sep 17 00:00:00 2001 From: Jian Hui Date: Tue, 18 Aug 2026 15:42:02 +0800 Subject: [PATCH 5/5] fix: preserve stream analytics output JSON interface Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1f212784-92d7-493e-87b8-1f34e70b4dbc --- .../generated/_input_helpers.py | 3 +- .../generated/_output_helpers.py | 30 +++++++++++++++++++ .../generated/custom.py | 24 +++++++-------- .../test_input_create_policy_violation.yaml | 6 ++-- ...est_input_sql_create_policy_violation.yaml | 6 ++-- .../test_output_create_policy_violation.yaml | 6 ++-- .../latest/test_stream_analytics_commands.py | 27 ++++++++--------- 7 files changed, 64 insertions(+), 38 deletions(-) create mode 100644 src/stream-analytics/azext_stream_analytics/generated/_output_helpers.py diff --git a/src/stream-analytics/azext_stream_analytics/generated/_input_helpers.py b/src/stream-analytics/azext_stream_analytics/generated/_input_helpers.py index 0d6044b257f..45d6834faab 100644 --- a/src/stream-analytics/azext_stream_analytics/generated/_input_helpers.py +++ b/src/stream-analytics/azext_stream_analytics/generated/_input_helpers.py @@ -18,7 +18,8 @@ def _camel_to_snake(name): - return re.sub(r'(?