From fe44be72e5d294d71ceb819cb684708f7f5fa5f5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 8 Jan 2025 09:09:43 +0000 Subject: [PATCH] CodeGen from PR 31774 in Azure/azure-rest-api-specs Merge 2f0b5dbc05f0b95f35d359102de9e2e73b949cc1 into a5e15ea76b123c1fed61c2b3464688edb8d84788 --- .../synapse/armsynapse/CHANGELOG.md | 17 + .../synapse/armsynapse/README.md | 2 +- .../synapse/armsynapse/autorest.md | 6 +- ...onlyauthentications_client_example_test.go | 125 -- .../bigdatapools_client_example_test.go | 367 ---- .../synapse/armsynapse/client_factory.go | 458 +++-- .../synapse/armsynapse/constants.go | 19 +- ...datamaskingpolicies_client_example_test.go | 127 -- .../datamaskingrules_client_example_test.go | 288 --- ...lobauditingpolicies_client_example_test.go | 236 --- .../armsynapse/fake/polymorphic_helpers.go | 4 +- .../fake/sqlpooloperationresults_server.go | 6 +- .../armsynapse/fake/sqlpools_server.go | 47 - .../synapse/armsynapse/fake/time_rfc3339.go | 42 +- .../armsynapse/get_client_example_test.go | 102 -- sdk/resourcemanager/synapse/armsynapse/go.mod | 12 +- sdk/resourcemanager/synapse/armsynapse/go.sum | 23 - ...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 ------ .../armsynapse/integrationruntimes_client.go | 4 +- ...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 - .../synapse/armsynapse/kustopools_client.go | 4 +- .../kustopools_client_example_test.go | 647 ------- .../libraries_client_example_test.go | 76 - .../armsynapse/library_client_example_test.go | 53 - .../synapse/armsynapse/models.go | 61 +- .../synapse/armsynapse/models_serde.go | 121 +- .../operations_client_example_test.go | 1579 ----------------- .../synapse/armsynapse/options.go | 5 - .../synapse/armsynapse/polymorphic_helpers.go | 24 +- ...endpointconnections_client_example_test.go | 167 -- ...tionsprivatelinkhub_client_example_test.go | 108 -- ...rivatelinkresources_client_example_test.go | 90 - .../armsynapse/privatelinkhubs_client.go | 3 +- .../privatelinkhubs_client_example_test.go | 250 --- ...rivatelinkresources_client_example_test.go | 90 - .../{response_types.go => responses.go} | 5 - ...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 -- .../synapse/armsynapse/sqlpools_client.go | 62 - .../sqlpools_client_example_test.go | 486 ----- .../armsynapse/sqlpoolschemas_client.go | 2 +- .../sqlpoolschemas_client_example_test.go | 81 - ...curityalertpolicies_client_example_test.go | 193 -- .../sqlpoolsensitivitylabels_client.go | 12 +- ...olsensitivitylabels_client_example_test.go | 303 ---- .../armsynapse/sqlpooltablecolumns_client.go | 2 +- ...sqlpooltablecolumns_client_example_test.go | 62 - .../armsynapse/sqlpooltables_client.go | 2 +- .../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 --- .../synapse/armsynapse/time_rfc3339.go | 42 +- .../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 -- 101 files changed, 582 insertions(+), 13808 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 rename sdk/resourcemanager/synapse/armsynapse/{response_types.go => responses.go} (99%) 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 1d2dddbf032a..f99de07daf3b 100644 --- a/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md +++ b/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md @@ -1,5 +1,22 @@ # Release History +## 0.9.0 (2025-01-08) +### Breaking Changes + +- Function `*SQLPoolsClient.Rename` has been removed +- Struct `ResourceMoveDefinition` has been removed + +### Features Added + +- Type of `WorkspaceProperties.ExtraProperties` has been changed from `map[string]any` to `any` +- New enum type `SelfContainedInteractiveAuthoringState` with values `SelfContainedInteractiveAuthoringStateFalse`, `SelfContainedInteractiveAuthoringStateTrue` +- New struct `CopyComputeScaleProperties` +- New struct `PipelineExternalComputeScaleProperties` +- New field `CopyComputeScaleProperties`, `PipelineExternalComputeScaleProperties` in struct `IntegrationRuntimeComputeProperties` +- New field `OSType`, `SelfContainedInteractiveAuthoringEnabled`, `TargetFramework` in struct `SelfHostedIntegrationRuntimeStatusTypeProperties` +- New field `SelfContainedInteractiveAuthoringEnabled` in struct `SelfHostedIntegrationRuntimeTypeProperties` + + ## 0.8.0 (2023-11-24) ### Features Added diff --git a/sdk/resourcemanager/synapse/armsynapse/README.md b/sdk/resourcemanager/synapse/armsynapse/README.md index 26e09c633c82..2a9093d95073 100644 --- a/sdk/resourcemanager/synapse/armsynapse/README.md +++ b/sdk/resourcemanager/synapse/armsynapse/README.md @@ -55,7 +55,7 @@ clientFactory, err := armsynapse.NewClientFactory(, cred, &opti A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. ```go -client := clientFactory.NewKustoPoolDataConnectionsClient() +client := clientFactory.NewAzureADOnlyAuthenticationsClient() ``` ## Fakes diff --git a/sdk/resourcemanager/synapse/armsynapse/autorest.md b/sdk/resourcemanager/synapse/armsynapse/autorest.md index 17588ae5c5db..e0b04e8f7ff5 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.8.0 +module-version: 0.9.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 b2578d584dc1..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.200Z"); 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.200Z"); 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.200Z"); 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 9c8f59d39e3c..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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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:00.000Z"); 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/client_factory.go b/sdk/resourcemanager/synapse/armsynapse/client_factory.go index 2a632fc14ca1..88f6bcfa0114 100644 --- a/sdk/resourcemanager/synapse/armsynapse/client_factory.go +++ b/sdk/resourcemanager/synapse/armsynapse/client_factory.go @@ -17,8 +17,7 @@ import ( // Don't use this type directly, use NewClientFactory instead. type ClientFactory struct { subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions + internal *arm.Client } // NewClientFactory creates a new instance of ClientFactory with the specified values. @@ -27,462 +26,611 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), + subscriptionID: subscriptionID, + internal: internal, }, nil } // NewAzureADOnlyAuthenticationsClient creates a new instance of AzureADOnlyAuthenticationsClient. func (c *ClientFactory) NewAzureADOnlyAuthenticationsClient() *AzureADOnlyAuthenticationsClient { - subClient, _ := NewAzureADOnlyAuthenticationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &AzureADOnlyAuthenticationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewBigDataPoolsClient creates a new instance of BigDataPoolsClient. func (c *ClientFactory) NewBigDataPoolsClient() *BigDataPoolsClient { - subClient, _ := NewBigDataPoolsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &BigDataPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient. func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient { - subClient, _ := NewDataMaskingPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &DataMaskingPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient. func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient { - subClient, _ := NewDataMaskingRulesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &DataMaskingRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewExtendedSQLPoolBlobAuditingPoliciesClient creates a new instance of ExtendedSQLPoolBlobAuditingPoliciesClient. func (c *ClientFactory) NewExtendedSQLPoolBlobAuditingPoliciesClient() *ExtendedSQLPoolBlobAuditingPoliciesClient { - subClient, _ := NewExtendedSQLPoolBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &ExtendedSQLPoolBlobAuditingPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewGetClient creates a new instance of GetClient. func (c *ClientFactory) NewGetClient() *GetClient { - subClient, _ := NewGetClient(c.subscriptionID, c.credential, c.options) - return subClient + return &GetClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIPFirewallRulesClient creates a new instance of IPFirewallRulesClient. func (c *ClientFactory) NewIPFirewallRulesClient() *IPFirewallRulesClient { - subClient, _ := NewIPFirewallRulesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IPFirewallRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeAuthKeysClient creates a new instance of IntegrationRuntimeAuthKeysClient. func (c *ClientFactory) NewIntegrationRuntimeAuthKeysClient() *IntegrationRuntimeAuthKeysClient { - subClient, _ := NewIntegrationRuntimeAuthKeysClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeAuthKeysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeConnectionInfosClient creates a new instance of IntegrationRuntimeConnectionInfosClient. func (c *ClientFactory) NewIntegrationRuntimeConnectionInfosClient() *IntegrationRuntimeConnectionInfosClient { - subClient, _ := NewIntegrationRuntimeConnectionInfosClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeConnectionInfosClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeCredentialsClient creates a new instance of IntegrationRuntimeCredentialsClient. func (c *ClientFactory) NewIntegrationRuntimeCredentialsClient() *IntegrationRuntimeCredentialsClient { - subClient, _ := NewIntegrationRuntimeCredentialsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeCredentialsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeMonitoringDataClient creates a new instance of IntegrationRuntimeMonitoringDataClient. func (c *ClientFactory) NewIntegrationRuntimeMonitoringDataClient() *IntegrationRuntimeMonitoringDataClient { - subClient, _ := NewIntegrationRuntimeMonitoringDataClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeMonitoringDataClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeNodeIPAddressClient creates a new instance of IntegrationRuntimeNodeIPAddressClient. func (c *ClientFactory) NewIntegrationRuntimeNodeIPAddressClient() *IntegrationRuntimeNodeIPAddressClient { - subClient, _ := NewIntegrationRuntimeNodeIPAddressClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeNodeIPAddressClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeNodesClient creates a new instance of IntegrationRuntimeNodesClient. func (c *ClientFactory) NewIntegrationRuntimeNodesClient() *IntegrationRuntimeNodesClient { - subClient, _ := NewIntegrationRuntimeNodesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeNodesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeObjectMetadataClient creates a new instance of IntegrationRuntimeObjectMetadataClient. func (c *ClientFactory) NewIntegrationRuntimeObjectMetadataClient() *IntegrationRuntimeObjectMetadataClient { - subClient, _ := NewIntegrationRuntimeObjectMetadataClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeObjectMetadataClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimeStatusClient creates a new instance of IntegrationRuntimeStatusClient. func (c *ClientFactory) NewIntegrationRuntimeStatusClient() *IntegrationRuntimeStatusClient { - subClient, _ := NewIntegrationRuntimeStatusClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimeStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewIntegrationRuntimesClient creates a new instance of IntegrationRuntimesClient. func (c *ClientFactory) NewIntegrationRuntimesClient() *IntegrationRuntimesClient { - subClient, _ := NewIntegrationRuntimesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &IntegrationRuntimesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKeysClient creates a new instance of KeysClient. func (c *ClientFactory) NewKeysClient() *KeysClient { - subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KeysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoOperationsClient creates a new instance of KustoOperationsClient. func (c *ClientFactory) NewKustoOperationsClient() *KustoOperationsClient { - subClient, _ := NewKustoOperationsClient(c.credential, c.options) - return subClient + return &KustoOperationsClient{ + internal: c.internal, + } } // NewKustoPoolAttachedDatabaseConfigurationsClient creates a new instance of KustoPoolAttachedDatabaseConfigurationsClient. func (c *ClientFactory) NewKustoPoolAttachedDatabaseConfigurationsClient() *KustoPoolAttachedDatabaseConfigurationsClient { - subClient, _ := NewKustoPoolAttachedDatabaseConfigurationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolAttachedDatabaseConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolChildResourceClient creates a new instance of KustoPoolChildResourceClient. func (c *ClientFactory) NewKustoPoolChildResourceClient() *KustoPoolChildResourceClient { - subClient, _ := NewKustoPoolChildResourceClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolChildResourceClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolDataConnectionsClient creates a new instance of KustoPoolDataConnectionsClient. func (c *ClientFactory) NewKustoPoolDataConnectionsClient() *KustoPoolDataConnectionsClient { - subClient, _ := NewKustoPoolDataConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolDataConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolDatabasePrincipalAssignmentsClient creates a new instance of KustoPoolDatabasePrincipalAssignmentsClient. func (c *ClientFactory) NewKustoPoolDatabasePrincipalAssignmentsClient() *KustoPoolDatabasePrincipalAssignmentsClient { - subClient, _ := NewKustoPoolDatabasePrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolDatabasePrincipalAssignmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolDatabasesClient creates a new instance of KustoPoolDatabasesClient. func (c *ClientFactory) NewKustoPoolDatabasesClient() *KustoPoolDatabasesClient { - subClient, _ := NewKustoPoolDatabasesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolDatabasesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolPrincipalAssignmentsClient creates a new instance of KustoPoolPrincipalAssignmentsClient. func (c *ClientFactory) NewKustoPoolPrincipalAssignmentsClient() *KustoPoolPrincipalAssignmentsClient { - subClient, _ := NewKustoPoolPrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolPrincipalAssignmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolPrivateLinkResourcesClient creates a new instance of KustoPoolPrivateLinkResourcesClient. func (c *ClientFactory) NewKustoPoolPrivateLinkResourcesClient() *KustoPoolPrivateLinkResourcesClient { - subClient, _ := NewKustoPoolPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolPrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewKustoPoolsClient creates a new instance of KustoPoolsClient. func (c *ClientFactory) NewKustoPoolsClient() *KustoPoolsClient { - subClient, _ := NewKustoPoolsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &KustoPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewLibrariesClient creates a new instance of LibrariesClient. func (c *ClientFactory) NewLibrariesClient() *LibrariesClient { - subClient, _ := NewLibrariesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &LibrariesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewLibraryClient creates a new instance of LibraryClient. func (c *ClientFactory) NewLibraryClient() *LibraryClient { - subClient, _ := NewLibraryClient(c.subscriptionID, c.credential, c.options) - return subClient + return &LibraryClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &OperationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewPrivateEndpointConnectionsPrivateLinkHubClient creates a new instance of PrivateEndpointConnectionsPrivateLinkHubClient. func (c *ClientFactory) NewPrivateEndpointConnectionsPrivateLinkHubClient() *PrivateEndpointConnectionsPrivateLinkHubClient { - subClient, _ := NewPrivateEndpointConnectionsPrivateLinkHubClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateEndpointConnectionsPrivateLinkHubClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewPrivateLinkHubPrivateLinkResourcesClient creates a new instance of PrivateLinkHubPrivateLinkResourcesClient. func (c *ClientFactory) NewPrivateLinkHubPrivateLinkResourcesClient() *PrivateLinkHubPrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkHubPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateLinkHubPrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewPrivateLinkHubsClient creates a new instance of PrivateLinkHubsClient. func (c *ClientFactory) NewPrivateLinkHubsClient() *PrivateLinkHubsClient { - subClient, _ := NewPrivateLinkHubsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateLinkHubsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewRestorableDroppedSQLPoolsClient creates a new instance of RestorableDroppedSQLPoolsClient. func (c *ClientFactory) NewRestorableDroppedSQLPoolsClient() *RestorableDroppedSQLPoolsClient { - subClient, _ := NewRestorableDroppedSQLPoolsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &RestorableDroppedSQLPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolBlobAuditingPoliciesClient creates a new instance of SQLPoolBlobAuditingPoliciesClient. func (c *ClientFactory) NewSQLPoolBlobAuditingPoliciesClient() *SQLPoolBlobAuditingPoliciesClient { - subClient, _ := NewSQLPoolBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolBlobAuditingPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolColumnsClient creates a new instance of SQLPoolColumnsClient. func (c *ClientFactory) NewSQLPoolColumnsClient() *SQLPoolColumnsClient { - subClient, _ := NewSQLPoolColumnsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolColumnsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolConnectionPoliciesClient creates a new instance of SQLPoolConnectionPoliciesClient. func (c *ClientFactory) NewSQLPoolConnectionPoliciesClient() *SQLPoolConnectionPoliciesClient { - subClient, _ := NewSQLPoolConnectionPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolConnectionPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolDataWarehouseUserActivitiesClient creates a new instance of SQLPoolDataWarehouseUserActivitiesClient. func (c *ClientFactory) NewSQLPoolDataWarehouseUserActivitiesClient() *SQLPoolDataWarehouseUserActivitiesClient { - subClient, _ := NewSQLPoolDataWarehouseUserActivitiesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolDataWarehouseUserActivitiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolGeoBackupPoliciesClient creates a new instance of SQLPoolGeoBackupPoliciesClient. func (c *ClientFactory) NewSQLPoolGeoBackupPoliciesClient() *SQLPoolGeoBackupPoliciesClient { - subClient, _ := NewSQLPoolGeoBackupPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolGeoBackupPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolMaintenanceWindowOptionsClient creates a new instance of SQLPoolMaintenanceWindowOptionsClient. func (c *ClientFactory) NewSQLPoolMaintenanceWindowOptionsClient() *SQLPoolMaintenanceWindowOptionsClient { - subClient, _ := NewSQLPoolMaintenanceWindowOptionsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolMaintenanceWindowOptionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolMaintenanceWindowsClient creates a new instance of SQLPoolMaintenanceWindowsClient. func (c *ClientFactory) NewSQLPoolMaintenanceWindowsClient() *SQLPoolMaintenanceWindowsClient { - subClient, _ := NewSQLPoolMaintenanceWindowsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolMaintenanceWindowsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolMetadataSyncConfigsClient creates a new instance of SQLPoolMetadataSyncConfigsClient. func (c *ClientFactory) NewSQLPoolMetadataSyncConfigsClient() *SQLPoolMetadataSyncConfigsClient { - subClient, _ := NewSQLPoolMetadataSyncConfigsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolMetadataSyncConfigsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolOperationResultsClient creates a new instance of SQLPoolOperationResultsClient. func (c *ClientFactory) NewSQLPoolOperationResultsClient() *SQLPoolOperationResultsClient { - subClient, _ := NewSQLPoolOperationResultsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolOperationsClient creates a new instance of SQLPoolOperationsClient. func (c *ClientFactory) NewSQLPoolOperationsClient() *SQLPoolOperationsClient { - subClient, _ := NewSQLPoolOperationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolOperationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolRecommendedSensitivityLabelsClient creates a new instance of SQLPoolRecommendedSensitivityLabelsClient. func (c *ClientFactory) NewSQLPoolRecommendedSensitivityLabelsClient() *SQLPoolRecommendedSensitivityLabelsClient { - subClient, _ := NewSQLPoolRecommendedSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolRecommendedSensitivityLabelsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolReplicationLinksClient creates a new instance of SQLPoolReplicationLinksClient. func (c *ClientFactory) NewSQLPoolReplicationLinksClient() *SQLPoolReplicationLinksClient { - subClient, _ := NewSQLPoolReplicationLinksClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolReplicationLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolRestorePointsClient creates a new instance of SQLPoolRestorePointsClient. func (c *ClientFactory) NewSQLPoolRestorePointsClient() *SQLPoolRestorePointsClient { - subClient, _ := NewSQLPoolRestorePointsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolRestorePointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolSchemasClient creates a new instance of SQLPoolSchemasClient. func (c *ClientFactory) NewSQLPoolSchemasClient() *SQLPoolSchemasClient { - subClient, _ := NewSQLPoolSchemasClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolSchemasClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolSecurityAlertPoliciesClient creates a new instance of SQLPoolSecurityAlertPoliciesClient. func (c *ClientFactory) NewSQLPoolSecurityAlertPoliciesClient() *SQLPoolSecurityAlertPoliciesClient { - subClient, _ := NewSQLPoolSecurityAlertPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolSecurityAlertPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolSensitivityLabelsClient creates a new instance of SQLPoolSensitivityLabelsClient. func (c *ClientFactory) NewSQLPoolSensitivityLabelsClient() *SQLPoolSensitivityLabelsClient { - subClient, _ := NewSQLPoolSensitivityLabelsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolSensitivityLabelsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolTableColumnsClient creates a new instance of SQLPoolTableColumnsClient. func (c *ClientFactory) NewSQLPoolTableColumnsClient() *SQLPoolTableColumnsClient { - subClient, _ := NewSQLPoolTableColumnsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolTableColumnsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolTablesClient creates a new instance of SQLPoolTablesClient. func (c *ClientFactory) NewSQLPoolTablesClient() *SQLPoolTablesClient { - subClient, _ := NewSQLPoolTablesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolTablesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolTransparentDataEncryptionsClient creates a new instance of SQLPoolTransparentDataEncryptionsClient. func (c *ClientFactory) NewSQLPoolTransparentDataEncryptionsClient() *SQLPoolTransparentDataEncryptionsClient { - subClient, _ := NewSQLPoolTransparentDataEncryptionsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolTransparentDataEncryptionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolUsagesClient creates a new instance of SQLPoolUsagesClient. func (c *ClientFactory) NewSQLPoolUsagesClient() *SQLPoolUsagesClient { - subClient, _ := NewSQLPoolUsagesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolUsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient creates a new instance of SQLPoolVulnerabilityAssessmentRuleBaselinesClient. func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient() *SQLPoolVulnerabilityAssessmentRuleBaselinesClient { - subClient, _ := NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolVulnerabilityAssessmentRuleBaselinesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolVulnerabilityAssessmentScansClient creates a new instance of SQLPoolVulnerabilityAssessmentScansClient. func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentScansClient() *SQLPoolVulnerabilityAssessmentScansClient { - subClient, _ := NewSQLPoolVulnerabilityAssessmentScansClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolVulnerabilityAssessmentScansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolVulnerabilityAssessmentsClient creates a new instance of SQLPoolVulnerabilityAssessmentsClient. func (c *ClientFactory) NewSQLPoolVulnerabilityAssessmentsClient() *SQLPoolVulnerabilityAssessmentsClient { - subClient, _ := NewSQLPoolVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolVulnerabilityAssessmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolWorkloadClassifierClient creates a new instance of SQLPoolWorkloadClassifierClient. func (c *ClientFactory) NewSQLPoolWorkloadClassifierClient() *SQLPoolWorkloadClassifierClient { - subClient, _ := NewSQLPoolWorkloadClassifierClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolWorkloadClassifierClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolWorkloadGroupClient creates a new instance of SQLPoolWorkloadGroupClient. func (c *ClientFactory) NewSQLPoolWorkloadGroupClient() *SQLPoolWorkloadGroupClient { - subClient, _ := NewSQLPoolWorkloadGroupClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolWorkloadGroupClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSQLPoolsClient creates a new instance of SQLPoolsClient. func (c *ClientFactory) NewSQLPoolsClient() *SQLPoolsClient { - subClient, _ := NewSQLPoolsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SQLPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSparkConfigurationClient creates a new instance of SparkConfigurationClient. func (c *ClientFactory) NewSparkConfigurationClient() *SparkConfigurationClient { - subClient, _ := NewSparkConfigurationClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SparkConfigurationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewSparkConfigurationsClient creates a new instance of SparkConfigurationsClient. func (c *ClientFactory) NewSparkConfigurationsClient() *SparkConfigurationsClient { - subClient, _ := NewSparkConfigurationsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &SparkConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceAADAdminsClient creates a new instance of WorkspaceAADAdminsClient. func (c *ClientFactory) NewWorkspaceAADAdminsClient() *WorkspaceAADAdminsClient { - subClient, _ := NewWorkspaceAADAdminsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceAADAdminsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedIdentitySQLControlSettingsClient creates a new instance of WorkspaceManagedIdentitySQLControlSettingsClient. func (c *ClientFactory) NewWorkspaceManagedIdentitySQLControlSettingsClient() *WorkspaceManagedIdentitySQLControlSettingsClient { - subClient, _ := NewWorkspaceManagedIdentitySQLControlSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedIdentitySQLControlSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient creates a new instance of WorkspaceManagedSQLServerBlobAuditingPoliciesClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient() *WorkspaceManagedSQLServerBlobAuditingPoliciesClient { - subClient, _ := NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerBlobAuditingPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient creates a new instance of WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient() *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient { - subClient, _ := NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerEncryptionProtectorClient creates a new instance of WorkspaceManagedSQLServerEncryptionProtectorClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerEncryptionProtectorClient() *WorkspaceManagedSQLServerEncryptionProtectorClient { - subClient, _ := NewWorkspaceManagedSQLServerEncryptionProtectorClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerEncryptionProtectorClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient creates a new instance of WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient() *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient { - subClient, _ := NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient creates a new instance of WorkspaceManagedSQLServerRecoverableSQLPoolsClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient() *WorkspaceManagedSQLServerRecoverableSQLPoolsClient { - subClient, _ := NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerRecoverableSQLPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerSecurityAlertPolicyClient creates a new instance of WorkspaceManagedSQLServerSecurityAlertPolicyClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerSecurityAlertPolicyClient() *WorkspaceManagedSQLServerSecurityAlertPolicyClient { - subClient, _ := NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerSecurityAlertPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerUsagesClient creates a new instance of WorkspaceManagedSQLServerUsagesClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerUsagesClient() *WorkspaceManagedSQLServerUsagesClient { - subClient, _ := NewWorkspaceManagedSQLServerUsagesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerUsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient creates a new instance of WorkspaceManagedSQLServerVulnerabilityAssessmentsClient. func (c *ClientFactory) NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient() *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient { - subClient, _ := NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceManagedSQLServerVulnerabilityAssessmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspaceSQLAADAdminsClient creates a new instance of WorkspaceSQLAADAdminsClient. func (c *ClientFactory) NewWorkspaceSQLAADAdminsClient() *WorkspaceSQLAADAdminsClient { - subClient, _ := NewWorkspaceSQLAADAdminsClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspaceSQLAADAdminsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } // NewWorkspacesClient creates a new instance of WorkspacesClient. func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient { - subClient, _ := NewWorkspacesClient(c.subscriptionID, c.credential, c.options) - return subClient + return &WorkspacesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } } diff --git a/sdk/resourcemanager/synapse/armsynapse/constants.go b/sdk/resourcemanager/synapse/armsynapse/constants.go index 35f45369c347..8f6cc024dc5a 100644 --- a/sdk/resourcemanager/synapse/armsynapse/constants.go +++ b/sdk/resourcemanager/synapse/armsynapse/constants.go @@ -10,7 +10,7 @@ package armsynapse const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" - moduleVersion = "v0.8.0" + moduleVersion = "v0.9.0" ) // ActualState - Actual state @@ -1362,6 +1362,23 @@ func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { } } +// SelfContainedInteractiveAuthoringState - An alternative option to ensure interactive authoring function when your self-hosted +// integration runtime is unable to establish a connection with Azure Relay. +type SelfContainedInteractiveAuthoringState bool + +const ( + SelfContainedInteractiveAuthoringStateFalse SelfContainedInteractiveAuthoringState = false + SelfContainedInteractiveAuthoringStateTrue SelfContainedInteractiveAuthoringState = true +) + +// PossibleSelfContainedInteractiveAuthoringStateValues returns the possible values for the SelfContainedInteractiveAuthoringState const type. +func PossibleSelfContainedInteractiveAuthoringStateValues() []SelfContainedInteractiveAuthoringState { + return []SelfContainedInteractiveAuthoringState{ + SelfContainedInteractiveAuthoringStateFalse, + SelfContainedInteractiveAuthoringStateTrue, + } +} + // SelfHostedIntegrationRuntimeNodeStatus - Status of the integration runtime node. type SelfHostedIntegrationRuntimeNodeStatus string 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/fake/polymorphic_helpers.go b/sdk/resourcemanager/synapse/armsynapse/fake/polymorphic_helpers.go index 6334133ee8c0..4ab134fd9f47 100644 --- a/sdk/resourcemanager/synapse/armsynapse/fake/polymorphic_helpers.go +++ b/sdk/resourcemanager/synapse/armsynapse/fake/polymorphic_helpers.go @@ -14,7 +14,7 @@ import ( ) func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (armsynapse.DataConnectionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -39,7 +39,7 @@ func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (armsynapse.D } func unmarshalDatabaseClassification(rawMsg json.RawMessage) (armsynapse.DatabaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any diff --git a/sdk/resourcemanager/synapse/armsynapse/fake/sqlpooloperationresults_server.go b/sdk/resourcemanager/synapse/armsynapse/fake/sqlpooloperationresults_server.go index 8c8bd4c15117..f4c1738c4503 100644 --- a/sdk/resourcemanager/synapse/armsynapse/fake/sqlpooloperationresults_server.go +++ b/sdk/resourcemanager/synapse/armsynapse/fake/sqlpooloperationresults_server.go @@ -24,7 +24,7 @@ import ( // SQLPoolOperationResultsServer is a fake server for instances of the armsynapse.SQLPoolOperationResultsClient type. type SQLPoolOperationResultsServer struct { // BeginGetLocationHeaderResult is the fake for method SQLPoolOperationResultsClient.BeginGetLocationHeaderResult - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted BeginGetLocationHeaderResult func(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *armsynapse.SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions) (resp azfake.PollerResponder[armsynapse.SQLPoolOperationResultsClientGetLocationHeaderResultResponse], errResp azfake.ErrorResponder) } @@ -111,9 +111,9 @@ func (s *SQLPoolOperationResultsServerTransport) dispatchBeginGetLocationHeaderR return nil, err } - if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { s.beginGetLocationHeaderResult.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} } if !server.PollerResponderMore(beginGetLocationHeaderResult) { s.beginGetLocationHeaderResult.remove(req) diff --git a/sdk/resourcemanager/synapse/armsynapse/fake/sqlpools_server.go b/sdk/resourcemanager/synapse/armsynapse/fake/sqlpools_server.go index 2735ba35672d..45a181c09cb7 100644 --- a/sdk/resourcemanager/synapse/armsynapse/fake/sqlpools_server.go +++ b/sdk/resourcemanager/synapse/armsynapse/fake/sqlpools_server.go @@ -44,10 +44,6 @@ type SQLPoolsServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginPause func(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *armsynapse.SQLPoolsClientBeginPauseOptions) (resp azfake.PollerResponder[armsynapse.SQLPoolsClientPauseResponse], errResp azfake.ErrorResponder) - // Rename is the fake for method SQLPoolsClient.Rename - // HTTP status codes to indicate success: http.StatusOK - Rename func(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters armsynapse.ResourceMoveDefinition, options *armsynapse.SQLPoolsClientRenameOptions) (resp azfake.Responder[armsynapse.SQLPoolsClientRenameResponse], errResp azfake.ErrorResponder) - // BeginResume is the fake for method SQLPoolsClient.BeginResume // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginResume func(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *armsynapse.SQLPoolsClientBeginResumeOptions) (resp azfake.PollerResponder[armsynapse.SQLPoolsClientResumeResponse], errResp azfake.ErrorResponder) @@ -106,8 +102,6 @@ func (s *SQLPoolsServerTransport) Do(req *http.Request) (*http.Response, error) resp, err = s.dispatchNewListByWorkspacePager(req) case "SQLPoolsClient.BeginPause": resp, err = s.dispatchBeginPause(req) - case "SQLPoolsClient.Rename": - resp, err = s.dispatchRename(req) case "SQLPoolsClient.BeginResume": resp, err = s.dispatchBeginResume(req) case "SQLPoolsClient.BeginUpdate": @@ -349,47 +343,6 @@ func (s *SQLPoolsServerTransport) dispatchBeginPause(req *http.Request) (*http.R return resp, nil } -func (s *SQLPoolsServerTransport) dispatchRename(req *http.Request) (*http.Response, error) { - if s.srv.Rename == nil { - return nil, &nonRetriableError{errors.New("fake for method Rename not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Synapse/workspaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sqlPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/move` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armsynapse.ResourceMoveDefinition](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - workspaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workspaceName")]) - if err != nil { - return nil, err - } - sqlPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("sqlPoolName")]) - if err != nil { - return nil, err - } - respr, errRespr := s.srv.Rename(req.Context(), resourceGroupNameParam, workspaceNameParam, sqlPoolNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} - } - resp, err := server.NewResponse(respContent, req, nil) - if err != nil { - return nil, err - } - return resp, nil -} - func (s *SQLPoolsServerTransport) dispatchBeginResume(req *http.Request) (*http.Response, error) { if s.srv.BeginResume == nil { return nil, &nonRetriableError{errors.New("fake for method BeginResume not implemented")} diff --git a/sdk/resourcemanager/synapse/armsynapse/fake/time_rfc3339.go b/sdk/resourcemanager/synapse/armsynapse/fake/time_rfc3339.go index b0535a7b63e6..81f308b0d343 100644 --- a/sdk/resourcemanager/synapse/armsynapse/fake/time_rfc3339.go +++ b/sdk/resourcemanager/synapse/armsynapse/fake/time_rfc3339.go @@ -19,12 +19,16 @@ import ( ) // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) const ( - utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` - utcDateTime = "2006-01-02T15:04:05.999999999" - dateTimeJSON = `"` + time.RFC3339Nano + `"` + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` ) type dateTimeRFC3339 time.Time @@ -40,17 +44,33 @@ func (t dateTimeRFC3339) MarshalText() ([]byte, error) { } func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcDateTimeJSON - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT } return t.Parse(layout, string(data)) } func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - layout := utcDateTime - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT } return t.Parse(layout, string(data)) } @@ -61,6 +81,10 @@ func (t *dateTimeRFC3339) Parse(layout, value string) error { return err } +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return @@ -74,7 +98,7 @@ func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { } func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { + if data == nil || string(data) == "null" { return nil } var aux dateTimeRFC3339 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 786c276a16f1..8457d778c96e 100644 --- a/sdk/resourcemanager/synapse/armsynapse/go.mod +++ b/sdk/resourcemanager/synapse/armsynapse/go.mod @@ -2,20 +2,10 @@ 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.16.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.1 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect - golang.org/x/crypto v0.31.0 // indirect golang.org/x/net v0.33.0 // indirect - golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect ) diff --git a/sdk/resourcemanager/synapse/armsynapse/go.sum b/sdk/resourcemanager/synapse/armsynapse/go.sum index 9620a8f197a3..823eafcd76d5 100644 --- a/sdk/resourcemanager/synapse/armsynapse/go.sum +++ b/sdk/resourcemanager/synapse/armsynapse/go.sum @@ -1,35 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 h1:JZg6HRh6W6U4OLl6lk7BZ7BLisIzM9dG1R50zUk9C/M= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0/go.mod h1:YL1xnZ6QejvQHWJrX/AvhFl4WW4rqHVoKspWNVwFk0M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 h1:B/dfvscEQtew9dVuoxqxrUKKv8Ih2f55PydknDamU+g= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0/go.mod h1:fiPSssYvltE08HJchL04dOy+RD4hgrjph0cwGGMntdI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0 h1:+m0M/LFxN43KvULkDNfdXOgrjtg6UYJPFBJyuEcRCAw= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= -github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 h1:kYRSnvJju5gYVyhkij+RTJ/VR6QIUaCfWeaFm2ycsjQ= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 h1:IsMZxCuZqKuao2vNdfD82fjjgPLfyHLpR41Z88viRWs= -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-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 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 945a1191c831..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.626Z"); return t}()), - // LastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-17T03:45:30.849Z"); 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.801Z"); 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.754Z"); return t}()), - // LastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:52:59.893Z"); 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.923Z"); 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.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go index 97983dec4902..b4e9fd6cf1eb 100644 --- a/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go @@ -121,10 +121,10 @@ func (client *IntegrationRuntimesClient) createCreateRequest(ctx context.Context reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, integrationRuntime); err != nil { return nil, err } @@ -430,10 +430,10 @@ func (client *IntegrationRuntimesClient) getCreateRequest(ctx context.Context, r reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfNoneMatch != nil { req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } 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 3422b5599169..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.869Z"); 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 cd2871983e4c..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.183Z"); 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.893Z"); return t}()), - // LastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T14:52:59.893Z"); 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.923Z"); 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.go b/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go index 8952ee8f3e6e..7d61763d108e 100644 --- a/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go @@ -270,13 +270,13 @@ func (client *KustoPoolsClient) createOrUpdateCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } if options != nil && options.IfNoneMatch != nil { req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err } @@ -1173,10 +1173,10 @@ func (client *KustoPoolsClient) updateCreateRequest(ctx context.Context, workspa reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { return nil, err } 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 bd73671b9454..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.157Z"); 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.157Z"); 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 1c3cf5424d61..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.157Z"); return t}()), - // }, - // } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/models.go b/sdk/resourcemanager/synapse/armsynapse/models.go index ac0af991fc63..fbf35206eedf 100644 --- a/sdk/resourcemanager/synapse/armsynapse/models.go +++ b/sdk/resourcemanager/synapse/armsynapse/models.go @@ -459,6 +459,15 @@ func (c *ComponentSetup) GetCustomSetupBase() *CustomSetupBase { } } +// CopyComputeScaleProperties - CopyComputeScale properties for managed integration runtime. +type CopyComputeScaleProperties struct { + // DIU number setting reserved for copy activity execution. Supported values are multiples of 4 in range 4-256. + DataIntegrationUnit *int32 + + // Time to live (in minutes) setting of integration runtime which will execute copy activity. + TimeToLive *int32 +} + // CreateSQLPoolRestorePointDefinition - Contains the information necessary to perform a create Sql pool restore point operation. type CreateSQLPoolRestorePointDefinition struct { // REQUIRED; The restore point label to apply @@ -1472,6 +1481,9 @@ type IntegrationRuntimeComputeProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any + // CopyComputeScale properties for managed integration runtime. + CopyComputeScaleProperties *CopyComputeScaleProperties + // Data flow properties for managed integration runtime. DataFlowProperties *IntegrationRuntimeDataFlowProperties @@ -1487,6 +1499,9 @@ type IntegrationRuntimeComputeProperties struct { // The required number of nodes for managed integration runtime. NumberOfNodes *int32 + // PipelineExternalComputeScale properties for managed integration runtime. + PipelineExternalComputeScaleProperties *PipelineExternalComputeScaleProperties + // VNet properties for managed integration runtime. VNetProperties *IntegrationRuntimeVNetProperties } @@ -2048,14 +2063,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. @@ -2642,6 +2657,18 @@ type OptimizedAutoscale struct { Version *int32 } +// PipelineExternalComputeScaleProperties - PipelineExternalComputeScale properties for managed integration runtime. +type PipelineExternalComputeScaleProperties struct { + // Number of the the external nodes, which should be greater than 0 and less than 11. + NumberOfExternalNodes *int32 + + // Number of the pipeline nodes, which should be greater than 0 and less than 11. + NumberOfPipelineNodes *int32 + + // Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity. + TimeToLive *int32 +} + // PrivateEndpoint - Private endpoint details type PrivateEndpoint struct { // READ-ONLY; Resource id of the private endpoint. @@ -3155,12 +3182,6 @@ type Resource struct { Type *string } -// ResourceMoveDefinition - Contains the information necessary to perform a resource move (rename). -type ResourceMoveDefinition struct { - // REQUIRED; The target ID for the resource - ID *string -} - // RestorableDroppedSQLPool - A restorable dropped Sql pool type RestorableDroppedSQLPool struct { // The properties of a restorable dropped Sql pool @@ -4022,15 +4043,25 @@ 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 // READ-ONLY; The date at which the integration runtime will be scheduled to update, in ISO8601 format. ScheduledUpdateDate *time.Time + // READ-ONLY; An alternative option to ensure interactive authoring function when your self-hosted integration runtime is + // unable to establish a connection with Azure Relay. + SelfContainedInteractiveAuthoringEnabled *SelfContainedInteractiveAuthoringState + // 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 @@ -4048,6 +4079,10 @@ type SelfHostedIntegrationRuntimeStatusTypeProperties struct { type SelfHostedIntegrationRuntimeTypeProperties struct { // Linked integration runtime type from data factory LinkedInfo LinkedIntegrationRuntimeTypeClassification + + // An alternative option to ensure interactive authoring function when your self-hosted integration runtime is unable to establish + // a connection with Azure Relay. + SelfContainedInteractiveAuthoringEnabled *SelfContainedInteractiveAuthoringState } // SensitivityLabel - A sensitivity label. @@ -5132,9 +5167,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 @@ -5184,8 +5216,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 3bee2fb8a8b9..c85ecd3b5b85 100644 --- a/sdk/resourcemanager/synapse/armsynapse/models_serde.go +++ b/sdk/resourcemanager/synapse/armsynapse/models_serde.go @@ -1142,6 +1142,37 @@ func (c *ComponentSetup) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CopyComputeScaleProperties. +func (c CopyComputeScaleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataIntegrationUnit", c.DataIntegrationUnit) + populate(objectMap, "timeToLive", c.TimeToLive) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CopyComputeScaleProperties. +func (c *CopyComputeScaleProperties) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataIntegrationUnit": + err = unpopulate(val, "DataIntegrationUnit", &c.DataIntegrationUnit) + delete(rawMsg, key) + case "timeToLive": + err = unpopulate(val, "TimeToLive", &c.TimeToLive) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CreateSQLPoolRestorePointDefinition. func (c CreateSQLPoolRestorePointDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3497,11 +3528,13 @@ func (i *IntegrationRuntimeAuthKeys) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeComputeProperties. func (i IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "copyComputeScaleProperties", i.CopyComputeScaleProperties) populate(objectMap, "dataFlowProperties", i.DataFlowProperties) populate(objectMap, "location", i.Location) populate(objectMap, "maxParallelExecutionsPerNode", i.MaxParallelExecutionsPerNode) populate(objectMap, "nodeSize", i.NodeSize) populate(objectMap, "numberOfNodes", i.NumberOfNodes) + populate(objectMap, "pipelineExternalComputeScaleProperties", i.PipelineExternalComputeScaleProperties) populate(objectMap, "vNetProperties", i.VNetProperties) if i.AdditionalProperties != nil { for key, val := range i.AdditionalProperties { @@ -3520,6 +3553,9 @@ func (i *IntegrationRuntimeComputeProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "copyComputeScaleProperties": + err = unpopulate(val, "CopyComputeScaleProperties", &i.CopyComputeScaleProperties) + delete(rawMsg, key) case "dataFlowProperties": err = unpopulate(val, "DataFlowProperties", &i.DataFlowProperties) delete(rawMsg, key) @@ -3535,6 +3571,9 @@ func (i *IntegrationRuntimeComputeProperties) UnmarshalJSON(data []byte) error { case "numberOfNodes": err = unpopulate(val, "NumberOfNodes", &i.NumberOfNodes) delete(rawMsg, key) + case "pipelineExternalComputeScaleProperties": + err = unpopulate(val, "PipelineExternalComputeScaleProperties", &i.PipelineExternalComputeScaleProperties) + delete(rawMsg, key) case "vNetProperties": err = unpopulate(val, "VNetProperties", &i.VNetProperties) delete(rawMsg, key) @@ -6607,6 +6646,41 @@ func (o *OptimizedAutoscale) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type PipelineExternalComputeScaleProperties. +func (p PipelineExternalComputeScaleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "numberOfExternalNodes", p.NumberOfExternalNodes) + populate(objectMap, "numberOfPipelineNodes", p.NumberOfPipelineNodes) + populate(objectMap, "timeToLive", p.TimeToLive) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineExternalComputeScaleProperties. +func (p *PipelineExternalComputeScaleProperties) 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", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "numberOfExternalNodes": + err = unpopulate(val, "NumberOfExternalNodes", &p.NumberOfExternalNodes) + delete(rawMsg, key) + case "numberOfPipelineNodes": + err = unpopulate(val, "NumberOfPipelineNodes", &p.NumberOfPipelineNodes) + delete(rawMsg, key) + case "timeToLive": + err = unpopulate(val, "TimeToLive", &p.TimeToLive) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -8016,33 +8090,6 @@ func (r *Resource) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ResourceMoveDefinition. -func (r ResourceMoveDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMoveDefinition. -func (r *ResourceMoveDefinition) 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", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type RestorableDroppedSQLPool. func (r RestorableDroppedSQLPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -9948,10 +9995,13 @@ 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) populateDateTimeRFC3339(objectMap, "scheduledUpdateDate", s.ScheduledUpdateDate) + populate(objectMap, "selfContainedInteractiveAuthoringEnabled", s.SelfContainedInteractiveAuthoringEnabled) 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) @@ -10001,18 +10051,27 @@ 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) case "scheduledUpdateDate": err = unpopulateDateTimeRFC3339(val, "ScheduledUpdateDate", &s.ScheduledUpdateDate) delete(rawMsg, key) + case "selfContainedInteractiveAuthoringEnabled": + err = unpopulate(val, "SelfContainedInteractiveAuthoringEnabled", &s.SelfContainedInteractiveAuthoringEnabled) + delete(rawMsg, key) case "serviceRegion": err = unpopulate(val, "ServiceRegion", &s.ServiceRegion) delete(rawMsg, key) 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) @@ -10037,6 +10096,7 @@ func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data [] func (s SelfHostedIntegrationRuntimeTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "linkedInfo", s.LinkedInfo) + populate(objectMap, "selfContainedInteractiveAuthoringEnabled", s.SelfContainedInteractiveAuthoringEnabled) return json.Marshal(objectMap) } @@ -10052,6 +10112,9 @@ func (s *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(data []byte) case "linkedInfo": s.LinkedInfo, err = unmarshalLinkedIntegrationRuntimeTypeClassification(val) delete(rawMsg, key) + case "selfContainedInteractiveAuthoringEnabled": + err = unpopulate(val, "SelfContainedInteractiveAuthoringEnabled", &s.SelfContainedInteractiveAuthoringEnabled) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -12528,7 +12591,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) @@ -12706,7 +12769,7 @@ func populateAny(m map[string]any, k string, v any) { } func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { + if data == nil || string(data) == "null" { return nil } if err := json.Unmarshal(data, v); err != nil { 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/options.go b/sdk/resourcemanager/synapse/armsynapse/options.go index 6d4da5c6e5d8..915dff814bdd 100644 --- a/sdk/resourcemanager/synapse/armsynapse/options.go +++ b/sdk/resourcemanager/synapse/armsynapse/options.go @@ -1165,11 +1165,6 @@ type SQLPoolsClientListByWorkspaceOptions struct { // placeholder for future optional parameters } -// SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. -type SQLPoolsClientRenameOptions struct { - // placeholder for future optional parameters -} - // SparkConfigurationClientGetOptions contains the optional parameters for the SparkConfigurationClient.Get method. type SparkConfigurationClientGetOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go b/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go index af11c71e5362..295605a4bf60 100644 --- a/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go +++ b/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go @@ -11,7 +11,7 @@ package armsynapse import "encoding/json" func unmarshalCustomSetupBaseClassification(rawMsg json.RawMessage) (CustomSetupBaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -36,7 +36,7 @@ func unmarshalCustomSetupBaseClassification(rawMsg json.RawMessage) (CustomSetup } func unmarshalCustomSetupBaseClassificationArray(rawMsg json.RawMessage) ([]CustomSetupBaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -55,7 +55,7 @@ func unmarshalCustomSetupBaseClassificationArray(rawMsg json.RawMessage) ([]Cust } func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (DataConnectionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -80,7 +80,7 @@ func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (DataConnecti } func unmarshalDataConnectionClassificationArray(rawMsg json.RawMessage) ([]DataConnectionClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -99,7 +99,7 @@ func unmarshalDataConnectionClassificationArray(rawMsg json.RawMessage) ([]DataC } func unmarshalDatabaseClassification(rawMsg json.RawMessage) (DatabaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -122,7 +122,7 @@ func unmarshalDatabaseClassification(rawMsg json.RawMessage) (DatabaseClassifica } func unmarshalDatabaseClassificationArray(rawMsg json.RawMessage) ([]DatabaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage @@ -141,7 +141,7 @@ func unmarshalDatabaseClassificationArray(rawMsg json.RawMessage) ([]DatabaseCla } func unmarshalIntegrationRuntimeClassification(rawMsg json.RawMessage) (IntegrationRuntimeClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -164,7 +164,7 @@ func unmarshalIntegrationRuntimeClassification(rawMsg json.RawMessage) (Integrat } func unmarshalIntegrationRuntimeStatusClassification(rawMsg json.RawMessage) (IntegrationRuntimeStatusClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -187,7 +187,7 @@ func unmarshalIntegrationRuntimeStatusClassification(rawMsg json.RawMessage) (In } func unmarshalLinkedIntegrationRuntimeTypeClassification(rawMsg json.RawMessage) (LinkedIntegrationRuntimeTypeClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -210,7 +210,7 @@ func unmarshalLinkedIntegrationRuntimeTypeClassification(rawMsg json.RawMessage) } func unmarshalSecretBaseClassification(rawMsg json.RawMessage) (SecretBaseClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -231,7 +231,7 @@ func unmarshalSecretBaseClassification(rawMsg json.RawMessage) (SecretBaseClassi } func unmarshalSsisObjectMetadataClassification(rawMsg json.RawMessage) (SsisObjectMetadataClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var m map[string]any @@ -258,7 +258,7 @@ func unmarshalSsisObjectMetadataClassification(rawMsg json.RawMessage) (SsisObje } func unmarshalSsisObjectMetadataClassificationArray(rawMsg json.RawMessage) ([]SsisObjectMetadataClassification, error) { - if rawMsg == nil { + if rawMsg == nil || string(rawMsg) == "null" { return nil, nil } var rawMessages []json.RawMessage 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.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go index 1475a0cfd550..111e7e8ee7b9 100644 --- a/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go @@ -127,7 +127,8 @@ func (client *PrivateLinkHubsClient) BeginDelete(ctx context.Context, resourceGr return nil, err } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkHubsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { 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/response_types.go b/sdk/resourcemanager/synapse/armsynapse/responses.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/response_types.go rename to sdk/resourcemanager/synapse/armsynapse/responses.go index ec6d1d5f84ed..254944a04295 100644 --- a/sdk/resourcemanager/synapse/armsynapse/response_types.go +++ b/sdk/resourcemanager/synapse/armsynapse/responses.go @@ -1171,11 +1171,6 @@ type SQLPoolsClientPauseResponse struct { SQLPool } -// SQLPoolsClientRenameResponse contains the response from method SQLPoolsClient.Rename. -type SQLPoolsClientRenameResponse struct { - // placeholder for future response values -} - // SQLPoolsClientResumeResponse contains the response from method SQLPoolsClient.BeginResume. type SQLPoolsClientResumeResponse struct { // A SQL Analytics pool 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 44a8b340c4b9..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.200Z"); return t}()), - // DatabaseName: to.Ptr("restorabledroppeddatabasetest-7654"), - // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-20T02:49:47.690Z"); 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.200Z"); return t}()), - // DatabaseName: to.Ptr("restorabledroppeddatabasetest-1345"), - // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-20T02:49:47.690Z"); 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.200Z"); 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.690Z"); 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 27044c3374a0..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:00.000Z"); 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 7e61bc208963..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:00.000Z"); 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:00.000Z"); 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 c7d4e75468d0..9e083eb010a1 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go @@ -88,7 +88,7 @@ func (client *SQLPoolOperationResultsClient) getLocationHeaderResult(ctx context if err != nil { return nil, err } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { err = runtime.NewResponseError(httpResp) return nil, err } 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 ca638f64eca7..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.680Z"); 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 b40409e276a0..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:10.000Z"); 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.100Z"); 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:10.000Z"); 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.100Z"); 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 674cc0a89c7a..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:14.000Z"); 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:55.000Z"); 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.go b/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go index 48ef07b61a97..d975103d4477 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go @@ -424,68 +424,6 @@ func (client *SQLPoolsClient) pauseCreateRequest(ctx context.Context, resourceGr return req, nil } -// Rename - Rename a SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - workspaceName - The name of the workspace. -// - sqlPoolName - SQL pool name -// - parameters - The resource move definition for renaming this Sql pool. -// - options - SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. -func (client *SQLPoolsClient) Rename(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters ResourceMoveDefinition, options *SQLPoolsClientRenameOptions) (SQLPoolsClientRenameResponse, error) { - var err error - const operationName = "SQLPoolsClient.Rename" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.renameCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) - if err != nil { - return SQLPoolsClientRenameResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SQLPoolsClientRenameResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return SQLPoolsClientRenameResponse{}, err - } - return SQLPoolsClientRenameResponse{}, nil -} - -// renameCreateRequest creates the Rename request. -func (client *SQLPoolsClient) renameCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters ResourceMoveDefinition, options *SQLPoolsClientRenameOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/move" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if workspaceName == "" { - return nil, errors.New("parameter workspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) - if sqlPoolName == "" { - return nil, errors.New("parameter sqlPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sqlPoolName}", url.PathEscape(sqlPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - // BeginResume - Resume a SQL pool // If the operation fails it returns an *azcore.ResponseError type. // 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 e2217e83c739..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.200Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); 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, "1-01-01T00:00:00.000Z"); 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.040Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); 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, "1-01-01T00:00:00.000Z"); 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, "1-01-01T00:00:00.000Z"); 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, "1-01-01T00:00:00.000Z"); 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, "1-01-01T00:00:00.000Z"); 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.200Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); 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.200Z"); return t}()), - // MaxSizeBytes: to.Ptr[int64](268435456000), - // ProvisioningState: to.Ptr("Succeeded"), - // RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); 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.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go index 71666981e94f..5bb0e5ec2342 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go @@ -171,10 +171,10 @@ func (client *SQLPoolSchemasClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil 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 eb4eca246f9f..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:00.000Z"); 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:00.000Z"); 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.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go index aab6ebe5f856..839ed78071b8 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go @@ -505,10 +505,10 @@ func (client *SQLPoolSensitivityLabelsClient) listCurrentCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -578,15 +578,15 @@ func (client *SQLPoolSensitivityLabelsClient) listRecommendedCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - if options != nil && options.IncludeDisabledRecommendations != nil { - reqQP.Set("includeDisabledRecommendations", strconv.FormatBool(*options.IncludeDisabledRecommendations)) + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) } if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) + reqQP.Set("api-version", "2021-06-01") + if options != nil && options.IncludeDisabledRecommendations != nil { + reqQP.Set("includeDisabledRecommendations", strconv.FormatBool(*options.IncludeDisabledRecommendations)) } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} 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.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go index 4a864e7ee52c..f08374bba4ac 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go @@ -108,10 +108,10 @@ func (client *SQLPoolTableColumnsClient) listByTableNameCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil 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.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go index 28435afa5b48..9e130eeb9f1e 100644 --- a/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go @@ -182,10 +182,10 @@ func (client *SQLPoolTablesClient) listBySchemaCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } + reqQP.Set("api-version", "2021-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil 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 ee8980558b62..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:06.000Z"); 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:06.000Z"); 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:06.000Z"); 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:06.000Z"); 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:06.000Z"); 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:06.000Z"); 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:06.000Z"); 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:06.000Z"); 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/time_rfc3339.go b/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go index 51b9c6936594..0d8f100a274f 100644 --- a/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go +++ b/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go @@ -19,12 +19,16 @@ import ( ) // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) const ( - utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` - utcDateTime = "2006-01-02T15:04:05.999999999" - dateTimeJSON = `"` + time.RFC3339Nano + `"` + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` ) type dateTimeRFC3339 time.Time @@ -40,17 +44,33 @@ func (t dateTimeRFC3339) MarshalText() ([]byte, error) { } func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcDateTimeJSON - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT } return t.Parse(layout, string(data)) } func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { - layout := utcDateTime - if tzOffsetRegex.Match(data) { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT } return t.Parse(layout, string(data)) } @@ -61,6 +81,10 @@ func (t *dateTimeRFC3339) Parse(layout, value string) error { return err } +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return @@ -74,7 +98,7 @@ func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { } func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { + if data == nil || string(data) == "null" { return nil } var aux dateTimeRFC3339 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 214e6a37f85c..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.780Z"); 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.780Z"); 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.780Z"); 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.780Z"); 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 c7b3bb99e86c..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.520Z"); 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.520Z"); 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.520Z"); 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.520Z"); 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) - } -}