From 0d061fcb07082d39bee4b459e7add7021e958675 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 24 May 2023 05:45:48 +0000 Subject: [PATCH] CodeGen from PR 24139 in Azure/azure-rest-api-specs Merge 29dbd366e1223ecb3c122311ab11e490c1c7907b into 3c2bb08d44536eecec0a8624587776a05692031c --- .../synapse/armsynapse/CHANGELOG.md | 12 + .../synapse/armsynapse/autorest.md | 6 +- ...onlyauthentications_client_example_test.go | 125 -- .../bigdatapools_client_example_test.go | 367 ---- .../synapse/armsynapse/constants.go | 2 +- ...datamaskingpolicies_client_example_test.go | 127 -- .../datamaskingrules_client_example_test.go | 288 --- ...lobauditingpolicies_client_example_test.go | 236 --- .../armsynapse/get_client_example_test.go | 102 -- sdk/resourcemanager/synapse/armsynapse/go.mod | 14 +- sdk/resourcemanager/synapse/armsynapse/go.sum | 22 +- ...tionruntimeauthkeys_client_example_test.go | 68 - ...timeconnectioninfos_client_example_test.go | 46 - ...nruntimecredentials_client_example_test.go | 35 - ...ntimemonitoringdata_client_example_test.go | 51 - ...untimenodeipaddress_client_example_test.go | 41 - ...grationruntimenodes_client_example_test.go | 121 -- ...ntimeobjectmetadata_client_example_test.go | 577 ------ ...integrationruntimes_client_example_test.go | 387 ---- ...rationruntimestatus_client_example_test.go | 87 - .../ipfirewallrules_client_example_test.go | 189 -- .../armsynapse/keys_client_example_test.go | 157 -- .../kustooperations_client_example_test.go | 55 - ...abaseconfigurations_client_example_test.go | 223 --- ...topoolchildresource_client_example_test.go | 75 - ...rincipalassignments_client_example_test.go | 207 --- .../kustopooldatabases_client_example_test.go | 208 --- ...pooldataconnections_client_example_test.go | 278 --- ...rincipalassignments_client_example_test.go | 207 --- ...rivatelinkresources_client_example_test.go | 69 - .../kustopools_client_example_test.go | 647 ------- .../libraries_client_example_test.go | 76 - .../armsynapse/library_client_example_test.go | 53 - .../synapse/armsynapse/models.go | 40 +- .../synapse/armsynapse/models_serde.go | 45 +- .../operations_client_example_test.go | 1579 ----------------- ...endpointconnections_client_example_test.go | 167 -- ...tionsprivatelinkhub_client_example_test.go | 108 -- ...rivatelinkresources_client_example_test.go | 90 - .../privatelinkhubs_client_example_test.go | 250 --- ...rivatelinkresources_client_example_test.go | 90 - ...abledroppedsqlpools_client_example_test.go | 111 -- .../sparkconfiguration_client_example_test.go | 66 - ...sparkconfigurations_client_example_test.go | 102 -- ...lobauditingpolicies_client_example_test.go | 195 -- .../sqlpoolcolumns_client_example_test.go | 46 - ...lconnectionpolicies_client_example_test.go | 53 - ...houseuseractivities_client_example_test.go | 46 - ...olgeobackuppolicies_client_example_test.go | 119 -- ...enancewindowoptions_client_example_test.go | 57 - ...lmaintenancewindows_client_example_test.go | 78 - ...metadatasyncconfigs_client_example_test.go | 79 - .../sqlpooloperationresults_client.go | 2 +- ...ooloperationresults_client_example_test.go | 58 - .../sqlpooloperations_client_example_test.go | 80 - ...edsensitivitylabels_client_example_test.go | 62 - ...oolreplicationlinks_client_example_test.go | 102 -- ...qlpoolrestorepoints_client_example_test.go | 164 -- .../sqlpools_client_example_test.go | 486 ----- .../sqlpoolschemas_client_example_test.go | 81 - ...curityalertpolicies_client_example_test.go | 193 -- ...olsensitivitylabels_client_example_test.go | 303 ---- ...sqlpooltablecolumns_client_example_test.go | 62 - .../sqlpooltables_client_example_test.go | 81 - ...rentdataencryptions_client_example_test.go | 118 -- .../sqlpoolusages_client_example_test.go | 54 - ...ssmentrulebaselines_client_example_test.go | 144 -- ...rabilityassessments_client_example_test.go | 235 --- ...lityassessmentscans_client_example_test.go | 179 -- ...lworkloadclassifier_client_example_test.go | 227 --- ...qlpoolworkloadgroup_client_example_test.go | 229 --- .../workspaceaadadmins_client_example_test.go | 111 -- ...ysqlcontrolsettings_client_example_test.go | 89 - ...lobauditingpolicies_client_example_test.go | 201 --- ...lminimaltlssettings_client_example_test.go | 130 -- ...encryptionprotector_client_example_test.go | 192 -- ...lobauditingpolicies_client_example_test.go | 203 --- ...recoverablesqlpools_client_example_test.go | 106 -- ...securityalertpolicy_client_example_test.go | 204 --- ...agedsqlserverusages_client_example_test.go | 62 - ...rabilityassessments_client_example_test.go | 240 --- .../workspaces_client_example_test.go | 558 ------ ...rkspacesqlaadadmins_client_example_test.go | 111 -- 83 files changed, 96 insertions(+), 13450 deletions(-) delete mode 100644 sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/bigdatapools_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/get_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/keys_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustooperations_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopools_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/libraries_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/library_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpools_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspaces_client_example_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client_example_test.go diff --git a/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md b/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md index bf5ed84bd155..787e3dee6669 100644 --- a/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md +++ b/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 0.8.0 (2023-05-24) +### Breaking Changes + +- Type of `ServerVulnerabilityAssessmentProperties.RecurringScans` has been changed from `*VulnerabilityAssessmentRecurringScansProperties` to `*VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated` + +### Features Added + +- Type of `WorkspaceProperties.ExtraProperties` has been changed from `map[string]any` to `any` +- New struct `VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated` +- New field `OSType`, `TargetFramework` in struct `SelfHostedIntegrationRuntimeStatusTypeProperties` + + ## 0.7.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/synapse/armsynapse/autorest.md b/sdk/resourcemanager/synapse/armsynapse/autorest.md index 209917cb399e..531446a4624c 100644 --- a/sdk/resourcemanager/synapse/armsynapse/autorest.md +++ b/sdk/resourcemanager/synapse/armsynapse/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/synapse/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/synapse/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.7.1 +module-version: 0.8.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client_example_test.go deleted file mode 100644 index cbfa6afd6c08..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client_example_test.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureADOnlyAuthentication.json -func ExampleAzureADOnlyAuthenticationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAzureADOnlyAuthenticationsClient().Get(ctx, "workspace-6852", "workspace-2080", armsynapse.AzureADOnlyAuthenticationNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AzureADOnlyAuthentication = armsynapse.AzureADOnlyAuthentication{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/azureADOnlyAuthentications"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/azureADOnlyAuthentications/default"), - // Properties: &armsynapse.AzureADOnlyAuthenticationProperties{ - // AzureADOnlyAuthentication: to.Ptr(true), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // State: to.Ptr(armsynapse.StateValueConsistent), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateAzureADOnlyAuthentication.json -func ExampleAzureADOnlyAuthenticationsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAzureADOnlyAuthenticationsClient().BeginCreate(ctx, "workspace-6852", "workspace-2080", armsynapse.AzureADOnlyAuthenticationNameDefault, armsynapse.AzureADOnlyAuthentication{ - Properties: &armsynapse.AzureADOnlyAuthenticationProperties{ - AzureADOnlyAuthentication: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AzureADOnlyAuthentication = armsynapse.AzureADOnlyAuthentication{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/azureADOnlyAuthentications"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/azureADOnlyAuthentications/default"), - // Properties: &armsynapse.AzureADOnlyAuthenticationProperties{ - // AzureADOnlyAuthentication: to.Ptr(true), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // State: to.Ptr(armsynapse.StateValueConsistent), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListAzureADOnlyAuthentication.json -func ExampleAzureADOnlyAuthenticationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAzureADOnlyAuthenticationsClient().NewListPager("workspace-6852", "workspace-2080", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AzureADOnlyAuthenticationListResult = armsynapse.AzureADOnlyAuthenticationListResult{ - // Value: []*armsynapse.AzureADOnlyAuthentication{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/azureADOnlyAuthentications"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/azureADOnlyAuthentications/default"), - // Properties: &armsynapse.AzureADOnlyAuthenticationProperties{ - // AzureADOnlyAuthentication: to.Ptr(true), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // State: to.Ptr(armsynapse.StateValueConsistent), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client_example_test.go deleted file mode 100644 index 03a7180e7976..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client_example_test.go +++ /dev/null @@ -1,367 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/GetBigDataPool.json -func ExampleBigDataPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBigDataPoolsClient().Get(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BigDataPoolResourceInfo = armsynapse.BigDataPoolResourceInfo{ - // Name: to.Ptr("ExamplePool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.BigDataPoolResourceProperties{ - // AutoPause: &armsynapse.AutoPauseProperties{ - // DelayInMinutes: to.Ptr[int32](15), - // Enabled: to.Ptr(true), - // }, - // AutoScale: &armsynapse.AutoScaleProperties{ - // Enabled: to.Ptr(true), - // MaxNodeCount: to.Ptr[int32](50), - // MinNodeCount: to.Ptr[int32](3), - // }, - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // DefaultSparkLogFolder: to.Ptr("/logs"), - // IsAutotuneEnabled: to.Ptr(false), - // LibraryRequirements: &armsynapse.LibraryRequirements{ - // Content: to.Ptr(""), - // Filename: to.Ptr("requirements.txt"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // }, - // NodeCount: to.Ptr[int32](4), - // NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - // NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - // ProvisioningState: to.Ptr("Succeeded"), - // SparkEventsFolder: to.Ptr("/events"), - // SparkVersion: to.Ptr("3.3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/UpdateBigDataPool.json -func ExampleBigDataPoolsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBigDataPoolsClient().Update(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", armsynapse.BigDataPoolPatchInfo{ - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BigDataPoolResourceInfo = armsynapse.BigDataPoolResourceInfo{ - // Name: to.Ptr("ExamplePool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.BigDataPoolResourceProperties{ - // AutoPause: &armsynapse.AutoPauseProperties{ - // DelayInMinutes: to.Ptr[int32](15), - // Enabled: to.Ptr(true), - // }, - // AutoScale: &armsynapse.AutoScaleProperties{ - // Enabled: to.Ptr(true), - // MaxNodeCount: to.Ptr[int32](50), - // MinNodeCount: to.Ptr[int32](3), - // }, - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // DefaultSparkLogFolder: to.Ptr("/logs"), - // IsAutotuneEnabled: to.Ptr(false), - // LibraryRequirements: &armsynapse.LibraryRequirements{ - // Content: to.Ptr(""), - // Filename: to.Ptr("requirements.txt"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // }, - // NodeCount: to.Ptr[int32](4), - // NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - // NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - // ProvisioningState: to.Ptr("Succeeded"), - // SparkEventsFolder: to.Ptr("/events"), - // SparkVersion: to.Ptr("3.3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/CreateOrUpdateBigDataPool.json -func ExampleBigDataPoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBigDataPoolsClient().BeginCreateOrUpdate(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", armsynapse.BigDataPoolResourceInfo{ - Location: to.Ptr("West US 2"), - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - Properties: &armsynapse.BigDataPoolResourceProperties{ - AutoPause: &armsynapse.AutoPauseProperties{ - DelayInMinutes: to.Ptr[int32](15), - Enabled: to.Ptr(true), - }, - AutoScale: &armsynapse.AutoScaleProperties{ - Enabled: to.Ptr(true), - MaxNodeCount: to.Ptr[int32](50), - MinNodeCount: to.Ptr[int32](3), - }, - DefaultSparkLogFolder: to.Ptr("/logs"), - IsAutotuneEnabled: to.Ptr(false), - LibraryRequirements: &armsynapse.LibraryRequirements{ - Content: to.Ptr(""), - Filename: to.Ptr("requirements.txt"), - }, - NodeCount: to.Ptr[int32](4), - NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - SparkEventsFolder: to.Ptr("/events"), - SparkVersion: to.Ptr("3.3"), - }, - }, &armsynapse.BigDataPoolsClientBeginCreateOrUpdateOptions{Force: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BigDataPoolResourceInfo = armsynapse.BigDataPoolResourceInfo{ - // Name: to.Ptr("ExamplePool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.BigDataPoolResourceProperties{ - // AutoPause: &armsynapse.AutoPauseProperties{ - // DelayInMinutes: to.Ptr[int32](15), - // Enabled: to.Ptr(true), - // }, - // AutoScale: &armsynapse.AutoScaleProperties{ - // Enabled: to.Ptr(true), - // MaxNodeCount: to.Ptr[int32](50), - // MinNodeCount: to.Ptr[int32](3), - // }, - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // DefaultSparkLogFolder: to.Ptr("/logs"), - // IsAutotuneEnabled: to.Ptr(false), - // LastSucceededTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T10:00:00Z"); return t}()), - // LibraryRequirements: &armsynapse.LibraryRequirements{ - // Content: to.Ptr(""), - // Filename: to.Ptr("requirements.txt"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // }, - // NodeCount: to.Ptr[int32](4), - // NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - // NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - // ProvisioningState: to.Ptr("Succeeded"), - // SparkEventsFolder: to.Ptr("/events"), - // SparkVersion: to.Ptr("3.3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/DeleteBigDataPool.json -func ExampleBigDataPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBigDataPoolsClient().BeginDelete(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BigDataPoolResourceInfo = armsynapse.BigDataPoolResourceInfo{ - // Name: to.Ptr("ExamplePool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.BigDataPoolResourceProperties{ - // AutoPause: &armsynapse.AutoPauseProperties{ - // DelayInMinutes: to.Ptr[int32](15), - // Enabled: to.Ptr(true), - // }, - // AutoScale: &armsynapse.AutoScaleProperties{ - // Enabled: to.Ptr(true), - // MaxNodeCount: to.Ptr[int32](50), - // MinNodeCount: to.Ptr[int32](3), - // }, - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // DefaultSparkLogFolder: to.Ptr("/logs"), - // IsAutotuneEnabled: to.Ptr(false), - // LibraryRequirements: &armsynapse.LibraryRequirements{ - // Content: to.Ptr(""), - // Filename: to.Ptr("requirements.txt"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // }, - // NodeCount: to.Ptr[int32](4), - // NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - // NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - // ProvisioningState: to.Ptr("Succeeded"), - // SparkEventsFolder: to.Ptr("/events"), - // SparkVersion: to.Ptr("3.3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/ListBigDataPoolsInWorkspace.json -func ExampleBigDataPoolsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBigDataPoolsClient().NewListByWorkspacePager("ExampleResourceGroup", "ExampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.BigDataPoolResourceInfoListResult = armsynapse.BigDataPoolResourceInfoListResult{ - // Value: []*armsynapse.BigDataPoolResourceInfo{ - // { - // Name: to.Ptr("ExamplePool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.BigDataPoolResourceProperties{ - // AutoPause: &armsynapse.AutoPauseProperties{ - // DelayInMinutes: to.Ptr[int32](15), - // Enabled: to.Ptr(true), - // }, - // AutoScale: &armsynapse.AutoScaleProperties{ - // Enabled: to.Ptr(true), - // MaxNodeCount: to.Ptr[int32](50), - // MinNodeCount: to.Ptr[int32](3), - // }, - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // DefaultSparkLogFolder: to.Ptr("/logs"), - // IsAutotuneEnabled: to.Ptr(false), - // LibraryRequirements: &armsynapse.LibraryRequirements{ - // Content: to.Ptr(""), - // Filename: to.Ptr("requirements.txt"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // }, - // NodeCount: to.Ptr[int32](4), - // NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - // NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - // ProvisioningState: to.Ptr("Succeeded"), - // SparkEventsFolder: to.Ptr("/events"), - // SparkVersion: to.Ptr("3.3"), - // }, - // }, - // { - // Name: to.Ptr("ExamplePool2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool2"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.BigDataPoolResourceProperties{ - // AutoPause: &armsynapse.AutoPauseProperties{ - // DelayInMinutes: to.Ptr[int32](15), - // Enabled: to.Ptr(true), - // }, - // AutoScale: &armsynapse.AutoScaleProperties{ - // Enabled: to.Ptr(true), - // MaxNodeCount: to.Ptr[int32](50), - // MinNodeCount: to.Ptr[int32](3), - // }, - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // DefaultSparkLogFolder: to.Ptr("/logs"), - // IsAutotuneEnabled: to.Ptr(false), - // LibraryRequirements: &armsynapse.LibraryRequirements{ - // Content: to.Ptr(""), - // Filename: to.Ptr("requirements.txt"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // }, - // NodeCount: to.Ptr[int32](4), - // NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - // NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - // ProvisioningState: to.Ptr("Succeeded"), - // SparkEventsFolder: to.Ptr("/events"), - // SparkVersion: to.Ptr("3.3"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/constants.go b/sdk/resourcemanager/synapse/armsynapse/constants.go index c6eb25e319f9..ad3a4f63ab28 100644 --- a/sdk/resourcemanager/synapse/armsynapse/constants.go +++ b/sdk/resourcemanager/synapse/armsynapse/constants.go @@ -11,7 +11,7 @@ package armsynapse const ( moduleName = "armsynapse" - moduleVersion = "v0.7.1" + moduleVersion = "v0.8.0" ) // ActualState - Actual state diff --git a/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client_example_test.go deleted file mode 100644 index 93a268766503..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client_example_test.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMax.json -func ExampleDataMaskingPoliciesClient_CreateOrUpdate_createOrUpdateDataMaskingPolicyMax() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingPoliciesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", armsynapse.DataMaskingPolicy{ - Properties: &armsynapse.DataMaskingPolicyProperties{ - DataMaskingState: to.Ptr(armsynapse.DataMaskingStateEnabled), - ExemptPrincipals: to.Ptr("testuser;"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingPolicy = armsynapse.DataMaskingPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default"), - // Location: to.Ptr("Central US"), - // ManagedBy: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331"), - // Properties: &armsynapse.DataMaskingPolicyProperties{ - // ApplicationPrincipals: to.Ptr(""), - // DataMaskingState: to.Ptr(armsynapse.DataMaskingStateEnabled), - // ExemptPrincipals: to.Ptr("testuser;"), - // MaskingLevel: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMin.json -func ExampleDataMaskingPoliciesClient_CreateOrUpdate_createOrUpdateDataMaskingPolicyMin() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingPoliciesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", armsynapse.DataMaskingPolicy{ - Properties: &armsynapse.DataMaskingPolicyProperties{ - DataMaskingState: to.Ptr(armsynapse.DataMaskingStateEnabled), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingPolicy = armsynapse.DataMaskingPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default"), - // Location: to.Ptr("Central US"), - // ManagedBy: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331"), - // Properties: &armsynapse.DataMaskingPolicyProperties{ - // ApplicationPrincipals: to.Ptr(""), - // DataMaskingState: to.Ptr(armsynapse.DataMaskingStateEnabled), - // ExemptPrincipals: to.Ptr(""), - // MaskingLevel: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyGet.json -func ExampleDataMaskingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingPoliciesClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingPolicy = armsynapse.DataMaskingPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default"), - // Location: to.Ptr("Central US"), - // ManagedBy: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331"), - // Properties: &armsynapse.DataMaskingPolicyProperties{ - // ApplicationPrincipals: to.Ptr(""), - // DataMaskingState: to.Ptr(armsynapse.DataMaskingStateEnabled), - // ExemptPrincipals: to.Ptr(""), - // MaskingLevel: to.Ptr(""), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client_example_test.go deleted file mode 100644 index f73c8ade3a5e..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client_example_test.go +++ /dev/null @@ -1,288 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json -func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForDefaultMax() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsynapse.DataMaskingRule{ - Properties: &armsynapse.DataMaskingRuleProperties{ - AliasName: to.Ptr("nickname"), - ColumnName: to.Ptr("test1"), - MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionDefault), - RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - SchemaName: to.Ptr("dbo"), - TableName: to.Ptr("Table_1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingRule = armsynapse.DataMaskingRule{ - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // AliasName: to.Ptr("nickname"), - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionDefault), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // TableName: to.Ptr("Table_1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json -func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForDefaultMin() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsynapse.DataMaskingRule{ - Properties: &armsynapse.DataMaskingRuleProperties{ - ColumnName: to.Ptr("test1"), - MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionDefault), - SchemaName: to.Ptr("dbo"), - TableName: to.Ptr("Table_1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingRule = armsynapse.DataMaskingRule{ - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionDefault), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // TableName: to.Ptr("Table_1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateNumber.json -func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForNumbers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsynapse.DataMaskingRule{ - Properties: &armsynapse.DataMaskingRuleProperties{ - ColumnName: to.Ptr("test1"), - MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionNumber), - NumberFrom: to.Ptr("0"), - NumberTo: to.Ptr("2"), - SchemaName: to.Ptr("dbo"), - TableName: to.Ptr("Table_1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingRule = armsynapse.DataMaskingRule{ - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionNumber), - // NumberFrom: to.Ptr("0"), - // NumberTo: to.Ptr("2"), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // TableName: to.Ptr("Table_1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateText.json -func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForText() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsynapse.DataMaskingRule{ - Properties: &armsynapse.DataMaskingRuleProperties{ - ColumnName: to.Ptr("test1"), - MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionText), - PrefixSize: to.Ptr("1"), - ReplacementString: to.Ptr("asdf"), - SchemaName: to.Ptr("dbo"), - SuffixSize: to.Ptr("0"), - TableName: to.Ptr("Table_1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingRule = armsynapse.DataMaskingRule{ - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionText), - // PrefixSize: to.Ptr("1"), - // ReplacementString: to.Ptr("asdf"), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // SuffixSize: to.Ptr("0"), - // TableName: to.Ptr("Table_1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleGet.json -func ExampleDataMaskingRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataMaskingRulesClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataMaskingRule = armsynapse.DataMaskingRule{ - // Name: to.Ptr("rule1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionText), - // PrefixSize: to.Ptr("1"), - // ReplacementString: to.Ptr("asdf"), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // SuffixSize: to.Ptr("0"), - // TableName: to.Ptr("Table_1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleList.json -func ExampleDataMaskingRulesClient_NewListBySQLPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDataMaskingRulesClient().NewListBySQLPoolPager("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DataMaskingRuleListResult = armsynapse.DataMaskingRuleListResult{ - // Value: []*armsynapse.DataMaskingRule{ - // { - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionText), - // PrefixSize: to.Ptr("1"), - // ReplacementString: to.Ptr("asdf"), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // SuffixSize: to.Ptr("0"), - // TableName: to.Ptr("Table_1"), - // }, - // }, - // { - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.DataMaskingRuleProperties{ - // ColumnName: to.Ptr("test1"), - // ID: to.Ptr("dbo_Table_1_test1"), - // MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionNumber), - // NumberFrom: to.Ptr("0"), - // NumberTo: to.Ptr("2"), - // RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - // SchemaName: to.Ptr("dbo"), - // TableName: to.Ptr("Table_1"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client_example_test.go deleted file mode 100644 index beabfc9fd1b9..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client_example_test.go +++ /dev/null @@ -1,236 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingGet.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExtendedSQLPoolBlobAuditingPoliciesClient().Get(ctx, "blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedSQLPoolBlobAuditingPolicy = armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Synapse/workspaces/blobauditingtest-2080/sqlPools/testdb"), - // Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // PredicateExpression: to.Ptr("statement = 'select 1'"), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolAzureMonitorAuditingCreateMin.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate_createOrUpdateAnExtendedSqlPoolsAzureMonitorAuditingPolicyWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExtendedSQLPoolBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - IsAzureMonitorTargetEnabled: to.Ptr(true), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedSQLPoolBlobAuditingPolicy = armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Synapse/workspaces/blobauditingtest-6440/sqlPools/testdb"), - // Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsAzureMonitorTargetEnabled: to.Ptr(true), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingCreateMax.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate_createOrUpdateAnExtendedSqlPoolsBlobAuditingPolicyWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExtendedSQLPoolBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("DATABASE_LOGOUT_GROUP"), - to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), - to.Ptr("UPDATE on database::TestDatabaseName by public")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - PredicateExpression: to.Ptr("statement = 'select 1'"), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedSQLPoolBlobAuditingPolicy = armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Synapse/workspaces/blobauditingtest-6440/sqlPools/testdb"), - // Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("DATABASE_LOGOUT_GROUP"), - // to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), - // to.Ptr("UPDATE on database::TestDatabaseName by public")}, - // IsAzureMonitorTargetEnabled: to.Ptr(true), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // PredicateExpression: to.Ptr("statement = 'select 1'"), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingCreateMin.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate_createOrUpdateAnExtendedSqlPoolsBlobAuditingPolicyWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExtendedSQLPoolBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedSQLPoolBlobAuditingPolicy = armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Synapse/workspaces/blobauditingtest-6440/sqlPools/testdb"), - // Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolExtendedAuditingSettingsList.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_NewListBySQLPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewExtendedSQLPoolBlobAuditingPoliciesClient().NewListBySQLPoolPager("blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ExtendedSQLPoolBlobAuditingPolicyListResult = armsynapse.ExtendedSQLPoolBlobAuditingPolicyListResult{ - // Value: []*armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Synapse/workspaces/blobauditingtest-2080/sqlPools/testdb/extendedAuditingSettings/default"), - // Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // PredicateExpression: to.Ptr("statement = 'select 1'"), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/get_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/get_client_example_test.go deleted file mode 100644 index 8e5bbd7aafb5..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/get_client_example_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Start_OperationStatus.json -func ExampleGetClient_IntegrationRuntimeStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGetClient().IntegrationRuntimeStart(ctx, "drage-felles-prod-rg", "felles-prod-synapse-workspace", "SSIS-intergrationRuntime-Drage", "5752dcdf918e4aecb941245ddf6ebb83", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeOperationStatus = armsynapse.IntegrationRuntimeOperationStatus{ - // Properties: map[string]any{ - // "name": "5752dcdf918e4aecb941245ddf6ebb83", - // "error": nil, - // "properties": nil, - // "status": "InProgress", - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Stop_OperationStatus.json -func ExampleGetClient_IntegrationRuntimeStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGetClient().IntegrationRuntimeStop(ctx, "drage-felles-prod-rg", "felles-prod-synapse-workspace", "SSIS-intergrationRuntime-Drage", "5752dcdf918e4aecb941245ddf6ebb83", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeStopOperationStatus = armsynapse.IntegrationRuntimeStopOperationStatus{ - // Properties: map[string]any{ - // "name": "5752dcdf918e4aecb941245ddf6ebb83", - // "error": nil, - // "properties": nil, - // "status": "InProgress", - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/EnableInteractivequery_IntegrationRuntimes.json -func ExampleGetClient_IntegrationRuntimeEnableInteractivequery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGetClient().IntegrationRuntimeEnableInteractivequery(ctx, "drage-felles-prod-rg", "felles-prod-synapse-workspace", "SSIS-intergrationRuntime-Drage", "5752dcdf918e4aecb941245ddf6ebb83", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeEnableinteractivequery = armsynapse.IntegrationRuntimeEnableinteractivequery{ - // Properties: map[string]any{ - // "name": "5752dcdf918e4aecb941245ddf6ebb83", - // "error": nil, - // "properties": nil, - // "status": "InProgress", - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/go.mod b/sdk/resourcemanager/synapse/armsynapse/go.mod index 0d31c06234c1..eae8c0c211e6 100644 --- a/sdk/resourcemanager/synapse/armsynapse/go.mod +++ b/sdk/resourcemanager/synapse/armsynapse/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/synapse/armsynapse/go.sum b/sdk/resourcemanager/synapse/armsynapse/go.sum index 8ba445a8c4da..b6bd7eaad1ba 100644 --- a/sdk/resourcemanager/synapse/armsynapse/go.sum +++ b/sdk/resourcemanager/synapse/armsynapse/go.sum @@ -1,31 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client_example_test.go deleted file mode 100644 index 68852fd59312..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client_example_test.go +++ /dev/null @@ -1,68 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_RegenerateAuthKey.json -func ExampleIntegrationRuntimeAuthKeysClient_Regenerate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeAuthKeysClient().Regenerate(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", armsynapse.IntegrationRuntimeRegenerateKeyParameters{ - KeyName: to.Ptr(armsynapse.IntegrationRuntimeAuthKeyNameAuthKey2), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeAuthKeys = armsynapse.IntegrationRuntimeAuthKeys{ - // AuthKey2: to.Ptr("**********"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListAuthKeys.json -func ExampleIntegrationRuntimeAuthKeysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeAuthKeysClient().List(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeAuthKeys = armsynapse.IntegrationRuntimeAuthKeys{ - // AuthKey1: to.Ptr("**********"), - // AuthKey2: to.Ptr("**********"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client_example_test.go deleted file mode 100644 index e0fe603c6888..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client_example_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetConnectionInfo.json -func ExampleIntegrationRuntimeConnectionInfosClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeConnectionInfosClient().Get(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeConnectionInfo = armsynapse.IntegrationRuntimeConnectionInfo{ - // HostServiceURI: to.Ptr("https://yanzhang-dt.fareast.corp.microsoft.com:8050/HostServiceRemote.svc/"), - // IdentityCertThumbprint: to.Ptr("**********"), - // IsIdentityCertExprired: to.Ptr(false), - // PublicKey: to.Ptr("**********"), - // ServiceToken: to.Ptr("**********"), - // Version: to.Ptr("3.8.6730.2"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client_example_test.go deleted file mode 100644 index 6afc4933f4da..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client_example_test.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_SyncCredentials.json -func ExampleIntegrationRuntimeCredentialsClient_Sync() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimeCredentialsClient().Sync(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client_example_test.go deleted file mode 100644 index 03b1eb33fa58..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client_example_test.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeMonitoringData_List.json -func ExampleIntegrationRuntimeMonitoringDataClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeMonitoringDataClient().List(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeMonitoringData = armsynapse.IntegrationRuntimeMonitoringData{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Nodes: []*armsynapse.IntegrationRuntimeNodeMonitoringData{ - // { - // AvailableMemoryInMB: to.Ptr[int32](16740), - // ConcurrentJobsLimit: to.Ptr[int32](28), - // ConcurrentJobsRunning: to.Ptr[int32](0), - // CPUUtilization: to.Ptr[int32](15), - // NodeName: to.Ptr("Node_1"), - // ReceivedBytes: to.Ptr[float32](6.731423377990723), - // SentBytes: to.Ptr[float32](2.647491693496704), - // }}, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client_example_test.go deleted file mode 100644 index 4443449f2ac0..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_GetIpAddress.json -func ExampleIntegrationRuntimeNodeIPAddressClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeNodeIPAddressClient().Get(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeNodeIPAddress = armsynapse.IntegrationRuntimeNodeIPAddress{ - // IPAddress: to.Ptr("**********"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client_example_test.go deleted file mode 100644 index f56c8b9c1d05..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client_example_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Get.json -func ExampleIntegrationRuntimeNodesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeNodesClient().Get(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SelfHostedIntegrationRuntimeNode = armsynapse.SelfHostedIntegrationRuntimeNode{ - // Capabilities: map[string]*string{ - // "connectedToResourceManager": to.Ptr("True"), - // "credentialInSync": to.Ptr("True"), - // "httpsPortEnabled": to.Ptr("True"), - // "nodeEnabled": to.Ptr("True"), - // "serviceBusConnected": to.Ptr("True"), - // }, - // HostServiceURI: to.Ptr("https://yanzhang-dt.fareast.corp.microsoft.com:8050/HostServiceRemote.svc/"), - // IsActiveDispatcher: to.Ptr(true), - // LastConnectTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-17T06:30:46.6262976Z"); return t}()), - // LastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-17T03:45:30.8499851Z"); return t}()), - // LastUpdateResult: to.Ptr(armsynapse.IntegrationRuntimeUpdateResultNone), - // MachineName: to.Ptr("YANZHANG-DT"), - // MaxConcurrentJobs: to.Ptr[int32](20), - // NodeName: to.Ptr("Node_1"), - // RegisterTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-17T03:44:55.8012825Z"); return t}()), - // Status: to.Ptr(armsynapse.SelfHostedIntegrationRuntimeNodeStatusOnline), - // Version: to.Ptr("3.8.6743.6"), - // VersionStatus: to.Ptr("UpToDate"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Update.json -func ExampleIntegrationRuntimeNodesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeNodesClient().Update(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", armsynapse.UpdateIntegrationRuntimeNodeRequest{ - ConcurrentJobsLimit: to.Ptr[int32](2), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SelfHostedIntegrationRuntimeNode = armsynapse.SelfHostedIntegrationRuntimeNode{ - // Capabilities: map[string]*string{ - // "connectedToResourceManager": to.Ptr("True"), - // "credentialInSync": to.Ptr("True"), - // "httpsPortEnabled": to.Ptr("True"), - // "nodeEnabled": to.Ptr("True"), - // "serviceBusConnected": to.Ptr("True"), - // }, - // ConcurrentJobsLimit: to.Ptr[int32](2), - // HostServiceURI: to.Ptr("https://yanzhang-dt.fareast.corp.microsoft.com:8050/HostServiceRemote.svc/"), - // IsActiveDispatcher: to.Ptr(true), - // LastConnectTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T15:00:35.7544322Z"); return t}()), - // LastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:52:59.8933313Z"); return t}()), - // LastUpdateResult: to.Ptr(armsynapse.IntegrationRuntimeUpdateResultNone), - // MachineName: to.Ptr("YANZHANG-DT"), - // MaxConcurrentJobs: to.Ptr[int32](56), - // NodeName: to.Ptr("Node_1"), - // RegisterTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:51:44.9237069Z"); return t}()), - // Status: to.Ptr(armsynapse.SelfHostedIntegrationRuntimeNodeStatusOnline), - // Version: to.Ptr("3.8.6730.2"), - // VersionStatus: to.Ptr("UpToDate"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Delete.json -func ExampleIntegrationRuntimeNodesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimeNodesClient().Delete(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client_example_test.go deleted file mode 100644 index 2c71c9c49019..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client_example_test.go +++ /dev/null @@ -1,577 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_List.json -func ExampleIntegrationRuntimeObjectMetadataClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeObjectMetadataClient().List(ctx, "exampleResourceGroup", "exampleWorkspace", "testactivityv2", &armsynapse.IntegrationRuntimeObjectMetadataClientListOptions{GetMetadataRequest: &armsynapse.GetSsisObjectMetadataRequest{ - MetadataPath: to.Ptr("ssisFolders"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SsisObjectMetadataListResponse = armsynapse.SsisObjectMetadataListResponse{ - // Value: []armsynapse.SsisObjectMetadataClassification{ - // &armsynapse.SsisFolder{ - // Name: to.Ptr("TestFolder"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](1), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("EnvironmentFolder"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](2), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("ActivityTest"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](3), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("这是文件夹"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](4), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("1"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](5), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("2"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](6), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("3"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](7), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("4"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](8), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("5"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](9), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("6"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](10), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("7"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](11), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("8"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](12), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("9"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](13), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("10"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](14), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("11"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](15), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("12"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](16), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("13"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](17), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("14"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](18), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("15"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](19), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("16"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](20), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("17"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](21), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("18"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](22), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("19"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](23), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("20"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](24), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("21"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](25), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("22"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](26), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("23"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](27), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("24"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](28), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("25"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](29), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("26"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](30), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("27"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](31), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("28"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](32), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("29"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](33), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("30"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](34), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("31"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](35), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("32"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](36), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("33"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](37), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("34"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](38), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("35"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](39), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("36"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](40), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("37"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](41), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("38"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](42), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("39"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](43), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("40"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](44), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("41"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](45), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("42"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](46), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("43"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](47), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("44"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](48), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("45"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](49), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("46"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](50), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("47"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](51), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("48"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](52), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("49"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](53), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("50"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](54), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("51"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](55), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("52"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](56), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("53"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](57), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("54"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](58), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("55"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](59), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("56"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](60), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("57"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](61), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("58"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](62), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("59"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](63), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("60"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](64), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("61"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](65), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("62"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](66), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("63"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](67), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("64"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](68), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("65"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](69), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("66"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](70), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("67"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](71), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("68"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](72), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("69"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](73), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("70"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](74), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("71"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](75), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("72"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](76), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("73"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](77), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("74"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](78), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("75"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](79), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("76"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](80), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("77"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](81), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("78"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](82), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("79"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](83), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("80"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](84), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("81"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](85), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("82"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](86), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("83"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](87), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("84"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](88), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("85"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](89), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("86"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](90), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("87"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](91), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("88"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](92), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("89"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](93), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("90"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](94), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("91"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](95), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("92"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](96), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("93"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](97), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("94"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](98), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("95"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](99), - // }, - // &armsynapse.SsisFolder{ - // Name: to.Ptr("96"), - // Type: to.Ptr(armsynapse.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](100), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_Refresh.json -func ExampleIntegrationRuntimeObjectMetadataClient_BeginRefresh() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimeObjectMetadataClient().BeginRefresh(ctx, "exampleResourceGroup", "exampleWorkspace", "testactivityv2", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SsisObjectMetadataStatusResponse = armsynapse.SsisObjectMetadataStatusResponse{ - // Name: to.Ptr("ca63c855b72d44959653ffcc6eb0b96c"), - // Status: to.Ptr("Succeeded"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client_example_test.go deleted file mode 100644 index cca588403484..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client_example_test.go +++ /dev/null @@ -1,387 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Update.json -func ExampleIntegrationRuntimesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().Update(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", armsynapse.UpdateIntegrationRuntimeRequest{ - AutoUpdate: to.Ptr(armsynapse.IntegrationRuntimeAutoUpdateOff), - UpdateDelayOffset: to.Ptr("\"PT3H\""), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeResource = armsynapse.IntegrationRuntimeResource{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/integrationruntimes"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/integrationruntimes/exampleIntegrationRuntime"), - // Etag: to.Ptr("0400f1a1-0000-0000-0000-5b2188640000"), - // Properties: &armsynapse.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Get.json -func ExampleIntegrationRuntimesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().Get(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", &armsynapse.IntegrationRuntimesClientGetOptions{IfNoneMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeResource = armsynapse.IntegrationRuntimeResource{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/integrationruntimes"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/integrationruntimes/exampleIntegrationRuntime"), - // Etag: to.Ptr("15003c4f-0000-0200-0000-5cbe090b0000"), - // Properties: &armsynapse.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Create.json -func ExampleIntegrationRuntimesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginCreate(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", armsynapse.IntegrationRuntimeResource{ - Properties: &armsynapse.SelfHostedIntegrationRuntime{ - Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - Description: to.Ptr("A selfhosted integration runtime"), - }, - }, &armsynapse.IntegrationRuntimesClientBeginCreateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeResource = armsynapse.IntegrationRuntimeResource{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/integrationruntimes"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/integrationruntimes/exampleIntegrationRuntime"), - // Etag: to.Ptr("000046c4-0000-0000-0000-5b2198bf0000"), - // Properties: &armsynapse.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Delete.json -func ExampleIntegrationRuntimesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginDelete(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Upgrade.json -func ExampleIntegrationRuntimesClient_Upgrade() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimesClient().Upgrade(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListByWorkspace.json -func ExampleIntegrationRuntimesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewIntegrationRuntimesClient().NewListByWorkspacePager("exampleResourceGroup", "exampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.IntegrationRuntimeListResponse = armsynapse.IntegrationRuntimeListResponse{ - // Value: []*armsynapse.IntegrationRuntimeResource{ - // { - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/integrationruntimes"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/integrationruntimes/exampleIntegrationRuntime"), - // Etag: to.Ptr("0400f1a1-0000-0000-0000-5b2188640000"), - // Properties: &armsynapse.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Start.json -func ExampleIntegrationRuntimesClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginStart(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeStatusResponse = armsynapse.IntegrationRuntimeStatusResponse{ - // Name: to.Ptr("exampleManagedIntegrationRuntime"), - // Properties: &armsynapse.ManagedIntegrationRuntimeStatus{ - // Type: to.Ptr(armsynapse.IntegrationRuntimeTypeManaged), - // DataFactoryName: to.Ptr("exampleWorkspaceName"), - // State: to.Ptr(armsynapse.IntegrationRuntimeStateStarted), - // TypeProperties: &armsynapse.ManagedIntegrationRuntimeStatusTypeProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-13T21:11:01.8695494Z"); return t}()), - // Nodes: []*armsynapse.ManagedIntegrationRuntimeNode{ - // }, - // OtherErrors: []*armsynapse.ManagedIntegrationRuntimeError{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Stop.json -func ExampleIntegrationRuntimesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginStop(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json -func ExampleIntegrationRuntimesClient_ListOutboundNetworkDependenciesEndpoints() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().ListOutboundNetworkDependenciesEndpoints(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse = armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse{ - // Value: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint{ - // { - // Category: to.Ptr("Azure Data Factory (Management)"), - // Endpoints: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("wu.frontend.int.clouddatahub-int.net"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Azure Storage (Management)"), - // Endpoints: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("*.blob.core.windows.net"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("*.table.core.windows.net"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Event Hub (Logging)"), - // Endpoints: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("*.servicebus.windows.net"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Microsoft Logging service (Internal Use)"), - // Endpoints: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("gcs.prod.monitoring.core.windows.net"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("prod.warmpath.msftcloudes.com"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("azurewatsonanalysis-prod.core.windows.net"), - // EndpointDetails: []*armsynapse.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_EnableInteractiveQuery.json -func ExampleIntegrationRuntimesClient_BeginEnableInteractiveQuery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginEnableInteractiveQuery(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_DisableInteractiveQuery.json -func ExampleIntegrationRuntimesClient_BeginDisableInteractiveQuery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginDisableInteractiveQuery(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client_example_test.go deleted file mode 100644 index 2aafabe2cacc..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client_example_test.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetStatus.json -func ExampleIntegrationRuntimeStatusClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeStatusClient().Get(ctx, "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IntegrationRuntimeStatusResponse = armsynapse.IntegrationRuntimeStatusResponse{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Properties: &armsynapse.SelfHostedIntegrationRuntimeStatus{ - // Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - // State: to.Ptr(armsynapse.IntegrationRuntimeStateOnline), - // TypeProperties: &armsynapse.SelfHostedIntegrationRuntimeStatusTypeProperties{ - // AutoUpdate: to.Ptr(armsynapse.IntegrationRuntimeAutoUpdateOff), - // Capabilities: map[string]*string{ - // "connectedToResourceManager": to.Ptr("True"), - // "credentialInSync": to.Ptr("True"), - // "httpsPortEnabled": to.Ptr("True"), - // "nodeEnabled": to.Ptr("True"), - // "serviceBusConnected": to.Ptr("True"), - // }, - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T09:17:45.1839685Z"); return t}()), - // LatestVersion: to.Ptr("3.7.6711.1"), - // LocalTimeZoneOffset: to.Ptr("PT8H"), - // Nodes: []*armsynapse.SelfHostedIntegrationRuntimeNode{ - // { - // Capabilities: map[string]*string{ - // "connectedToResourceManager": to.Ptr("True"), - // "credentialInSync": to.Ptr("True"), - // "httpsPortEnabled": to.Ptr("True"), - // "nodeEnabled": to.Ptr("True"), - // "serviceBusConnected": to.Ptr("True"), - // }, - // HostServiceURI: to.Ptr("https://yanzhang-dt.fareast.corp.microsoft.com:8050/HostServiceRemote.svc/"), - // IsActiveDispatcher: to.Ptr(true), - // LastConnectTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:52:59.8933313Z"); return t}()), - // LastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:52:59.8933313Z"); return t}()), - // LastUpdateResult: to.Ptr(armsynapse.IntegrationRuntimeUpdateResultNone), - // MachineName: to.Ptr("YANZHANG-DT"), - // MaxConcurrentJobs: to.Ptr[int32](56), - // NodeName: to.Ptr("Node_1"), - // RegisterTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:51:44.9237069Z"); return t}()), - // Status: to.Ptr(armsynapse.SelfHostedIntegrationRuntimeNodeStatusOnline), - // Version: to.Ptr("3.8.6730.2"), - // VersionStatus: to.Ptr("UpToDate"), - // }}, - // ServiceUrls: []*string{ - // to.Ptr("wu.frontend.int.clouddatahub-int.net"), - // to.Ptr("*.servicebus.windows.net")}, - // TaskQueueID: to.Ptr("1a6296ab-423c-4346-9bcc-85a78c2c0582"), - // UpdateDelayOffset: to.Ptr("PT3H"), - // Version: to.Ptr("3.8.6730.2"), - // VersionStatus: to.Ptr("UpToDate"), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client_example_test.go deleted file mode 100644 index f8c13e2d311b..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client_example_test.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListIpFirewallRules.json -func ExampleIPFirewallRulesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewIPFirewallRulesClient().NewListByWorkspacePager("ExampleResourceGroup", "ExampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.IPFirewallRuleInfoListResult = armsynapse.IPFirewallRuleInfoListResult{ - // Value: []*armsynapse.IPFirewallRuleInfo{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateIpFirewallRule.json -func ExampleIPFirewallRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIPFirewallRulesClient().BeginCreateOrUpdate(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", armsynapse.IPFirewallRuleInfo{ - Properties: &armsynapse.IPFirewallRuleProperties{ - EndIPAddress: to.Ptr("10.0.0.254"), - StartIPAddress: to.Ptr("10.0.0.0"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IPFirewallRuleInfo = armsynapse.IPFirewallRuleInfo{ - // Name: to.Ptr("ExampleIpFirewallRule"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/firewallRules"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/firewallRules/ExampleIpFirewallRule"), - // Properties: &armsynapse.IPFirewallRuleProperties{ - // EndIPAddress: to.Ptr("10.0.0.254"), - // ProvisioningState: to.Ptr(armsynapse.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("10.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteIpFirewallRule.json -func ExampleIPFirewallRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIPFirewallRulesClient().BeginDelete(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IPFirewallRuleInfo = armsynapse.IPFirewallRuleInfo{ - // Name: to.Ptr("ExampleIpFirewallRule"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/firewallRules"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/firewallRules/ExampleIpFirewallRule"), - // Properties: &armsynapse.IPFirewallRuleProperties{ - // EndIPAddress: to.Ptr("10.0.0.254"), - // ProvisioningState: to.Ptr(armsynapse.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("10.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetIpFirewallRule.json -func ExampleIPFirewallRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIPFirewallRulesClient().Get(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.IPFirewallRuleInfo = armsynapse.IPFirewallRuleInfo{ - // Name: to.Ptr("ExampleIpFirewallRule"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/firewallRules"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/firewallRules/ExampleIpFirewallRule"), - // Properties: &armsynapse.IPFirewallRuleProperties{ - // EndIPAddress: to.Ptr("10.0.0.254"), - // ProvisioningState: to.Ptr(armsynapse.ProvisioningStateSucceeded), - // StartIPAddress: to.Ptr("10.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ReplaceAllIpFirewallRules.json -func ExampleIPFirewallRulesClient_BeginReplaceAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIPFirewallRulesClient().BeginReplaceAll(ctx, "ExampleResourceGroup", "ExampleWorkspace", armsynapse.ReplaceAllIPFirewallRulesRequest{ - IPFirewallRules: map[string]*armsynapse.IPFirewallRuleProperties{ - "AnotherExampleFirewallRule": { - EndIPAddress: to.Ptr("10.0.1.254"), - StartIPAddress: to.Ptr("10.0.1.0"), - }, - "ExampleFirewallRule": { - EndIPAddress: to.Ptr("10.0.0.254"), - StartIPAddress: to.Ptr("10.0.0.0"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ReplaceAllFirewallRulesOperationResponse = armsynapse.ReplaceAllFirewallRulesOperationResponse{ - // OperationID: to.Ptr("00000000-1111-4444-2222-333333333333"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/keys_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/keys_client_example_test.go deleted file mode 100644 index bb2358709b7e..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/keys_client_example_test.go +++ /dev/null @@ -1,157 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListKeysInWorkspace.json -func ExampleKeysClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKeysClient().NewListByWorkspacePager("ExampleResourceGroup", "ExampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.KeyInfoListResult = armsynapse.KeyInfoListResult{ - // Value: []*armsynapse.Key{ - // { - // Name: to.Ptr("key1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/keys"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/keys/key1"), - // Properties: &armsynapse.KeyProperties{ - // IsActiveCMK: to.Ptr(false), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/somesecret1"), - // }, - // }, - // { - // Name: to.Ptr("key2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/keys"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/keys/key2"), - // Properties: &armsynapse.KeyProperties{ - // IsActiveCMK: to.Ptr(true), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/somesecret2"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetKey.json -func ExampleKeysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKeysClient().Get(ctx, "ExampleResourceGroup", "ExampleWorkspace", "somekey", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Key = armsynapse.Key{ - // Name: to.Ptr("somekey"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/keys"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/keys/somekey"), - // Properties: &armsynapse.KeyProperties{ - // IsActiveCMK: to.Ptr(true), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateKey.json -func ExampleKeysClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKeysClient().CreateOrUpdate(ctx, "ExampleResourceGroup", "ExampleWorkspace", "somekey", armsynapse.Key{ - Properties: &armsynapse.KeyProperties{ - IsActiveCMK: to.Ptr(true), - KeyVaultURL: to.Ptr("https://vault.azure.net/keys/somesecret"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Key = armsynapse.Key{ - // Name: to.Ptr("somekey"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/keys"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/keys/somekey"), - // Properties: &armsynapse.KeyProperties{ - // IsActiveCMK: to.Ptr(true), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/somesecret"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteKey.json -func ExampleKeysClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKeysClient().Delete(ctx, "ExampleResourceGroup", "ExampleWorkspace", "somekey", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Key = armsynapse.Key{ - // Name: to.Ptr("somekey"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/keys"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/keys/somekey"), - // Properties: &armsynapse.KeyProperties{ - // IsActiveCMK: to.Ptr(true), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustooperations_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustooperations_client_example_test.go deleted file mode 100644 index 1aa98350523a..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustooperations_client_example_test.go +++ /dev/null @@ -1,55 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoOperationsList.json -func ExampleKustoOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armsynapse.OperationListResult{ - // Value: []*armsynapse.Operation{ - // { - // Name: to.Ptr("operationName"), - // Display: &armsynapse.OperationDisplay{ - // Description: to.Ptr("operation description"), - // Operation: to.Ptr("operationName"), - // Provider: to.Ptr("providerName"), - // Resource: to.Ptr("resourceName"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client_example_test.go deleted file mode 100644 index 8461faedc62f..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client_example_test.go +++ /dev/null @@ -1,223 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsListByKustoPool.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_NewListByKustoPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolAttachedDatabaseConfigurationsClient().NewListByKustoPoolPager("kustorptest", "kustoclusterrptest4", "kustorptest", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AttachedDatabaseConfigurationListResult = armsynapse.AttachedDatabaseConfigurationListResult{ - // Value: []*armsynapse.AttachedDatabaseConfiguration{ - // { - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/AttachedDatabaseConfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4/AttachedDatabaseConfigurations/KustoDatabase8"), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.AttachedDatabaseConfigurationProperties{ - // KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/KustoClusterLeader"), - // DatabaseName: to.Ptr("db1"), - // DefaultPrincipalsModificationKind: to.Ptr(armsynapse.DefaultPrincipalsModificationKindUnion), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // }, - // }, - // { - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase9"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/AttachedDatabaseConfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4/AttachedDatabaseConfigurations/KustoDatabase9"), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.AttachedDatabaseConfigurationProperties{ - // KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/KustoClusterLeader"), - // DatabaseName: to.Ptr("db1"), - // DefaultPrincipalsModificationKind: to.Ptr(armsynapse.DefaultPrincipalsModificationKindUnion), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // TableLevelSharingProperties: &armsynapse.TableLevelSharingProperties{ - // ExternalTablesToExclude: []*string{ - // to.Ptr("ExternalTable2")}, - // ExternalTablesToInclude: []*string{ - // to.Ptr("ExternalTable1")}, - // MaterializedViewsToExclude: []*string{ - // to.Ptr("MaterializedViewTable2")}, - // MaterializedViewsToInclude: []*string{ - // to.Ptr("MaterializedViewTable1")}, - // TablesToExclude: []*string{ - // to.Ptr("Table2")}, - // TablesToInclude: []*string{ - // to.Ptr("Table1")}, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsGet.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolAttachedDatabaseConfigurationsClient().Get(ctx, "kustorptest", "kustoclusterrptest4", "attachedDatabaseConfigurations1", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AttachedDatabaseConfiguration = armsynapse.AttachedDatabaseConfiguration{ - // Name: to.Ptr("KustoClusterRPTest4/attachedDatabaseConfigurations1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/AttachedDatabaseConfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4/AttachedDatabaseConfigurations/attachedDatabaseConfigurations1"), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.AttachedDatabaseConfigurationProperties{ - // KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4"), - // DatabaseName: to.Ptr("*"), - // DefaultPrincipalsModificationKind: to.Ptr(armsynapse.DefaultPrincipalsModificationKindUnion), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // TableLevelSharingProperties: &armsynapse.TableLevelSharingProperties{ - // ExternalTablesToExclude: []*string{ - // to.Ptr("ExternalTable2")}, - // ExternalTablesToInclude: []*string{ - // to.Ptr("ExternalTable1")}, - // MaterializedViewsToExclude: []*string{ - // to.Ptr("MaterializedViewTable2")}, - // MaterializedViewsToInclude: []*string{ - // to.Ptr("MaterializedViewTable1")}, - // TablesToExclude: []*string{ - // to.Ptr("Table2")}, - // TablesToInclude: []*string{ - // to.Ptr("Table1")}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsCreateOrUpdate.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolAttachedDatabaseConfigurationsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoclusterrptest4", "attachedDatabaseConfigurations1", "kustorptest", armsynapse.AttachedDatabaseConfiguration{ - Location: to.Ptr("westus"), - Properties: &armsynapse.AttachedDatabaseConfigurationProperties{ - KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4"), - DatabaseName: to.Ptr("kustodatabase"), - DefaultPrincipalsModificationKind: to.Ptr(armsynapse.DefaultPrincipalsModificationKindUnion), - TableLevelSharingProperties: &armsynapse.TableLevelSharingProperties{ - ExternalTablesToExclude: []*string{ - to.Ptr("ExternalTable2")}, - ExternalTablesToInclude: []*string{ - to.Ptr("ExternalTable1")}, - MaterializedViewsToExclude: []*string{ - to.Ptr("MaterializedViewTable2")}, - MaterializedViewsToInclude: []*string{ - to.Ptr("MaterializedViewTable1")}, - TablesToExclude: []*string{ - to.Ptr("Table2")}, - TablesToInclude: []*string{ - to.Ptr("Table1")}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AttachedDatabaseConfiguration = armsynapse.AttachedDatabaseConfiguration{ - // Name: to.Ptr("KustoClusterRPTest4/attachedDatabaseConfigurations1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/AttachedDatabaseConfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4/attachedDatabaseConfigurations/attachedDatabaseConfigurations1"), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.AttachedDatabaseConfigurationProperties{ - // KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/KustoClusterLeader"), - // DatabaseName: to.Ptr("db1"), - // DefaultPrincipalsModificationKind: to.Ptr(armsynapse.DefaultPrincipalsModificationKindUnion), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // TableLevelSharingProperties: &armsynapse.TableLevelSharingProperties{ - // ExternalTablesToExclude: []*string{ - // to.Ptr("ExternalTable2")}, - // ExternalTablesToInclude: []*string{ - // to.Ptr("ExternalTable1")}, - // MaterializedViewsToExclude: []*string{ - // to.Ptr("MaterializedViewTable2")}, - // MaterializedViewsToInclude: []*string{ - // to.Ptr("MaterializedViewTable1")}, - // TablesToExclude: []*string{ - // to.Ptr("Table2")}, - // TablesToInclude: []*string{ - // to.Ptr("Table1")}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsDelete.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolAttachedDatabaseConfigurationsClient().BeginDelete(ctx, "kustorptest", "kustoclusterrptest4", "attachedDatabaseConfigurations1", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client_example_test.go deleted file mode 100644 index 0ed3e8be4fe5..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client_example_test.go +++ /dev/null @@ -1,75 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationCheckNameAvailability.json -func ExampleKustoPoolChildResourceClient_CheckNameAvailability_kustoPoolAttachedDatabaseConfigurationCheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolChildResourceClient().CheckNameAvailability(ctx, "kustorptest", "kustoclusterrptest4", "kustorptest", armsynapse.DatabaseCheckNameRequest{ - Name: to.Ptr("adc1"), - Type: to.Ptr(armsynapse.TypeMicrosoftSynapseWorkspacesKustoPoolsAttachedDatabaseConfigurations), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameResult = armsynapse.CheckNameResult{ - // Name: to.Ptr("adc1"), - // Message: to.Ptr("Name 'adc1' is already taken. Please specify a different name"), - // NameAvailable: to.Ptr(false), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesCheckNameAvailability.json -func ExampleKustoPoolChildResourceClient_CheckNameAvailability_kustoPoolDatabasesCheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolChildResourceClient().CheckNameAvailability(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "kustorptest", armsynapse.DatabaseCheckNameRequest{ - Name: to.Ptr("database1"), - Type: to.Ptr(armsynapse.TypeMicrosoftSynapseWorkspacesKustoPoolsDatabases), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameResult = armsynapse.CheckNameResult{ - // Name: to.Ptr("database1"), - // Message: to.Ptr("Name 'database1' is already taken. Please specify a different name"), - // NameAvailable: to.Ptr(false), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client_example_test.go deleted file mode 100644 index 6d91029c2523..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client_example_test.go +++ /dev/null @@ -1,207 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsCheckNameAvailability.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolDatabasePrincipalAssignmentsClient().CheckNameAvailability(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "Kustodatabase8", "kustorptest", armsynapse.DatabasePrincipalAssignmentCheckNameRequest{ - Name: to.Ptr("kustoprincipal1"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameResult = armsynapse.CheckNameResult{ - // Name: to.Ptr("kustoprincipal1"), - // Message: to.Ptr("Name 'kustoprincipal1' is already taken. Please specify a different name"), - // NameAvailable: to.Ptr(false), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsList.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolDatabasePrincipalAssignmentsClient().NewListPager("synapseWorkspaceName", "kustoclusterrptest4", "Kustodatabase8", "kustorptest", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabasePrincipalAssignmentListResult = armsynapse.DatabasePrincipalAssignmentListResult{ - // Value: []*armsynapse.DatabasePrincipalAssignment{ - // { - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"), - // Properties: &armsynapse.DatabasePrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.DatabasePrincipalRoleAdmin), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // }, - // { - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal2"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal2"), - // Properties: &armsynapse.DatabasePrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.DatabasePrincipalRoleAdmin), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsGet.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolDatabasePrincipalAssignmentsClient().Get(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "Kustodatabase8", "kustoprincipal1", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabasePrincipalAssignment = armsynapse.DatabasePrincipalAssignment{ - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"), - // Properties: &armsynapse.DatabasePrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.DatabasePrincipalRoleAdmin), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsCreateOrUpdate.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDatabasePrincipalAssignmentsClient().BeginCreateOrUpdate(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "Kustodatabase8", "kustoprincipal1", "kustorptest", armsynapse.DatabasePrincipalAssignment{ - Properties: &armsynapse.DatabasePrincipalProperties{ - PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - Role: to.Ptr(armsynapse.DatabasePrincipalRoleAdmin), - TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabasePrincipalAssignment = armsynapse.DatabasePrincipalAssignment{ - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"), - // Properties: &armsynapse.DatabasePrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.DatabasePrincipalRoleAdmin), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsDelete.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDatabasePrincipalAssignmentsClient().BeginDelete(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "Kustodatabase8", "kustoprincipal1", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client_example_test.go deleted file mode 100644 index e5ad4ef83450..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client_example_test.go +++ /dev/null @@ -1,208 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoDatabasesListByKustoPool.json -func ExampleKustoPoolDatabasesClient_NewListByKustoPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolDatabasesClient().NewListByKustoPoolPager("kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabaseListResult = armsynapse.DatabaseListResult{ - // Value: []armsynapse.DatabaseClassification{ - // &armsynapse.ReadWriteDatabase{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools/Databases"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8"), - // Kind: to.Ptr(armsynapse.KindReadWrite), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.ReadWriteDatabaseProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // SoftDeletePeriod: to.Ptr("P1D"), - // }, - // }, - // &armsynapse.ReadWriteDatabase{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase9"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools/Databases"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustopools/KustoClusterRPTest4/Databases/KustoDatabase9"), - // Kind: to.Ptr(armsynapse.KindReadWrite), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.ReadWriteDatabaseProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // SoftDeletePeriod: to.Ptr("P1D"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesGet.json -func ExampleKustoPoolDatabasesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolDatabasesClient().Get(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armsynapse.KustoPoolDatabasesClientGetResponse{ - // DatabaseClassification: &armsynapse.ReadWriteDatabase{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools/Databases"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8"), - // Kind: to.Ptr(armsynapse.KindReadWrite), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.ReadWriteDatabaseProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // SoftDeletePeriod: to.Ptr("P1D"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesCreateOrUpdate.json -func ExampleKustoPoolDatabasesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDatabasesClient().BeginCreateOrUpdate(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", &armsynapse.ReadWriteDatabase{ - Kind: to.Ptr(armsynapse.KindReadWrite), - Location: to.Ptr("westus"), - Properties: &armsynapse.ReadWriteDatabaseProperties{ - SoftDeletePeriod: to.Ptr("P1D"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armsynapse.KustoPoolDatabasesClientCreateOrUpdateResponse{ - // DatabaseClassification: &armsynapse.ReadWriteDatabase{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools/Databases"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8"), - // Kind: to.Ptr(armsynapse.KindReadWrite), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.ReadWriteDatabaseProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // SoftDeletePeriod: to.Ptr("P1D"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesUpdate.json -func ExampleKustoPoolDatabasesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDatabasesClient().BeginUpdate(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", &armsynapse.ReadWriteDatabase{ - Kind: to.Ptr(armsynapse.KindReadWrite), - Properties: &armsynapse.ReadWriteDatabaseProperties{ - SoftDeletePeriod: to.Ptr("P1D"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armsynapse.KustoPoolDatabasesClientUpdateResponse{ - // DatabaseClassification: &armsynapse.ReadWriteDatabase{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools/Databases"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8"), - // Kind: to.Ptr(armsynapse.KindReadWrite), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.ReadWriteDatabaseProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // SoftDeletePeriod: to.Ptr("P1D"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesDelete.json -func ExampleKustoPoolDatabasesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDatabasesClient().BeginDelete(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client_example_test.go deleted file mode 100644 index acea825cf337..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client_example_test.go +++ /dev/null @@ -1,278 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsCheckNameAvailability.json -func ExampleKustoPoolDataConnectionsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolDataConnectionsClient().CheckNameAvailability(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "Kustodatabase8", armsynapse.DataConnectionCheckNameRequest{ - Name: to.Ptr("DataConnections8"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameResult = armsynapse.CheckNameResult{ - // Name: to.Ptr("DataConnections8"), - // Message: to.Ptr("Name 'DataConnections8' is already taken. Please specify a different name."), - // NameAvailable: to.Ptr(false), - // Reason: to.Ptr(armsynapse.ReasonAlreadyExists), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionValidation.json -func ExampleKustoPoolDataConnectionsClient_BeginDataConnectionValidation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDataConnectionsClient().BeginDataConnectionValidation(ctx, "kustorptest", "kustorptest", "kustoclusterrptest4", "KustoDatabase8", armsynapse.DataConnectionValidation{ - DataConnectionName: to.Ptr("DataConnections8"), - Properties: &armsynapse.EventHubDataConnection{ - Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataConnectionValidationListResult = armsynapse.DataConnectionValidationListResult{ - // Value: []*armsynapse.DataConnectionValidationResult{ - // { - // ErrorMessage: to.Ptr("Event hub's namespace does not exist"), - // }, - // { - // ErrorMessage: to.Ptr("Database does not exist"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsListByDatabase.json -func ExampleKustoPoolDataConnectionsClient_NewListByDatabasePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolDataConnectionsClient().NewListByDatabasePager("kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DataConnectionListResult = armsynapse.DataConnectionListResult{ - // Value: []armsynapse.DataConnectionClassification{ - // &armsynapse.EventHubDataConnection{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8/KustoDataConnection8"), - // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8/DataConnections/KustoDataConnection8"), - // Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.EventHubConnectionProperties{ - // ConsumerGroup: to.Ptr("testConsumerGroup1"), - // EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - // }, - // }, - // &armsynapse.EventHubDataConnection{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase9/KustoDataConnection9"), - // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase9/DataConnections/KustoDataConnection9"), - // Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.EventHubConnectionProperties{ - // ConsumerGroup: to.Ptr("testConsumerGroup2"), - // EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns2/eventhubs/eventhubTest2"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsGet.json -func ExampleKustoPoolDataConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolDataConnectionsClient().Get(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", "DataConnections8", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armsynapse.KustoPoolDataConnectionsClientGetResponse{ - // DataConnectionClassification: &armsynapse.EventHubDataConnection{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8/DataConnections8"), - // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8/DataConnections/DataConnections8"), - // Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.EventHubConnectionProperties{ - // ConsumerGroup: to.Ptr("testConsumerGroup1"), - // EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsCreateOrUpdate.json -func ExampleKustoPoolDataConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDataConnectionsClient().BeginCreateOrUpdate(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", "DataConnections8", &armsynapse.EventHubDataConnection{ - Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - Location: to.Ptr("westus"), - Properties: &armsynapse.EventHubConnectionProperties{ - ConsumerGroup: to.Ptr("testConsumerGroup1"), - EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armsynapse.KustoPoolDataConnectionsClientCreateOrUpdateResponse{ - // DataConnectionClassification: &armsynapse.EventHubDataConnection{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8/DataConnections8"), - // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8/DataConnections/DataConnections8"), - // Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.EventHubConnectionProperties{ - // ConsumerGroup: to.Ptr("testConsumerGroup1"), - // EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsUpdate.json -func ExampleKustoPoolDataConnectionsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDataConnectionsClient().BeginUpdate(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", "DataConnections8", &armsynapse.EventHubDataConnection{ - Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - Location: to.Ptr("westus"), - Properties: &armsynapse.EventHubConnectionProperties{ - ConsumerGroup: to.Ptr("testConsumerGroup1"), - EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = armsynapse.KustoPoolDataConnectionsClientUpdateResponse{ - // DataConnectionClassification: &armsynapse.EventHubDataConnection{ - // Name: to.Ptr("KustoClusterRPTest4/KustoDatabase8/DataConnections8"), - // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4/Databases/KustoDatabase8/DataConnections/DataConnections8"), - // Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - // Location: to.Ptr("westus"), - // Properties: &armsynapse.EventHubConnectionProperties{ - // ConsumerGroup: to.Ptr("testConsumerGroup1"), - // EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsDelete.json -func ExampleKustoPoolDataConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolDataConnectionsClient().BeginDelete(ctx, "kustorptest", "synapseWorkspaceName", "kustoclusterrptest4", "KustoDatabase8", "kustoeventhubconnection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client_example_test.go deleted file mode 100644 index 9b232772cfca..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client_example_test.go +++ /dev/null @@ -1,207 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsCheckNameAvailability.json -func ExampleKustoPoolPrincipalAssignmentsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolPrincipalAssignmentsClient().CheckNameAvailability(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "kustorptest", armsynapse.ClusterPrincipalAssignmentCheckNameRequest{ - Name: to.Ptr("kustoprincipal1"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools/principalAssignments"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameResult = armsynapse.CheckNameResult{ - // Name: to.Ptr("kustoprincipal1"), - // Message: to.Ptr("Name 'kustoprincipal1' is already taken. Please specify a different name"), - // NameAvailable: to.Ptr(false), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsList.json -func ExampleKustoPoolPrincipalAssignmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolPrincipalAssignmentsClient().NewListPager("synapseWorkspaceName", "kustoclusterrptest4", "kustorptest", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ClusterPrincipalAssignmentListResult = armsynapse.ClusterPrincipalAssignmentListResult{ - // Value: []*armsynapse.ClusterPrincipalAssignment{ - // { - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1"), - // Properties: &armsynapse.ClusterPrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.ClusterPrincipalRole("Admin")), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // }, - // { - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/kustoprincipal2"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal2"), - // Properties: &armsynapse.ClusterPrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.ClusterPrincipalRole("Admin")), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsGet.json -func ExampleKustoPoolPrincipalAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolPrincipalAssignmentsClient().Get(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "kustoprincipal1", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ClusterPrincipalAssignment = armsynapse.ClusterPrincipalAssignment{ - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1"), - // Properties: &armsynapse.ClusterPrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.ClusterPrincipalRole("Admin")), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsCreateOrUpdate.json -func ExampleKustoPoolPrincipalAssignmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolPrincipalAssignmentsClient().BeginCreateOrUpdate(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "kustoprincipal1", "kustorptest", armsynapse.ClusterPrincipalAssignment{ - Properties: &armsynapse.ClusterPrincipalProperties{ - PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - Role: to.Ptr(armsynapse.ClusterPrincipalRoleAllDatabasesAdmin), - TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ClusterPrincipalAssignment = armsynapse.ClusterPrincipalAssignment{ - // Name: to.Ptr("synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1"), - // Properties: &armsynapse.ClusterPrincipalProperties{ - // AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"), - // PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - // PrincipalName: to.Ptr("TestApp"), - // PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // Role: to.Ptr(armsynapse.ClusterPrincipalRole("Admin")), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - // TenantName: to.Ptr("tenantName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsDelete.json -func ExampleKustoPoolPrincipalAssignmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolPrincipalAssignmentsClient().BeginDelete(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "kustoprincipal1", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client_example_test.go deleted file mode 100644 index d7ccbdabc647..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client_example_test.go +++ /dev/null @@ -1,69 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrivateLinkResourcesList.json -func ExampleKustoPoolPrivateLinkResourcesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolPrivateLinkResourcesClient().NewListPager("DP-900", "synapse-ws-ebi-data", "dataexplorerpool900", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateLinkResources = armsynapse.PrivateLinkResources{ - // Value: []*armsynapse.KustoPoolPrivateLinkResources{ - // { - // Name: to.Ptr("synapseWorkspaceName/dataexplorerpool900/privateLinkResources"), - // Type: to.Ptr("Microsoft.Synapse/Workspaces/KustoPools/privateLinkResources"), - // ID: to.Ptr("/subscriptions/7a587823-959d-4ad0-85bd-cf2a7cef436a/resourceGroups/DP-900/providers/Microsoft.Synapse/workspaces/synapse-ws-ebi-data/kustoPools/dataexplorerpool900/privateLinkResources"), - // Properties: &armsynapse.PrivateLinkResourcesProperties{ - // GroupID: to.Ptr("aaaaa"), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // RequiredMembers: []*string{ - // to.Ptr("Engine"), - // to.Ptr("DataManagement"), - // to.Ptr("blob-ne3kstrldkustoCluster00"), - // to.Ptr("queue-ne3kstrldkustoCluster00"), - // to.Ptr("table-ne3kstrldkustoCluster00"), - // to.Ptr("blob-qmukstrldkustoCluster01"), - // to.Ptr("queue-qmukstrldkustoCluster01"), - // to.Ptr("table-qmukstrldkustoCluster01")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.westus2.kusto.windows.net"), - // to.Ptr("privatelink.blob.core.windows.net"), - // to.Ptr("privatelink.queue.core.windows.net"), - // to.Ptr("privatelink.table.core.windows.net")}, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopools_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/kustopools_client_example_test.go deleted file mode 100644 index 4f5ba9b6831c..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/kustopools_client_example_test.go +++ /dev/null @@ -1,647 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsListSkus.json -func ExampleKustoPoolsClient_NewListSKUsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolsClient().NewListSKUsPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SKUDescriptionList = armsynapse.SKUDescriptionList{ - // Value: []*armsynapse.SKUDescription{ - // { - // Name: to.Ptr("Compute optimized"), - // LocationInfo: []*armsynapse.SKULocationInfoItem{ - // { - // Location: to.Ptr("West US"), - // Zones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // }, - // { - // Location: to.Ptr("West Europe"), - // Zones: []*string{ - // }, - // }}, - // Locations: []*string{ - // to.Ptr("West US"), - // to.Ptr("West Europe")}, - // Size: to.Ptr("Medium"), - // }, - // { - // Name: to.Ptr("Compute optimized"), - // LocationInfo: []*armsynapse.SKULocationInfoItem{ - // { - // Location: to.Ptr("West US"), - // Zones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // }, - // { - // Location: to.Ptr("West Europe"), - // Zones: []*string{ - // }, - // }}, - // Locations: []*string{ - // to.Ptr("West US"), - // to.Ptr("West Europe")}, - // Size: to.Ptr("Large"), - // }, - // { - // Name: to.Ptr("Storage optimized"), - // LocationInfo: []*armsynapse.SKULocationInfoItem{ - // { - // Location: to.Ptr("West US"), - // Zones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // }, - // { - // Location: to.Ptr("West Europe"), - // Zones: []*string{ - // }, - // }}, - // Locations: []*string{ - // to.Ptr("West US"), - // to.Ptr("West Europe")}, - // Size: to.Ptr("Medium"), - // }, - // { - // Name: to.Ptr("Storage optimized"), - // LocationInfo: []*armsynapse.SKULocationInfoItem{ - // { - // Location: to.Ptr("West US"), - // Zones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // }, - // { - // Location: to.Ptr("West Europe"), - // Zones: []*string{ - // }, - // }}, - // Locations: []*string{ - // to.Ptr("West US"), - // to.Ptr("West Europe")}, - // Size: to.Ptr("Large"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsCheckNameAvailability.json -func ExampleKustoPoolsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolsClient().CheckNameAvailability(ctx, "westus", armsynapse.KustoPoolCheckNameRequest{ - Name: to.Ptr("kustoclusterrptest4"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameResult = armsynapse.CheckNameResult{ - // Name: to.Ptr("kustoclusterrptest4"), - // Message: to.Ptr("Name 'kustoclusterrptest4' is already taken. Please specify a different name"), - // NameAvailable: to.Ptr(false), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsListByWorkspace.json -func ExampleKustoPoolsClient_ListByWorkspace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolsClient().ListByWorkspace(ctx, "kustorptest", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KustoPoolListResult = armsynapse.KustoPoolListResult{ - // Value: []*armsynapse.KustoPool{ - // { - // Name: to.Ptr("KustoClusterRPTest4"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustopools/KustoClusterRPTest4"), - // Location: to.Ptr("westus"), - // Etag: to.Ptr("abcd123"), - // Properties: &armsynapse.KustoPoolProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // }, - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - // Capacity: to.Ptr[int32](2), - // Size: to.Ptr(armsynapse.SKUSizeMedium), - // }, - // }, - // { - // Name: to.Ptr("KustoClusterRPTest3"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustopools/KustoClusterRPTest3"), - // Location: to.Ptr("westus"), - // Etag: to.Ptr("abcd123"), - // Properties: &armsynapse.KustoPoolProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // }, - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameComputeOptimized), - // Capacity: to.Ptr[int32](2), - // Size: to.Ptr(armsynapse.SKUSizeSmall), - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsGet.json -func ExampleKustoPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKustoPoolsClient().Get(ctx, "synapseWorkspaceName", "kustoclusterrptest4", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KustoPool = armsynapse.KustoPool{ - // Name: to.Ptr("KustoClusterRPTest5"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest5"), - // Location: to.Ptr("westus"), - // Etag: to.Ptr("abcd123"), - // Properties: &armsynapse.KustoPoolProperties{ - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // }, - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - // Capacity: to.Ptr[int32](2), - // Size: to.Ptr(armsynapse.SKUSizeMedium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsCreateOrUpdate.json -func ExampleKustoPoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginCreateOrUpdate(ctx, "synapseWorkspaceName", "kustorptest", "kustoclusterrptest4", armsynapse.KustoPool{ - Location: to.Ptr("westus"), - Properties: &armsynapse.KustoPoolProperties{ - EnablePurge: to.Ptr(true), - EnableStreamingIngest: to.Ptr(true), - WorkspaceUID: to.Ptr("11111111-2222-3333-444444444444"), - }, - SKU: &armsynapse.AzureSKU{ - Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - Capacity: to.Ptr[int32](2), - Size: to.Ptr(armsynapse.SKUSizeMedium), - }, - }, &armsynapse.KustoPoolsClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KustoPool = armsynapse.KustoPool{ - // Name: to.Ptr("KustoClusterRPTest4"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4"), - // Location: to.Ptr("westus"), - // Etag: to.Ptr("abcd"), - // Properties: &armsynapse.KustoPoolProperties{ - // EnablePurge: to.Ptr(true), - // EnableStreamingIngest: to.Ptr(true), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // }, - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - // Capacity: to.Ptr[int32](2), - // Size: to.Ptr(armsynapse.SKUSizeMedium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsUpdate.json -func ExampleKustoPoolsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginUpdate(ctx, "synapseWorkspaceName", "kustorptest", "kustoclusterrptest4", armsynapse.KustoPoolUpdate{ - Properties: &armsynapse.KustoPoolProperties{ - EnablePurge: to.Ptr(true), - EnableStreamingIngest: to.Ptr(true), - WorkspaceUID: to.Ptr("11111111-2222-3333-444444444444"), - }, - SKU: &armsynapse.AzureSKU{ - Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - Capacity: to.Ptr[int32](2), - Size: to.Ptr(armsynapse.SKUSizeMedium), - }, - }, &armsynapse.KustoPoolsClientBeginUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KustoPool = armsynapse.KustoPool{ - // Name: to.Ptr("KustoClusterRPTest4"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/kustopools"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustopools/KustoClusterRPTest4"), - // Location: to.Ptr("westus"), - // Etag: to.Ptr("abcd"), - // Properties: &armsynapse.KustoPoolProperties{ - // EnablePurge: to.Ptr(true), - // EnableStreamingIngest: to.Ptr(true), - // ProvisioningState: to.Ptr(armsynapse.ResourceProvisioningStateSucceeded), - // }, - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - // Capacity: to.Ptr[int32](2), - // Size: to.Ptr(armsynapse.SKUSizeMedium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsDelete.json -func ExampleKustoPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginDelete(ctx, "kustorptest", "kustorptest", "kustoclusterrptest4", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsStop.json -func ExampleKustoPoolsClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginStop(ctx, "kustorptest", "kustoclusterrptest4", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsStart.json -func ExampleKustoPoolsClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginStart(ctx, "kustorptest", "kustoclusterrptest4", "kustorptest", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsListResourceSkus.json -func ExampleKustoPoolsClient_NewListSKUsByResourcePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolsClient().NewListSKUsByResourcePager("synapseWorkspaceName", "kustoclusterrptest4", "kustorptest", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListResourceSKUsResult = armsynapse.ListResourceSKUsResult{ - // Value: []*armsynapse.AzureResourceSKU{ - // { - // Capacity: &armsynapse.AzureCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](100), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr(armsynapse.AzureScaleTypeAutomatic), - // }, - // ResourceType: to.Ptr("workspaces/kustoPools"), - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameComputeOptimized), - // Size: to.Ptr(armsynapse.SKUSizeMedium), - // }, - // }, - // { - // Capacity: &armsynapse.AzureCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](100), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr(armsynapse.AzureScaleTypeAutomatic), - // }, - // ResourceType: to.Ptr("workspaces/kustoPools"), - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameComputeOptimized), - // Size: to.Ptr(armsynapse.SKUSizeLarge), - // }, - // }, - // { - // Capacity: &armsynapse.AzureCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](100), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr(armsynapse.AzureScaleTypeAutomatic), - // }, - // ResourceType: to.Ptr("workspaces/kustoPools"), - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - // Size: to.Ptr(armsynapse.SKUSizeMedium), - // }, - // }, - // { - // Capacity: &armsynapse.AzureCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](100), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr(armsynapse.AzureScaleTypeAutomatic), - // }, - // ResourceType: to.Ptr("workspaces/kustoPools"), - // SKU: &armsynapse.AzureSKU{ - // Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - // Size: to.Ptr(armsynapse.SKUSizeLarge), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolLanguageExtensionsList.json -func ExampleKustoPoolsClient_NewListLanguageExtensionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolsClient().NewListLanguageExtensionsPager("kustorptest", "kustoclusterrptest4", "kustorptest", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LanguageExtensionsList = armsynapse.LanguageExtensionsList{ - // Value: []*armsynapse.LanguageExtension{ - // { - // LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNamePYTHON), - // }, - // { - // LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNameR), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolLanguageExtensionsAdd.json -func ExampleKustoPoolsClient_BeginAddLanguageExtensions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginAddLanguageExtensions(ctx, "kustorptest", "kustoclusterrptest4", "kustorptest", armsynapse.LanguageExtensionsList{ - Value: []*armsynapse.LanguageExtension{ - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNamePYTHON), - }, - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNameR), - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolLanguageExtensionsRemove.json -func ExampleKustoPoolsClient_BeginRemoveLanguageExtensions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginRemoveLanguageExtensions(ctx, "kustorptest", "kustoclusterrptest4", "kustorptest", armsynapse.LanguageExtensionsList{ - Value: []*armsynapse.LanguageExtension{ - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNamePYTHON), - }, - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNameR), - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolFollowerDatabasesList.json -func ExampleKustoPoolsClient_NewListFollowerDatabasesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKustoPoolsClient().NewListFollowerDatabasesPager("kustorptest", "kustoclusterrptest4", "kustorptest", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FollowerDatabaseListResult = armsynapse.FollowerDatabaseListResult{ - // Value: []*armsynapse.FollowerDatabaseDefinition{ - // { - // AttachedDatabaseConfigurationName: to.Ptr("attachedDbConfiguration"), - // KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustoPools/follower1"), - // DatabaseName: to.Ptr("*"), - // }, - // { - // AttachedDatabaseConfigurationName: to.Ptr("attachedDbConfiguration2"), - // KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustoPools/follower4"), - // DatabaseName: to.Ptr("db1"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolFollowerDatabasesDetach.json -func ExampleKustoPoolsClient_BeginDetachFollowerDatabases() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKustoPoolsClient().BeginDetachFollowerDatabases(ctx, "kustorptest", "kustoclusterrptest4", "kustorptest", armsynapse.FollowerDatabaseDefinition{ - AttachedDatabaseConfigurationName: to.Ptr("myAttachedDatabaseConfiguration"), - KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustoPools/leader4"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/libraries_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/libraries_client_example_test.go deleted file mode 100644 index 8b7a2aa4f43a..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/libraries_client_example_test.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Libraries_ListByWorkspace.json -func ExampleLibrariesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLibrariesClient().NewListByWorkspacePager("exampleResourceGroup", "exampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LibraryListResponse = armsynapse.LibraryListResponse{ - // Value: []*armsynapse.LibraryResource{ - // { - // Name: to.Ptr("exampleLibraryName1.jar"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/libraries"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/libraries/exampleLibraryName1.jar"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // Properties: &armsynapse.LibraryInfo{ - // Name: to.Ptr("exampleLibraryName1.jar"), - // Type: to.Ptr("jar"), - // Path: to.Ptr("exampleWorkspace/libraries/exampleLibraryName1.jar"), - // ContainerName: to.Ptr("exampleContainer"), - // CreatorID: to.Ptr("2222222e-222d-222f-2222-22a2f222d2f2"), - // ProvisioningStatus: to.Ptr("Succeeded"), - // UploadedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T07:59:29.1573546+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("exampleLibraryName2.jar"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/libraries"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/libraries/exampleLibraryName2.jar"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // Properties: &armsynapse.LibraryInfo{ - // Name: to.Ptr("exampleLibraryName2.jar"), - // Type: to.Ptr("jar"), - // Path: to.Ptr("exampleWorkspace/libraries/exampleLibraryName2.jar"), - // ContainerName: to.Ptr("exampleContainer"), - // CreatorID: to.Ptr("2222222e-222d-222f-2222-22a2f222d2f2"), - // ProvisioningStatus: to.Ptr("Succeeded"), - // UploadedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T07:59:29.1573546+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/library_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/library_client_example_test.go deleted file mode 100644 index 192c76d054d0..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/library_client_example_test.go +++ /dev/null @@ -1,53 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Library_Get.json -func ExampleLibraryClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLibraryClient().Get(ctx, "exampleResourceGroup", "exampleLibraryName.jar", "exampleWorkspace", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LibraryResource = armsynapse.LibraryResource{ - // Name: to.Ptr("exampleLibraryName.jar"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/libraries"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/libraries/exampleLibraryName.jar"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // Properties: &armsynapse.LibraryInfo{ - // Name: to.Ptr("exampleLibraryName.jar"), - // Type: to.Ptr("jar"), - // Path: to.Ptr("exampleWorkspace/libraries/exampleLibraryName.jar"), - // ContainerName: to.Ptr("exampleContainer"), - // CreatorID: to.Ptr("2222222e-222d-222f-2222-22a2f222d2f2"), - // ProvisioningStatus: to.Ptr("Succeeded"), - // UploadedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T07:59:29.1573546+00:00"); return t}()), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/models.go b/sdk/resourcemanager/synapse/armsynapse/models.go index 9e563d10255e..d46ffdc3ab27 100644 --- a/sdk/resourcemanager/synapse/armsynapse/models.go +++ b/sdk/resourcemanager/synapse/armsynapse/models.go @@ -282,9 +282,6 @@ type BigDataPoolResourceProperties struct { // Auto-scaling properties AutoScale *AutoScaleProperties - // The cache size - CacheSize *int32 - // List of custom libraries/packages associated with the spark pool. CustomLibraries []*LibraryInfo @@ -327,6 +324,9 @@ type BigDataPoolResourceProperties struct { // The Apache Spark version. SparkVersion *string + // READ-ONLY; The cache size + CacheSize *int32 + // READ-ONLY; The time when the Big Data pool was created. CreationDate *time.Time @@ -2698,14 +2698,14 @@ type LibraryInfo struct { // Type of the library. Type *string - // The last update time of the library. - UploadedTimestamp *time.Time - // READ-ONLY; Creator Id of the library/package. CreatorID *string // READ-ONLY; Provisioning status of the library/package. ProvisioningStatus *string + + // READ-ONLY; The last update time of the library. + UploadedTimestamp *time.Time } // LibraryListResponse - A list of Library resources. @@ -5241,6 +5241,9 @@ type SelfHostedIntegrationRuntimeStatusTypeProperties struct { // READ-ONLY; The node communication Channel encryption mode NodeCommunicationChannelEncryptionMode *string + // READ-ONLY + OSType *int32 + // READ-ONLY; The version that the integration runtime is going to update to. PushedVersion *string @@ -5250,6 +5253,9 @@ type SelfHostedIntegrationRuntimeStatusTypeProperties struct { // READ-ONLY; The URLs for the services used in integration runtime backend service. ServiceUrls []*string + // READ-ONLY + TargetFramework *int32 + // READ-ONLY; The task queue id of the integration runtime. TaskQueueID *string @@ -5587,7 +5593,7 @@ type ServerVulnerabilityAssessmentProperties struct { StorageContainerPath *string // The recurring scans settings - RecurringScans *VulnerabilityAssessmentRecurringScansProperties + RecurringScans *VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' // isn't specified, storageAccountAccessKey is required. @@ -6121,6 +6127,18 @@ type VulnerabilityAssessmentRecurringScansProperties struct { IsEnabled *bool } +// VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated - Properties of a Vulnerability Assessment recurring scans. +type VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated struct { + // Specifies that the schedule scan notification will be is sent to the subscription administrators. + EmailSubscriptionAdmins *bool + + // Specifies an array of e-mail addresses to which the scan notification is sent. + Emails []*string + + // Recurring scans state. + IsEnabled *bool +} + // VulnerabilityAssessmentScanError - Properties of a vulnerability assessment scan error. type VulnerabilityAssessmentScanError struct { // READ-ONLY; The error code. @@ -6547,9 +6565,6 @@ type WorkspaceProperties struct { // Enable or Disable AzureADOnlyAuthentication on All Workspace subresource AzureADOnlyAuthentication *bool - // Connectivity endpoints - ConnectivityEndpoints map[string]*string - // Initial workspace AAD admin properties for a CSP subscription CspWorkspaceAdminProperties *CspWorkspaceAdminProperties @@ -6599,8 +6614,11 @@ type WorkspaceProperties struct { // READ-ONLY; The ADLA resource ID. AdlaResourceID *string + // READ-ONLY; Connectivity endpoints + ConnectivityEndpoints map[string]*string + // READ-ONLY; Workspace level configs and feature flags - ExtraProperties map[string]any + ExtraProperties any // READ-ONLY; Resource provisioning state ProvisioningState *string diff --git a/sdk/resourcemanager/synapse/armsynapse/models_serde.go b/sdk/resourcemanager/synapse/armsynapse/models_serde.go index eb4003f2c600..cc6b85fb676e 100644 --- a/sdk/resourcemanager/synapse/armsynapse/models_serde.go +++ b/sdk/resourcemanager/synapse/armsynapse/models_serde.go @@ -9949,10 +9949,12 @@ func (s SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, populate(objectMap, "newerVersions", s.NewerVersions) populate(objectMap, "nodeCommunicationChannelEncryptionMode", s.NodeCommunicationChannelEncryptionMode) populate(objectMap, "nodes", s.Nodes) + populate(objectMap, "osType", s.OSType) populate(objectMap, "pushedVersion", s.PushedVersion) populateTimeRFC3339(objectMap, "scheduledUpdateDate", s.ScheduledUpdateDate) populate(objectMap, "serviceRegion", s.ServiceRegion) populate(objectMap, "serviceUrls", s.ServiceUrls) + populate(objectMap, "targetFramework", s.TargetFramework) populate(objectMap, "taskQueueId", s.TaskQueueID) populate(objectMap, "updateDelayOffset", s.UpdateDelayOffset) populate(objectMap, "version", s.Version) @@ -10002,6 +10004,9 @@ func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data [] case "nodes": err = unpopulate(val, "Nodes", &s.Nodes) delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &s.OSType) + delete(rawMsg, key) case "pushedVersion": err = unpopulate(val, "PushedVersion", &s.PushedVersion) delete(rawMsg, key) @@ -10014,6 +10019,9 @@ func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data [] case "serviceUrls": err = unpopulate(val, "ServiceUrls", &s.ServiceUrls) delete(rawMsg, key) + case "targetFramework": + err = unpopulate(val, "TargetFramework", &s.TargetFramework) + delete(rawMsg, key) case "taskQueueId": err = unpopulate(val, "TaskQueueID", &s.TaskQueueID) delete(rawMsg, key) @@ -11892,6 +11900,41 @@ func (v *VulnerabilityAssessmentRecurringScansProperties) UnmarshalJSON(data []b return nil } +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated. +func (v VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emailSubscriptionAdmins", v.EmailSubscriptionAdmins) + populate(objectMap, "emails", v.Emails) + populate(objectMap, "isEnabled", v.IsEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated. +func (v *VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emailSubscriptionAdmins": + err = unpopulate(val, "EmailSubscriptionAdmins", &v.EmailSubscriptionAdmins) + delete(rawMsg, key) + case "emails": + err = unpopulate(val, "Emails", &v.Emails) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &v.IsEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanError. func (v VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -12529,7 +12572,7 @@ func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "cspWorkspaceAdminProperties", w.CspWorkspaceAdminProperties) populate(objectMap, "defaultDataLakeStorage", w.DefaultDataLakeStorage) populate(objectMap, "encryption", w.Encryption) - populate(objectMap, "extraProperties", w.ExtraProperties) + populateAny(objectMap, "extraProperties", w.ExtraProperties) populate(objectMap, "managedResourceGroupName", w.ManagedResourceGroupName) populate(objectMap, "managedVirtualNetwork", w.ManagedVirtualNetwork) populate(objectMap, "managedVirtualNetworkSettings", w.ManagedVirtualNetworkSettings) diff --git a/sdk/resourcemanager/synapse/armsynapse/operations_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/operations_client_example_test.go deleted file mode 100644 index 680709d9a391..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/operations_client_example_test.go +++ /dev/null @@ -1,1579 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAlreadyExists.json -func ExampleOperationsClient_CheckNameAvailability_checkForAWorkspaceNameThatAlreadyExists() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationsClient().CheckNameAvailability(ctx, armsynapse.CheckNameAvailabilityRequest{ - Name: to.Ptr("workspace1"), - Type: to.Ptr("Microsoft.Synapse/workspaces"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameAvailabilityResponse = armsynapse.CheckNameAvailabilityResponse{ - // Name: to.Ptr("workspace1"), - // Available: to.Ptr(false), - // Message: to.Ptr("Specified workspace name is already used"), - // Reason: to.Ptr("AlreadyExists"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAvailable.json -func ExampleOperationsClient_CheckNameAvailability_checkForAWorkspaceNameThatIsAvailable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationsClient().CheckNameAvailability(ctx, armsynapse.CheckNameAvailabilityRequest{ - Name: to.Ptr("workspace1"), - Type: to.Ptr("Microsoft.ProjectArcadia/workspaces"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameAvailabilityResponse = armsynapse.CheckNameAvailabilityResponse{ - // Name: to.Ptr("workspace1"), - // Available: to.Ptr(true), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAvailableOperations.json -func ExampleOperationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationsClient().List(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AvailableRpOperationArray = []*armsynapse.AvailableRpOperation{ - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get any Integration Runtime."), - // Operation: to.Ptr("Get Integration Runtime Operation result."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/managedIdentitySqlControlSettings/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Update Managed Identity SQL Control Settings on the workspace"), - // Operation: to.Ptr("Update Managed Identity SQL Control Settings"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Managed Identity SQL Control Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/managedIdentitySqlControlSettings/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get Managed Identity SQL Control Settings"), - // Operation: to.Ptr("Get Managed Identity SQL Control Settings"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Managed Identity SQL Control Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/operations/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read Available Operations from the Analytics 365 Resource Provider."), - // Operation: to.Ptr("Read Available Operations."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Available Operations"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/nodes/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get any Integration Runtime Node."), - // Operation: to.Ptr("Get Integration Runtime Node."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/nodes/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any Integration Runtime Node."), - // Operation: to.Ptr("Delete Integration Runtime Node."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/nodes/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Patch any Integration Runtime Node."), - // Operation: to.Ptr("Patch Integration Runtime Node."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/nodes/ipAddress/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get Integration Runtime Ip Address"), - // Operation: to.Ptr("Get Integration Runtime Ip Address"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationruntimes/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any Integration Runtimes."), - // Operation: to.Ptr("Create or Update Integration Runtimes."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any Integration Runtime"), - // Operation: to.Ptr("Delete Integration Runtimes"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/getStatus/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get any Integration Runtime's Status"), - // Operation: to.Ptr("Get an Integration Runtime Status"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/start/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Start any Integration Runtime"), - // Operation: to.Ptr("Start an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/stop/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Stop any Integration Runtime"), - // Operation: to.Ptr("Stop an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/getConnectionInfo/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get Connection Info of any Integration Runtime"), - // Operation: to.Ptr("Get Connection Info of an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/regenerateAuthKey/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Regenerate auth key of any Integration Runtime"), - // Operation: to.Ptr("Regenerate auth key of an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/listAuthKeys/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("List Auth Keys of any Integration Runtime"), - // Operation: to.Ptr("List Auth Keys of an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/removeNode/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Remove any Integration Runtime node"), - // Operation: to.Ptr("Remove an Integration Runtime node"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/monitoringData/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get any Integration Runtime's monitoring data"), - // Operation: to.Ptr("Get an Integration Runtime's monitoring data"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/syncCredentials/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Sync credential on any Integration Runtime"), - // Operation: to.Ptr("Sync credential on an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/upgrade/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Upgrade any Integration Runtime"), - // Operation: to.Ptr("Upgrade an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/removeLinks/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Remove any Integration Runtime link"), - // Operation: to.Ptr("Remove an Integration Runtime link"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/enableInteractiveQuery/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Enable Interactive query on any Integration Runtime"), - // Operation: to.Ptr("Enable Interactive query on an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/disableInteractiveQuery/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Disable Interactive query on any Integration Runtime"), - // Operation: to.Ptr("Disable Interactive query on an Integration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/refreshObjectMetadata/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Refresh Object metadata on any Intergration Runtime"), - // Operation: to.Ptr("Refresh Object metadata on an Intergration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/integrationRuntimes/getObjectMetadata/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get Object metadata on any Intergration Runtime"), - // Operation: to.Ptr("Get Object metadata on an Intergration Runtime"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Integration Runtimes."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/firewallRules/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or update any IP Firewall Rule."), - // Operation: to.Ptr("Create or update IP Firewall Rule."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("IP Firewall Rule."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/firewallRules/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read IP Firewall Rule"), - // Operation: to.Ptr("Read IP Firewall Rule"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("IP Firewall Rule."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/firewallRules/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any IP Firewall Rule."), - // Operation: to.Ptr("Delete IP Firewall Rule"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("IP Firewall Rule."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/replaceAllIpFirewallRules/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Replaces all Ip Firewall Rules for the Workspace."), - // Operation: to.Ptr("Replace all Ip Firewall Rules for the Workspace."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Workspaces"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any SQL Analytics pools."), - // Operation: to.Ptr("Create or Update SQL Analytics pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pools."), - // Operation: to.Ptr("Read SQL Analytics pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataWarehouseQueries/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Queries."), - // Operation: to.Ptr("Read SQL Analytics pool Queries."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Queries"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/geoBackupPolicies/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Geo Backup Policies."), - // Operation: to.Ptr("Read SQL Analytics pool Geo Backup Policies."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Geo Backup Policies"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataWarehouseUserActivities/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool User Activities."), - // Operation: to.Ptr("Read SQL Analytics pool User Activities."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool User Activities"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Restore Points."), - // Operation: to.Ptr("Read SQL Analytics pool Restore Points."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Restore Points"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataWarehouseQueries/dataWarehouseQuerySteps/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Query Steps."), - // Operation: to.Ptr("Read SQL Analytics pool Query Steps."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Query Steps"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/maintenanceWindows/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Maintenance Windows."), - // Operation: to.Ptr("Read SQL Analytics pool Maintenance Windows."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Maintenance Windows"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/maintenanceWindowOptions/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Maintenance Window Options."), - // Operation: to.Ptr("Read SQL Analytics pool Maintenance Window Options."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Maintenance Window Options"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/replicationLinks/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Replication Links."), - // Operation: to.Ptr("Read SQL Analytics pool Replication Links."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Replication Links"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Transparent Data Encryption Configuration."), - // Operation: to.Ptr("Read SQL Analytics pool Transparent Data Encryption Configuration."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Transparent Data Encryption Configuration"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption/operationResults/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Transparent Data Encryption Configuration Operation Results."), - // Operation: to.Ptr("Read SQL Analytics pool Transparent Data Encryption Configuration Operation Results."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Transparent Data Encryption Configuration Operation Results"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/auditingSettings/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Auditing Settings."), - // Operation: to.Ptr("Read SQL Analytics pool Auditing Settings."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Auditing Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/operations/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Operations."), - // Operation: to.Ptr("Read SQL Analytics pool Operations."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Operations"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/usages/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Usages."), - // Operation: to.Ptr("Read SQL Analytics pool Usages."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Usages"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/currentSensitivityLabels/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Current Sensitivity Labels."), - // Operation: to.Ptr("Read SQL Analytics pool Current Sensitivity Labels."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Current Sensitivity Labels"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/recommendedSensitivityLabels/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Recommended Sensitivity Labels."), - // Operation: to.Ptr("Read SQL Analytics pool Recommended Sensitivity Labels."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Recommended Sensitivity Labels"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Schemas."), - // Operation: to.Ptr("Read SQL Analytics pool Schemas."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Schemas"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Schema Tables."), - // Operation: to.Ptr("Read SQL Analytics pool Schema Tables."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Schema Tables"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Schema Table Columns."), - // Operation: to.Ptr("Read SQL Analytics pool Schema Table Columns."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Schema Table Columns"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/connectionPolicies/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Connection Policies."), - // Operation: to.Ptr("Read SQL Analytics pool Connection Policies."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Connection Policies"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Vulnerability Assessment."), - // Operation: to.Ptr("Read SQL Analytics pool Vulnerability Assessment."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Vulnerability Assessment Scan Records."), - // Operation: to.Ptr("Read SQL Analytics pool Vulnerability Assessment Scan Records."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment Scan Records"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Sql Analytics pool Threat Detection Policies."), - // Operation: to.Ptr("Read Sql Analytics pool Threat Detection Policies."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Security Alert Policies"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any SQL Analytics pools."), - // Operation: to.Ptr("Delete SQL Analytics pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/pause/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Pause any SQL Analytics pools."), - // Operation: to.Ptr("Pause SQL Analytics pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/resume/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Resume any SQL Analytics pools."), - // Operation: to.Ptr("Resume SQL Analytics pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create a SQL Analytics pool Restore Point."), - // Operation: to.Ptr("Create SQL Analytics pool Restore Point."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Restore Points"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/move/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Rename any SQL Analytics pools."), - // Operation: to.Ptr("Rename SQL Analytics pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels/enable/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Enable any SQL Analytics pool Sensitivity Labels."), - // Operation: to.Ptr("Enable SQL Analytics pool Sensitivity Labels."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Sensitivity Labels"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels/disable/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Disable any SQL Analytics pool Sensitivity Labels."), - // Operation: to.Ptr("Disable SQL Analytics pool Sensitivity Labels."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Sensitivity Labels"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans/initiateScan/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Initiate any SQL Analytics pool Vulnerability Assessment Scan Records."), - // Operation: to.Ptr("Initiate SQL Analytics pool Vulnerability Assessment Scan Records."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment Scan Records"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans/export/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Export any SQL Analytics pool Vulnerability Assessment Scan Records."), - // Operation: to.Ptr("Export SQL Analytics pool Vulnerability Assessment Scan Records."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment Scan Records"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/maintenanceWindows/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any SQL Analytics pool Maintenance Windows."), - // Operation: to.Ptr("Create or Update SQL Analytics pool Maintenance Windows."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Maintenance Windows"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/auditingSettings/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any SQL Analytics pool Auditing Settings."), - // Operation: to.Ptr("Create or Update SQL Analytics pool Auditing Settings."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Auditing Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any SQL Analytics pool Sensitivity Labels."), - // Operation: to.Ptr("Create or update SQL Analytics pool Sensitivity Labels."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Sensitivity Labels"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any SQL Analytics pool Transparent Data Encryption Configuration."), - // Operation: to.Ptr("Create or Update SQL Analytics pool Transparent Data Encryption Configuration."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Transparent Data Encryption Configuration"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any SQL Analytics pool Threat Detection Policies."), - // Operation: to.Ptr("Create or Update SQL Analytics pool Threat Detection Policies."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Security Alert Policies"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/rules/baselines/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any SQL Analytics pool Vulnerability Assessment Rule Baseline."), - // Operation: to.Ptr("Create or Update SQL Analytics pool Vulnerability Assessment Rule Baseline."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment Rule Baseline"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any SQL Analytics pool Sensitivity Labels."), - // Operation: to.Ptr("Delete SQL Analytics pool Sensitivity Labels.2"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Sensitivity Labels"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any SQL Analytics pool Vulnerability Assessment."), - // Operation: to.Ptr("Delete SQL Analytics pool Vulnerability Assessment."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/rules/baselines/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any SQL Analytics pool Vulnerability Assessment Rule Baseline."), - // Operation: to.Ptr("Delete SQL Analytics pool Vulnerability Assessment Rule Baseline."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Vulnerability Assessment Rule Baseline"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/operationStatus/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Async Operation Status."), - // Operation: to.Ptr("Read Async Operation Status."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Async Operation Status."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/operationResults/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Async Operation Result."), - // Operation: to.Ptr("Read Async Operation Result."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Async Operation Result"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/operationResults/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Async Operation Result."), - // Operation: to.Ptr("Read Async Operation Result."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Async Operation Result"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/checkNameAvailability/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Checks Workspace name availability."), - // Operation: to.Ptr("Checks Workspace name availability."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Check Name Availability"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any Spark pools."), - // Operation: to.Ptr("Create or Update Spark pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Spark pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Spark pools."), - // Operation: to.Ptr("Read Spark pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Spark pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any Spark pools."), - // Operation: to.Ptr("Delete Spark pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Spark pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/metadataSync/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read SQL Analytics pool Metadata Sync Config"), - // Operation: to.Ptr("Read SQL Analytics pool Metadata Sync Config"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Metadata Sync Config"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/metadataSync/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update SQL Analytics pool Metadata Sync Config"), - // Operation: to.Ptr("Create or Update SQL Analytics pool Metadata Sync Config"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Metadata Sync Config"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/register/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Registers the Analytics 365 Resource Provider and enables the creation of Workspaces."), - // Operation: to.Ptr("Registers the Analytics 365 Resource Provider."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Analytics 365 Resource Provider."), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/administrators/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Set Active Directory Administrator on the Workspace"), - // Operation: to.Ptr("Set Active Directory Administrator"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Administrators"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/administrators/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get Workspace Active Directory Administrator"), - // Operation: to.Ptr("Get Workspace Active Directory Administrator"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Administrators"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/administrators/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete Workspace Active Directory Administrator"), - // Operation: to.Ptr("Delete Workspace Active Directory Administrator"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Administrators"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update any Workspaces."), - // Operation: to.Ptr("Create or Update Workspaces."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Workspaces"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Workspaces."), - // Operation: to.Ptr("Read Workspaces."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Workspaces"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete any Workspaces."), - // Operation: to.Ptr("Delete Workspaces."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Workspaces"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnectionProxies/validate/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Validates Private Endpoint Connection Proxy"), - // Operation: to.Ptr("Validates Private Endpoint Connection Proxy"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Validate Private Endpoint Connection Proxy"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnectionProxies/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update Private Endpoint Connection Proxy"), - // Operation: to.Ptr("Create or Update Private Endpoint Connection Proxy"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Private Endpoint Connection Proxy"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnectionProxies/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read any Private Endpoint Connection Proxy"), - // Operation: to.Ptr("Read Private Endpoint Connection Proxies"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Private Endpoint Connection Proxy"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/privateLinkResources/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Get a list of Private Link Resources"), - // Operation: to.Ptr("Get Private Link Resources"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Private Link Resources"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/serverKeys/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Creates or updates a server key"), - // Operation: to.Ptr("Creates or updates a server key"), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Key"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/serverKeys/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Deletes the server key with the given name."), - // Operation: to.Ptr("Deletes the server key with the given name."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Key"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/extendedAuditingSettings/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update SQL server extended auditing settings."), - // Operation: to.Ptr("Create or Update SQL server extended auditing settings."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Extended Auditing Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/extendedAuditingSettings/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read SQL server extended auditing settings."), - // Operation: to.Ptr("Read SQL server extended auditing settings."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Extended Auditing Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/auditingSettings/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update SQL server auditing settings."), - // Operation: to.Ptr("Create or Update SQL server auditing settings."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Auditing Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/auditingSettings/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read SQL server auditing settings."), - // Operation: to.Ptr("Read SQL server auditing settings."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Auditing Settings"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/securityAlertPolicies/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update SQL server security alert policies."), - // Operation: to.Ptr("Create or Update SQL server security alert policies."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Security Alert Policy"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/securityAlertPolicies/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read SQL server security alert policies."), - // Operation: to.Ptr("Read SQL server security alert policies."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Security Alert Policy"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Create or Update SQL server vulnerability assement report."), - // Operation: to.Ptr("Create or Update SQL server vulnerability assement report."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Vulnerability Assesment"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Read SQL server vulnerability assement report."), - // Operation: to.Ptr("Read SQL server vulnerability assement report."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Vulnerability Assesment"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments/delete"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Delete SQL server vulnerability assement report."), - // Operation: to.Ptr("Delete SQL server vulnerability assement report."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Vulnerability Assesment"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Update the properties for the specified Server Encryption Protector."), - // Operation: to.Ptr("Update the properties for the specified Server Encryption Protector."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Encryption Protector"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Returns a list of server encryption protectors or gets the properties for the specified server encryption protector."), - // Operation: to.Ptr("Returns a list of server encryption protectors or gets the properties for the specified server encryption protector."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Encryption Protector"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector/revalidate/action"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Revalidates an existing encryption protector."), - // Operation: to.Ptr("Revalidates an existing encryption protector."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Server Encryption Protector"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Gets the available metrics for workspace"), - // Operation: to.Ptr("Read workspace metric definitions"), - // Provider: to.Ptr("Microsoft Azure Synapse Analytics"), - // Resource: to.Ptr("Workspace"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armsynapse.OperationMetaPropertyInfo{ - // ServiceSpecification: &armsynapse.OperationMetaServiceSpecification{ - // MetricSpecifications: []*armsynapse.OperationMetaMetricSpecification{ - // { - // Name: to.Ptr("PipelineFailedRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Failed pipeline runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("PipelineSucceededRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Succeeded pipeline runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("PipelineCancelledRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Cancelled pipeline runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ActivityFailedRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("ActivityType"), - // DisplayName: to.Ptr("Activity Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("PipelineName"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Activity"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Failed activity runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ActivitySucceededRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("ActivityType"), - // DisplayName: to.Ptr("Activity Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("PipelineName"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Activity"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Succeeded activity runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ActivityCancelledRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("ActivityType"), - // DisplayName: to.Ptr("Activity Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("PipelineName"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Activity"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Cancelled activity runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TriggerFailedRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Trigger"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Failed trigger runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TriggerSucceededRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Trigger"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Succeeded trigger runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TriggerCancelledRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armsynapse.OperationMetaMetricDimensionSpecification{ - // { - // Name: to.Ptr("Name"), - // DisplayName: to.Ptr("Trigger"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("FailureType"), - // DisplayName: to.Ptr("Failure Type"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Cancelled trigger runs"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Azure Synapse Analytics"), - // Resource: to.Ptr("Workspace"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Azure Synapse Analytics"), - // Resource: to.Ptr("Workspace"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/providers/Microsoft.Insights/logDefinitions/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Gets the available logs for workspace"), - // Operation: to.Ptr("Read workspace log definitions"), - // Provider: to.Ptr("Microsoft Azure Synapse Analytics"), - // Resource: to.Ptr("The log definition of workspace"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armsynapse.OperationMetaPropertyInfo{ - // ServiceSpecification: &armsynapse.OperationMetaServiceSpecification{ - // LogSpecifications: []*armsynapse.OperationMetaLogSpecification{ - // { - // Name: to.Ptr("ActivityRuns"), - // BlobDuration: to.Ptr("PT1H"), - // DisplayName: to.Ptr("Activity runs"), - // }, - // { - // Name: to.Ptr("PipelineRuns"), - // BlobDuration: to.Ptr("PT1H"), - // DisplayName: to.Ptr("Pipeline runs"), - // }, - // { - // Name: to.Ptr("TriggerRuns"), - // BlobDuration: to.Ptr("PT1H"), - // DisplayName: to.Ptr("Trigger runs"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/recoverableSqlPools/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Gets recoverable SQL Analytics Pools, which are the resources representing geo backups of SQL Analytics Pools."), - // Operation: to.Ptr("Gets recoverable SQL Analytics Pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("Recoverable Sql Analytics Pools"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }, - // { - // Name: to.Ptr("Microsoft.Synapse/workspaces/sqlUsages/read"), - // Display: &armsynapse.AvailableRpOperationDisplayInfo{ - // Description: to.Ptr("Gets usage limits available for SQL Analytics Pools."), - // Operation: to.Ptr("Gets usage limits available for SQL Analytics Pools."), - // Provider: to.Ptr("Analytics 365 Resource Provider."), - // Resource: to.Ptr("SQL Analytics pool Usages"), - // }, - // IsDataAction: to.Ptr("false"), - // Origin: to.Ptr("user, system"), - // }} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeader.json -func ExampleOperationsClient_GetLocationHeaderResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewOperationsClient().GetLocationHeaderResult(ctx, "resourceGroup1", "workspace1", "01234567-89ab-4def-0123-456789abcdef", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureAsyncOperationHeader.json -func ExampleOperationsClient_GetAzureAsyncHeaderResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationsClient().GetAzureAsyncHeaderResult(ctx, "resourceGroup1", "workspace1", "01234567-89ab-4def-0123-456789abcdef", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.OperationResource = armsynapse.OperationResource{ - // Status: to.Ptr(armsynapse.OperationStatusInProgress), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client_example_test.go deleted file mode 100644 index d850507d639d..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,167 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = armsynapse.PrivateEndpointConnection{ - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateEndpointConnections/ExamplePrivateEndpointConnection"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/privateEndpoints/ExamplePrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreate(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", armsynapse.PrivateEndpointConnection{ - Properties: &armsynapse.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Approved by abc@example.com"), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = armsynapse.PrivateEndpointConnection{ - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateEndpointConnections/ExamplePrivateEndpointConnection"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/privateEndpoints/ExamplePrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateEndpointConnections.json -func ExamplePrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("ExampleResourceGroup", "ExampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionList = armsynapse.PrivateEndpointConnectionList{ - // Value: []*armsynapse.PrivateEndpointConnection{ - // { - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateEndpointConnections/ExamplePrivateEndpointConnection"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/privateEndpoints/ExamplePrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client_example_test.go deleted file mode 100644 index ef3c8ab17511..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client_example_test.go +++ /dev/null @@ -1,108 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_List.json -func ExamplePrivateEndpointConnectionsPrivateLinkHubClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndpointConnectionsPrivateLinkHubClient().NewListPager("gh-res-grp", "pe0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse = armsynapse.PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse{ - // Value: []*armsynapse.PrivateEndpointConnectionForPrivateLinkHub{ - // { - // ID: to.Ptr("/subscriptions/48b08652-d7a1-4d52-b13f-5a2471dce57b/resourceGroups/gh-res-grp/providers/Microsoft.Synapse/privateLinkHubs/plh900/privateEndpointConnections/pe0-f3ed30f5-338c-4855-a542-24a403694ad2"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/48b08652-d7a1-4d52-b13f-5a2471dce57b/resourceGroups/gh-res-grp/providers/Microsoft.Network/privateEndpoints/pe0"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // Name: to.Ptr("pe0-f3ed30f5-338c-4855-a542-24a403694ad2"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs/privateEndpointConnections"), - // }, - // { - // ID: to.Ptr("/subscriptions/48b08652-d7a1-4d52-b13f-5a2471dce57b/resourceGroups/gh-res-grp/providers/Microsoft.Synapse/privateLinkHubs/plh900/privateEndpointConnections/pe-xbox-3e425dc3-edd9-434c-9bca-3ac6cecbc7e4"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/48b08652-d7a1-4d52-b13f-5a2471dce57b/resourceGroups/gh-res-grp/providers/Microsoft.Network/privateEndpoints/pe-xbox"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // Name: to.Ptr("pe-xbox-3e425dc3-edd9-434c-9bca-3ac6cecbc7e4"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs/privateEndpointConnections"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_Get.json -func ExamplePrivateEndpointConnectionsPrivateLinkHubClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsPrivateLinkHubClient().Get(ctx, "gh-res-grp", "pe0", "pe0-f3ed30f5-338c-4855-a542-24a403694ad2", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnectionForPrivateLinkHub = armsynapse.PrivateEndpointConnectionForPrivateLinkHub{ - // ID: to.Ptr("/subscriptions/48b08652-d7a1-4d52-b13f-5a2471dce57b/resourceGroups/gh-res-grp/providers/Microsoft.Synapse/privateLinkHubs/plh900/privateEndpointConnections/pe0-f3ed30f5-338c-4855-a542-24a403694ad2"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/48b08652-d7a1-4d52-b13f-5a2471dce57b/resourceGroups/gh-res-grp/providers/Microsoft.Network/privateEndpoints/pe0"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // Name: to.Ptr("pe0-f3ed30f5-338c-4855-a542-24a403694ad2"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs/privateEndpointConnections"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client_example_test.go deleted file mode 100644 index 283402ff4fa1..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client_example_test.go +++ /dev/null @@ -1,90 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubPrivateLinkResources.json -func ExamplePrivateLinkHubPrivateLinkResourcesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateLinkHubPrivateLinkResourcesClient().NewListPager("ExampleResourceGroup", "ExamplePrivateLinkHub", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateLinkResourceListResult = armsynapse.PrivateLinkResourceListResult{ - // Value: []*armsynapse.PrivateLinkResource{ - // { - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs/privateLinkResources"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/privateLinkHubs/ExamplePrivateLinkHub/privateLinkResources/sql"), - // Properties: &armsynapse.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sql"), - // RequiredMembers: []*string{ - // to.Ptr("sql")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.sql.azuresynapse.net")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHubPrivateLinkResource.json -func ExamplePrivateLinkHubPrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkHubPrivateLinkResourcesClient().Get(ctx, "ExampleResourceGroup", "ExamplePrivateLinkHub", "sql", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResource = armsynapse.PrivateLinkResource{ - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs/privateLinkResources"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/privateLinkHubs/ExamplePrivateLinkHub/privateLinkResources/sql"), - // Properties: &armsynapse.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sql"), - // RequiredMembers: []*string{ - // to.Ptr("sql")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.sql.azuresynapse.net")}, - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client_example_test.go deleted file mode 100644 index 1887f742feb2..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client_example_test.go +++ /dev/null @@ -1,250 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInResourceGroup.json -func ExamplePrivateLinkHubsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateLinkHubsClient().NewListByResourceGroupPager("resourceGroup1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateLinkHubInfoListResult = armsynapse.PrivateLinkHubInfoListResult{ - // Value: []*armsynapse.PrivateLinkHub{ - // { - // Name: to.Ptr("privateLinkHub1"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }, - // { - // Name: to.Ptr("privateLinkHub2"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub2"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHub.json -func ExamplePrivateLinkHubsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkHubsClient().Get(ctx, "resourceGroup1", "privateLinkHub1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkHub = armsynapse.PrivateLinkHub{ - // Name: to.Ptr("privateLinkHub1"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdatePrivateLinkHub.json -func ExamplePrivateLinkHubsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkHubsClient().Update(ctx, "resourceGroup1", "privateLinkHub1", armsynapse.PrivateLinkHubPatchInfo{ - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkHub = armsynapse.PrivateLinkHub{ - // Name: to.Ptr("privateLinkHub1"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdatePrivateLinkHub.json -func ExamplePrivateLinkHubsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkHubsClient().CreateOrUpdate(ctx, "resourceGroup1", "privateLinkHub1", armsynapse.PrivateLinkHub{ - Location: to.Ptr("East US"), - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - Properties: &armsynapse.PrivateLinkHubProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkHub = armsynapse.PrivateLinkHub{ - // Name: to.Ptr("privateLinkHub1"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateLinkHub.json -func ExamplePrivateLinkHubsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateLinkHubsClient().BeginDelete(ctx, "resourceGroup1", "privateLinkHub1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInSubscription.json -func ExamplePrivateLinkHubsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateLinkHubsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateLinkHubInfoListResult = armsynapse.PrivateLinkHubInfoListResult{ - // Value: []*armsynapse.PrivateLinkHub{ - // { - // Name: to.Ptr("privateLinkHub1"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }, - // { - // Name: to.Ptr("privateLinkHub2"), - // Type: to.Ptr("Microsoft.Synapse/privateLinkHubs"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub2"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.PrivateLinkHubProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client_example_test.go deleted file mode 100644 index 5c9c5fe32492..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,90 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkResources.json -func ExamplePrivateLinkResourcesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateLinkResourcesClient().NewListPager("ExampleResourceGroup", "ExampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateLinkResourceListResult = armsynapse.PrivateLinkResourceListResult{ - // Value: []*armsynapse.PrivateLinkResource{ - // { - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateLinkResources"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateLinkResources/sql"), - // Properties: &armsynapse.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sql"), - // RequiredMembers: []*string{ - // to.Ptr("sql")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.sql.azuresynapse.net")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkResource.json -func ExamplePrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "ExampleResourceGroup", "ExampleWorkspace", "sql", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResource = armsynapse.PrivateLinkResource{ - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateLinkResources"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateLinkResources/sql"), - // Properties: &armsynapse.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sql"), - // RequiredMembers: []*string{ - // to.Ptr("sql")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.sql.azuresynapse.net")}, - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client_example_test.go deleted file mode 100644 index 7c7483cf3b77..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlPoolGet.json -func ExampleRestorableDroppedSQLPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRestorableDroppedSQLPoolsClient().Get(ctx, "restorabledroppeddatabasetest-1257", "restorabledroppeddatabasetest-2389", "restorabledroppeddatabasetest-7654,131403269876900000", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RestorableDroppedSQLPool = armsynapse.RestorableDroppedSQLPool{ - // Name: to.Ptr("restorabledroppeddatabasetest-7654,131403269876900000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/restorableDroppedSqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/restorabledroppeddatabasetest-1257/providers/Microsoft.Synapse/workspaces/restorabledroppeddatabasetest-2389/restorableDroppedSqlPools/restorabledroppeddatabasetest-7654,131403269876900000"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.RestorableDroppedSQLPoolProperties{ - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // DatabaseName: to.Ptr("restorabledroppeddatabasetest-7654"), - // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.69Z"); return t}()), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-20T02:49:47.69Z"); return t}()), - // Edition: to.Ptr("Datawarehouse"), - // MaxSizeBytes: to.Ptr("2147483648"), - // ServiceLevelObjective: to.Ptr("DW100c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlpoolList.json -func ExampleRestorableDroppedSQLPoolsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRestorableDroppedSQLPoolsClient().NewListByWorkspacePager("restorabledroppeddatabasetest-1349", "restorabledroppeddatabasetest-1840", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RestorableDroppedSQLPoolListResult = armsynapse.RestorableDroppedSQLPoolListResult{ - // Value: []*armsynapse.RestorableDroppedSQLPool{ - // { - // Name: to.Ptr("restorabledroppeddatabasetest-1345,131403269876900000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/restorableDroppedSqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/restorabledroppeddatabasetest-1349/providers/Microsoft.Synapse/workspaces/restorabledroppeddatabasetest-1840/restorableDroppedSqlPools/restorabledroppeddatabasetest-1345,131403269876900000"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.RestorableDroppedSQLPoolProperties{ - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // DatabaseName: to.Ptr("restorabledroppeddatabasetest-1345"), - // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.69Z"); return t}()), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-20T02:49:47.69Z"); return t}()), - // Edition: to.Ptr("Basic"), - // MaxSizeBytes: to.Ptr("2147483648"), - // ServiceLevelObjective: to.Ptr("Basic"), - // }, - // }, - // { - // Name: to.Ptr("restorabledroppeddatabasetest-2764,131403249684030000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/restorableDroppedSqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/restorabledroppeddatabasetest-1349/providers/Microsoft.Synapse/workspaces/restorabledroppeddatabasetest-1840/restorableDroppedSqlPools/restorabledroppeddatabasetest-2764,131403249684030000"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.RestorableDroppedSQLPoolProperties{ - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-10T00:56:19.2Z"); return t}()), - // DatabaseName: to.Ptr("restorabledroppeddatabasetest-2764"), - // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:16:08.403Z"); return t}()), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-21T02:49:47.69Z"); return t}()), - // Edition: to.Ptr("Standard"), - // MaxSizeBytes: to.Ptr("268435456000"), - // ServiceLevelObjective: to.Ptr("S0"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client_example_test.go deleted file mode 100644 index 602155a87242..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client_example_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfiguration_Get.json -func ExampleSparkConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSparkConfigurationClient().Get(ctx, "exampleResourceGroup", "exampleSparkConfigurationName", "exampleWorkspace", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SparkConfigurationResource = armsynapse.SparkConfigurationResource{ - // Name: to.Ptr("exampleSparkConfigurationName"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sparkconfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/sparkconfigurations/exampleSparkConfigurationName"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // Properties: &armsynapse.SparkConfigurationInfo{ - // Description: to.Ptr("test sparkconfiguration description"), - // Annotations: []*string{ - // to.Ptr("testAnnotation1"), - // to.Ptr("testAnnotation2")}, - // ConfigMergeRule: map[string]*string{ - // "allowedNextOperations.spark.key1": to.Ptr("replace,delete"), - // "allowedNextOperations.spark.key2": to.Ptr("replace,delete,append"), - // "currentOperation.append.separator.spark.key1": to.Ptr("space"), - // "currentOperation.append.separator.spark.key2": to.Ptr("comma"), - // "currentOperation.spark.key1": to.Ptr("append"), - // "currentOperation.spark.key2": to.Ptr("append"), - // }, - // Configs: map[string]*string{ - // "prop1": to.Ptr("true"), - // "prop2": to.Ptr("true"), - // "prop3": to.Ptr("123"), - // }, - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // CreatedBy: to.Ptr("test@microsoft.com"), - // Notes: to.Ptr("testNotes"), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client_example_test.go deleted file mode 100644 index 3f99551282e1..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client_example_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfigurations_ListByWorkspace.json -func ExampleSparkConfigurationsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSparkConfigurationsClient().NewListByWorkspacePager("exampleResourceGroup", "exampleWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SparkConfigurationListResponse = armsynapse.SparkConfigurationListResponse{ - // Value: []*armsynapse.SparkConfigurationResource{ - // { - // Name: to.Ptr("exampleSparkConfigurationName1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sparkconfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/sparkconfigurations/exampleSparkConfigurationName"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // Properties: &armsynapse.SparkConfigurationInfo{ - // Description: to.Ptr("test sparkconfiguration description1"), - // Annotations: []*string{ - // to.Ptr("testAnnotation1"), - // to.Ptr("testAnnotation2")}, - // ConfigMergeRule: map[string]*string{ - // "allowedNextOperations.spark.key1": to.Ptr("replace,delete"), - // "allowedNextOperations.spark.key2": to.Ptr("replace,delete,append"), - // "currentOperation.append.separator.spark.key1": to.Ptr("space"), - // "currentOperation.append.separator.spark.key2": to.Ptr("comma"), - // "currentOperation.spark.key1": to.Ptr("append"), - // "currentOperation.spark.key2": to.Ptr("append"), - // }, - // Configs: map[string]*string{ - // "prop1": to.Ptr("true"), - // "prop2": to.Ptr("true"), - // "prop3": to.Ptr("123"), - // }, - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // CreatedBy: to.Ptr("test@microsoft.com"), - // Notes: to.Ptr("testNotes"), - // }, - // }, - // { - // Name: to.Ptr("exampleSparkConfigurationName2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sparkconfigurations"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/sparkconfigurations/exampleSparkConfigurationName2"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // Properties: &armsynapse.SparkConfigurationInfo{ - // Description: to.Ptr("test sparkconfiguration description2"), - // Annotations: []*string{ - // to.Ptr("testAnnotation1"), - // to.Ptr("testAnnotation2")}, - // ConfigMergeRule: map[string]*string{ - // "allowedNextOperations.spark.key1": to.Ptr("replace,delete"), - // "allowedNextOperations.spark.key2": to.Ptr("replace,delete,append"), - // "currentOperation.append.separator.spark.key1": to.Ptr("space"), - // "currentOperation.append.separator.spark.key2": to.Ptr("comma"), - // "currentOperation.spark.key1": to.Ptr("append"), - // "currentOperation.spark.key2": to.Ptr("append"), - // }, - // Configs: map[string]*string{ - // "prop1": to.Ptr("true"), - // "prop2": to.Ptr("true"), - // "prop3": to.Ptr("123"), - // }, - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00Z"); return t}()), - // CreatedBy: to.Ptr("test@microsoft.com"), - // Notes: to.Ptr("testNotes"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client_example_test.go deleted file mode 100644 index b7d98cdcb80b..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client_example_test.go +++ /dev/null @@ -1,195 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolBlobAuditing.json -func ExampleSQLPoolBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolBlobAuditingPoliciesClient().Get(ctx, "blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolBlobAuditingPolicy = armsynapse.SQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Synapse/workspaces/blobauditingtest-2080/sqlPools/testdb"), - // Kind: to.Ptr("V12"), - // Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithAllParameters.json -func ExampleSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate_createOrUpdateADatabasesBlobAuditingPolicyWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsynapse.SQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("DATABASE_LOGOUT_GROUP"), - to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), - to.Ptr("UPDATE on database::TestDatabaseName by public")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolBlobAuditingPolicy = armsynapse.SQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Synapse/workspaces/blobauditingtest-6440/sqlPools/testdb"), - // Kind: to.Ptr("V12"), - // Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("DATABASE_LOGOUT_GROUP"), - // to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), - // to.Ptr("UPDATE on database::TestDatabaseName by public")}, - // IsAzureMonitorTargetEnabled: to.Ptr(true), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithMinParameters.json -func ExampleSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate_createOrUpdateADatabasesBlobAuditingPolicyWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsynapse.SQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolBlobAuditingPolicy = armsynapse.SQLPoolBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Synapse/workspaces/blobauditingtest-6440/sqlPools/testdb"), - // Kind: to.Ptr("V12"), - // Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolAuditingSettingsList.json -func ExampleSQLPoolBlobAuditingPoliciesClient_NewListBySQLPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolBlobAuditingPoliciesClient().NewListBySQLPoolPager("blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolBlobAuditingPolicyListResult = armsynapse.SQLPoolBlobAuditingPolicyListResult{ - // Value: []*armsynapse.SQLPoolBlobAuditingPolicy{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Synapse/workspaces/blobauditingtest-2080/sqlPools/testdb"), - // Kind: to.Ptr("V12"), - // Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client_example_test.go deleted file mode 100644 index e34db00e0e9d..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client_example_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolColumnGet.json -func ExampleSQLPoolColumnsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolColumnsClient().Get(ctx, "myRG", "serverName", "myDatabase", "dbo", "table1", "column1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolColumn = armsynapse.SQLPoolColumn{ - // Name: to.Ptr("column1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1/columns/column1"), - // Properties: &armsynapse.SQLPoolColumnProperties{ - // ColumnType: to.Ptr(armsynapse.ColumnDataTypeBit), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client_example_test.go deleted file mode 100644 index ee08db909a22..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client_example_test.go +++ /dev/null @@ -1,53 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolConnectionPolicy.json -func ExampleSQLPoolConnectionPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolConnectionPoliciesClient().Get(ctx, "blobauditingtest-6852", "blobauditingtest-2080", "testdb", armsynapse.ConnectionPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolConnectionPolicy = armsynapse.SQLPoolConnectionPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/connectionPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Synapse/workspaces/blobauditingtest-2080/sqlPools/testdb/connectionPolicies/default"), - // Location: to.Ptr("West US"), - // Properties: &armsynapse.SQLPoolConnectionPolicyProperties{ - // ProxyDNSName: to.Ptr("blobauditingtest-2080.database.secure.windows.net"), - // ProxyPort: to.Ptr("1433"), - // RedirectionState: to.Ptr("Disabled"), - // SecurityEnabledAccess: to.Ptr("Optional"), - // State: to.Ptr("New"), - // UseServerDefault: to.Ptr("Enabled"), - // Visibility: to.Ptr("Visible"), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client_example_test.go deleted file mode 100644 index eddc3272c6c1..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client_example_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolUserActivity.json -func ExampleSQLPoolDataWarehouseUserActivitiesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolDataWarehouseUserActivitiesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsynapse.DataWarehouseUserActivityNameCurrent, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataWarehouseUserActivities = armsynapse.DataWarehouseUserActivities{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/dataWarehouseUserActivities"), - // ID: to.Ptr("subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/dwdb01/dataWarehouseUserActivities/current"), - // Properties: &armsynapse.DataWarehouseUserActivitiesProperties{ - // ActiveQueriesCount: to.Ptr[int32](0), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client_example_test.go deleted file mode 100644 index c593024ad9b8..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client_example_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolGeoBackupPolicies_List.json -func ExampleSQLPoolGeoBackupPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolGeoBackupPoliciesClient().NewListPager("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.GeoBackupPolicyListResult = armsynapse.GeoBackupPolicyListResult{ - // Value: []*armsynapse.GeoBackupPolicy{ - // { - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/geoBackupPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Synapse/workspaces/sqlcrudtest-5961/sqlPools/testdw/geoBackupPolicies/Default"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.GeoBackupPolicyProperties{ - // State: to.Ptr(armsynapse.GeoBackupPolicyStateEnabled), - // StorageType: to.Ptr("Premium"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateGeoBackupPolicies.json -func ExampleSQLPoolGeoBackupPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolGeoBackupPoliciesClient().CreateOrUpdate(ctx, "testrg", "testws", "testdw", armsynapse.GeoBackupPolicyNameDefault, armsynapse.GeoBackupPolicy{ - Properties: &armsynapse.GeoBackupPolicyProperties{ - State: to.Ptr(armsynapse.GeoBackupPolicyStateEnabled), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GeoBackupPolicy = armsynapse.GeoBackupPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlpools/geoBackupPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Synapse/workspaces/testws/databases/testdw/geoBackupPolicies/Default"), - // Properties: &armsynapse.GeoBackupPolicyProperties{ - // State: to.Ptr(armsynapse.GeoBackupPolicyStateEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolGeoBackupPolicy.json -func ExampleSQLPoolGeoBackupPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolGeoBackupPoliciesClient().Get(ctx, "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", armsynapse.GeoBackupPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GeoBackupPolicy = armsynapse.GeoBackupPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/geoBackupPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Synapse/workspaces/sqlcrudtest-5961/sqlPools/testdw/geoBackupPolicies/Default"), - // Location: to.Ptr("Central US"), - // Properties: &armsynapse.GeoBackupPolicyProperties{ - // State: to.Ptr(armsynapse.GeoBackupPolicyStateEnabled), - // StorageType: to.Ptr("Premium"), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client_example_test.go deleted file mode 100644 index 927d993e3296..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client_example_test.go +++ /dev/null @@ -1,57 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindowOptions.json -func ExampleSQLPoolMaintenanceWindowOptionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolMaintenanceWindowOptionsClient().Get(ctx, "samplerg", "testworkspace", "testsp", "current", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MaintenanceWindowOptions = armsynapse.MaintenanceWindowOptions{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/maintenanceWindowOptions"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/samplerg/providers/Microsoft.Synapse/workspaces/testworkspace/sqlPools/testsp/maintenanceWindowOptions/current"), - // Properties: &armsynapse.MaintenanceWindowOptionsProperties{ - // AllowMultipleMaintenanceWindowsPerCycle: to.Ptr(true), - // DefaultDurationInMinutes: to.Ptr[int32](120), - // IsEnabled: to.Ptr(true), - // MaintenanceWindowCycles: []*armsynapse.MaintenanceWindowTimeRange{ - // { - // DayOfWeek: to.Ptr(armsynapse.DayOfWeekSaturday), - // Duration: to.Ptr("PT60M"), - // StartTime: to.Ptr("00:00:00"), - // }}, - // MinCycles: to.Ptr[int32](2), - // MinDurationInMinutes: to.Ptr[int32](60), - // TimeGranularityInMinutes: to.Ptr[int32](5), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client_example_test.go deleted file mode 100644 index deb77c2f4517..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client_example_test.go +++ /dev/null @@ -1,78 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindows.json -func ExampleSQLPoolMaintenanceWindowsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolMaintenanceWindowsClient().Get(ctx, "samplerg", "testworkspace", "testsp", "current", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MaintenanceWindows = armsynapse.MaintenanceWindows{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/maintenancewindows"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/samplerg/providers/Microsoft.Synapse/workspaces/testworkspace/sqlPools/testsp/maintenancewindows/current"), - // Properties: &armsynapse.MaintenanceWindowsProperties{ - // TimeRanges: []*armsynapse.MaintenanceWindowTimeRange{ - // { - // DayOfWeek: to.Ptr(armsynapse.DayOfWeekSaturday), - // Duration: to.Ptr("PT60M"), - // StartTime: to.Ptr("00:00:00"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateMaintenanceWindows.json -func ExampleSQLPoolMaintenanceWindowsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolMaintenanceWindowsClient().CreateOrUpdate(ctx, "samplerg", "testworkspace", "testsp", "current", armsynapse.MaintenanceWindows{ - Properties: &armsynapse.MaintenanceWindowsProperties{ - TimeRanges: []*armsynapse.MaintenanceWindowTimeRange{ - { - DayOfWeek: to.Ptr(armsynapse.DayOfWeekSaturday), - Duration: to.Ptr("PT60M"), - StartTime: to.Ptr("00:00:00"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client_example_test.go deleted file mode 100644 index ebdc9c0ad756..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client_example_test.go +++ /dev/null @@ -1,79 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolMetadataSyncConfig.json -func ExampleSQLPoolMetadataSyncConfigsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolMetadataSyncConfigsClient().Get(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MetadataSyncConfig = armsynapse.MetadataSyncConfig{ - // Name: to.Ptr("config"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools/metadataSync/config"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool/metadataSync/config"), - // Properties: &armsynapse.MetadataSyncConfigProperties{ - // Enabled: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolMetadataSyncConfig.json -func ExampleSQLPoolMetadataSyncConfigsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolMetadataSyncConfigsClient().Create(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", armsynapse.MetadataSyncConfig{ - Properties: &armsynapse.MetadataSyncConfigProperties{ - Enabled: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MetadataSyncConfig = armsynapse.MetadataSyncConfig{ - // Name: to.Ptr("config"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/bigDataPools/metadataSync/config"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/bigDataPools/ExamplePool/metadataSync/config"), - // Properties: &armsynapse.MetadataSyncConfigProperties{ - // Enabled: to.Ptr(true), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go index 0b3a900e95b1..41cd7757a841 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go @@ -79,7 +79,7 @@ func (client *SQLPoolOperationResultsClient) getLocationHeaderResult(ctx context if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { return nil, runtime.NewResponseError(resp) } return resp, nil diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client_example_test.go deleted file mode 100644 index bc57ef3f2395..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client_example_test.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeaderResultWithSqlPool.json -func ExampleSQLPoolOperationResultsClient_BeginGetLocationHeaderResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolOperationResultsClient().BeginGetLocationHeaderResult(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", "fedcba98-7654-4210-fedc-ba9876543210", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("SampleSQLPool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg_ursa/providers/Microsoft.Synapse/workspaces/ursascaneastus/sqlPools/SampleSQLPool"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-25T09:22:46.68Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](263882790666240), - // Status: to.Ptr("Paused"), - // }, - // SKU: &armsynapse.SKU{ - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client_example_test.go deleted file mode 100644 index b684204934cc..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client_example_test.go +++ /dev/null @@ -1,80 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolOperations.json -func ExampleSQLPoolOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolOperationsClient().NewListPager("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolBlobAuditingPolicySQLPoolOperationListResult = armsynapse.SQLPoolBlobAuditingPolicySQLPoolOperationListResult{ - // Value: []*armsynapse.SQLPoolOperation{ - // { - // Name: to.Ptr("11111111-1111-1111-1111-111111111111"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/operations"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Synapse/workspaces/sqlcrudtest-4645/sqlPools/testdb/operations/11111111-1111-1111-1111-111111111111"), - // Properties: &armsynapse.SQLPoolOperationProperties{ - // Description: to.Ptr("UpdateLogicalDatabase on 'testdb', target ServiceLevelObjective S3"), - // DatabaseName: to.Ptr("testdb"), - // EstimatedCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T13:10:10Z"); return t}()), - // IsCancellable: to.Ptr(false), - // Operation: to.Ptr("UpdateLogicalDatabase"), - // OperationFriendlyName: to.Ptr("ALTER DATABASE"), - // PercentComplete: to.Ptr[int32](100), - // ServerName: to.Ptr("sqlcrudtest-4645"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T09:10:08.10Z"); return t}()), - // State: to.Ptr(armsynapse.ManagementOperationStateSucceeded), - // }, - // }, - // { - // Name: to.Ptr("55555555-5555-5555-5555-555555555555"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/operations"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Synapse/workspaces/sqlcrudtest-4645/sqlPools/testdb/operations/55555555-5555-5555-5555-555555555555"), - // Properties: &armsynapse.SQLPoolOperationProperties{ - // Description: to.Ptr("UpdateLogicalDatabase on 'testdb', target ServiceLevelObjective S3"), - // DatabaseName: to.Ptr("testdb"), - // EstimatedCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T13:10:10Z"); return t}()), - // IsCancellable: to.Ptr(true), - // Operation: to.Ptr("UpdateLogicalDatabase"), - // OperationFriendlyName: to.Ptr("ALTER DATABASE"), - // PercentComplete: to.Ptr[int32](19), - // ServerName: to.Ptr("sqlcrudtest-4645"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T10:10:08.10Z"); return t}()), - // State: to.Ptr(armsynapse.ManagementOperationStateInProgress), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client_example_test.go deleted file mode 100644 index 4c1517c0a230..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client_example_test.go +++ /dev/null @@ -1,62 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsRecommendedUpdate.json -func ExampleSQLPoolRecommendedSensitivityLabelsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolRecommendedSensitivityLabelsClient().Update(ctx, "myRG", "myWorkspace", "mySqlPool", armsynapse.RecommendedSensitivityLabelUpdateList{ - Operations: []*armsynapse.RecommendedSensitivityLabelUpdate{ - { - Properties: &armsynapse.RecommendedSensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column1"), - Op: to.Ptr(armsynapse.RecommendedSensitivityLabelUpdateKindEnable), - Table: to.Ptr("table1"), - }, - }, - { - Properties: &armsynapse.RecommendedSensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column2"), - Op: to.Ptr(armsynapse.RecommendedSensitivityLabelUpdateKindEnable), - Table: to.Ptr("table2"), - }, - }, - { - Properties: &armsynapse.RecommendedSensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column3"), - Op: to.Ptr(armsynapse.RecommendedSensitivityLabelUpdateKindDisable), - Table: to.Ptr("table1"), - }, - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client_example_test.go deleted file mode 100644 index f3142df5fec5..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client_example_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolReplicationLinks.json -func ExampleSQLPoolReplicationLinksClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolReplicationLinksClient().NewListPager("sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ReplicationLinkListResult = armsynapse.ReplicationLinkListResult{ - // Value: []*armsynapse.ReplicationLink{ - // { - // Name: to.Ptr("5b301b68-03f6-4b26-b0f4-73ebb8634238"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/replicationLinks"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6440/sqlPools/testdb/replicationLinks/5b301b68-03f6-4b26-b0f4-73ebb8634238"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.ReplicationLinkProperties{ - // IsTerminationAllowed: to.Ptr(true), - // PartnerDatabase: to.Ptr("testdb"), - // PartnerLocation: to.Ptr("Japan East"), - // PartnerRole: to.Ptr(armsynapse.ReplicationRolePrimary), - // PartnerServer: to.Ptr("sqlcrudtest-5961"), - // PercentComplete: to.Ptr[int32](100), - // ReplicationMode: to.Ptr("ASYNC"), - // ReplicationState: to.Ptr(armsynapse.ReplicationStateCATCHUP), - // Role: to.Ptr(armsynapse.ReplicationRoleSecondary), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:44:27.117Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolReplicationLinks_GetByName.json -func ExampleSQLPoolReplicationLinksClient_GetByName() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolReplicationLinksClient().GetByName(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", "5b301b68-03f6-4b26-b0f4-73ebb8634238", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ReplicationLink = armsynapse.ReplicationLink{ - // Name: to.Ptr("5b301b68-03f6-4b26-b0f4-73ebb8634238"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/replicationLinks"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6440/sqlPools/testdb/replicationLinks/5b301b68-03f6-4b26-b0f4-73ebb8634238"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.ReplicationLinkProperties{ - // IsTerminationAllowed: to.Ptr(true), - // PartnerDatabase: to.Ptr("testdb"), - // PartnerLocation: to.Ptr("Japan East"), - // PartnerRole: to.Ptr(armsynapse.ReplicationRolePrimary), - // PartnerServer: to.Ptr("sqlcrudtest-5961"), - // PercentComplete: to.Ptr[int32](100), - // ReplicationMode: to.Ptr("ASYNC"), - // ReplicationState: to.Ptr(armsynapse.ReplicationStateCATCHUP), - // Role: to.Ptr(armsynapse.ReplicationRoleSecondary), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:44:27.117Z"); return t}()), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client_example_test.go deleted file mode 100644 index 7421816708d4..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client_example_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolRestorePoints.json -func ExampleSQLPoolRestorePointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolRestorePointsClient().NewListPager("Default-SQL-SouthEastAsia", "testserver", "testDatabase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RestorePointListResult = armsynapse.RestorePointListResult{ - // Value: []*armsynapse.RestorePoint{ - // { - // Name: to.Ptr("131546477590000000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Synapse/workspaces/testserver/sqlPools/testDatabase/restorePoints/131546477590000000"), - // Location: to.Ptr("japaneast"), - // Properties: &armsynapse.RestorePointProperties{ - // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), - // RestorePointLabel: to.Ptr("mylabel1"), - // RestorePointType: to.Ptr(armsynapse.RestorePointTypeDISCRETE), - // }, - // }, - // { - // Name: to.Ptr("131553636140000000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Synapse/workspaces/testserver/sqlPools/testDatabase/restorePoints/131553636140000000"), - // Location: to.Ptr("japaneast"), - // Properties: &armsynapse.RestorePointProperties{ - // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T03:40:14Z"); return t}()), - // RestorePointLabel: to.Ptr("mylabel2"), - // RestorePointType: to.Ptr(armsynapse.RestorePointTypeDISCRETE), - // }, - // }, - // { - // Name: to.Ptr("131553619750000000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Synapse/workspaces/testserver/sqlPools/testDatabase/restorePoints/131553619750000000"), - // Location: to.Ptr("japaneast"), - // Properties: &armsynapse.RestorePointProperties{ - // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T03:12:55Z"); return t}()), - // RestorePointType: to.Ptr(armsynapse.RestorePointTypeDISCRETE), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolRestorePoints.json -func ExampleSQLPoolRestorePointsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolRestorePointsClient().BeginCreate(ctx, "Default-SQL-SouthEastAsia", "testserver", "testDatabase", armsynapse.CreateSQLPoolRestorePointDefinition{ - RestorePointLabel: to.Ptr("mylabel"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RestorePoint = armsynapse.RestorePoint{ - // Name: to.Ptr("131546477590000000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Synapse/workspaces/testserver/sqlPools/testDatabase/restorePoints/131546477590000000"), - // Location: to.Ptr("japaneast"), - // Properties: &armsynapse.RestorePointProperties{ - // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), - // RestorePointLabel: to.Ptr("mylabel"), - // RestorePointType: to.Ptr(armsynapse.RestorePointTypeDISCRETE), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsGet.json -func ExampleSQLPoolRestorePointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolRestorePointsClient().Get(ctx, "Default-SQL-SouthEastAsia", "testws", "testpool", "131546477590000000", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RestorePoint = armsynapse.RestorePoint{ - // Name: to.Ptr("131546477590000000"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/restorePoints"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Synapse/workspaces/testws/sqlPools/testpool/restorePoints/131546477590000000"), - // Location: to.Ptr("japaneast"), - // Properties: &armsynapse.RestorePointProperties{ - // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), - // RestorePointLabel: to.Ptr("mylabel"), - // RestorePointType: to.Ptr(armsynapse.RestorePointTypeDISCRETE), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsDelete.json -func ExampleSQLPoolRestorePointsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolRestorePointsClient().Delete(ctx, "Default-SQL-SouthEastAsia", "testws", "testpool", "131546477590000000", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpools_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpools_client_example_test.go deleted file mode 100644 index 082061f5c229..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpools_client_example_test.go +++ /dev/null @@ -1,486 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPool.json -func ExampleSQLPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolsClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("sqlcrudtest-9187"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187"), - // Location: to.Ptr("Japan East"), - // Tags: map[string]*string{ - // "tagKey1": to.Ptr("TagValue1"), - // }, - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateSqlPool.json -func ExampleSQLPoolsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolsClient().BeginUpdate(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", armsynapse.SQLPoolPatchInfo{ - Location: to.Ptr("West US 2"), - Properties: &armsynapse.SQLPoolResourceProperties{ - Collation: to.Ptr(""), - MaxSizeBytes: to.Ptr[int64](0), - RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00.000Z"); return t }()), - }, - SKU: &armsynapse.SKU{ - Name: to.Ptr(""), - Tier: to.Ptr(""), - }, - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("ExampleSqlPool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspaces/sqlPools/ExampleSqlPool"), - // Location: to.Ptr("West US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr(""), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00.000Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](0), - // ProvisioningState: to.Ptr("Succeeded"), - // RecoverableDatabaseID: to.Ptr(""), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00.000Z"); return t}()), - // Status: to.Ptr("Paused"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr(""), - // Tier: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPool.json -func ExampleSQLPoolsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolsClient().BeginCreate(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", armsynapse.SQLPool{ - Location: to.Ptr("Southeast Asia"), - Tags: map[string]*string{}, - Properties: &armsynapse.SQLPoolResourceProperties{ - Collation: to.Ptr(""), - CreateMode: to.Ptr(armsynapse.CreateMode("")), - MaxSizeBytes: to.Ptr[int64](0), - RecoverableDatabaseID: to.Ptr(""), - SourceDatabaseID: to.Ptr(""), - StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeLRS), - }, - SKU: &armsynapse.SKU{ - Name: to.Ptr(""), - Tier: to.Ptr(""), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("ExampleSqlPool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspaces/sqlPools/ExampleSqlPool"), - // Location: to.Ptr("Southeast Asia"), - // Tags: map[string]*string{ - // }, - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr(""), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00.000Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](0), - // ProvisioningState: to.Ptr("Succeeded"), - // RecoverableDatabaseID: to.Ptr(""), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00.000Z"); return t}()), - // Status: to.Ptr("Paused"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeLRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr(""), - // Tier: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPool.json -func ExampleSQLPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolsClient().BeginDelete(ctx, "ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("ExampleSqlPool"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/sqlPools/ExampleSqlPool"), - // Location: to.Ptr("West US 2"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // Status: to.Ptr("Paused"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspace.json -func ExampleSQLPoolsClient_NewListByWorkspacePager_listSqlAnalyticsPoolsInAWorkspace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolsClient().NewListByWorkspacePager("sqlcrudtest-6845", "sqlcrudtest-7177", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolInfoListResult = armsynapse.SQLPoolInfoListResult{ - // Value: []*armsynapse.SQLPool{ - // { - // Name: to.Ptr("master"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6845/providers/Microsoft.Synapse/workspaces/sqlcrudtest-7177/sqlPools/master"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:59:33.483Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](32212254720), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("GP_Gen5_2"), - // }, - // }, - // { - // Name: to.Ptr("sqlcrudtest-1142"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6845/providers/Microsoft.Synapse/workspaces/sqlcrudtest-7177/sqlPools/sqlcrudtest-1142"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:03:34.04Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // }, - // { - // Name: to.Ptr("sqlcrudtest-2788"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6845/providers/Microsoft.Synapse/workspaces/sqlcrudtest-7177/sqlPools/sqlcrudtest-2788"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:00:21.067Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // }, - // { - // Name: to.Ptr("sqlcrudtest-6877"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6845/providers/Microsoft.Synapse/workspaces/sqlcrudtest-7177/sqlPools/sqlcrudtest-6877"), - // Location: to.Ptr("Southeast Asia"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:02:28.853Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeLRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // }, - // { - // Name: to.Ptr("sqlcrudtest-9888"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6845/providers/Microsoft.Synapse/workspaces/sqlcrudtest-7177/sqlPools/sqlcrudtest-9888"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:01:25.347Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspaceWithFilter.json -func ExampleSQLPoolsClient_NewListByWorkspacePager_listSqlAnalyticsPoolsInAWorkspaceWithFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolsClient().NewListByWorkspacePager("sqlcrudtest-6845", "sqlcrudtest-7177", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolInfoListResult = armsynapse.SQLPoolInfoListResult{ - // Value: []*armsynapse.SQLPool{ - // { - // Name: to.Ptr("master"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6845/providers/Microsoft.Synapse/workspaces/sqlcrudtest-7177/sqlPools/master"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:59:33.483Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](32212254720), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeGRS), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("GP_Gen5_2"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PauseSqlPool.json -func ExampleSQLPoolsClient_BeginPause() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolsClient().BeginPause(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdwdb", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("testdwdb"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/testdwdb"), - // Location: to.Ptr("Japan East"), - // Tags: map[string]*string{ - // "tagKey1": to.Ptr("TagValue1"), - // }, - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ResumeSqlPool.json -func ExampleSQLPoolsClient_BeginResume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolsClient().BeginResume(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPool = armsynapse.SQLPool{ - // Name: to.Ptr("sqlcrudtest-9187"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187"), - // Location: to.Ptr("Japan East"), - // Tags: map[string]*string{ - // "tagKey1": to.Ptr("TagValue1"), - // }, - // Properties: &armsynapse.SQLPoolResourceProperties{ - // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), - // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T00:56:19.2Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // Status: to.Ptr("Online"), - // }, - // SKU: &armsynapse.SKU{ - // Name: to.Ptr("DW100c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RenameSqlPool.json -func ExampleSQLPoolsClient_Rename() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolsClient().Rename(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsynapse.ResourceMoveDefinition{ - ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/newtestdb"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client_example_test.go deleted file mode 100644 index 6cabb3123a0f..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client_example_test.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSchema.json -func ExampleSQLPoolSchemasClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolSchemasClient().NewListPager("myRG", "serverName", "myDatabase", &armsynapse.SQLPoolSchemasClientListOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolSchemaListResult = armsynapse.SQLPoolSchemaListResult{ - // Value: []*armsynapse.SQLPoolSchema{ - // { - // Name: to.Ptr("dbo"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo"), - // }, - // { - // Name: to.Ptr("schema2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/schema2"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSchemaGet.json -func ExampleSQLPoolSchemasClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolSchemasClient().Get(ctx, "myRG", "serverName", "myDatabase", "dbo", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolSchema = armsynapse.SQLPoolSchema{ - // Name: to.Ptr("dbo"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client_example_test.go deleted file mode 100644 index 05b28f53f269..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client_example_test.go +++ /dev/null @@ -1,193 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSecurityAlertPolicies_List.json -func ExampleSQLPoolSecurityAlertPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolSecurityAlertPoliciesClient().NewListPager("securityalert-6852", "securityalert-2080", "testdb", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListSQLPoolSecurityAlertPolicies = armsynapse.ListSQLPoolSecurityAlertPolicies{ - // Value: []*armsynapse.SQLPoolSecurityAlertPolicy{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Synapse/workspaces/securityalert-2080/sqlPools/testdb"), - // Properties: &armsynapse.SecurityAlertPolicyProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-08T00:00:00Z"); return t}()), - // DisabledAlerts: []*string{ - // to.Ptr("Usage_Anomaly")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("test@microsoft.com"), - // to.Ptr("user@microsoft.com")}, - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - // StorageAccountAccessKey: to.Ptr(""), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolSecurityAlert.json -func ExampleSQLPoolSecurityAlertPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolSecurityAlertPoliciesClient().Get(ctx, "securityalert-6852", "securityalert-2080", "testdb", armsynapse.SecurityAlertPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolSecurityAlertPolicy = armsynapse.SQLPoolSecurityAlertPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Synapse/workspaces/securityalert-2080/sqlPools/testdb"), - // Properties: &armsynapse.SecurityAlertPolicyProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-08T00:00:00Z"); return t}()), - // DisabledAlerts: []*string{ - // to.Ptr("Usage_Anomaly")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("test@microsoft.com"), - // to.Ptr("user@microsoft.com")}, - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - // StorageAccountAccessKey: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithAllParameters.json -func ExampleSQLPoolSecurityAlertPoliciesClient_CreateOrUpdate_updateASqlPoolsThreatDetectionPolicyWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolSecurityAlertPoliciesClient().CreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", "testdb", armsynapse.SecurityAlertPolicyNameDefault, armsynapse.SQLPoolSecurityAlertPolicy{ - Properties: &armsynapse.SecurityAlertPolicyProperties{ - DisabledAlerts: []*string{ - to.Ptr("Sql_Injection"), - to.Ptr("Usage_Anomaly")}, - EmailAccountAdmins: to.Ptr(true), - EmailAddresses: []*string{ - to.Ptr("test@microsoft.com"), - to.Ptr("user@microsoft.com")}, - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolSecurityAlertPolicy = armsynapse.SQLPoolSecurityAlertPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Synapse/workspaces/securityalert-6440/sqlPools/testdb"), - // Properties: &armsynapse.SecurityAlertPolicyProperties{ - // DisabledAlerts: []*string{ - // to.Ptr("Sql_Injection"), - // to.Ptr("Usage_Anomaly")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("test@microsoft.com"), - // to.Ptr("user@microsoft.com")}, - // RetentionDays: to.Ptr[int32](6), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - // StorageAccountAccessKey: to.Ptr(""), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithMinParameters.json -func ExampleSQLPoolSecurityAlertPoliciesClient_CreateOrUpdate_updateASqlPoolsThreatDetectionPolicyWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolSecurityAlertPoliciesClient().CreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", "testdb", armsynapse.SecurityAlertPolicyNameDefault, armsynapse.SQLPoolSecurityAlertPolicy{ - Properties: &armsynapse.SecurityAlertPolicyProperties{ - State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolSecurityAlertPolicy = armsynapse.SQLPoolSecurityAlertPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Synapse/workspaces/securityalert-6440/sqlPools/testdb"), - // Properties: &armsynapse.SecurityAlertPolicyProperties{ - // DisabledAlerts: []*string{ - // }, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // }, - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - // StorageAccountAccessKey: to.Ptr(""), - // StorageEndpoint: to.Ptr(""), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client_example_test.go deleted file mode 100644 index 3c34bb923d07..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client_example_test.go +++ /dev/null @@ -1,303 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsSensitivityLabelsWithSourceCurrent.json -func ExampleSQLPoolSensitivityLabelsClient_NewListCurrentPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolSensitivityLabelsClient().NewListCurrentPager("myRG", "myServer", "myDatabase", &armsynapse.SQLPoolSensitivityLabelsClientListCurrentOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SensitivityLabelListResult = armsynapse.SensitivityLabelListResult{ - // Value: []*armsynapse.SensitivityLabel{ - // { - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current"), - // Properties: &armsynapse.SensitivityLabelProperties{ - // InformationType: to.Ptr("Financial"), - // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - // LabelID: to.Ptr("05e6eaa1-075a-4fb4-a732-a92215a2444a"), - // LabelName: to.Ptr("Sensitive"), - // }, - // }, - // { - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/current"), - // Properties: &armsynapse.SensitivityLabelProperties{ - // InformationType: to.Ptr("Email"), - // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - // LabelName: to.Ptr("PII"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsCurrentUpdate.json -func ExampleSQLPoolSensitivityLabelsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolSensitivityLabelsClient().Update(ctx, "myRG", "myWorkspace", "mySqlPool", armsynapse.SensitivityLabelUpdateList{ - Operations: []*armsynapse.SensitivityLabelUpdate{ - { - Properties: &armsynapse.SensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column1"), - Op: to.Ptr(armsynapse.SensitivityLabelUpdateKindSet), - SensitivityLabel: &armsynapse.SensitivityLabel{ - Properties: &armsynapse.SensitivityLabelProperties{ - InformationType: to.Ptr("Financial"), - InformationTypeID: to.Ptr("1D3652D6-422C-4115-82F1-65DAEBC665C8"), - LabelID: to.Ptr("3A477B16-9423-432B-AA97-6069B481CEC3"), - LabelName: to.Ptr("Highly Confidential"), - Rank: to.Ptr(armsynapse.SensitivityLabelRankLow), - }, - }, - Table: to.Ptr("table1"), - }, - }, - { - Properties: &armsynapse.SensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column2"), - Op: to.Ptr(armsynapse.SensitivityLabelUpdateKindSet), - SensitivityLabel: &armsynapse.SensitivityLabel{ - Properties: &armsynapse.SensitivityLabelProperties{ - InformationType: to.Ptr("PhoneNumber"), - InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - LabelName: to.Ptr("PII"), - Rank: to.Ptr(armsynapse.SensitivityLabelRankCritical), - }, - }, - Table: to.Ptr("table2"), - }, - }, - { - Properties: &armsynapse.SensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("Column3"), - Op: to.Ptr(armsynapse.SensitivityLabelUpdateKindRemove), - Table: to.Ptr("Table1"), - }, - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSensitivityLabelsWithSourceRecommended.json -func ExampleSQLPoolSensitivityLabelsClient_NewListRecommendedPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolSensitivityLabelsClient().NewListRecommendedPager("myRG", "myServer", "myDatabase", &armsynapse.SQLPoolSensitivityLabelsClientListRecommendedOptions{IncludeDisabledRecommendations: nil, - SkipToken: nil, - Filter: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SensitivityLabelListResult = armsynapse.SensitivityLabelListResult{ - // Value: []*armsynapse.SensitivityLabel{ - // { - // Name: to.Ptr("recommended"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/recommended"), - // Properties: &armsynapse.SensitivityLabelProperties{ - // InformationType: to.Ptr("Financial"), - // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - // LabelID: to.Ptr("05e6eaa1-075a-4fb4-a732-a92215a2444a"), - // LabelName: to.Ptr("Sensitive"), - // }, - // }, - // { - // Name: to.Ptr("recommended"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended"), - // Properties: &armsynapse.SensitivityLabelProperties{ - // InformationType: to.Ptr("Email"), - // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - // LabelName: to.Ptr("PII"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolColumnSensitivityLabelWithAllParameters.json -func ExampleSQLPoolSensitivityLabelsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolSensitivityLabelsClient().CreateOrUpdate(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", armsynapse.SensitivityLabel{ - Properties: &armsynapse.SensitivityLabelProperties{ - InformationType: to.Ptr("PhoneNumber"), - InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - LabelName: to.Ptr("PII"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SensitivityLabel = armsynapse.SensitivityLabel{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), - // Properties: &armsynapse.SensitivityLabelProperties{ - // InformationType: to.Ptr("PhoneNumber"), - // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - // LabelName: to.Ptr("PII"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolColumnSensitivityLabel.json -func ExampleSQLPoolSensitivityLabelsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolSensitivityLabelsClient().Delete(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolColumnSensitivityLabelGet.json -func ExampleSQLPoolSensitivityLabelsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolSensitivityLabelsClient().Get(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", armsynapse.SensitivityLabelSourceCurrent, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SensitivityLabel = armsynapse.SensitivityLabel{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), - // Properties: &armsynapse.SensitivityLabelProperties{ - // InformationType: to.Ptr("PhoneNumber"), - // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - // LabelName: to.Ptr("PII"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelEnable.json -func ExampleSQLPoolSensitivityLabelsClient_EnableRecommendation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolSensitivityLabelsClient().EnableRecommendation(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelDisable.json -func ExampleSQLPoolSensitivityLabelsClient_DisableRecommendation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolSensitivityLabelsClient().DisableRecommendation(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client_example_test.go deleted file mode 100644 index 9311a5c701f9..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client_example_test.go +++ /dev/null @@ -1,62 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolColumns.json -func ExampleSQLPoolTableColumnsClient_NewListByTableNamePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolTableColumnsClient().NewListByTableNamePager("myRG", "serverName", "myDatabase", "dbo", "table1", &armsynapse.SQLPoolTableColumnsClientListByTableNameOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolColumnListResult = armsynapse.SQLPoolColumnListResult{ - // Value: []*armsynapse.SQLPoolColumn{ - // { - // Name: to.Ptr("col1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1/columns/col1"), - // Properties: &armsynapse.SQLPoolColumnProperties{ - // ColumnType: to.Ptr(armsynapse.ColumnDataTypeNvarchar), - // }, - // }, - // { - // Name: to.Ptr("col2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1/columns/col2"), - // Properties: &armsynapse.SQLPoolColumnProperties{ - // ColumnType: to.Ptr(armsynapse.ColumnDataTypeBit), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client_example_test.go deleted file mode 100644 index 860a029b5277..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client_example_test.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolTables.json -func ExampleSQLPoolTablesClient_NewListBySchemaPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolTablesClient().NewListBySchemaPager("myRG", "serverName", "myDatabase", "dbo", &armsynapse.SQLPoolTablesClientListBySchemaOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolTableListResult = armsynapse.SQLPoolTableListResult{ - // Value: []*armsynapse.SQLPoolTable{ - // { - // Name: to.Ptr("table1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1"), - // }, - // { - // Name: to.Ptr("table2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table2"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolTableGet.json -func ExampleSQLPoolTablesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolTablesClient().Get(ctx, "myRG", "serverName", "myDatabase", "dbo", "table1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolTable = armsynapse.SQLPoolTable{ - // Name: to.Ptr("table1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/schemas/tables"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1"), - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client_example_test.go deleted file mode 100644 index 31248fc85cbd..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client_example_test.go +++ /dev/null @@ -1,118 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryption.json -func ExampleSQLPoolTransparentDataEncryptionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolTransparentDataEncryptionsClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", armsynapse.TransparentDataEncryptionNameCurrent, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TransparentDataEncryption = armsynapse.TransparentDataEncryption{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/transparentDataEncryption/current"), - // Location: to.Ptr("North Europe"), - // Properties: &armsynapse.TransparentDataEncryptionProperties{ - // Status: to.Ptr(armsynapse.TransparentDataEncryptionStatusEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolTransparentDataEncryption.json -func ExampleSQLPoolTransparentDataEncryptionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolTransparentDataEncryptionsClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", armsynapse.TransparentDataEncryptionNameCurrent, armsynapse.TransparentDataEncryption{ - Properties: &armsynapse.TransparentDataEncryptionProperties{ - Status: to.Ptr(armsynapse.TransparentDataEncryptionStatusEnabled), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TransparentDataEncryption = armsynapse.TransparentDataEncryption{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/transparentDataEncryption/current"), - // Location: to.Ptr("North Europe"), - // Properties: &armsynapse.TransparentDataEncryptionProperties{ - // Status: to.Ptr(armsynapse.TransparentDataEncryptionStatusEnabled), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryptionList.json -func ExampleSQLPoolTransparentDataEncryptionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolTransparentDataEncryptionsClient().NewListPager("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TransparentDataEncryptionListResult = armsynapse.TransparentDataEncryptionListResult{ - // Value: []*armsynapse.TransparentDataEncryption{ - // { - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/transparentDataEncryption/current"), - // Location: to.Ptr("North Europe"), - // Properties: &armsynapse.TransparentDataEncryptionProperties{ - // Status: to.Ptr(armsynapse.TransparentDataEncryptionStatusEnabled), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client_example_test.go deleted file mode 100644 index b93edc6856c0..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client_example_test.go +++ /dev/null @@ -1,54 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolUsageMetricsList.json -func ExampleSQLPoolUsagesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolUsagesClient().NewListPager("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolUsageListResult = armsynapse.SQLPoolUsageListResult{ - // Value: []*armsynapse.SQLPoolUsage{ - // { - // Name: to.Ptr("database_size"), - // CurrentValue: to.Ptr[float64](4194304), - // DisplayName: to.Ptr("Database Size"), - // Limit: to.Ptr[float64](268435456000), - // ResourceName: to.Ptr("3481"), - // Unit: to.Ptr("Bytes"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client_example_test.go deleted file mode 100644 index 7a643ff8845d..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client_example_test.go +++ /dev/null @@ -1,144 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentRuleBaseline.json -func ExampleSQLPoolVulnerabilityAssessmentRuleBaselinesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, "VA1001", armsynapse.VulnerabilityAssessmentPolicyBaselineNameDefault, armsynapse.SQLPoolVulnerabilityAssessmentRuleBaseline{ - Properties: &armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineProperties{ - BaselineResults: []*armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineItem{ - { - Result: []*string{ - to.Ptr("userA"), - to.Ptr("SELECT")}, - }, - { - Result: []*string{ - to.Ptr("userB"), - to.Ptr("SELECT")}, - }, - { - Result: []*string{ - to.Ptr("userC"), - to.Ptr("SELECT"), - to.Ptr("tableId_4")}, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessmentRuleBaseline = armsynapse.SQLPoolVulnerabilityAssessmentRuleBaseline{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/rules/baselines"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineProperties{ - // BaselineResults: []*armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineItem{ - // { - // Result: []*string{ - // to.Ptr("userA"), - // to.Ptr("SELECT")}, - // }, - // { - // Result: []*string{ - // to.Ptr("userB"), - // to.Ptr("SELECT")}, - // }, - // { - // Result: []*string{ - // to.Ptr("userC"), - // to.Ptr("SELECT"), - // to.Ptr("tableId_4")}, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessmentRuleBaseline.json -func ExampleSQLPoolVulnerabilityAssessmentRuleBaselinesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, "VA1001", armsynapse.VulnerabilityAssessmentPolicyBaselineNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentRuleBaselineGet.json -func ExampleSQLPoolVulnerabilityAssessmentRuleBaselinesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, "VA1001", armsynapse.VulnerabilityAssessmentPolicyBaselineNameMaster, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessmentRuleBaseline = armsynapse.SQLPoolVulnerabilityAssessmentRuleBaseline{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/rules/baselines"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineProperties{ - // BaselineResults: []*armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineItem{ - // { - // Result: []*string{ - // to.Ptr("userA"), - // to.Ptr("SELECT")}, - // }, - // { - // Result: []*string{ - // to.Ptr("userB"), - // to.Ptr("SELECT")}, - // }, - // { - // Result: []*string{ - // to.Ptr("userC"), - // to.Ptr("SELECT"), - // to.Ptr("tableId_4")}, - // }}, - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client_example_test.go deleted file mode 100644 index 95e17e0cef03..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client_example_test.go +++ /dev/null @@ -1,235 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessments.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolVulnerabilityAssessmentsClient().NewListPager("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SQLPoolVulnerabilityAssessmentListResult = armsynapse.SQLPoolVulnerabilityAssessmentListResult{ - // Value: []*armsynapse.SQLPoolVulnerabilityAssessment{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(true), - // Emails: []*string{ - // to.Ptr("email1@mail.com"), - // to.Ptr("email2@mail.com")}, - // IsEnabled: to.Ptr(true), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolVulnerabilityAssessment.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessment = armsynapse.SQLPoolVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(true), - // Emails: []*string{ - // to.Ptr("email1@mail.com"), - // to.Ptr("email2@mail.com")}, - // IsEnabled: to.Ptr(true), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithAllParameters.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_CreateOrUpdate_createADatabasesVulnerabilityAssessmentWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, armsynapse.SQLPoolVulnerabilityAssessment{ - Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - EmailSubscriptionAdmins: to.Ptr(true), - Emails: []*string{ - to.Ptr("email1@mail.com"), - to.Ptr("email2@mail.com")}, - IsEnabled: to.Ptr(true), - }, - StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessment = armsynapse.SQLPoolVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(true), - // Emails: []*string{ - // to.Ptr("email1@mail.com"), - // to.Ptr("email2@mail.com")}, - // IsEnabled: to.Ptr(true), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateVulnerabilityAssessmentWithStorageAccessKeyAndMinParameters.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_CreateOrUpdate_createADatabasesVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, armsynapse.SQLPoolVulnerabilityAssessment{ - Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessment = armsynapse.SQLPoolVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(false), - // Emails: []*string{ - // }, - // IsEnabled: to.Ptr(true), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithContainerSasKeyAndMinParameters.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_CreateOrUpdate_createADatabasesVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, armsynapse.SQLPoolVulnerabilityAssessment{ - Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessment = armsynapse.SQLPoolVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityaseessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(false), - // Emails: []*string{ - // }, - // IsEnabled: to.Ptr(true), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessment.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSQLPoolVulnerabilityAssessmentsClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client_example_test.go deleted file mode 100644 index b8ad4f8ecf8a..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client_example_test.go +++ /dev/null @@ -1,179 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessmentScanRecords.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolVulnerabilityAssessmentScansClient().NewListPager("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.VulnerabilityAssessmentScanRecordListResult = armsynapse.VulnerabilityAssessmentScanRecordListResult{ - // Value: []*armsynapse.VulnerabilityAssessmentScanRecord{ - // { - // Name: to.Ptr("scan001"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityassessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/scans/scan001"), - // Properties: &armsynapse.VulnerabilityAssessmentScanRecordProperties{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06Z"); return t}()), - // Errors: []*armsynapse.VulnerabilityAssessmentScanError{ - // }, - // NumberOfFailedSecurityChecks: to.Ptr[int32](9), - // ScanID: to.Ptr("scan001"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06Z"); return t}()), - // State: to.Ptr(armsynapse.VulnerabilityAssessmentScanStatePassed), - // TriggerType: to.Ptr(armsynapse.VulnerabilityAssessmentScanTriggerTypeOnDemand), - // }, - // }, - // { - // Name: to.Ptr("scan002"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityassessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/scans/scan002"), - // Properties: &armsynapse.VulnerabilityAssessmentScanRecordProperties{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06Z"); return t}()), - // Errors: []*armsynapse.VulnerabilityAssessmentScanError{ - // }, - // NumberOfFailedSecurityChecks: to.Ptr[int32](9), - // ScanID: to.Ptr("scan002"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06Z"); return t}()), - // State: to.Ptr(armsynapse.VulnerabilityAssessmentScanStateFailed), - // TriggerType: to.Ptr(armsynapse.VulnerabilityAssessmentScanTriggerTypeRecurring), - // }, - // }, - // { - // Name: to.Ptr("scan003"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityassessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/scans/scan003"), - // Properties: &armsynapse.VulnerabilityAssessmentScanRecordProperties{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06Z"); return t}()), - // Errors: []*armsynapse.VulnerabilityAssessmentScanError{ - // { - // Code: to.Ptr("StorageNotFound"), - // Message: to.Ptr("Storage not found"), - // }}, - // NumberOfFailedSecurityChecks: to.Ptr[int32](0), - // ScanID: to.Ptr("scan003"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06Z"); return t}()), - // State: to.Ptr(armsynapse.VulnerabilityAssessmentScanStateFailedToRun), - // TriggerType: to.Ptr(armsynapse.VulnerabilityAssessmentScanTriggerTypeRecurring), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExecuteSqlPoolVulnerabilityAssessmentScans.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_BeginInitiateScan() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolVulnerabilityAssessmentScansClient().BeginInitiateScan(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, "scan01", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExportSqlPoolVulnerabilityAssessmentScan.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_Export() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentScansClient().Export(ctx, "vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, "scan001", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SQLPoolVulnerabilityAssessmentScansExport = armsynapse.SQLPoolVulnerabilityAssessmentScansExport{ - // Name: to.Ptr("scan001"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans/export"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityassessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/scans/scan001/export"), - // Properties: &armsynapse.SQLPoolVulnerabilityAssessmentScanExportProperties{ - // ExportedReportLocation: to.Ptr("https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentScanRecordsGet.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolVulnerabilityAssessmentScansClient().Get(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsynapse.VulnerabilityAssessmentNameDefault, "scan001", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.VulnerabilityAssessmentScanRecord = armsynapse.VulnerabilityAssessmentScanRecord{ - // Name: to.Ptr("scan001"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/vulnerabilityAssessments/scans"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Synapse/workspaces/vulnerabilityassessmenttest-6440/sqlPools/testdb/vulnerabilityAssessments/default/scans/scan001"), - // Properties: &armsynapse.VulnerabilityAssessmentScanRecordProperties{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06Z"); return t}()), - // Errors: []*armsynapse.VulnerabilityAssessmentScanError{ - // }, - // NumberOfFailedSecurityChecks: to.Ptr[int32](9), - // ScanID: to.Ptr("scan001"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06Z"); return t}()), - // State: to.Ptr(armsynapse.VulnerabilityAssessmentScanStatePassed), - // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), - // TriggerType: to.Ptr(armsynapse.VulnerabilityAssessmentScanTriggerTypeOnDemand), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client_example_test.go deleted file mode 100644 index a064c84d5a05..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client_example_test.go +++ /dev/null @@ -1,227 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifier.json -func ExampleSQLPoolWorkloadClassifierClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolWorkloadClassifierClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", "wlm_classifier", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkloadClassifier = armsynapse.WorkloadClassifier{ - // Name: to.Ptr("wlm_classifier"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups/workloadClassifiers"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_classifier"), - // Properties: &armsynapse.WorkloadClassifierProperties{ - // Context: to.Ptr("test_context"), - // EndTime: to.Ptr("14:00"), - // Importance: to.Ptr("high"), - // Label: to.Ptr("test_label"), - // MemberName: to.Ptr("dbo"), - // StartTime: to.Ptr("12:00"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMax.json -func ExampleSQLPoolWorkloadClassifierClient_BeginCreateOrUpdate_createAWorkloadClassifierWithAllPropertiesSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolWorkloadClassifierClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", "wlm_workloadclassifier", armsynapse.WorkloadClassifier{ - Properties: &armsynapse.WorkloadClassifierProperties{ - Context: to.Ptr("test_context"), - EndTime: to.Ptr("14:00"), - Importance: to.Ptr("high"), - Label: to.Ptr("test_label"), - MemberName: to.Ptr("dbo"), - StartTime: to.Ptr("12:00"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkloadClassifier = armsynapse.WorkloadClassifier{ - // Name: to.Ptr("wlm_workloadclassifier"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups/workloadClassifiers"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier"), - // Properties: &armsynapse.WorkloadClassifierProperties{ - // Context: to.Ptr("test_context"), - // EndTime: to.Ptr("14:00"), - // Importance: to.Ptr("high"), - // Label: to.Ptr("test_label"), - // MemberName: to.Ptr("dbo"), - // StartTime: to.Ptr("12:00"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMin.json -func ExampleSQLPoolWorkloadClassifierClient_BeginCreateOrUpdate_createAWorkloadClassifierWithTheRequiredPropertiesSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolWorkloadClassifierClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", "wlm_workloadclassifier", armsynapse.WorkloadClassifier{ - Properties: &armsynapse.WorkloadClassifierProperties{ - MemberName: to.Ptr("dbo"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkloadClassifier = armsynapse.WorkloadClassifier{ - // Name: to.Ptr("wlm_workloadclassifier"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups/workloadClassifiers"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier"), - // Properties: &armsynapse.WorkloadClassifierProperties{ - // Context: to.Ptr(""), - // EndTime: to.Ptr(""), - // Importance: to.Ptr(""), - // Label: to.Ptr(""), - // MemberName: to.Ptr("dbo"), - // StartTime: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroupWorkloadClassifer.json -func ExampleSQLPoolWorkloadClassifierClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolWorkloadClassifierClient().BeginDelete(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", "wlm_workloadclassifier", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifierList.json -func ExampleSQLPoolWorkloadClassifierClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolWorkloadClassifierClient().NewListPager("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkloadClassifierListResult = armsynapse.WorkloadClassifierListResult{ - // Value: []*armsynapse.WorkloadClassifier{ - // { - // Name: to.Ptr("classifier3"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups/workloadClassifiers"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier3"), - // Properties: &armsynapse.WorkloadClassifierProperties{ - // Context: to.Ptr(""), - // EndTime: to.Ptr(""), - // Importance: to.Ptr("high"), - // Label: to.Ptr(""), - // MemberName: to.Ptr("dbo"), - // StartTime: to.Ptr(""), - // }, - // }, - // { - // Name: to.Ptr("classifier1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups/workloadClassifiers"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier1"), - // Properties: &armsynapse.WorkloadClassifierProperties{ - // Context: to.Ptr("test_context"), - // EndTime: to.Ptr("14:00"), - // Importance: to.Ptr("high"), - // Label: to.Ptr("test_label"), - // MemberName: to.Ptr("dbo"), - // StartTime: to.Ptr("12:00"), - // }, - // }, - // { - // Name: to.Ptr("classifier2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups/workloadClassifiers"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier2"), - // Properties: &armsynapse.WorkloadClassifierProperties{ - // Context: to.Ptr(""), - // EndTime: to.Ptr("17:00"), - // Importance: to.Ptr("high"), - // Label: to.Ptr(""), - // MemberName: to.Ptr("dbo"), - // StartTime: to.Ptr("11:00"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client_example_test.go deleted file mode 100644 index bb1e7764feab..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client_example_test.go +++ /dev/null @@ -1,229 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroup.json -func ExampleSQLPoolWorkloadGroupClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSQLPoolWorkloadGroupClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "smallrc", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkloadGroup = armsynapse.WorkloadGroup{ - // Name: to.Ptr("smallrc"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/smallrc"), - // Properties: &armsynapse.WorkloadGroupProperties{ - // Importance: to.Ptr("normal"), - // MaxResourcePercent: to.Ptr[int32](100), - // MaxResourcePercentPerRequest: to.Ptr[float64](3), - // MinResourcePercent: to.Ptr[int32](0), - // MinResourcePercentPerRequest: to.Ptr[float64](3), - // QueryExecutionTimeout: to.Ptr[int32](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMax.json -func ExampleSQLPoolWorkloadGroupClient_BeginCreateOrUpdate_createAWorkloadGroupWithAllPropertiesSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolWorkloadGroupClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "smallrc", armsynapse.WorkloadGroup{ - Properties: &armsynapse.WorkloadGroupProperties{ - Importance: to.Ptr("normal"), - MaxResourcePercent: to.Ptr[int32](100), - MaxResourcePercentPerRequest: to.Ptr[float64](3), - MinResourcePercent: to.Ptr[int32](0), - MinResourcePercentPerRequest: to.Ptr[float64](3), - QueryExecutionTimeout: to.Ptr[int32](0), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkloadGroup = armsynapse.WorkloadGroup{ - // Name: to.Ptr("smallrc"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/workloadGroups/smallrc"), - // Properties: &armsynapse.WorkloadGroupProperties{ - // Importance: to.Ptr("normal"), - // MaxResourcePercent: to.Ptr[int32](100), - // MaxResourcePercentPerRequest: to.Ptr[float64](3), - // MinResourcePercent: to.Ptr[int32](0), - // MinResourcePercentPerRequest: to.Ptr[float64](3), - // QueryExecutionTimeout: to.Ptr[int32](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMin.json -func ExampleSQLPoolWorkloadGroupClient_BeginCreateOrUpdate_createAWorkloadGroupWithTheRequiredPropertiesSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolWorkloadGroupClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "smallrc", armsynapse.WorkloadGroup{ - Properties: &armsynapse.WorkloadGroupProperties{ - MaxResourcePercent: to.Ptr[int32](100), - MinResourcePercent: to.Ptr[int32](0), - MinResourcePercentPerRequest: to.Ptr[float64](3), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkloadGroup = armsynapse.WorkloadGroup{ - // Name: to.Ptr("smallrc"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/workloadGroups/smallrc"), - // Properties: &armsynapse.WorkloadGroupProperties{ - // Importance: to.Ptr("normal"), - // MaxResourcePercent: to.Ptr[int32](100), - // MaxResourcePercentPerRequest: to.Ptr[float64](3), - // MinResourcePercent: to.Ptr[int32](0), - // MinResourcePercentPerRequest: to.Ptr[float64](3), - // QueryExecutionTimeout: to.Ptr[int32](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroup.json -func ExampleSQLPoolWorkloadGroupClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSQLPoolWorkloadGroupClient().BeginDelete(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupList.json -func ExampleSQLPoolWorkloadGroupClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSQLPoolWorkloadGroupClient().NewListPager("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkloadGroupListResult = armsynapse.WorkloadGroupListResult{ - // Value: []*armsynapse.WorkloadGroup{ - // { - // Name: to.Ptr("smallrc"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/smallrc"), - // Properties: &armsynapse.WorkloadGroupProperties{ - // Importance: to.Ptr("normal"), - // MaxResourcePercent: to.Ptr[int32](100), - // MaxResourcePercentPerRequest: to.Ptr[float64](5), - // MinResourcePercent: to.Ptr[int32](0), - // MinResourcePercentPerRequest: to.Ptr[float64](5), - // QueryExecutionTimeout: to.Ptr[int32](0), - // }, - // }, - // { - // Name: to.Ptr("mediumrc"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/mediumrc"), - // Properties: &armsynapse.WorkloadGroupProperties{ - // Importance: to.Ptr("normal"), - // MaxResourcePercent: to.Ptr[int32](100), - // MaxResourcePercentPerRequest: to.Ptr[float64](10), - // MinResourcePercent: to.Ptr[int32](0), - // MinResourcePercentPerRequest: to.Ptr[float64](10), - // QueryExecutionTimeout: to.Ptr[int32](0), - // }, - // }, - // { - // Name: to.Ptr("largerc"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/sqlPools/workloadGroups"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-9187/workloadGroups/largerc"), - // Properties: &armsynapse.WorkloadGroupProperties{ - // Importance: to.Ptr("high"), - // MaxResourcePercent: to.Ptr[int32](100), - // MaxResourcePercentPerRequest: to.Ptr[float64](20), - // MinResourcePercent: to.Ptr[int32](0), - // MinResourcePercentPerRequest: to.Ptr[float64](20), - // QueryExecutionTimeout: to.Ptr[int32](0), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client_example_test.go deleted file mode 100644 index 28e257f38dcc..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json -func ExampleWorkspaceAADAdminsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceAADAdminsClient().Get(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkspaceAADAdminInfo = armsynapse.WorkspaceAADAdminInfo{ - // Name: to.Ptr("activeDirectory"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/administrators/activeDirectory"), - // Properties: &armsynapse.AADAdminProperties{ - // AdministratorType: to.Ptr("ActiveDirectory"), - // Login: to.Ptr("bob@contoso.com"), - // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json -func ExampleWorkspaceAADAdminsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceAADAdminsClient().BeginCreateOrUpdate(ctx, "resourceGroup1", "workspace1", armsynapse.WorkspaceAADAdminInfo{ - Properties: &armsynapse.AADAdminProperties{ - AdministratorType: to.Ptr("ActiveDirectory"), - Login: to.Ptr("bob@contoso.com"), - Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkspaceAADAdminInfo = armsynapse.WorkspaceAADAdminInfo{ - // Name: to.Ptr("activeDirectory"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/administrators/activeDirectory"), - // Properties: &armsynapse.AADAdminProperties{ - // AdministratorType: to.Ptr("ActiveDirectory"), - // Login: to.Ptr("bob@contoso.com"), - // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json -func ExampleWorkspaceAADAdminsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceAADAdminsClient().BeginDelete(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client_example_test.go deleted file mode 100644 index 4f449d451694..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client_example_test.go +++ /dev/null @@ -1,89 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetManagedIdentitySqlControlSettings.json -func ExampleWorkspaceManagedIdentitySQLControlSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedIdentitySQLControlSettingsClient().Get(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagedIdentitySQLControlSettingsModel = armsynapse.ManagedIdentitySQLControlSettingsModel{ - // Name: to.Ptr("default"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/managedIdentitySqlControlSettings/default"), - // Properties: &armsynapse.ManagedIdentitySQLControlSettingsModelProperties{ - // GrantSQLControlToManagedIdentity: &armsynapse.ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity{ - // ActualState: to.Ptr(armsynapse.ActualStateEnabled), - // DesiredState: to.Ptr(armsynapse.DesiredStateEnabled), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateManagedIdentitySqlControlSettings.json -func ExampleWorkspaceManagedIdentitySQLControlSettingsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedIdentitySQLControlSettingsClient().BeginCreateOrUpdate(ctx, "resourceGroup1", "workspace1", armsynapse.ManagedIdentitySQLControlSettingsModel{ - Properties: &armsynapse.ManagedIdentitySQLControlSettingsModelProperties{ - GrantSQLControlToManagedIdentity: &armsynapse.ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity{ - DesiredState: to.Ptr(armsynapse.DesiredStateEnabled), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagedIdentitySQLControlSettingsModel = armsynapse.ManagedIdentitySQLControlSettingsModel{ - // Name: to.Ptr("default"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/managedIdentitySqlControlSettings/default"), - // Properties: &armsynapse.ManagedIdentitySQLControlSettingsModelProperties{ - // GrantSQLControlToManagedIdentity: &armsynapse.ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity{ - // ActualState: to.Ptr(armsynapse.ActualStateEnabling), - // DesiredState: to.Ptr(armsynapse.DesiredStateEnabled), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client_example_test.go deleted file mode 100644 index b896d69ac5d2..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client_example_test.go +++ /dev/null @@ -1,201 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient().Get(ctx, "wsg-7398", "testWorkspace", armsynapse.BlobAuditingPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerBlobAuditingPolicy = armsynapse.ServerBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/auditingSettings/default"), - // Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsDevopsAuditEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithAllParameters.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_BeginCreateOrUpdate_createOrUpdateBlobAuditingPolicyOfWorkspaceSqlServerWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.BlobAuditingPolicyNameDefault, armsynapse.ServerBlobAuditingPolicy{ - Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("BATCH_COMPLETED_GROUP")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - QueueDelayMs: to.Ptr[int32](4000), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerBlobAuditingPolicy = armsynapse.ServerBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/auditingSettings/default"), - // Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsAzureMonitorTargetEnabled: to.Ptr(true), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // QueueDelayMs: to.Ptr[int32](4000), - // RetentionDays: to.Ptr[int32](6), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithMinParameters.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_BeginCreateOrUpdate_createOrUpdateBlobAuditingPolicyOfWorkspaceManagedSqlServerWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.BlobAuditingPolicyNameDefault, armsynapse.ServerBlobAuditingPolicy{ - Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerBlobAuditingPolicy = armsynapse.ServerBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/auditingSettings/default"), - // Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](6), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient().NewListByWorkspacePager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerBlobAuditingPolicyListResult = armsynapse.ServerBlobAuditingPolicyListResult{ - // Value: []*armsynapse.ServerBlobAuditingPolicy{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/auditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/auditingSettings/default"), - // Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_example_test.go deleted file mode 100644 index c8eace26ff95..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_example_test.go +++ /dev/null @@ -1,130 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettings.json -func ExampleWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient().BeginUpdate(ctx, "workspace-6852", "workspace-2080", armsynapse.DedicatedSQLMinimalTLSSettingsNameDefault, armsynapse.DedicatedSQLminimalTLSSettings{ - Properties: &armsynapse.DedicatedSQLminimalTLSSettingsProperties{ - MinimalTLSVersion: to.Ptr("1.1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DedicatedSQLminimalTLSSettings = armsynapse.DedicatedSQLminimalTLSSettings{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/dedicatedSQLminimalTlsSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/dedicatedSQLminimalTlsSettings/default"), - // Properties: &armsynapse.DedicatedSQLminimalTLSSettingsProperties{ - // MinimalTLSVersion: to.Ptr("1.1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettings.json -func ExampleWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient().Get(ctx, "workspace-6852", "workspace-2080", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DedicatedSQLminimalTLSSettings = armsynapse.DedicatedSQLminimalTLSSettings{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/dedicatedSQLminimalTlsSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/dedicatedSQLminimalTlsSettings/default"), - // Location: to.Ptr("eastus"), - // Properties: &armsynapse.DedicatedSQLminimalTLSSettingsProperties{ - // MinimalTLSVersion: to.Ptr("1.1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettings.json -func ExampleWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient().NewListPager("workspace-6852", "workspace-2080", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DedicatedSQLminimalTLSSettingsListResult = armsynapse.DedicatedSQLminimalTLSSettingsListResult{ - // Value: []*armsynapse.DedicatedSQLminimalTLSSettings{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/dedicatedSQLminimalTlsSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/dedicatedSQLminimalTlsSettings/default"), - // Location: to.Ptr("eastus"), - // Properties: &armsynapse.DedicatedSQLminimalTLSSettingsProperties{ - // MinimalTLSVersion: to.Ptr("1.1"), - // }, - // }, - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/dedicatedSQLminimalTlsSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-6852/providers/Microsoft.Synapse/workspaces/workspace-2080/dedicatedSQLminimalTlsSettings/default"), - // Location: to.Ptr("eastus"), - // Properties: &armsynapse.DedicatedSQLminimalTLSSettingsProperties{ - // MinimalTLSVersion: to.Ptr("1.1"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client_example_test.go deleted file mode 100644 index 65eaa1b4197f..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client_example_test.go +++ /dev/null @@ -1,192 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtector.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerEncryptionProtectorClient().Get(ctx, "wsg-7398", "testWorkspace", armsynapse.EncryptionProtectorNameCurrent, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionProtector = armsynapse.EncryptionProtector{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/encryptionProtector/current"), - // Kind: to.Ptr("azurekeyvault"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.EncryptionProtectorProperties{ - // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), - // ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeAzureKeyVault), - // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateKeyVault.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_BeginCreateOrUpdate_updateTheEncryptionProtectorToKeyVault() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerEncryptionProtectorClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.EncryptionProtectorNameCurrent, armsynapse.EncryptionProtector{ - Properties: &armsynapse.EncryptionProtectorProperties{ - ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), - ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeAzureKeyVault), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionProtector = armsynapse.EncryptionProtector{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/encryptionProtector/current"), - // Kind: to.Ptr("azurekeyvault"), - // Location: to.Ptr("West US"), - // Properties: &armsynapse.EncryptionProtectorProperties{ - // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), - // ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeAzureKeyVault), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateServiceManaged.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_BeginCreateOrUpdate_updateTheEncryptionProtectorToServiceManaged() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerEncryptionProtectorClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.EncryptionProtectorNameCurrent, armsynapse.EncryptionProtector{ - Properties: &armsynapse.EncryptionProtectorProperties{ - ServerKeyName: to.Ptr("ServiceManaged"), - ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeServiceManaged), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EncryptionProtector = armsynapse.EncryptionProtector{ - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/encryptionProtector/current"), - // Kind: to.Ptr("servicemanaged"), - // Location: to.Ptr("West US"), - // Properties: &armsynapse.EncryptionProtectorProperties{ - // ServerKeyName: to.Ptr("ServiceManaged"), - // ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeServiceManaged), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtectorList.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerEncryptionProtectorClient().NewListPager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.EncryptionProtectorListResult = armsynapse.EncryptionProtectorListResult{ - // Value: []*armsynapse.EncryptionProtector{ - // { - // Name: to.Ptr("current"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/encryptionProtector"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/encryptionProtector/current"), - // Kind: to.Ptr("azurekeyvault"), - // Location: to.Ptr("Japan East"), - // Properties: &armsynapse.EncryptionProtectorProperties{ - // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), - // ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeAzureKeyVault), - // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorRevalidate.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_BeginRevalidate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerEncryptionProtectorClient().BeginRevalidate(ctx, "wsg-7398", "testWorkspace", armsynapse.EncryptionProtectorNameCurrent, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client_example_test.go deleted file mode 100644 index cf4a09a56568..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client_example_test.go +++ /dev/null @@ -1,203 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlExtendedServerBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient().Get(ctx, "wsg-7398", "testWorkspace", armsynapse.BlobAuditingPolicyNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedServerBlobAuditingPolicy = armsynapse.ExtendedServerBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/extendedAuditingSettings/default"), - // Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExtendedBlobAuditingSettingsWithAllParameters.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_BeginCreateOrUpdate_createOrUpdateWorkspaceManagedSqlServersExtendedBlobAuditingPolicyOfWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.BlobAuditingPolicyNameDefault, armsynapse.ExtendedServerBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("BATCH_COMPLETED_GROUP")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedServerBlobAuditingPolicy = armsynapse.ExtendedServerBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/extendedAuditingSettings/default"), - // Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsAzureMonitorTargetEnabled: to.Ptr(true), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), - // RetentionDays: to.Ptr[int32](6), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExetendedBlobAuditingSettingsWithMinParameters.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_BeginCreateOrUpdate_createOrUpdateWorkspaceManagedSqlServersExtendedBlobAuditingPolicyOfWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.BlobAuditingPolicyNameDefault, armsynapse.ExtendedServerBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ExtendedServerBlobAuditingPolicy = armsynapse.ExtendedServerBlobAuditingPolicy{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/extendedAuditingSettings/default"), - // Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - // to.Ptr("BATCH_COMPLETED_GROUP")}, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // RetentionDays: to.Ptr[int32](6), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerExtendedBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient().NewListByWorkspacePager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ExtendedServerBlobAuditingPolicyListResult = armsynapse.ExtendedServerBlobAuditingPolicyListResult{ - // Value: []*armsynapse.ExtendedServerBlobAuditingPolicy{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/extendedAuditingSettings"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/extendedAuditingSettings/default"), - // Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - // AuditActionsAndGroups: []*string{ - // }, - // IsAzureMonitorTargetEnabled: to.Ptr(false), - // IsStorageSecondaryKeyInUse: to.Ptr(false), - // PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.BlobAuditingPolicyStateDisabled), - // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // StorageEndpoint: to.Ptr(""), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client_example_test.go deleted file mode 100644 index f7cd9f9e7582..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client_example_test.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerRecoverableSqlPool.json -func ExampleWorkspaceManagedSQLServerRecoverableSQLPoolsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient().NewListPager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RecoverableSQLPoolListResult = armsynapse.RecoverableSQLPoolListResult{ - // Value: []*armsynapse.RecoverableSQLPool{ - // { - // Name: to.Ptr("recoverableSqlpools-1235"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/recoverableSqlpools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/recoverableSqlpools/recoverableSqlpools-1235"), - // Properties: &armsynapse.RecoverableSQLPoolProperties{ - // Edition: to.Ptr("Standard"), - // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T01:06:29.78Z"); return t}()), - // ServiceLevelObjective: to.Ptr("S0"), - // }, - // }, - // { - // Name: to.Ptr("recoverableSqlpools-9231"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/recoverableSqlpools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/recoverableSqlpools/recoverableSqlpools-9231"), - // Properties: &armsynapse.RecoverableSQLPoolProperties{ - // Edition: to.Ptr("Premium"), - // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T03:20:31.78Z"); return t}()), - // ServiceLevelObjective: to.Ptr("P1"), - // }, - // }, - // { - // Name: to.Ptr("recoverableSqlpools-0342"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/recoverableSqlpools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/recoverableSqlpools/recoverableSqlpools-0342"), - // Properties: &armsynapse.RecoverableSQLPoolProperties{ - // Edition: to.Ptr("Basic"), - // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T02:06:18.78Z"); return t}()), - // ServiceLevelObjective: to.Ptr("Basic"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerRecoverableSqlPool.json -func ExampleWorkspaceManagedSQLServerRecoverableSQLPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient().Get(ctx, "wsg-7398", "testWorkspace", "recoverableSqlpools-1235", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RecoverableSQLPool = armsynapse.RecoverableSQLPool{ - // Name: to.Ptr("recoverableSqlpools-1235"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/recoverableSqlpools"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/recoverableSqlpools/recoverableSqlpools-1235"), - // Properties: &armsynapse.RecoverableSQLPoolProperties{ - // Edition: to.Ptr("Standard"), - // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T01:06:29.78Z"); return t}()), - // ServiceLevelObjective: to.Ptr("S0"), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client_example_test.go deleted file mode 100644 index c5f5881eeada..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client_example_test.go +++ /dev/null @@ -1,204 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerSecurityAlertPolicy.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient().Get(ctx, "wsg-7398", "testWorkspace", armsynapse.SecurityAlertPolicyNameAutoGeneratedDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerSecurityAlertPolicy = armsynapse.ServerSecurityAlertPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default"), - // Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T04:52:49.52Z"); return t}()), - // DisabledAlerts: []*string{ - // to.Ptr("Access_Anomaly")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("test@microsoft.com;user@microsoft.com")}, - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateDisabled), - // StorageAccountAccessKey: to.Ptr(""), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertWithAllParameters.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_BeginCreateOrUpdate_updateAWorkspaceManagedSqlServersThreatDetectionPolicyWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.SecurityAlertPolicyNameAutoGeneratedDefault, armsynapse.ServerSecurityAlertPolicy{ - Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - DisabledAlerts: []*string{ - to.Ptr("Access_Anomaly"), - to.Ptr("Usage_Anomaly")}, - EmailAccountAdmins: to.Ptr(true), - EmailAddresses: []*string{ - to.Ptr("testSecurityAlert@microsoft.com")}, - RetentionDays: to.Ptr[int32](5), - State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerSecurityAlertPolicy = armsynapse.ServerSecurityAlertPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default"), - // Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T04:52:49.52Z"); return t}()), - // DisabledAlerts: []*string{ - // to.Ptr("Access_Anomaly"), - // to.Ptr("Usage_Anomaly")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("testSecurityAlert@microsoft.com")}, - // RetentionDays: to.Ptr[int32](5), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - // StorageAccountAccessKey: to.Ptr(""), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertCreateWithMinParameters.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_BeginCreateOrUpdate_updateAWorkspaceManagedSqlServersThreatDetectionPolicyWithMinimalParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient().BeginCreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.SecurityAlertPolicyNameAutoGeneratedDefault, armsynapse.ServerSecurityAlertPolicy{ - Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - EmailAccountAdmins: to.Ptr(true), - State: to.Ptr(armsynapse.SecurityAlertPolicyStateDisabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerSecurityAlertPolicy = armsynapse.ServerSecurityAlertPolicy{ - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default"), - // Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T04:52:49.52Z"); return t}()), - // DisabledAlerts: []*string{ - // to.Ptr("")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("")}, - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - // StorageAccountAccessKey: to.Ptr(""), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerSecurityAlertPolicies.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient().NewListPager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerSecurityAlertPolicyListResult = armsynapse.ServerSecurityAlertPolicyListResult{ - // Value: []*armsynapse.ServerSecurityAlertPolicy{ - // { - // Name: to.Ptr("Default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/securityAlertPolicies"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies"), - // Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T04:52:49.52Z"); return t}()), - // DisabledAlerts: []*string{ - // to.Ptr("Access_Anomaly")}, - // EmailAccountAdmins: to.Ptr(true), - // EmailAddresses: []*string{ - // to.Ptr("test@microsoft.com;user@microsoft.com")}, - // RetentionDays: to.Ptr[int32](0), - // State: to.Ptr(armsynapse.SecurityAlertPolicyStateDisabled), - // StorageAccountAccessKey: to.Ptr(""), - // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client_example_test.go deleted file mode 100644 index ad4755aae98c..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client_example_test.go +++ /dev/null @@ -1,62 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerUsages.json -func ExampleWorkspaceManagedSQLServerUsagesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerUsagesClient().NewListPager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerUsageListResult = armsynapse.ServerUsageListResult{ - // Value: []*armsynapse.ServerUsage{ - // { - // Name: to.Ptr("server_dtu_quota"), - // CurrentValue: to.Ptr[float64](0), - // DisplayName: to.Ptr("Database Throughput Unit Quota"), - // Limit: to.Ptr[float64](45000), - // ResourceName: to.Ptr("testWorkspace"), - // Unit: to.Ptr("DTUs"), - // }, - // { - // Name: to.Ptr("server_dtu_quota_current"), - // CurrentValue: to.Ptr[float64](0), - // DisplayName: to.Ptr("Database Throughput Unit Quota"), - // Limit: to.Ptr[float64](45000), - // ResourceName: to.Ptr("testWorkspace"), - // Unit: to.Ptr("DTUs"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client_example_test.go deleted file mode 100644 index bf3698b813c2..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client_example_test.go +++ /dev/null @@ -1,240 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerVulnerabilityAssessment.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient().Get(ctx, "wsg-7398", "testWorkspace", armsynapse.VulnerabilityAssessmentNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerVulnerabilityAssessment = armsynapse.ServerVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default"), - // Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(true), - // Emails: []*string{ - // to.Ptr("email1@mail.com"), - // to.Ptr("email2@mail.com")}, - // IsEnabled: to.Ptr(true), - // }, - // StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceManagedSqlServerVulnerabilityAssessmentWithAllParameters.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_CreateOrUpdate_createOrUpdateAWorkspaceManagedSqlServersVulnerabilityAssessmentWithAllParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.VulnerabilityAssessmentNameDefault, armsynapse.ServerVulnerabilityAssessment{ - Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - EmailSubscriptionAdmins: to.Ptr(true), - Emails: []*string{ - to.Ptr("email1@mail.com"), - to.Ptr("email2@mail.com")}, - IsEnabled: to.Ptr(true), - }, - StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerVulnerabilityAssessment = armsynapse.ServerVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default"), - // Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(true), - // Emails: []*string{ - // to.Ptr("email1@mail.com"), - // to.Ptr("email2@mail.com")}, - // IsEnabled: to.Ptr(true), - // }, - // StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceMangedSqlServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_CreateOrUpdate_createOrUpdateAWorkspaceManagedSqlServersVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.VulnerabilityAssessmentNameDefault, armsynapse.ServerVulnerabilityAssessment{ - Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerVulnerabilityAssessment = armsynapse.ServerVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default"), - // Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(false), - // Emails: []*string{ - // }, - // IsEnabled: to.Ptr(true), - // }, - // StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceMangedSqlServerVulnerabilityAssessmentCreateContainerSasKeyMin.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_CreateOrUpdate_createOrUpdateAWorkspaceManagedSqlServersVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "wsg-7398", "testWorkspace", armsynapse.VulnerabilityAssessmentNameDefault, armsynapse.ServerVulnerabilityAssessment{ - Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerVulnerabilityAssessment = armsynapse.ServerVulnerabilityAssessment{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default"), - // Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(false), - // Emails: []*string{ - // }, - // IsEnabled: to.Ptr(true), - // }, - // StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceManagedSqlServerVulnerabilityAssessment.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient().Delete(ctx, "wsg-7398", "testWorkspace", armsynapse.VulnerabilityAssessmentNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerVulnerabilityAssessmentPolicies.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient().NewListPager("wsg-7398", "testWorkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerVulnerabilityAssessmentListResult = armsynapse.ServerVulnerabilityAssessmentListResult{ - // Value: []*armsynapse.ServerVulnerabilityAssessment{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/vulnerabilityAssessments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default"), - // Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - // RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - // EmailSubscriptionAdmins: to.Ptr(true), - // Emails: []*string{ - // to.Ptr("email1@mail.com"), - // to.Ptr("email2@mail.com")}, - // IsEnabled: to.Ptr(true), - // }, - // StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspaces_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspaces_client_example_test.go deleted file mode 100644 index 1ea2f387c49b..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspaces_client_example_test.go +++ /dev/null @@ -1,558 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInResourceGroup.json -func ExampleWorkspacesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("resourceGroup1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkspaceInfoListResult = armsynapse.WorkspaceInfoListResult{ - // Value: []*armsynapse.Workspace{ - // { - // Name: to.Ptr("workspace1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace1.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace1.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ProvisioningState: to.Ptr("Succeeded"), - // SQLAdministratorLogin: to.Ptr("login"), - // SQLAdministratorLoginPassword: to.Ptr("password"), - // }, - // }, - // { - // Name: to.Ptr("workspace2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace2"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace2.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace2.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ProvisioningState: to.Ptr("Succeeded"), - // SQLAdministratorLogin: to.Ptr("login"), - // SQLAdministratorLoginPassword: to.Ptr("password"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspace.json -func ExampleWorkspacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().Get(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Workspace = armsynapse.Workspace{ - // Name: to.Ptr("workspace1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace1.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace1.sql.projectarcadia.net"), - // }, - // CspWorkspaceAdminProperties: &armsynapse.CspWorkspaceAdminProperties{ - // InitialWorkspaceAdminObjectID: to.Ptr("6c20646f-8050-49ec-b3b1-80a0e58e454d"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // ExtraProperties: map[string]any{ - // "IsScopeEnabled": "false", - // "WorkspaceType": "Normal", - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - // AllowedAADTenantIDsForLinking: []*string{ - // to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - // LinkedAccessCheckOnTargetResource: to.Ptr(false), - // PreventDataExfiltration: to.Ptr(false), - // }, - // PrivateEndpointConnections: []*armsynapse.PrivateEndpointConnection{ - // { - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateEndpointConnections/ExamplePrivateEndpointConnection"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/privateEndpoints/ExamplePrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // ProvisioningState: to.Ptr("Succeeded"), - // PurviewConfiguration: &armsynapse.PurviewConfiguration{ - // PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - // }, - // SQLAdministratorLogin: to.Ptr("login"), - // WorkspaceRepositoryConfiguration: &armsynapse.WorkspaceRepositoryConfiguration{ - // Type: to.Ptr("FactoryGitHubConfiguration"), - // AccountName: to.Ptr("myGithubAccount"), - // CollaborationBranch: to.Ptr("master"), - // HostName: to.Ptr(""), - // ProjectName: to.Ptr("myProject"), - // RepositoryName: to.Ptr("myRepository"), - // RootFolder: to.Ptr("/"), - // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // WorkspaceUID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateWorkspace.json -func ExampleWorkspacesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "resourceGroup1", "workspace1", armsynapse.WorkspacePatchInfo{ - Identity: &armsynapse.ManagedIdentity{ - Type: to.Ptr(armsynapse.ResourceIdentityTypeSystemAssigned), - }, - Properties: &armsynapse.WorkspacePatchProperties{ - Encryption: &armsynapse.EncryptionDetails{ - Cmk: &armsynapse.CustomerManagedKeyDetails{ - Key: &armsynapse.WorkspaceKeyDetails{ - Name: to.Ptr("default"), - KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - }, - }, - }, - ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - AllowedAADTenantIDsForLinking: []*string{ - to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - LinkedAccessCheckOnTargetResource: to.Ptr(false), - PreventDataExfiltration: to.Ptr(false), - }, - PublicNetworkAccess: to.Ptr(armsynapse.WorkspacePublicNetworkAccessEnabled), - PurviewConfiguration: &armsynapse.PurviewConfiguration{ - PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - }, - SQLAdministratorLoginPassword: to.Ptr("password"), - WorkspaceRepositoryConfiguration: &armsynapse.WorkspaceRepositoryConfiguration{ - Type: to.Ptr("FactoryGitHubConfiguration"), - AccountName: to.Ptr("adifferentacount"), - CollaborationBranch: to.Ptr("master"), - HostName: to.Ptr(""), - ProjectName: to.Ptr("myproject"), - RepositoryName: to.Ptr("myrepository"), - RootFolder: to.Ptr("/"), - }, - }, - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Workspace = armsynapse.Workspace{ - // Name: to.Ptr("workspace1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace1.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace1.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // Encryption: &armsynapse.EncryptionDetails{ - // Cmk: &armsynapse.CustomerManagedKeyDetails{ - // Key: &armsynapse.WorkspaceKeyDetails{ - // Name: to.Ptr("default"), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - // }, - // Status: to.Ptr("Consistent"), - // }, - // DoubleEncryptionEnabled: to.Ptr(true), - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - // AllowedAADTenantIDsForLinking: []*string{ - // to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - // LinkedAccessCheckOnTargetResource: to.Ptr(false), - // PreventDataExfiltration: to.Ptr(false), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // PublicNetworkAccess: to.Ptr(armsynapse.WorkspacePublicNetworkAccessEnabled), - // PurviewConfiguration: &armsynapse.PurviewConfiguration{ - // PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - // }, - // SQLAdministratorLogin: to.Ptr("login"), - // WorkspaceUID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspace.json -func ExampleWorkspacesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "resourceGroup1", "workspace1", armsynapse.Workspace{ - Location: to.Ptr("East US"), - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - Identity: &armsynapse.ManagedIdentity{ - Type: to.Ptr(armsynapse.ResourceIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armsynapse.UserAssignedManagedIdentity{ - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1": {}, - }, - }, - Properties: &armsynapse.WorkspaceProperties{ - CspWorkspaceAdminProperties: &armsynapse.CspWorkspaceAdminProperties{ - InitialWorkspaceAdminObjectID: to.Ptr("6c20646f-8050-49ec-b3b1-80a0e58e454d"), - }, - DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - Filesystem: to.Ptr("default"), - }, - Encryption: &armsynapse.EncryptionDetails{ - Cmk: &armsynapse.CustomerManagedKeyDetails{ - KekIdentity: &armsynapse.KekIdentityProperties{ - UseSystemAssignedIdentity: false, - UserAssignedIdentity: to.Ptr("/subscriptions/b64d7b94-73e7-4d36-94b2-7764ea3fd74a/resourcegroups/SynapseCI/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"), - }, - Key: &armsynapse.WorkspaceKeyDetails{ - Name: to.Ptr("default"), - KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - }, - }, - }, - ManagedResourceGroupName: to.Ptr("workspaceManagedResourceGroupUnique"), - ManagedVirtualNetwork: to.Ptr("default"), - ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - AllowedAADTenantIDsForLinking: []*string{ - to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - LinkedAccessCheckOnTargetResource: to.Ptr(false), - PreventDataExfiltration: to.Ptr(false), - }, - PublicNetworkAccess: to.Ptr(armsynapse.WorkspacePublicNetworkAccessEnabled), - PurviewConfiguration: &armsynapse.PurviewConfiguration{ - PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - }, - SQLAdministratorLogin: to.Ptr("login"), - SQLAdministratorLoginPassword: to.Ptr("password"), - WorkspaceRepositoryConfiguration: &armsynapse.WorkspaceRepositoryConfiguration{ - Type: to.Ptr("FactoryGitHubConfiguration"), - AccountName: to.Ptr("mygithubaccount"), - CollaborationBranch: to.Ptr("master"), - HostName: to.Ptr(""), - ProjectName: to.Ptr("myproject"), - RepositoryName: to.Ptr("myrepository"), - RootFolder: to.Ptr("/"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Workspace = armsynapse.Workspace{ - // Name: to.Ptr("workspace1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Identity: &armsynapse.ManagedIdentity{ - // Type: to.Ptr(armsynapse.ResourceIdentityTypeSystemAssignedUserAssigned), - // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // UserAssignedIdentities: map[string]*armsynapse.UserAssignedManagedIdentity{ - // "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1": &armsynapse.UserAssignedManagedIdentity{ - // ClientID: to.Ptr("ffffffff-8888-4444-8888-333333333333"), - // PrincipalID: to.Ptr("eeeeeeee-9999-4444-8888-333333333333"), - // }, - // }, - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace1.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace1.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // Encryption: &armsynapse.EncryptionDetails{ - // Cmk: &armsynapse.CustomerManagedKeyDetails{ - // KekIdentity: &armsynapse.KekIdentityProperties{ - // UseSystemAssignedIdentity: false, - // UserAssignedIdentity: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"), - // }, - // Key: &armsynapse.WorkspaceKeyDetails{ - // Name: to.Ptr("default"), - // KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - // }, - // Status: to.Ptr("Consistent"), - // }, - // DoubleEncryptionEnabled: to.Ptr(true), - // }, - // ManagedResourceGroupName: to.Ptr("workspaceManagedResourceGroupUnique"), - // ManagedVirtualNetwork: to.Ptr("default"), - // ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - // AllowedAADTenantIDsForLinking: []*string{ - // to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - // LinkedAccessCheckOnTargetResource: to.Ptr(false), - // PreventDataExfiltration: to.Ptr(false), - // }, - // PrivateEndpointConnections: []*armsynapse.PrivateEndpointConnection{ - // { - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Synapse/workspaces/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Synapse/workspaces/ExampleWorkspace/privateEndpointConnections/ExamplePrivateEndpointConnection"), - // Properties: &armsynapse.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armsynapse.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/01234567-89ab-4def-0123-456789abcdef/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/privateEndpoints/ExamplePrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // ProvisioningState: to.Ptr("Succeeded"), - // PublicNetworkAccess: to.Ptr(armsynapse.WorkspacePublicNetworkAccessEnabled), - // PurviewConfiguration: &armsynapse.PurviewConfiguration{ - // PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - // }, - // SQLAdministratorLogin: to.Ptr("login"), - // WorkspaceUID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspace.json -func ExampleWorkspacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginDelete(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Workspace = armsynapse.Workspace{ - // Name: to.Ptr("workspace1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace1.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace1.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ProvisioningState: to.Ptr("Succeeded"), - // SQLAdministratorLogin: to.Ptr("login"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInSubscription.json -func ExampleWorkspacesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspacesClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkspaceInfoListResult = armsynapse.WorkspaceInfoListResult{ - // Value: []*armsynapse.Workspace{ - // { - // Name: to.Ptr("workspace1"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace1.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace1.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ProvisioningState: to.Ptr("Succeeded"), - // SQLAdministratorLogin: to.Ptr("login"), - // WorkspaceUID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // }, - // { - // Name: to.Ptr("workspace2"), - // Type: to.Ptr("Microsoft.Synapse/workspaces"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace2"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "key": to.Ptr("value"), - // }, - // Properties: &armsynapse.WorkspaceProperties{ - // ConnectivityEndpoints: map[string]*string{ - // "dev": to.Ptr("workspace2.dev.projectarcadia.net"), - // "sql": to.Ptr("workspace2.sql.projectarcadia.net"), - // }, - // DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - // AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - // Filesystem: to.Ptr("default"), - // }, - // ManagedResourceGroupName: to.Ptr("resourceGroup2"), - // ProvisioningState: to.Ptr("Succeeded"), - // SQLAdministratorLogin: to.Ptr("login"), - // WorkspaceUID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client_example_test.go b/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client_example_test.go deleted file mode 100644 index 8a59c40254b5..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json -func ExampleWorkspaceSQLAADAdminsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceSQLAADAdminsClient().Get(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkspaceAADAdminInfo = armsynapse.WorkspaceAADAdminInfo{ - // Name: to.Ptr("activeDirectory"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/administrators/activeDirectory"), - // Properties: &armsynapse.AADAdminProperties{ - // AdministratorType: to.Ptr("ActiveDirectory"), - // Login: to.Ptr("bob@contoso.com"), - // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json -func ExampleWorkspaceSQLAADAdminsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceSQLAADAdminsClient().BeginCreateOrUpdate(ctx, "resourceGroup1", "workspace1", armsynapse.WorkspaceAADAdminInfo{ - Properties: &armsynapse.AADAdminProperties{ - AdministratorType: to.Ptr("ActiveDirectory"), - Login: to.Ptr("bob@contoso.com"), - Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkspaceAADAdminInfo = armsynapse.WorkspaceAADAdminInfo{ - // Name: to.Ptr("activeDirectory"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/administrators/activeDirectory"), - // Properties: &armsynapse.AADAdminProperties{ - // AdministratorType: to.Ptr("ActiveDirectory"), - // Login: to.Ptr("bob@contoso.com"), - // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json -func ExampleWorkspaceSQLAADAdminsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armsynapse.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspaceSQLAADAdminsClient().BeginDelete(ctx, "resourceGroup1", "workspace1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -}