diff --git a/sdk/resourcemanager/datafactory/armdatafactory/CHANGELOG.md b/sdk/resourcemanager/datafactory/armdatafactory/CHANGELOG.md index a19ee548c516..db97677ed675 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/CHANGELOG.md +++ b/sdk/resourcemanager/datafactory/armdatafactory/CHANGELOG.md @@ -1,5 +1,40 @@ # Release History +## 8.0.0 (2024-05-09) +### Breaking Changes + +- Type of `DatasetReference.Type` has been changed from `*DatasetReferenceType` to `*string` +- Type of `IntegrationRuntimeReference.Type` has been changed from `*IntegrationRuntimeReferenceType` to `*string` +- Type of `LinkedServiceReference.Type` has been changed from `*LinkedServiceReferenceType` to `*string` +- Type of `PipelineReference.Type` has been changed from `*PipelineReferenceType` to `*string` +- Enum `DatasetReferenceType` has been removed +- Enum `IntegrationRuntimeReferenceType` has been removed +- Enum `LinkedServiceReferenceType` has been removed +- Enum `PipelineReferenceType` has been removed +- Enum `ScriptType` has been removed + +### Features Added + +- Type of `ScriptActivityScriptBlock.Type` has been changed from `*ScriptType` to `any` +- New enum type `AmazonRdsForSQLAuthenticationType` with values `AmazonRdsForSQLAuthenticationTypeSQL`, `AmazonRdsForSQLAuthenticationTypeWindows` +- New enum type `AzureSQLDWAuthenticationType` with values `AzureSQLDWAuthenticationTypeSQL`, `AzureSQLDWAuthenticationTypeServicePrincipal`, `AzureSQLDWAuthenticationTypeSystemAssignedManagedIdentity`, `AzureSQLDWAuthenticationTypeUserAssignedManagedIdentity` +- New enum type `AzureSQLDatabaseAuthenticationType` with values `AzureSQLDatabaseAuthenticationTypeSQL`, `AzureSQLDatabaseAuthenticationTypeServicePrincipal`, `AzureSQLDatabaseAuthenticationTypeSystemAssignedManagedIdentity`, `AzureSQLDatabaseAuthenticationTypeUserAssignedManagedIdentity` +- New enum type `AzureSQLMIAuthenticationType` with values `AzureSQLMIAuthenticationTypeSQL`, `AzureSQLMIAuthenticationTypeServicePrincipal`, `AzureSQLMIAuthenticationTypeSystemAssignedManagedIdentity`, `AzureSQLMIAuthenticationTypeUserAssignedManagedIdentity` +- New enum type `SQLServerAuthenticationType` with values `SQLServerAuthenticationTypeSQL`, `SQLServerAuthenticationTypeWindows` +- New function `*DatasetReference.GetReference() *Reference` +- New function `*IntegrationRuntimeReference.GetReference() *Reference` +- New function `*LinkedServiceReference.GetReference() *Reference` +- New function `*PipelineReference.GetReference() *Reference` +- New function `*Reference.GetReference() *Reference` +- New struct `ManagedIdentityTypeProperties` +- New field `ApplicationIntent`, `AuthenticationType`, `CommandTimeout`, `ConnectRetryCount`, `ConnectRetryInterval`, `ConnectTimeout`, `Database`, `Encrypt`, `FailoverPartner`, `HostNameInCertificate`, `IntegratedSecurity`, `LoadBalanceTimeout`, `MaxPoolSize`, `MinPoolSize`, `MultiSubnetFailover`, `MultipleActiveResultSets`, `PacketSize`, `Pooling`, `Server`, `TrustServerCertificate` in struct `AmazonRdsForSQLServerLinkedServiceTypeProperties` +- New field `ApplicationIntent`, `AuthenticationType`, `CommandTimeout`, `ConnectRetryCount`, `ConnectRetryInterval`, `ConnectTimeout`, `Database`, `Encrypt`, `FailoverPartner`, `HostNameInCertificate`, `IntegratedSecurity`, `LoadBalanceTimeout`, `MaxPoolSize`, `MinPoolSize`, `MultiSubnetFailover`, `MultipleActiveResultSets`, `PacketSize`, `Pooling`, `Server`, `ServicePrincipalCredential`, `ServicePrincipalCredentialType`, `TrustServerCertificate`, `UserName` in struct `AzureSQLDWLinkedServiceTypeProperties` +- New field `ApplicationIntent`, `AuthenticationType`, `CommandTimeout`, `ConnectRetryCount`, `ConnectRetryInterval`, `ConnectTimeout`, `Database`, `Encrypt`, `FailoverPartner`, `HostNameInCertificate`, `IntegratedSecurity`, `LoadBalanceTimeout`, `MaxPoolSize`, `MinPoolSize`, `MultiSubnetFailover`, `MultipleActiveResultSets`, `PacketSize`, `Pooling`, `Server`, `ServicePrincipalCredential`, `ServicePrincipalCredentialType`, `TrustServerCertificate`, `UserName` in struct `AzureSQLDatabaseLinkedServiceTypeProperties` +- New field `ApplicationIntent`, `AuthenticationType`, `CommandTimeout`, `ConnectRetryCount`, `ConnectRetryInterval`, `ConnectTimeout`, `Database`, `Encrypt`, `FailoverPartner`, `HostNameInCertificate`, `IntegratedSecurity`, `LoadBalanceTimeout`, `MaxPoolSize`, `MinPoolSize`, `MultiSubnetFailover`, `MultipleActiveResultSets`, `PacketSize`, `Pooling`, `Server`, `ServicePrincipalCredential`, `ServicePrincipalCredentialType`, `TrustServerCertificate`, `UserName` in struct `AzureSQLMILinkedServiceTypeProperties` +- New field `TypeProperties` in struct `ManagedIdentityCredential` +- New field `ApplicationIntent`, `AuthenticationType`, `CommandTimeout`, `ConnectRetryCount`, `ConnectRetryInterval`, `ConnectTimeout`, `Database`, `Encrypt`, `FailoverPartner`, `HostNameInCertificate`, `IntegratedSecurity`, `LoadBalanceTimeout`, `MaxPoolSize`, `MinPoolSize`, `MultiSubnetFailover`, `MultipleActiveResultSets`, `PacketSize`, `Pooling`, `Server`, `TrustServerCertificate` in struct `SQLServerLinkedServiceTypeProperties` + + ## 7.0.0 (2024-04-04) ### Breaking Changes diff --git a/sdk/resourcemanager/datafactory/armdatafactory/README.md b/sdk/resourcemanager/datafactory/armdatafactory/README.md index 46dac46c2a15..0a84394293f2 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/README.md +++ b/sdk/resourcemanager/datafactory/armdatafactory/README.md @@ -1,6 +1,6 @@ # Azure Data Factory Module for Go -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8) The `armdatafactory` module provides operations for working with Azure Data Factory. @@ -20,7 +20,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve Install the Azure Data Factory module: ```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8 ``` ## Authorization diff --git a/sdk/resourcemanager/datafactory/armdatafactory/activityruns_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/activityruns_client_example_test.go deleted file mode 100644 index c787ba9dd211..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/activityruns_client_example_test.go +++ /dev/null @@ -1,138 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ActivityRuns_QueryByPipelineRun.json -func ExampleActivityRunsClient_QueryByPipelineRun() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewActivityRunsClient().QueryByPipelineRun(ctx, "exampleResourceGroup", "exampleFactoryName", "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b", armdatafactory.RunFilterParameters{ - LastUpdatedAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:36:44.334Z"); return t }()), - LastUpdatedBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:49:48.368Z"); return t }()), - }, 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.ActivityRunsQueryResponse = armdatafactory.ActivityRunsQueryResponse{ - // Value: []*armdatafactory.ActivityRun{ - // { - // AdditionalProperties: map[string]any{ - // "retryAttempt": nil, - // "userProperties": map[string]any{ - // }, - // }, - // ActivityName: to.Ptr("ExampleForeachActivity"), - // ActivityRunEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:38:11.544Z"); return t}()), - // ActivityRunID: to.Ptr("f30c5514-fb85-43ed-9fa4-768d42e58680"), - // ActivityRunStart: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:37:49.480Z"); return t}()), - // ActivityType: to.Ptr("ForEach"), - // DurationInMs: to.Ptr[int32](22064), - // Error: map[string]any{ - // "errorCode": "", - // "failureType": "", - // "message": "", - // "target": "ExampleForeachActivity", - // }, - // Input: map[string]any{ - // }, - // LinkedServiceName: to.Ptr(""), - // Output: map[string]any{ - // }, - // PipelineName: to.Ptr("examplePipeline"), - // PipelineRunID: to.Ptr("2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"), - // Status: to.Ptr("Succeeded"), - // }, - // { - // AdditionalProperties: map[string]any{ - // "retryAttempt": nil, - // "userProperties": map[string]any{ - // }, - // }, - // ActivityName: to.Ptr("ExampleCopyActivity"), - // ActivityRunEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:38:07.418Z"); return t}()), - // ActivityRunID: to.Ptr("a96678c8-7167-4f00-b629-afccfbad4e51"), - // ActivityRunStart: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:37:50.246Z"); return t}()), - // ActivityType: to.Ptr("Copy"), - // DurationInMs: to.Ptr[int32](17172), - // Error: map[string]any{ - // "errorCode": "", - // "failureType": "", - // "message": "", - // "target": "ExampleCopyActivity", - // }, - // Input: map[string]any{ - // "dataIntegrationUnits": float64(32), - // "sink":map[string]any{ - // "type": "BlobSink", - // }, - // "source":map[string]any{ - // "type": "BlobSource", - // }, - // }, - // LinkedServiceName: to.Ptr(""), - // Output: map[string]any{ - // "copyDuration": float64(6), - // "dataRead": float64(142000), - // "dataWritten": float64(142000), - // "effectiveIntegrationRuntime": "DefaultIntegrationRuntime (East US)", - // "errors":[]any{ - // }, - // "executionDetails":[]any{ - // map[string]any{ - // "detailedDurations":map[string]any{ - // "queuingDuration": float64(4), - // "transferDuration": float64(2), - // }, - // "duration": float64(6), - // "sink":map[string]any{ - // "type": "AzureBlob", - // }, - // "source":map[string]any{ - // "type": "AzureBlob", - // }, - // "start": "2018-06-16T00:37:50.68834Z", - // "status": "Succeeded", - // "usedCloudDataMovementUnits": float64(4), - // "usedParallelCopies": float64(1), - // }, - // }, - // "filesRead": float64(1), - // "filesWritten": float64(1), - // "throughput": float64(23.112), - // "usedCloudDataMovementUnits": float64(4), - // "usedParallelCopies": float64(1), - // }, - // PipelineName: to.Ptr("examplePipeline"), - // PipelineRunID: to.Ptr("2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"), - // Status: to.Ptr("Succeeded"), - // }}, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/autorest.md b/sdk/resourcemanager/datafactory/armdatafactory/autorest.md index e697eee5d772..affae5468de5 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/autorest.md +++ b/sdk/resourcemanager/datafactory/armdatafactory/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/datafactory/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/datafactory/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 7.0.0 -tag: package-2018-06 +module-version: 8.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/datafactory/armdatafactory/changedatacapture_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/changedatacapture_client_example_test.go deleted file mode 100644 index 5cfd59852e7b..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/changedatacapture_client_example_test.go +++ /dev/null @@ -1,232 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_ListByFactory.json -func ExampleChangeDataCaptureClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewChangeDataCaptureClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.ChangeDataCaptureListResponse = armdatafactory.ChangeDataCaptureListResponse{ - // Value: []*armdatafactory.ChangeDataCaptureResource{ - // { - // Name: to.Ptr("exampleChangeDataCapture"), - // Type: to.Ptr("Microsoft.DataFactory/factories/adfcdcs"), - // Etag: to.Ptr("4200eefe-0000-0100-0000-641aa97a0000"), - // ID: to.Ptr("/subscriptions/d3bb3b2e-9a7e-4194-9960-5171bd192117/resourceGroups/amja-rg-03/providers/Microsoft.DataFactory/factories/amja-adf-04/adfcdcs/exampleChangeDataCapture"), - // Properties: &armdatafactory.ChangeDataCapture{ - // Description: to.Ptr("Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database with automapped and non-automapped mappings."), - // AllowVNetOverride: to.Ptr(false), - // Status: to.Ptr("Stopped"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Create.json -func ExampleChangeDataCaptureClient_CreateOrUpdate_changeDataCaptureCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewChangeDataCaptureClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", armdatafactory.ChangeDataCaptureResource{ - Properties: &armdatafactory.ChangeDataCapture{ - Description: to.Ptr("Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database with automapped and non-automapped mappings."), - AllowVNetOverride: to.Ptr(false), - }, - }, &armdatafactory.ChangeDataCaptureClientCreateOrUpdateOptions{IfMatch: 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.ChangeDataCaptureResource = armdatafactory.ChangeDataCaptureResource{ - // Name: to.Ptr("exampleChangeDataCapture"), - // Type: to.Ptr("Microsoft.DataFactory/factories/adfcdcs"), - // Etag: to.Ptr("4300f91d-0000-0100-0000-641ab34d0000"), - // ID: to.Ptr("/subscriptions/d3bb3b2e-9a7e-4194-9960-5171bd192117/resourceGroups/amja-rg-03/providers/Microsoft.DataFactory/factories/amja-adf-04/adfcdcs/exampleChangeDataCapture"), - // Properties: &armdatafactory.ChangeDataCapture{ - // Description: to.Ptr("Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database. Updating table mappings."), - // AllowVNetOverride: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Update.json -func ExampleChangeDataCaptureClient_CreateOrUpdate_changeDataCaptureUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewChangeDataCaptureClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", armdatafactory.ChangeDataCaptureResource{ - Properties: &armdatafactory.ChangeDataCapture{ - Description: to.Ptr("Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database. Updating table mappings."), - AllowVNetOverride: to.Ptr(false), - Status: to.Ptr("Stopped"), - }, - }, &armdatafactory.ChangeDataCaptureClientCreateOrUpdateOptions{IfMatch: 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.ChangeDataCaptureResource = armdatafactory.ChangeDataCaptureResource{ - // Name: to.Ptr("exampleChangeDataCapture"), - // Type: to.Ptr("Microsoft.DataFactory/factories/adfcdcs"), - // Etag: to.Ptr("43008e18-0000-0100-0000-641aafca0000"), - // ID: to.Ptr("/subscriptions/d3bb3b2e-9a7e-4194-9960-5171bd192117/resourceGroups/amja-rg-03/providers/Microsoft.DataFactory/factories/amja-adf-04/adfcdcs/exampleChangeDataCapture"), - // Properties: &armdatafactory.ChangeDataCapture{ - // Description: to.Ptr("Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database. Updating table mappings."), - // AllowVNetOverride: to.Ptr(false), - // Status: to.Ptr("Stopped"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Get.json -func ExampleChangeDataCaptureClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewChangeDataCaptureClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", &armdatafactory.ChangeDataCaptureClientGetOptions{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.ChangeDataCaptureResource = armdatafactory.ChangeDataCaptureResource{ - // Name: to.Ptr("exampleChangeDataCapture"), - // Type: to.Ptr("Microsoft.DataFactory/factories/adfcdcs"), - // Etag: to.Ptr("4300f91d-0000-0100-0000-641ab34d0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/adfcdcs/exampleChangeDataCapture"), - // Properties: &armdatafactory.ChangeDataCapture{ - // Description: to.Ptr("Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database. Updating table mappings."), - // AllowVNetOverride: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Delete.json -func ExampleChangeDataCaptureClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewChangeDataCaptureClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Start.json -func ExampleChangeDataCaptureClient_Start() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewChangeDataCaptureClient().Start(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Stop.json -func ExampleChangeDataCaptureClient_Stop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewChangeDataCaptureClient().Stop(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Status.json -func ExampleChangeDataCaptureClient_Status() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewChangeDataCaptureClient().Status(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleChangeDataCapture", 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.Value = "Stopped" -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/constants.go b/sdk/resourcemanager/datafactory/armdatafactory/constants.go index b6e6b96a497d..632182176875 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/constants.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/constants.go @@ -10,7 +10,7 @@ package armdatafactory const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory" - moduleVersion = "v7.0.0" + moduleVersion = "v8.0.0" ) // ActivityOnInactiveMarkAs - Status result of the activity when the state is set to Inactive. This is an optional property @@ -48,6 +48,22 @@ func PossibleActivityStateValues() []ActivityState { } } +// AmazonRdsForSQLAuthenticationType - The type used for authentication. Type: string. +type AmazonRdsForSQLAuthenticationType string + +const ( + AmazonRdsForSQLAuthenticationTypeSQL AmazonRdsForSQLAuthenticationType = "SQL" + AmazonRdsForSQLAuthenticationTypeWindows AmazonRdsForSQLAuthenticationType = "Windows" +) + +// PossibleAmazonRdsForSQLAuthenticationTypeValues returns the possible values for the AmazonRdsForSQLAuthenticationType const type. +func PossibleAmazonRdsForSQLAuthenticationTypeValues() []AmazonRdsForSQLAuthenticationType { + return []AmazonRdsForSQLAuthenticationType{ + AmazonRdsForSQLAuthenticationTypeSQL, + AmazonRdsForSQLAuthenticationTypeWindows, + } +} + // AzureFunctionActivityMethod - The list of HTTP methods supported by a AzureFunctionActivity. type AzureFunctionActivityMethod string @@ -74,6 +90,66 @@ func PossibleAzureFunctionActivityMethodValues() []AzureFunctionActivityMethod { } } +// AzureSQLDWAuthenticationType - The type used for authentication. Type: string. +type AzureSQLDWAuthenticationType string + +const ( + AzureSQLDWAuthenticationTypeSQL AzureSQLDWAuthenticationType = "SQL" + AzureSQLDWAuthenticationTypeServicePrincipal AzureSQLDWAuthenticationType = "ServicePrincipal" + AzureSQLDWAuthenticationTypeSystemAssignedManagedIdentity AzureSQLDWAuthenticationType = "SystemAssignedManagedIdentity" + AzureSQLDWAuthenticationTypeUserAssignedManagedIdentity AzureSQLDWAuthenticationType = "UserAssignedManagedIdentity" +) + +// PossibleAzureSQLDWAuthenticationTypeValues returns the possible values for the AzureSQLDWAuthenticationType const type. +func PossibleAzureSQLDWAuthenticationTypeValues() []AzureSQLDWAuthenticationType { + return []AzureSQLDWAuthenticationType{ + AzureSQLDWAuthenticationTypeSQL, + AzureSQLDWAuthenticationTypeServicePrincipal, + AzureSQLDWAuthenticationTypeSystemAssignedManagedIdentity, + AzureSQLDWAuthenticationTypeUserAssignedManagedIdentity, + } +} + +// AzureSQLDatabaseAuthenticationType - The type used for authentication. Type: string. +type AzureSQLDatabaseAuthenticationType string + +const ( + AzureSQLDatabaseAuthenticationTypeSQL AzureSQLDatabaseAuthenticationType = "SQL" + AzureSQLDatabaseAuthenticationTypeServicePrincipal AzureSQLDatabaseAuthenticationType = "ServicePrincipal" + AzureSQLDatabaseAuthenticationTypeSystemAssignedManagedIdentity AzureSQLDatabaseAuthenticationType = "SystemAssignedManagedIdentity" + AzureSQLDatabaseAuthenticationTypeUserAssignedManagedIdentity AzureSQLDatabaseAuthenticationType = "UserAssignedManagedIdentity" +) + +// PossibleAzureSQLDatabaseAuthenticationTypeValues returns the possible values for the AzureSQLDatabaseAuthenticationType const type. +func PossibleAzureSQLDatabaseAuthenticationTypeValues() []AzureSQLDatabaseAuthenticationType { + return []AzureSQLDatabaseAuthenticationType{ + AzureSQLDatabaseAuthenticationTypeSQL, + AzureSQLDatabaseAuthenticationTypeServicePrincipal, + AzureSQLDatabaseAuthenticationTypeSystemAssignedManagedIdentity, + AzureSQLDatabaseAuthenticationTypeUserAssignedManagedIdentity, + } +} + +// AzureSQLMIAuthenticationType - The type used for authentication. Type: string. +type AzureSQLMIAuthenticationType string + +const ( + AzureSQLMIAuthenticationTypeSQL AzureSQLMIAuthenticationType = "SQL" + AzureSQLMIAuthenticationTypeServicePrincipal AzureSQLMIAuthenticationType = "ServicePrincipal" + AzureSQLMIAuthenticationTypeSystemAssignedManagedIdentity AzureSQLMIAuthenticationType = "SystemAssignedManagedIdentity" + AzureSQLMIAuthenticationTypeUserAssignedManagedIdentity AzureSQLMIAuthenticationType = "UserAssignedManagedIdentity" +) + +// PossibleAzureSQLMIAuthenticationTypeValues returns the possible values for the AzureSQLMIAuthenticationType const type. +func PossibleAzureSQLMIAuthenticationTypeValues() []AzureSQLMIAuthenticationType { + return []AzureSQLMIAuthenticationType{ + AzureSQLMIAuthenticationTypeSQL, + AzureSQLMIAuthenticationTypeServicePrincipal, + AzureSQLMIAuthenticationTypeSystemAssignedManagedIdentity, + AzureSQLMIAuthenticationTypeUserAssignedManagedIdentity, + } +} + // AzureSearchIndexWriteBehaviorType - Specify the write behavior when upserting documents into Azure Search Index. type AzureSearchIndexWriteBehaviorType string @@ -288,20 +364,6 @@ func PossibleDataFlowReferenceTypeValues() []DataFlowReferenceType { } } -// DatasetReferenceType - Dataset reference type. -type DatasetReferenceType string - -const ( - DatasetReferenceTypeDatasetReference DatasetReferenceType = "DatasetReference" -) - -// PossibleDatasetReferenceTypeValues returns the possible values for the DatasetReferenceType const type. -func PossibleDatasetReferenceTypeValues() []DatasetReferenceType { - return []DatasetReferenceType{ - DatasetReferenceTypeDatasetReference, - } -} - // DayOfWeek - The days of the week. type DayOfWeek string @@ -811,20 +873,6 @@ func PossibleIntegrationRuntimeLicenseTypeValues() []IntegrationRuntimeLicenseTy } } -// IntegrationRuntimeReferenceType - Type of integration runtime. -type IntegrationRuntimeReferenceType string - -const ( - IntegrationRuntimeReferenceTypeIntegrationRuntimeReference IntegrationRuntimeReferenceType = "IntegrationRuntimeReference" -) - -// PossibleIntegrationRuntimeReferenceTypeValues returns the possible values for the IntegrationRuntimeReferenceType const type. -func PossibleIntegrationRuntimeReferenceTypeValues() []IntegrationRuntimeReferenceType { - return []IntegrationRuntimeReferenceType{ - IntegrationRuntimeReferenceTypeIntegrationRuntimeReference, - } -} - // IntegrationRuntimeSsisCatalogPricingTier - The pricing tier for the catalog database. The valid values could be found in // https://azure.microsoft.com/en-us/pricing/details/sql-database/ type IntegrationRuntimeSsisCatalogPricingTier string @@ -912,20 +960,6 @@ func PossibleIntegrationRuntimeUpdateResultValues() []IntegrationRuntimeUpdateRe } } -// LinkedServiceReferenceType - Linked service reference type. -type LinkedServiceReferenceType string - -const ( - LinkedServiceReferenceTypeLinkedServiceReference LinkedServiceReferenceType = "LinkedServiceReference" -) - -// PossibleLinkedServiceReferenceTypeValues returns the possible values for the LinkedServiceReferenceType const type. -func PossibleLinkedServiceReferenceTypeValues() []LinkedServiceReferenceType { - return []LinkedServiceReferenceType{ - LinkedServiceReferenceTypeLinkedServiceReference, - } -} - // ManagedIntegrationRuntimeNodeStatus - The managed integration runtime node status. type ManagedIntegrationRuntimeNodeStatus string @@ -1110,20 +1144,6 @@ func PossiblePhoenixAuthenticationTypeValues() []PhoenixAuthenticationType { } } -// PipelineReferenceType - Pipeline reference type. -type PipelineReferenceType string - -const ( - PipelineReferenceTypePipelineReference PipelineReferenceType = "PipelineReference" -) - -// PossiblePipelineReferenceTypeValues returns the possible values for the PipelineReferenceType const type. -func PossiblePipelineReferenceTypeValues() []PipelineReferenceType { - return []PipelineReferenceType{ - PipelineReferenceTypePipelineReference, - } -} - // PolybaseSettingsRejectType - Indicates whether the RejectValue property is specified as a literal value or a percentage. type PolybaseSettingsRejectType string @@ -1344,6 +1364,22 @@ func PossibleSQLAlwaysEncryptedAkvAuthTypeValues() []SQLAlwaysEncryptedAkvAuthTy } } +// SQLServerAuthenticationType - The type used for authentication. Type: string. +type SQLServerAuthenticationType string + +const ( + SQLServerAuthenticationTypeSQL SQLServerAuthenticationType = "SQL" + SQLServerAuthenticationTypeWindows SQLServerAuthenticationType = "Windows" +) + +// PossibleSQLServerAuthenticationTypeValues returns the possible values for the SQLServerAuthenticationType const type. +func PossibleSQLServerAuthenticationTypeValues() []SQLServerAuthenticationType { + return []SQLServerAuthenticationType{ + SQLServerAuthenticationTypeSQL, + SQLServerAuthenticationTypeWindows, + } +} + // SalesforceSinkWriteBehavior - The write behavior for the operation. Default is Insert. type SalesforceSinkWriteBehavior string @@ -1478,22 +1514,6 @@ func PossibleScriptActivityParameterTypeValues() []ScriptActivityParameterType { } } -// ScriptType - The type of the query. Type: string. -type ScriptType string - -const ( - ScriptTypeNonQuery ScriptType = "NonQuery" - ScriptTypeQuery ScriptType = "Query" -) - -// PossibleScriptTypeValues returns the possible values for the ScriptType const type. -func PossibleScriptTypeValues() []ScriptType { - return []ScriptType{ - ScriptTypeNonQuery, - ScriptTypeQuery, - } -} - // SelfHostedIntegrationRuntimeNodeStatus - Status of the integration runtime node. type SelfHostedIntegrationRuntimeNodeStatus string diff --git a/sdk/resourcemanager/datafactory/armdatafactory/credentialoperations_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/credentialoperations_client_example_test.go deleted file mode 100644 index f0d67d9807f7..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/credentialoperations_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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Credentials_ListByFactory.json -func ExampleCredentialOperationsClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCredentialOperationsClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.CredentialListResponse = armdatafactory.CredentialListResponse{ - // Value: []*armdatafactory.CredentialResource{ - // { - // Name: to.Ptr("exampleLinkedService"), - // Type: to.Ptr("Microsoft.DataFactory/factories/credentials"), - // Etag: to.Ptr("0a0064d4-0000-0000-0000-5b245bd00000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/credentials/exampleCredential"), - // Properties: &armdatafactory.ManagedIdentityCredential{ - // Type: to.Ptr("ManagedIdentity"), - // Description: to.Ptr("Example description"), - // AdditionalProperties: map[string]any{ - // "typeProperties": map[string]any{ - // "resourceId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami", - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Credentials_Create.json -func ExampleCredentialOperationsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCredentialOperationsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleCredential", armdatafactory.CredentialResource{ - Properties: &armdatafactory.ManagedIdentityCredential{ - Type: to.Ptr("ManagedIdentity"), - AdditionalProperties: map[string]any{ - "typeProperties": map[string]any{ - "resourceId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami", - }, - }, - }, - }, &armdatafactory.CredentialOperationsClientCreateOrUpdateOptions{IfMatch: 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.CredentialResource = armdatafactory.CredentialResource{ - // Name: to.Ptr("exampleCredential"), - // Type: to.Ptr("Microsoft.DataFactory/factories/credentials"), - // Etag: to.Ptr("0a0062d4-0000-0000-0000-5b245bcf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/credentials/exampleCredential"), - // Properties: &armdatafactory.ManagedIdentityCredential{ - // Type: to.Ptr("ManagedIdentity"), - // AdditionalProperties: map[string]any{ - // "typeProperties": map[string]any{ - // "resourceId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami", - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Credentials_Get.json -func ExampleCredentialOperationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCredentialOperationsClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleCredential", &armdatafactory.CredentialOperationsClientGetOptions{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.CredentialResource = armdatafactory.CredentialResource{ - // Name: to.Ptr("exampleLinkedService"), - // Type: to.Ptr("Microsoft.DataFactory/factories/credentials"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/credentials/exampleCredential"), - // Properties: &armdatafactory.ManagedIdentityCredential{ - // Type: to.Ptr("ManagedIdentity"), - // Description: to.Ptr("Example description"), - // AdditionalProperties: map[string]any{ - // "typeProperties": map[string]any{ - // "resourceId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami", - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Credentials_Delete.json -func ExampleCredentialOperationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCredentialOperationsClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleCredential", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go b/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go index 15a01515d3b6..704993915d12 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/stretchr/testify/suite" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/dataflowdebugsession_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/dataflowdebugsession_client_example_test.go deleted file mode 100644 index 07ab7d562cb7..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/dataflowdebugsession_client_example_test.go +++ /dev/null @@ -1,265 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Create.json -func ExampleDataFlowDebugSessionClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDataFlowDebugSessionClient().BeginCreate(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.CreateDataFlowDebugSessionRequest{ - IntegrationRuntime: &armdatafactory.IntegrationRuntimeDebugResource{ - Name: to.Ptr("ir1"), - Properties: &armdatafactory.ManagedIntegrationRuntime{ - Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeManaged), - TypeProperties: &armdatafactory.ManagedIntegrationRuntimeTypeProperties{ - ComputeProperties: &armdatafactory.IntegrationRuntimeComputeProperties{ - DataFlowProperties: &armdatafactory.IntegrationRuntimeDataFlowProperties{ - ComputeType: to.Ptr(armdatafactory.DataFlowComputeTypeGeneral), - CoreCount: to.Ptr[int32](48), - TimeToLive: to.Ptr[int32](10), - }, - Location: to.Ptr("AutoResolve"), - }, - }, - }, - }, - TimeToLive: to.Ptr[int32](60), - }, 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.CreateDataFlowDebugSessionResponse = armdatafactory.CreateDataFlowDebugSessionResponse{ - // SessionID: to.Ptr("229c688c-944c-44ac-b31a-82d50f347154"), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_QueryByFactory.json -func ExampleDataFlowDebugSessionClient_NewQueryByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDataFlowDebugSessionClient().NewQueryByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.QueryDataFlowDebugSessionsResponse = armdatafactory.QueryDataFlowDebugSessionsResponse{ - // Value: []*armdatafactory.DataFlowDebugSessionInfo{ - // { - // AdditionalProperties: map[string]any{ - // "dataflowName": "DebugSession-0a7e0d6e-f2b7-48cc-8cd8-618326f5662f", - // "userObjectId": "0a7e0d6e-f2b7-48cc-8cd8-618326f5662f", - // }, - // ComputeType: to.Ptr("General"), - // CoreCount: to.Ptr[int32](48), - // LastActivityTime: to.Ptr("2019-09-05T18:28:00.9459674+00:00"), - // SessionID: to.Ptr("229c688c-944c-44ac-b31a-82d50f347154"), - // StartTime: to.Ptr("2019-09-05T18:23:20.3257799+00:00"), - // TimeToLiveInMinutes: to.Ptr[int32](60), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_AddDataFlow.json -func ExampleDataFlowDebugSessionClient_AddDataFlow() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataFlowDebugSessionClient().AddDataFlow(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.DataFlowDebugPackage{ - DataFlow: &armdatafactory.DataFlowDebugResource{ - Name: to.Ptr("dataflow1"), - Properties: &armdatafactory.MappingDataFlow{ - Type: to.Ptr("MappingDataFlow"), - TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - Script: to.Ptr("\n\nsource(output(\n Column_1 as string\n ),\n allowSchemaDrift: true,\n validateSchema: false) ~> source1"), - Sinks: []*armdatafactory.DataFlowSink{}, - Sources: []*armdatafactory.DataFlowSource{ - { - Name: to.Ptr("source1"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("DelimitedText2"), - }, - }}, - Transformations: []*armdatafactory.Transformation{}, - }, - }, - }, - Datasets: []*armdatafactory.DatasetDebugResource{ - { - Name: to.Ptr("dataset1"), - Properties: &armdatafactory.DelimitedTextDataset{ - Type: to.Ptr("DelimitedText"), - Schema: []any{ - map[string]any{ - "type": "String", - }, - }, - Annotations: []any{}, - LinkedServiceName: &armdatafactory.LinkedServiceReference{ - Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - ReferenceName: to.Ptr("linkedService5"), - }, - TypeProperties: &armdatafactory.DelimitedTextDatasetTypeProperties{ - ColumnDelimiter: ",", - EscapeChar: "\\", - FirstRowAsHeader: true, - Location: &armdatafactory.AzureBlobStorageLocation{ - Type: to.Ptr("AzureBlobStorageLocation"), - FileName: "Ansiencoding.csv", - Container: "dataflow-sample-data", - }, - QuoteChar: "\"", - }, - }, - }}, - DebugSettings: &armdatafactory.DataFlowDebugPackageDebugSettings{ - DatasetParameters: map[string]any{ - "Movies": map[string]any{ - "path": "abc", - }, - "Output": map[string]any{ - "time": "def", - }, - }, - Parameters: map[string]any{ - "sourcePath": "Toy", - }, - SourceSettings: []*armdatafactory.DataFlowSourceSetting{ - { - RowLimit: to.Ptr[int32](1000), - SourceName: to.Ptr("source1"), - }, - { - RowLimit: to.Ptr[int32](222), - SourceName: to.Ptr("source2"), - }}, - }, - LinkedServices: []*armdatafactory.LinkedServiceDebugResource{ - { - Name: to.Ptr("linkedService1"), - Properties: &armdatafactory.AzureBlobStorageLinkedService{ - Type: to.Ptr("AzureBlobStorage"), - Annotations: []any{}, - TypeProperties: &armdatafactory.AzureBlobStorageLinkedServiceTypeProperties{ - ConnectionString: "DefaultEndpointsProtocol=https;AccountName=;EndpointSuffix=core.windows.net;", - EncryptedCredential: to.Ptr(""), - }, - }, - }}, - SessionID: to.Ptr("f06ed247-9d07-49b2-b05e-2cb4a2fc871e"), - }, 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.AddDataFlowToDebugSessionResponse = armdatafactory.AddDataFlowToDebugSessionResponse{ - // JobVersion: to.Ptr("e5328ee7-c524-4207-8ba4-b709010db33d"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_Delete.json -func ExampleDataFlowDebugSessionClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDataFlowDebugSessionClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.DeleteDataFlowDebugSessionRequest{ - SessionID: to.Ptr("91fb57e0-8292-47be-89ff-c8f2d2bb2a7e"), - }, 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlowDebugSession_ExecuteCommand.json -func ExampleDataFlowDebugSessionClient_BeginExecuteCommand() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDataFlowDebugSessionClient().BeginExecuteCommand(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.DataFlowDebugCommandRequest{ - Command: to.Ptr(armdatafactory.DataFlowDebugCommandTypeExecutePreviewQuery), - CommandPayload: &armdatafactory.DataFlowDebugCommandPayload{ - RowLimits: to.Ptr[int32](100), - StreamName: to.Ptr("source1"), - }, - SessionID: to.Ptr("f06ed247-9d07-49b2-b05e-2cb4a2fc871e"), - }, 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.DataFlowDebugCommandResponse = armdatafactory.DataFlowDebugCommandResponse{ - // Data: to.Ptr("some output"), - // Status: to.Ptr("Succeeded"), - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/dataflows_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/dataflows_client_example_test.go deleted file mode 100644 index 7f3bd25e4747..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/dataflows_client_example_test.go +++ /dev/null @@ -1,460 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Create.json -func ExampleDataFlowsClient_CreateOrUpdate_dataFlowsCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataFlowsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataFlow", armdatafactory.DataFlowResource{ - Properties: &armdatafactory.MappingDataFlow{ - Type: to.Ptr("MappingDataFlow"), - Description: to.Ptr("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."), - TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - ScriptLines: []*string{ - to.Ptr("source(output("), - to.Ptr("PreviousConversionRate as double,"), - to.Ptr("Country as string,"), - to.Ptr("DateTime1 as string,"), - to.Ptr("CurrentConversionRate as double"), - to.Ptr("),"), - to.Ptr("allowSchemaDrift: false,"), - to.Ptr("validateSchema: false) ~> USDCurrency"), - to.Ptr("source(output("), - to.Ptr("PreviousConversionRate as double,"), - to.Ptr("Country as string,"), - to.Ptr("DateTime1 as string,"), - to.Ptr("CurrentConversionRate as double"), - to.Ptr("),"), - to.Ptr("allowSchemaDrift: true,"), - to.Ptr("validateSchema: false) ~> CADSource"), - to.Ptr("USDCurrency, CADSource union(byName: true)~> Union"), - to.Ptr("Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn"), - to.Ptr("NewCurrencyColumn split(Country == 'USD',"), - to.Ptr("Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)"), - to.Ptr("ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink"), - to.Ptr("ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink")}, - Sinks: []*armdatafactory.DataFlowSink{ - { - Name: to.Ptr("USDSink"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("USDOutput"), - }, - }, - { - Name: to.Ptr("CADSink"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("CADOutput"), - }, - }}, - Sources: []*armdatafactory.DataFlowSource{ - { - Name: to.Ptr("USDCurrency"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("CurrencyDatasetUSD"), - }, - }, - { - Name: to.Ptr("CADSource"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("CurrencyDatasetCAD"), - }, - }}, - }, - }, - }, &armdatafactory.DataFlowsClientCreateOrUpdateOptions{IfMatch: 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.DataFlowResource = armdatafactory.DataFlowResource{ - // Name: to.Ptr("exampleDataFlow"), - // Type: to.Ptr("Microsoft.DataFactory/factories/dataflows"), - // Etag: to.Ptr("0a0066d4-0000-0000-0000-5b245bd20000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset"), - // Properties: &armdatafactory.MappingDataFlow{ - // Type: to.Ptr("MappingDataFlow"), - // Description: to.Ptr("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."), - // TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - // ScriptLines: []*string{ - // to.Ptr("source(output("), - // to.Ptr("PreviousConversionRate as double,"), - // to.Ptr("Country as string,"), - // to.Ptr("DateTime1 as string,"), - // to.Ptr("CurrentConversionRate as double"), - // to.Ptr("),"), - // to.Ptr("allowSchemaDrift: false,"), - // to.Ptr("validateSchema: false) ~> USDCurrency"), - // to.Ptr("source(output("), - // to.Ptr("PreviousConversionRate as double,"), - // to.Ptr("Country as string,"), - // to.Ptr("DateTime1 as string,"), - // to.Ptr("CurrentConversionRate as double"), - // to.Ptr("),"), - // to.Ptr("allowSchemaDrift: true,"), - // to.Ptr("validateSchema: false) ~> CADSource"), - // to.Ptr("USDCurrency, CADSource union(byName: true)~> Union"), - // to.Ptr("Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn"), - // to.Ptr("NewCurrencyColumn split(Country == 'USD',"), - // to.Ptr("Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)"), - // to.Ptr("ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink"), - // to.Ptr("ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink")}, - // Sinks: []*armdatafactory.DataFlowSink{ - // { - // Name: to.Ptr("USDSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("USDOutput"), - // }, - // }, - // { - // Name: to.Ptr("CADSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CADOutput"), - // }, - // }}, - // Sources: []*armdatafactory.DataFlowSource{ - // { - // Name: to.Ptr("USDCurrency"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetUSD"), - // }, - // }, - // { - // Name: to.Ptr("CADSource"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetCAD"), - // }, - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Update.json -func ExampleDataFlowsClient_CreateOrUpdate_dataFlowsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataFlowsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataFlow", armdatafactory.DataFlowResource{ - Properties: &armdatafactory.MappingDataFlow{ - Type: to.Ptr("MappingDataFlow"), - Description: to.Ptr("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."), - TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - ScriptLines: []*string{ - to.Ptr("source(output("), - to.Ptr("PreviousConversionRate as double,"), - to.Ptr("Country as string,"), - to.Ptr("DateTime1 as string,"), - to.Ptr("CurrentConversionRate as double"), - to.Ptr("),"), - to.Ptr("allowSchemaDrift: false,"), - to.Ptr("validateSchema: false) ~> USDCurrency"), - to.Ptr("source(output("), - to.Ptr("PreviousConversionRate as double,"), - to.Ptr("Country as string,"), - to.Ptr("DateTime1 as string,"), - to.Ptr("CurrentConversionRate as double"), - to.Ptr("),"), - to.Ptr("allowSchemaDrift: true,"), - to.Ptr("validateSchema: false) ~> CADSource"), - to.Ptr("USDCurrency, CADSource union(byName: true)~> Union"), - to.Ptr("Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn"), - to.Ptr("NewCurrencyColumn split(Country == 'USD',"), - to.Ptr("Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)"), - to.Ptr("ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink"), - to.Ptr("ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink")}, - Sinks: []*armdatafactory.DataFlowSink{ - { - Name: to.Ptr("USDSink"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("USDOutput"), - }, - }, - { - Name: to.Ptr("CADSink"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("CADOutput"), - }, - }}, - Sources: []*armdatafactory.DataFlowSource{ - { - Name: to.Ptr("USDCurrency"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("CurrencyDatasetUSD"), - }, - }, - { - Name: to.Ptr("CADSource"), - Dataset: &armdatafactory.DatasetReference{ - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - ReferenceName: to.Ptr("CurrencyDatasetCAD"), - }, - }}, - }, - }, - }, &armdatafactory.DataFlowsClientCreateOrUpdateOptions{IfMatch: 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.DataFlowResource = armdatafactory.DataFlowResource{ - // Name: to.Ptr("exampleDataFlow"), - // Type: to.Ptr("Microsoft.DataFactory/factories/dataflows"), - // Etag: to.Ptr("0a0068d4-0000-0000-0000-5b245bd30002"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset"), - // Properties: &armdatafactory.MappingDataFlow{ - // Type: to.Ptr("MappingDataFlow"), - // Description: to.Ptr("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."), - // TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - // ScriptLines: []*string{ - // to.Ptr("source(output("), - // to.Ptr("PreviousConversionRate as double,"), - // to.Ptr("Country as string,"), - // to.Ptr("DateTime1 as string,"), - // to.Ptr("CurrentConversionRate as double"), - // to.Ptr("),"), - // to.Ptr("allowSchemaDrift: false,"), - // to.Ptr("validateSchema: false) ~> USDCurrency"), - // to.Ptr("source(output("), - // to.Ptr("PreviousConversionRate as double,"), - // to.Ptr("Country as string,"), - // to.Ptr("DateTime1 as string,"), - // to.Ptr("CurrentConversionRate as double"), - // to.Ptr("),"), - // to.Ptr("allowSchemaDrift: true,"), - // to.Ptr("validateSchema: false) ~> CADSource"), - // to.Ptr("USDCurrency, CADSource union(byName: true)~> Union"), - // to.Ptr("Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn"), - // to.Ptr("NewCurrencyColumn split(Country == 'USD',"), - // to.Ptr("Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)"), - // to.Ptr("ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink"), - // to.Ptr("ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink")}, - // Sinks: []*armdatafactory.DataFlowSink{ - // { - // Name: to.Ptr("USDSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("USDOutput"), - // }, - // }, - // { - // Name: to.Ptr("CADSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CADOutput"), - // }, - // }}, - // Sources: []*armdatafactory.DataFlowSource{ - // { - // Name: to.Ptr("USDCurrency"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetUSD"), - // }, - // }, - // { - // Name: to.Ptr("CADSource"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetCAD"), - // }, - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Get.json -func ExampleDataFlowsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataFlowsClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataFlow", &armdatafactory.DataFlowsClientGetOptions{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.DataFlowResource = armdatafactory.DataFlowResource{ - // Name: to.Ptr("exampleDataFlow"), - // Type: to.Ptr("Microsoft.DataFactory/factories/dataflows"), - // Etag: to.Ptr("15004c4f-0000-0200-0000-5cbe090e0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/dataflows/exampleDataFlow"), - // Properties: &armdatafactory.MappingDataFlow{ - // Type: to.Ptr("MappingDataFlow"), - // Description: to.Ptr("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."), - // TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - // Script: to.Ptr("source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink"), - // Sinks: []*armdatafactory.DataFlowSink{ - // { - // Name: to.Ptr("USDSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("USDOutput"), - // }, - // }, - // { - // Name: to.Ptr("CADSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CADOutput"), - // }, - // }}, - // Sources: []*armdatafactory.DataFlowSource{ - // { - // Name: to.Ptr("USDCurrency"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetUSD"), - // }, - // }, - // { - // Name: to.Ptr("CADSource"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetCAD"), - // }, - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_Delete.json -func ExampleDataFlowsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDataFlowsClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataFlow", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DataFlows_ListByFactory.json -func ExampleDataFlowsClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDataFlowsClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.DataFlowListResponse = armdatafactory.DataFlowListResponse{ - // Value: []*armdatafactory.DataFlowResource{ - // { - // Name: to.Ptr("exampleDataFlow"), - // Type: to.Ptr("Microsoft.DataFactory/factories/dataflows"), - // Etag: to.Ptr("0a0068d4-0000-0000-0000-5b245bd30000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/dataflows/exampleDataFlow"), - // Properties: &armdatafactory.MappingDataFlow{ - // Type: to.Ptr("MappingDataFlow"), - // Description: to.Ptr("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."), - // TypeProperties: &armdatafactory.MappingDataFlowTypeProperties{ - // Script: to.Ptr("source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink"), - // Sinks: []*armdatafactory.DataFlowSink{ - // { - // Name: to.Ptr("USDSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("USDOutput"), - // }, - // }, - // { - // Name: to.Ptr("CADSink"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CADOutput"), - // }, - // }}, - // Sources: []*armdatafactory.DataFlowSource{ - // { - // Name: to.Ptr("USDCurrency"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetUSD"), - // }, - // }, - // { - // Name: to.Ptr("CADSource"), - // Dataset: &armdatafactory.DatasetReference{ - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // ReferenceName: to.Ptr("CurrencyDatasetCAD"), - // }, - // }}, - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/datasets_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/datasets_client_example_test.go deleted file mode 100644 index 733fd55282e0..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/datasets_client_example_test.go +++ /dev/null @@ -1,334 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_ListByFactory.json -func ExampleDatasetsClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDatasetsClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.DatasetListResponse = armdatafactory.DatasetListResponse{ - // Value: []*armdatafactory.DatasetResource{ - // { - // Name: to.Ptr("exampleDataset"), - // Type: to.Ptr("Microsoft.DataFactory/factories/datasets"), - // Etag: to.Ptr("0a0068d4-0000-0000-0000-5b245bd30000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset"), - // Properties: &armdatafactory.AzureBlobDataset{ - // Type: to.Ptr("AzureBlob"), - // Description: to.Ptr("Example description"), - // LinkedServiceName: &armdatafactory.LinkedServiceReference{ - // Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - // ReferenceName: to.Ptr("exampleLinkedService"), - // }, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "MyFileName": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // "MyFolderPath": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // }, - // TypeProperties: &armdatafactory.AzureBlobDatasetTypeProperties{ - // Format: &armdatafactory.TextFormat{ - // Type: to.Ptr("TextFormat"), - // }, - // FileName: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFileName", - // }, - // FolderPath: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFolderPath", - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Create.json -func ExampleDatasetsClient_CreateOrUpdate_datasetsCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDatasetsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataset", armdatafactory.DatasetResource{ - Properties: &armdatafactory.AzureBlobDataset{ - Type: to.Ptr("AzureBlob"), - LinkedServiceName: &armdatafactory.LinkedServiceReference{ - Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - ReferenceName: to.Ptr("exampleLinkedService"), - }, - Parameters: map[string]*armdatafactory.ParameterSpecification{ - "MyFileName": { - Type: to.Ptr(armdatafactory.ParameterTypeString), - }, - "MyFolderPath": { - Type: to.Ptr(armdatafactory.ParameterTypeString), - }, - }, - TypeProperties: &armdatafactory.AzureBlobDatasetTypeProperties{ - Format: &armdatafactory.TextFormat{ - Type: to.Ptr("TextFormat"), - }, - FileName: map[string]any{ - "type": "Expression", - "value": "@dataset().MyFileName", - }, - FolderPath: map[string]any{ - "type": "Expression", - "value": "@dataset().MyFolderPath", - }, - }, - }, - }, &armdatafactory.DatasetsClientCreateOrUpdateOptions{IfMatch: 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.DatasetResource = armdatafactory.DatasetResource{ - // Name: to.Ptr("exampleDataset"), - // Type: to.Ptr("Microsoft.DataFactory/factories/datasets"), - // Etag: to.Ptr("0a0066d4-0000-0000-0000-5b245bd20000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset"), - // Properties: &armdatafactory.AzureBlobDataset{ - // Type: to.Ptr("AzureBlob"), - // Schema: []any{ - // map[string]any{ - // "name": "col1", - // "type": "INT_32", - // }, - // map[string]any{ - // "name": "col2", - // "type": "Decimal", - // "precision": "38", - // "scale": "2", - // }, - // }, - // LinkedServiceName: &armdatafactory.LinkedServiceReference{ - // Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - // ReferenceName: to.Ptr("exampleLinkedService"), - // }, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "MyFileName": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // "MyFolderPath": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // }, - // TypeProperties: &armdatafactory.AzureBlobDatasetTypeProperties{ - // Format: &armdatafactory.TextFormat{ - // Type: to.Ptr("TextFormat"), - // }, - // FileName: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFileName", - // }, - // FolderPath: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFolderPath", - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Update.json -func ExampleDatasetsClient_CreateOrUpdate_datasetsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDatasetsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataset", armdatafactory.DatasetResource{ - Properties: &armdatafactory.AzureBlobDataset{ - Type: to.Ptr("AzureBlob"), - Description: to.Ptr("Example description"), - LinkedServiceName: &armdatafactory.LinkedServiceReference{ - Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - ReferenceName: to.Ptr("exampleLinkedService"), - }, - Parameters: map[string]*armdatafactory.ParameterSpecification{ - "MyFileName": { - Type: to.Ptr(armdatafactory.ParameterTypeString), - }, - "MyFolderPath": { - Type: to.Ptr(armdatafactory.ParameterTypeString), - }, - }, - TypeProperties: &armdatafactory.AzureBlobDatasetTypeProperties{ - Format: &armdatafactory.TextFormat{ - Type: to.Ptr("TextFormat"), - }, - FileName: map[string]any{ - "type": "Expression", - "value": "@dataset().MyFileName", - }, - FolderPath: map[string]any{ - "type": "Expression", - "value": "@dataset().MyFolderPath", - }, - }, - }, - }, &armdatafactory.DatasetsClientCreateOrUpdateOptions{IfMatch: 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.DatasetResource = armdatafactory.DatasetResource{ - // Name: to.Ptr("exampleDataset"), - // Type: to.Ptr("Microsoft.DataFactory/factories/datasets"), - // Etag: to.Ptr("0a0068d4-0000-0000-0000-5b245bd30000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset"), - // Properties: &armdatafactory.AzureBlobDataset{ - // Type: to.Ptr("AzureBlob"), - // Description: to.Ptr("Example description"), - // LinkedServiceName: &armdatafactory.LinkedServiceReference{ - // Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - // ReferenceName: to.Ptr("exampleLinkedService"), - // }, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "MyFileName": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // "MyFolderPath": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // }, - // TypeProperties: &armdatafactory.AzureBlobDatasetTypeProperties{ - // Format: &armdatafactory.TextFormat{ - // Type: to.Ptr("TextFormat"), - // }, - // FileName: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFileName", - // }, - // FolderPath: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFolderPath", - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Get.json -func ExampleDatasetsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDatasetsClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataset", &armdatafactory.DatasetsClientGetOptions{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.DatasetResource = armdatafactory.DatasetResource{ - // Name: to.Ptr("exampleDataset"), - // Type: to.Ptr("Microsoft.DataFactory/factories/datasets"), - // Etag: to.Ptr("15004c4f-0000-0200-0000-5cbe090e0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset"), - // Properties: &armdatafactory.AzureBlobDataset{ - // Type: to.Ptr("AzureBlob"), - // Description: to.Ptr("Example description"), - // LinkedServiceName: &armdatafactory.LinkedServiceReference{ - // Type: to.Ptr(armdatafactory.LinkedServiceReferenceTypeLinkedServiceReference), - // ReferenceName: to.Ptr("exampleLinkedService"), - // }, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "MyFileName": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // "MyFolderPath": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // }, - // TypeProperties: &armdatafactory.AzureBlobDatasetTypeProperties{ - // Format: &armdatafactory.TextFormat{ - // Type: to.Ptr("TextFormat"), - // }, - // FileName: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFileName", - // }, - // FolderPath: map[string]any{ - // "type": "Expression", - // "value": "@dataset().MyFolderPath", - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Datasets_Delete.json -func ExampleDatasetsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDatasetsClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleDataset", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/exposurecontrol_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/exposurecontrol_client_example_test.go deleted file mode 100644 index 6642c3990fdd..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/exposurecontrol_client_example_test.go +++ /dev/null @@ -1,114 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValue.json -func ExampleExposureControlClient_GetFeatureValue() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExposureControlClient().GetFeatureValue(ctx, "WestEurope", armdatafactory.ExposureControlRequest{ - FeatureName: to.Ptr("ADFIntegrationRuntimeSharingRbac"), - FeatureType: to.Ptr("Feature"), - }, 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.ExposureControlResponse = armdatafactory.ExposureControlResponse{ - // FeatureName: to.Ptr("ADFIntegrationRuntimeSharingRbac"), - // Value: to.Ptr("False"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_GetFeatureValueByFactory.json -func ExampleExposureControlClient_GetFeatureValueByFactory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExposureControlClient().GetFeatureValueByFactory(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.ExposureControlRequest{ - FeatureName: to.Ptr("ADFIntegrationRuntimeSharingRbac"), - FeatureType: to.Ptr("Feature"), - }, 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.ExposureControlResponse = armdatafactory.ExposureControlResponse{ - // FeatureName: to.Ptr("ADFIntegrationRuntimeSharingRbac"), - // Value: to.Ptr("False"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ExposureControl_QueryFeatureValuesByFactory.json -func ExampleExposureControlClient_QueryFeatureValuesByFactory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewExposureControlClient().QueryFeatureValuesByFactory(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.ExposureControlBatchRequest{ - ExposureControlRequests: []*armdatafactory.ExposureControlRequest{ - { - FeatureName: to.Ptr("ADFIntegrationRuntimeSharingRbac"), - FeatureType: to.Ptr("Feature"), - }, - { - FeatureName: to.Ptr("ADFSampleFeature"), - FeatureType: to.Ptr("Feature"), - }}, - }, 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.ExposureControlBatchResponse = armdatafactory.ExposureControlBatchResponse{ - // ExposureControlResponses: []*armdatafactory.ExposureControlResponse{ - // { - // FeatureName: to.Ptr("ADFIntegrationRuntimeSharingRbac"), - // Value: to.Ptr("False"), - // }, - // { - // FeatureName: to.Ptr("ADFSampleFeature"), - // Value: to.Ptr("True"), - // }}, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/factories_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/factories_client_example_test.go deleted file mode 100644 index 2ff64a1d6498..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/factories_client_example_test.go +++ /dev/null @@ -1,592 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json -func ExampleFactoriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFactoriesClient().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.FactoryListResponse = armdatafactory.FactoryListResponse{ - // Value: []*armdatafactory.Factory{ - // { - // Name: to.Ptr("rpV2OrigDF-72c7d3d4-5e17-4ec6-91de-9ab433f15e79"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"0000aa0d-0000-0000-0000-5b0d58170000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/rg-yanzhang-dfv2/providers/Microsoft.DataFactory/factories/rpv2origdf-72c7d3d4-5e17-4ec6-91de-9ab433f15e79"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("399c3de2-6072-4326-bfa9-4d0c116f1a7b"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-29T13:39:35.615Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("df-dogfood-yanzhang-we"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"0000f301-0000-0000-0000-5b21b16c0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/rg-yanzhang-dfv2/providers/Microsoft.DataFactory/factories/df-dogfood-yanzhang-we"), - // Location: to.Ptr("West Europe"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("e8dd6df9-bad5-4dea-8fb8-0d13d1845d9e"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T00:06:04.666Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("exampleFactoryName-linked"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00008a02-0000-0000-0000-5b237f270000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName-linked"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("10743799-44d2-42fe-8c4d-5bc5c51c0684"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-15T08:56:07.182Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("FactoryToUpgrade"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00003d04-0000-0000-0000-5b28962f0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/factorytoupgrade"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:35:35.713Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2018-06-01"), - // }, - // }, - // { - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00004004-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "exampleTag": to.Ptr("exampleValue"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // PurviewConfiguration: &armdatafactory.PurviewConfiguration{ - // PurviewResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Purview/accounts/examplePurview"), - // }, - // RepoConfiguration: &armdatafactory.FactoryVSTSConfiguration{ - // Type: to.Ptr("FactoryVSTSConfiguration"), - // AccountName: to.Ptr("ADF"), - // CollaborationBranch: to.Ptr("master"), - // LastCommitID: to.Ptr(""), - // RepositoryName: to.Ptr("repo"), - // RootFolder: to.Ptr("/"), - // ProjectName: to.Ptr("project"), - // TenantID: to.Ptr(""), - // }, - // Version: to.Ptr("2018-06-01"), - // }, - // }, - // { - // Name: to.Ptr("rpV2OrigDF-72c7d3d4-5e17-4ec6-91de-9ab433f15e79"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"0000aa0d-0000-0000-0000-5b0d58170000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/rg-yanzhang-dfv2/providers/Microsoft.DataFactory/factories/rpv2origdf-72c7d3d4-5e17-4ec6-91de-9ab433f15e79"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("399c3de2-6072-4326-bfa9-4d0c116f1a7b"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-29T13:39:35.615Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("df-dogfood-yanzhang-we"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"0000f301-0000-0000-0000-5b21b16c0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/rg-yanzhang-dfv2/providers/Microsoft.DataFactory/factories/df-dogfood-yanzhang-we"), - // Location: to.Ptr("West Europe"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("e8dd6df9-bad5-4dea-8fb8-0d13d1845d9e"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-14T00:06:04.666Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("exampleFactoryName-linked"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00008a02-0000-0000-0000-5b237f270000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName-linked"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("10743799-44d2-42fe-8c4d-5bc5c51c0684"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-15T08:56:07.182Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("FactoryToUpgrade"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00003d04-0000-0000-0000-5b28962f0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/factorytoupgrade"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:35:35.713Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2018-06-01"), - // }, - // }, - // { - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00004004-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "exampleTag": to.Ptr("exampleValue"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // PurviewConfiguration: &armdatafactory.PurviewConfiguration{ - // PurviewResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Purview/accounts/examplePurview"), - // }, - // RepoConfiguration: &armdatafactory.FactoryVSTSConfiguration{ - // Type: to.Ptr("FactoryVSTSConfiguration"), - // AccountName: to.Ptr("ADF"), - // CollaborationBranch: to.Ptr("master"), - // LastCommitID: to.Ptr(""), - // RepositoryName: to.Ptr("repo"), - // RootFolder: to.Ptr("/"), - // ProjectName: to.Ptr("project"), - // TenantID: to.Ptr(""), - // }, - // Version: to.Ptr("2018-06-01"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ConfigureFactoryRepo.json -func ExampleFactoriesClient_ConfigureFactoryRepo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFactoriesClient().ConfigureFactoryRepo(ctx, "East US", armdatafactory.FactoryRepoUpdate{ - FactoryResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - RepoConfiguration: &armdatafactory.FactoryVSTSConfiguration{ - Type: to.Ptr("FactoryVSTSConfiguration"), - AccountName: to.Ptr("ADF"), - CollaborationBranch: to.Ptr("master"), - LastCommitID: to.Ptr(""), - RepositoryName: to.Ptr("repo"), - RootFolder: to.Ptr("/"), - ProjectName: to.Ptr("project"), - TenantID: to.Ptr(""), - }, - }, 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.Factory = armdatafactory.Factory{ - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00004004-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "exampleTag": to.Ptr("exampleValue"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // RepoConfiguration: &armdatafactory.FactoryVSTSConfiguration{ - // Type: to.Ptr("FactoryVSTSConfiguration"), - // AccountName: to.Ptr("ADF"), - // CollaborationBranch: to.Ptr("master"), - // LastCommitID: to.Ptr(""), - // RepositoryName: to.Ptr("repo"), - // RootFolder: to.Ptr("/"), - // ProjectName: to.Ptr("project"), - // TenantID: to.Ptr(""), - // }, - // Version: to.Ptr("2018-06-01"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_ListByResourceGroup.json -func ExampleFactoriesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFactoriesClient().NewListByResourceGroupPager("exampleResourceGroup", 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.FactoryListResponse = armdatafactory.FactoryListResponse{ - // Value: []*armdatafactory.Factory{ - // { - // Name: to.Ptr("exampleFactoryName-linked"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00008a02-0000-0000-0000-5b237f270000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName-linked"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Identity: &armdatafactory.FactoryIdentity{ - // Type: to.Ptr(armdatafactory.FactoryIdentityTypeSystemAssigned), - // PrincipalID: to.Ptr("10743799-44d2-42fe-8c4d-5bc5c51c0684"), - // TenantID: to.Ptr("12345678-1234-1234-1234-123456789abc"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-15T08:56:07.182Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2017-09-01-preview"), - // }, - // }, - // { - // Name: to.Ptr("FactoryToUpgrade"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00003d04-0000-0000-0000-5b28962f0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/factorytoupgrade"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:35:35.713Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2018-06-01"), - // }, - // }, - // { - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00004004-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "exampleTag": to.Ptr("exampleValue"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // RepoConfiguration: &armdatafactory.FactoryVSTSConfiguration{ - // Type: to.Ptr("FactoryVSTSConfiguration"), - // AccountName: to.Ptr("ADF"), - // CollaborationBranch: to.Ptr("master"), - // LastCommitID: to.Ptr(""), - // RepositoryName: to.Ptr("repo"), - // RootFolder: to.Ptr("/"), - // ProjectName: to.Ptr("project"), - // TenantID: to.Ptr(""), - // }, - // Version: to.Ptr("2018-06-01"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_CreateOrUpdate.json -func ExampleFactoriesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFactoriesClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.Factory{ - Location: to.Ptr("East US"), - }, &armdatafactory.FactoriesClientCreateOrUpdateOptions{IfMatch: 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.Factory = armdatafactory.Factory{ - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00003e04-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2018-06-01"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Update.json -func ExampleFactoriesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFactoriesClient().Update(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.FactoryUpdateParameters{ - Tags: map[string]*string{ - "exampleTag": to.Ptr("exampleValue"), - }, - }, 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.Factory = armdatafactory.Factory{ - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00003f04-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "exampleTag": to.Ptr("exampleValue"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Version: to.Ptr("2018-06-01"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Get.json -func ExampleFactoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFactoriesClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", &armdatafactory.FactoriesClientGetOptions{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.Factory = armdatafactory.Factory{ - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories"), - // ETag: to.Ptr("\"00004004-0000-0000-0000-5b28979e0000\""), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // "exampleTag": to.Ptr("exampleValue"), - // }, - // Properties: &armdatafactory.FactoryProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-19T05:41:50.004Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // PurviewConfiguration: &armdatafactory.PurviewConfiguration{ - // PurviewResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Purview/accounts/examplePurview"), - // }, - // RepoConfiguration: &armdatafactory.FactoryVSTSConfiguration{ - // Type: to.Ptr("FactoryVSTSConfiguration"), - // AccountName: to.Ptr("ADF"), - // CollaborationBranch: to.Ptr("master"), - // LastCommitID: to.Ptr(""), - // RepositoryName: to.Ptr("repo"), - // RootFolder: to.Ptr("/"), - // ProjectName: to.Ptr("project"), - // TenantID: to.Ptr(""), - // }, - // Version: to.Ptr("2018-06-01"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_Delete.json -func ExampleFactoriesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewFactoriesClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetGitHubAccessToken.json -func ExampleFactoriesClient_GetGitHubAccessToken() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFactoriesClient().GetGitHubAccessToken(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.GitHubAccessTokenRequest{ - GitHubAccessCode: to.Ptr("some"), - GitHubAccessTokenBaseURL: to.Ptr("some"), - GitHubClientID: to.Ptr("some"), - }, 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.GitHubAccessTokenResponse = armdatafactory.GitHubAccessTokenResponse{ - // GitHubAccessToken: to.Ptr("myAccessTokenExample"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_GetDataPlaneAccess.json -func ExampleFactoriesClient_GetDataPlaneAccess() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFactoriesClient().GetDataPlaneAccess(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.UserAccessPolicy{ - AccessResourcePath: to.Ptr(""), - ExpireTime: to.Ptr("2018-11-10T09:46:20.2659347Z"), - Permissions: to.Ptr("r"), - ProfileName: to.Ptr("DefaultProfile"), - StartTime: to.Ptr("2018-11-10T02:46:20.2659347Z"), - }, 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.AccessPolicyResponse = armdatafactory.AccessPolicyResponse{ - // AccessToken: to.Ptr("**********"), - // DataPlaneURL: to.Ptr("https://rpeastus.svc.datafactory.azure.com:4433"), - // Policy: &armdatafactory.UserAccessPolicy{ - // AccessResourcePath: to.Ptr(""), - // ExpireTime: to.Ptr("2018-11-10T09:46:20.2659347Z"), - // Permissions: to.Ptr("r"), - // ProfileName: to.Ptr("DefaultProfile"), - // StartTime: to.Ptr("2018-11-10T02:46:20.2659347Z"), - // }, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/activityruns_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/activityruns_server.go index 5676ac2174eb..c2706101e59a 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/activityruns_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/activityruns_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/changedatacapture_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/changedatacapture_server.go index 810faa0675ba..9d844a52438c 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/changedatacapture_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/changedatacapture_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/credentialoperations_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/credentialoperations_server.go index d31a9b2fb435..142870658689 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/credentialoperations_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/credentialoperations_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflowdebugsession_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflowdebugsession_server.go index 40a3a9ef2fbf..f51d4f9d850a 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflowdebugsession_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflowdebugsession_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflows_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflows_server.go index 35b942f81f68..311233506227 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflows_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/dataflows_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/datasets_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/datasets_server.go index f091ffc7be73..7f2d90171862 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/datasets_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/datasets_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/exposurecontrol_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/exposurecontrol_server.go index 320441da27a1..403f5a119ceb 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/exposurecontrol_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/exposurecontrol_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/factories_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/factories_server.go index fcaf6f94be52..a4da3612a68b 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/factories_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/factories_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/globalparameters_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/globalparameters_server.go index 204b27c49ecc..bc3da2b84b1c 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/globalparameters_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/globalparameters_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimenodes_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimenodes_server.go index db87fb81248e..ffb2e2b3b14a 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimenodes_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimenodes_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimeobjectmetadata_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimeobjectmetadata_server.go index c358f8550949..32f40efa40cb 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimeobjectmetadata_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimeobjectmetadata_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "reflect" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimes_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimes_server.go index 2194b9365a42..126921aefe9a 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimes_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/integrationruntimes_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/linkedservices_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/linkedservices_server.go index 629078156f43..5ed178105661 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/linkedservices_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/linkedservices_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/managedprivateendpoints_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/managedprivateendpoints_server.go index 246c7cede6dc..3b7a55be0fd7 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/managedprivateendpoints_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/managedprivateendpoints_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/managedvirtualnetworks_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/managedvirtualnetworks_server.go index 75f161d27a80..13835f69d5b1 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/managedvirtualnetworks_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/managedvirtualnetworks_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/operations_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/operations_server.go index c5ced05372c3..a4cfcffe224d 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/operations_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/operations_server.go @@ -15,7 +15,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" ) diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelineruns_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelineruns_server.go index a4aa98ef4220..c6493d51472a 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelineruns_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelineruns_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelines_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelines_server.go index 2ff5cabc722d..9ad491469bb7 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelines_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/pipelines_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "reflect" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnection_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnection_server.go index 6e864e3b4daf..60a56d45e683 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnection_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnection_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnections_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnections_server.go index 62f4107cec8a..910171f8ddab 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnections_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/privateendpointconnections_server.go @@ -15,7 +15,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/privatelinkresources_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/privatelinkresources_server.go index 99e7cdb8127c..f49f8359f78a 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/privatelinkresources_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/privatelinkresources_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/triggerruns_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/triggerruns_server.go index 9c9f391b800e..36560c0616ae 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/triggerruns_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/triggerruns_server.go @@ -15,7 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/fake/triggers_server.go b/sdk/resourcemanager/datafactory/armdatafactory/fake/triggers_server.go index c47dd04ac7f6..029262342d48 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/fake/triggers_server.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/fake/triggers_server.go @@ -16,7 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8" "net/http" "net/url" "regexp" diff --git a/sdk/resourcemanager/datafactory/armdatafactory/globalparameters_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/globalparameters_client_example_test.go deleted file mode 100644 index 160baae30217..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/globalparameters_client_example_test.go +++ /dev/null @@ -1,209 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GlobalParameters_ListByFactory.json -func ExampleGlobalParametersClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGlobalParametersClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.GlobalParameterListResponse = armdatafactory.GlobalParameterListResponse{ - // Value: []*armdatafactory.GlobalParameterResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.DataFactory/factories/globalParameters"), - // Etag: to.Ptr("da00a1c3-0000-0400-0000-6241f3290000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/globalParameters/default"), - // Properties: map[string]*armdatafactory.GlobalParameterSpecification{ - // "copyPipelineTest": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeObject), - // Value: map[string]any{ - // "mySinkDatasetFolderPath": "exampleOutput", - // "mySourceDatasetFolderPath": "exampleInput/", - // "testingEmptyContextParams": "", - // }, - // }, - // "mySourceDatasetFolderPath": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeString), - // Value: "input", - // }, - // "url": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeString), - // Value: "https://testuri.test", - // }, - // "validADFOffice365Uris": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeArray), - // Value: []any{ - // "https://testuri.test", - // "https://testuri.test", - // }, - // }, - // "waitTime": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeInt), - // Value: float64(5), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GlobalParameters_Get.json -func ExampleGlobalParametersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalParametersClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "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.GlobalParameterResource = armdatafactory.GlobalParameterResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.DataFactory/factories/globalParameters"), - // Etag: to.Ptr("72001a6a-0000-0400-0000-623d058f0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/globalParameters/default"), - // Properties: map[string]*armdatafactory.GlobalParameterSpecification{ - // "waitTime": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeInt), - // Value: float64(10), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GlobalParameters_Create.json -func ExampleGlobalParametersClient_CreateOrUpdate_globalParametersCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalParametersClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "default", armdatafactory.GlobalParameterResource{ - Properties: map[string]*armdatafactory.GlobalParameterSpecification{ - "waitTime": { - Type: to.Ptr(armdatafactory.GlobalParameterTypeInt), - Value: float64(5), - }, - }, - }, 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.GlobalParameterResource = armdatafactory.GlobalParameterResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.DataFactory/factories/globalParameters"), - // Etag: to.Ptr("0a008ad4-0000-0000-0000-5b245c6e0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/globalParameters/default"), - // Properties: map[string]*armdatafactory.GlobalParameterSpecification{ - // "waitTime": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeInt), - // Value: float64(5), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GlobalParameters_Update.json -func ExampleGlobalParametersClient_CreateOrUpdate_globalParametersUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalParametersClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "default", armdatafactory.GlobalParameterResource{ - Properties: map[string]*armdatafactory.GlobalParameterSpecification{ - "waitTime": { - Type: to.Ptr(armdatafactory.GlobalParameterTypeInt), - Value: float64(5), - }, - }, - }, 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.GlobalParameterResource = armdatafactory.GlobalParameterResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.DataFactory/factories/globalParameters"), - // Etag: to.Ptr("0a008ad4-0000-0000-0000-5b245c6e0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/globalParameters/default"), - // Properties: map[string]*armdatafactory.GlobalParameterSpecification{ - // "waitTime": &armdatafactory.GlobalParameterSpecification{ - // Type: to.Ptr(armdatafactory.GlobalParameterTypeInt), - // Value: float64(5), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GlobalParameters_Delete.json -func ExampleGlobalParametersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewGlobalParametersClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/go.mod b/sdk/resourcemanager/datafactory/armdatafactory/go.mod index a8ff57c552f6..fc53148a0f1e 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/go.mod +++ b/sdk/resourcemanager/datafactory/armdatafactory/go.mod @@ -1,10 +1,9 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8 go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 @@ -12,6 +11,7 @@ require ( ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect diff --git a/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimenodes_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimenodes_client_example_test.go deleted file mode 100644 index 55c0951c4c68..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimenodes_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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeNodesClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.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(armdatafactory.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(armdatafactory.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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimeNodesClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", "Node_1", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeNodesClient().Update(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", "Node_1", armdatafactory.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 = armdatafactory.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(armdatafactory.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(armdatafactory.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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeNodes_GetIpAddress.json -func ExampleIntegrationRuntimeNodesClient_GetIPAddress() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeNodesClient().GetIPAddress(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.IntegrationRuntimeNodeIPAddress{ - // IPAddress: to.Ptr("**********"), - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimeobjectmetadata_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimeobjectmetadata_client_example_test.go deleted file mode 100644 index d4c8e6079f0f..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimeObjectMetadataClient().BeginRefresh(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.SsisObjectMetadataStatusResponse{ - // Name: to.Ptr("ca63c855b72d44959653ffcc6eb0b96c"), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimeObjectMetadata_Get.json -func ExampleIntegrationRuntimeObjectMetadataClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimeObjectMetadataClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "testactivityv2", &armdatafactory.IntegrationRuntimeObjectMetadataClientGetOptions{GetMetadataRequest: &armdatafactory.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 = armdatafactory.SsisObjectMetadataListResponse{ - // Value: []armdatafactory.SsisObjectMetadataClassification{ - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("TestFolder"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](1), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("EnvironmentFolder"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](2), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("ActivityTest"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](3), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("这是文件夹"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // Description: to.Ptr(""), - // ID: to.Ptr[int64](4), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("1"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](5), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("2"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](6), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("3"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](7), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("4"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](8), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("5"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](9), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("6"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](10), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("7"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](11), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("8"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](12), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("9"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](13), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("10"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](14), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("11"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](15), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("12"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](16), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("13"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](17), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("14"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](18), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("15"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](19), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("16"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](20), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("17"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](21), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("18"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](22), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("19"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](23), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("20"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](24), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("21"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](25), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("22"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](26), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("23"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](27), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("24"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](28), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("25"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](29), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("26"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](30), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("27"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](31), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("28"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](32), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("29"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](33), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("30"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](34), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("31"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](35), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("32"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](36), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("33"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](37), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("34"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](38), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("35"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](39), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("36"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](40), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("37"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](41), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("38"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](42), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("39"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](43), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("40"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](44), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("41"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](45), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("42"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](46), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("43"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](47), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("44"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](48), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("45"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](49), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("46"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](50), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("47"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](51), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("48"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](52), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("49"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](53), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("50"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](54), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("51"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](55), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("52"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](56), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("53"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](57), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("54"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](58), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("55"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](59), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("56"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](60), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("57"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](61), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("58"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](62), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("59"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](63), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("60"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](64), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("61"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](65), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("62"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](66), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("63"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](67), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("64"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](68), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("65"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](69), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("66"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](70), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("67"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](71), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("68"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](72), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("69"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](73), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("70"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](74), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("71"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](75), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("72"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](76), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("73"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](77), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("74"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](78), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("75"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](79), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("76"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](80), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("77"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](81), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("78"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](82), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("79"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](83), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("80"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](84), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("81"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](85), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("82"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](86), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("83"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](87), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("84"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](88), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("85"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](89), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("86"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](90), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("87"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](91), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("88"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](92), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("89"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](93), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("90"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](94), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("91"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](95), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("92"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](96), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("93"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](97), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("94"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](98), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("95"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](99), - // }, - // &armdatafactory.SsisFolder{ - // Name: to.Ptr("96"), - // Type: to.Ptr(armdatafactory.SsisObjectMetadataTypeFolder), - // ID: to.Ptr[int64](100), - // }}, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimes_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimes_client_example_test.go deleted file mode 100644 index 64a04dfa9f56..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/integrationruntimes_client_example_test.go +++ /dev/null @@ -1,638 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListByFactory.json -func ExampleIntegrationRuntimesClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewIntegrationRuntimesClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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 = armdatafactory.IntegrationRuntimeListResponse{ - // Value: []*armdatafactory.IntegrationRuntimeResource{ - // { - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes"), - // Etag: to.Ptr("0400f1a1-0000-0000-0000-5b2188640000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/integrationruntimes/exampleIntegrationRuntime"), - // Properties: &armdatafactory.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Create.json -func ExampleIntegrationRuntimesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", armdatafactory.IntegrationRuntimeResource{ - Properties: &armdatafactory.SelfHostedIntegrationRuntime{ - Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - Description: to.Ptr("A selfhosted integration runtime"), - }, - }, &armdatafactory.IntegrationRuntimesClientCreateOrUpdateOptions{IfMatch: 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 = armdatafactory.IntegrationRuntimeResource{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes"), - // Etag: to.Ptr("000046c4-0000-0000-0000-5b2198bf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/integrationruntimes/exampleIntegrationRuntime"), - // Properties: &armdatafactory.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", &armdatafactory.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 = armdatafactory.IntegrationRuntimeResource{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes"), - // Etag: to.Ptr("15003c4f-0000-0200-0000-5cbe090b0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/integrationruntimes/exampleIntegrationRuntime"), - // Properties: &armdatafactory.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().Update(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", armdatafactory.UpdateIntegrationRuntimeRequest{ - AutoUpdate: to.Ptr(armdatafactory.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 = armdatafactory.IntegrationRuntimeResource{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Type: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes"), - // Etag: to.Ptr("0400f1a1-0000-0000-0000-5b2188640000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/integrationruntimes/exampleIntegrationRuntime"), - // Properties: &armdatafactory.SelfHostedIntegrationRuntime{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - // Description: to.Ptr("A selfhosted integration runtime"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_Delete.json -func ExampleIntegrationRuntimesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimesClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetStatus.json -func ExampleIntegrationRuntimesClient_GetStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().GetStatus(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.IntegrationRuntimeStatusResponse{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Properties: &armdatafactory.SelfHostedIntegrationRuntimeStatus{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - // State: to.Ptr(armdatafactory.IntegrationRuntimeStateOnline), - // TypeProperties: &armdatafactory.SelfHostedIntegrationRuntimeStatusTypeProperties{ - // AutoUpdate: to.Ptr(armdatafactory.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: []*armdatafactory.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(armdatafactory.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(armdatafactory.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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().ListOutboundNetworkDependenciesEndpoints(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse{ - // Value: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint{ - // { - // Category: to.Ptr("Azure Data Factory (Management)"), - // Endpoints: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("wu.frontend.int.clouddatahub-int.net"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Azure Storage (Management)"), - // Endpoints: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("*.blob.core.windows.net"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("*.table.core.windows.net"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Event Hub (Logging)"), - // Endpoints: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("*.servicebus.windows.net"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Microsoft Logging service (Internal Use)"), - // Endpoints: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpoint{ - // { - // DomainName: to.Ptr("gcs.prod.monitoring.core.windows.net"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("prod.warmpath.msftcloudes.com"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("azurewatsonanalysis-prod.core.windows.net"), - // EndpointDetails: []*armdatafactory.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails{ - // { - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetConnectionInfo.json -func ExampleIntegrationRuntimesClient_GetConnectionInfo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().GetConnectionInfo(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RegenerateAuthKey.json -func ExampleIntegrationRuntimesClient_RegenerateAuthKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().RegenerateAuthKey(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", armdatafactory.IntegrationRuntimeRegenerateKeyParameters{ - KeyName: to.Ptr(armdatafactory.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 = armdatafactory.IntegrationRuntimeAuthKeys{ - // AuthKey2: to.Ptr("**********"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_ListAuthKeys.json -func ExampleIntegrationRuntimesClient_ListAuthKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().ListAuthKeys(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.IntegrationRuntimeAuthKeys{ - // AuthKey1: to.Ptr("**********"), - // AuthKey2: to.Ptr("**********"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginStart(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.IntegrationRuntimeStatusResponse{ - // Name: to.Ptr("exampleManagedIntegrationRuntime"), - // Properties: &armdatafactory.ManagedIntegrationRuntimeStatus{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeManaged), - // DataFactoryName: to.Ptr("exampleFactoryName"), - // State: to.Ptr(armdatafactory.IntegrationRuntimeStateStarted), - // TypeProperties: &armdatafactory.ManagedIntegrationRuntimeStatusTypeProperties{ - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-13T21:11:01.869Z"); return t}()), - // Nodes: []*armdatafactory.ManagedIntegrationRuntimeNode{ - // }, - // OtherErrors: []*armdatafactory.ManagedIntegrationRuntimeError{ - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIntegrationRuntimesClient().BeginStop(ctx, "exampleResourceGroup", "exampleFactoryName", "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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_SyncCredentials.json -func ExampleIntegrationRuntimesClient_SyncCredentials() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimesClient().SyncCredentials(ctx, "exampleResourceGroup", "exampleFactoryName", "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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_GetMonitoringData.json -func ExampleIntegrationRuntimesClient_GetMonitoringData() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().GetMonitoringData(ctx, "exampleResourceGroup", "exampleFactoryName", "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 = armdatafactory.IntegrationRuntimeMonitoringData{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Nodes: []*armdatafactory.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), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimesClient().Upgrade(ctx, "exampleResourceGroup", "exampleFactoryName", "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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_RemoveLinks.json -func ExampleIntegrationRuntimesClient_RemoveLinks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewIntegrationRuntimesClient().RemoveLinks(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", armdatafactory.LinkedIntegrationRuntimeRequest{ - LinkedFactoryName: to.Ptr("exampleFactoryName-linked"), - }, 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/IntegrationRuntimes_CreateLinkedIntegrationRuntime.json -func ExampleIntegrationRuntimesClient_CreateLinkedIntegrationRuntime() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIntegrationRuntimesClient().CreateLinkedIntegrationRuntime(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleIntegrationRuntime", armdatafactory.CreateLinkedIntegrationRuntimeRequest{ - Name: to.Ptr("bfa92911-9fb6-4fbe-8f23-beae87bc1c83"), - DataFactoryLocation: to.Ptr("West US"), - DataFactoryName: to.Ptr("e9955d6d-56ea-4be3-841c-52a12c1a9981"), - SubscriptionID: to.Ptr("061774c7-4b5a-4159-a55b-365581830283"), - }, 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 = armdatafactory.IntegrationRuntimeStatusResponse{ - // Name: to.Ptr("exampleIntegrationRuntime"), - // Properties: &armdatafactory.SelfHostedIntegrationRuntimeStatus{ - // Type: to.Ptr(armdatafactory.IntegrationRuntimeTypeSelfHosted), - // DataFactoryName: to.Ptr("exampleFactoryName"), - // State: to.Ptr(armdatafactory.IntegrationRuntimeStateOnline), - // TypeProperties: &armdatafactory.SelfHostedIntegrationRuntimeStatusTypeProperties{ - // AutoUpdate: to.Ptr(armdatafactory.IntegrationRuntimeAutoUpdateOn), - // AutoUpdateETA: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-20T19:00:00.000Z"); return t}()), - // 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-08-17T03:43:25.705Z"); return t}()), - // LatestVersion: to.Ptr("3.9.6774.1"), - // Links: []*armdatafactory.LinkedIntegrationRuntime{ - // { - // Name: to.Ptr("bfa92911-9fb6-4fbe-8f23-beae87bc1c83"), - // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-17T06:31:04.061Z"); return t}()), - // DataFactoryLocation: to.Ptr("West US"), - // DataFactoryName: to.Ptr("e9955d6d-56ea-4be3-841c-52a12c1a9981"), - // SubscriptionID: to.Ptr("061774c7-4b5a-4159-a55b-365581830283"), - // }}, - // LocalTimeZoneOffset: to.Ptr("PT8H"), - // Nodes: []*armdatafactory.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(armdatafactory.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(armdatafactory.SelfHostedIntegrationRuntimeNodeStatusOnline), - // Version: to.Ptr("3.8.6743.6"), - // VersionStatus: to.Ptr("UpToDate"), - // }}, - // PushedVersion: to.Ptr("3.9.6774.1"), - // ScheduledUpdateDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-20T00:00:00.000Z"); return t}()), - // ServiceUrls: []*string{ - // to.Ptr("wu.frontend.int.clouddatahub-int.net"), - // to.Ptr("*.servicebus.windows.net")}, - // TaskQueueID: to.Ptr("823da112-f2d9-426b-a0d8-5f361b94f72a"), - // UpdateDelayOffset: to.Ptr("PT19H"), - // Version: to.Ptr("3.8.6743.6"), - // VersionStatus: to.Ptr("UpdateAvailable"), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/interfaces.go b/sdk/resourcemanager/datafactory/armdatafactory/interfaces.go index 504b9b6b74c7..f7fba97ffa9f 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/interfaces.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/interfaces.go @@ -297,6 +297,15 @@ type MultiplePipelineTriggerClassification interface { GetMultiplePipelineTrigger() *MultiplePipelineTrigger } +// ReferenceClassification provides polymorphic access to related types. +// Call the interface's GetReference() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DatasetReference, *IntegrationRuntimeReference, *LinkedServiceReference, *PipelineReference, *Reference +type ReferenceClassification interface { + // GetReference returns the Reference content of the underlying type. + GetReference() *Reference +} + // SecretBaseClassification provides polymorphic access to related types. // Call the interface's GetSecretBase() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: diff --git a/sdk/resourcemanager/datafactory/armdatafactory/linkedservices_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/linkedservices_client_example_test.go deleted file mode 100644 index 4fe2fc12c92a..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/linkedservices_client_example_test.go +++ /dev/null @@ -1,212 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_ListByFactory.json -func ExampleLinkedServicesClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLinkedServicesClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.LinkedServiceListResponse = armdatafactory.LinkedServiceListResponse{ - // Value: []*armdatafactory.LinkedServiceResource{ - // { - // Name: to.Ptr("exampleLinkedService"), - // Type: to.Ptr("Microsoft.DataFactory/factories/linkedservices"), - // Etag: to.Ptr("0a0064d4-0000-0000-0000-5b245bd00000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/linkedservices/exampleLinkedService"), - // Properties: &armdatafactory.AzureStorageLinkedService{ - // Type: to.Ptr("AzureStorage"), - // Description: to.Ptr("Example description"), - // TypeProperties: &armdatafactory.AzureStorageLinkedServiceTypeProperties{ - // ConnectionString: map[string]any{ - // "type": "SecureString", - // "value": "**********", - // }, - // EncryptedCredential: to.Ptr("ew0KICAiVmVyc2lvbiI6ICIyMDE3LTExLTMwIiwNCiAgIlByb3RlY3Rpb25Nb2RlIjogIktleSIsDQogICJTZWNyZXRDb250ZW50VHlwZSI6ICJQbGFpbnRleHQiLA0KICAiQ3JlZGVudGlhbElkIjogIkRGLURPR0ZPT0QtWUFOWkhBTkctV1VfMGI2M2EyMmYtMGEzNC00NDg2LWIzMDktNzM0NTlkODUyY2Q1Ig0KfQ=="), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Create.json -func ExampleLinkedServicesClient_CreateOrUpdate_linkedServicesCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLinkedServicesClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleLinkedService", armdatafactory.LinkedServiceResource{ - Properties: &armdatafactory.AzureStorageLinkedService{ - Type: to.Ptr("AzureStorage"), - TypeProperties: &armdatafactory.AzureStorageLinkedServiceTypeProperties{ - ConnectionString: map[string]any{ - "type": "SecureString", - "value": "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=", - }, - }, - }, - }, &armdatafactory.LinkedServicesClientCreateOrUpdateOptions{IfMatch: 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.LinkedServiceResource = armdatafactory.LinkedServiceResource{ - // Name: to.Ptr("exampleLinkedService"), - // Type: to.Ptr("Microsoft.DataFactory/factories/linkedservices"), - // Etag: to.Ptr("0a0062d4-0000-0000-0000-5b245bcf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/linkedservices/exampleLinkedService"), - // Properties: &armdatafactory.AzureStorageLinkedService{ - // Type: to.Ptr("AzureStorage"), - // TypeProperties: &armdatafactory.AzureStorageLinkedServiceTypeProperties{ - // ConnectionString: map[string]any{ - // "type": "SecureString", - // "value": "**********", - // }, - // EncryptedCredential: to.Ptr("ew0KICAiVmVyc2lvbiI6ICIyMDE3LTExLTMwIiwNCiAgIlByb3RlY3Rpb25Nb2RlIjogIktleSIsDQogICJTZWNyZXRDb250ZW50VHlwZSI6ICJQbGFpbnRleHQiLA0KICAiQ3JlZGVudGlhbElkIjogIkRGLURPR0ZPT0QtWUFOWkhBTkctV1VfM2FiMTk0NjYtNWUxNi00NzU1LWJlNzktMjI2ZTVmZWU3YzY0Ig0KfQ=="), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Update.json -func ExampleLinkedServicesClient_CreateOrUpdate_linkedServicesUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLinkedServicesClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleLinkedService", armdatafactory.LinkedServiceResource{ - Properties: &armdatafactory.AzureStorageLinkedService{ - Type: to.Ptr("AzureStorage"), - Description: to.Ptr("Example description"), - TypeProperties: &armdatafactory.AzureStorageLinkedServiceTypeProperties{ - ConnectionString: map[string]any{ - "type": "SecureString", - "value": "DefaultEndpointsProtocol=https;AccountName=examplestorageaccount;AccountKey=", - }, - }, - }, - }, &armdatafactory.LinkedServicesClientCreateOrUpdateOptions{IfMatch: 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.LinkedServiceResource = armdatafactory.LinkedServiceResource{ - // Name: to.Ptr("exampleLinkedService"), - // Type: to.Ptr("Microsoft.DataFactory/factories/linkedservices"), - // Etag: to.Ptr("0a0064d4-0000-0000-0000-5b245bd00000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/linkedservices/exampleLinkedService"), - // Properties: &armdatafactory.AzureStorageLinkedService{ - // Type: to.Ptr("AzureStorage"), - // Description: to.Ptr("Example description"), - // TypeProperties: &armdatafactory.AzureStorageLinkedServiceTypeProperties{ - // ConnectionString: map[string]any{ - // "type": "SecureString", - // "value": "**********", - // }, - // EncryptedCredential: to.Ptr("ew0KICAiVmVyc2lvbiI6ICIyMDE3LTExLTMwIiwNCiAgIlByb3RlY3Rpb25Nb2RlIjogIktleSIsDQogICJTZWNyZXRDb250ZW50VHlwZSI6ICJQbGFpbnRleHQiLA0KICAiQ3JlZGVudGlhbElkIjogIkRGLURPR0ZPT0QtWUFOWkhBTkctV1VfMGI2M2EyMmYtMGEzNC00NDg2LWIzMDktNzM0NTlkODUyY2Q1Ig0KfQ=="), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Get.json -func ExampleLinkedServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLinkedServicesClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleLinkedService", &armdatafactory.LinkedServicesClientGetOptions{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.LinkedServiceResource = armdatafactory.LinkedServiceResource{ - // Name: to.Ptr("exampleLinkedService"), - // Type: to.Ptr("Microsoft.DataFactory/factories/linkedservices"), - // Etag: to.Ptr("1500474f-0000-0200-0000-5cbe090d0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/linkedservices/exampleLinkedService"), - // Properties: &armdatafactory.AzureStorageLinkedService{ - // Type: to.Ptr("AzureStorage"), - // Description: to.Ptr("Example description"), - // TypeProperties: &armdatafactory.AzureStorageLinkedServiceTypeProperties{ - // ConnectionString: map[string]any{ - // "type": "SecureString", - // "value": "**********", - // }, - // EncryptedCredential: to.Ptr("ew0KICAiVmVyc2lvbiI6ICIyMDE3LTExLTMwIiwNCiAgIlByb3RlY3Rpb25Nb2RlIjogIktleSIsDQogICJTZWNyZXRDb250ZW50VHlwZSI6ICJQbGFpbnRleHQiLA0KICAiQ3JlZGVudGlhbElkIjogIkhWVEVTVEVYQU1QTEVTXzg5MjU1NGY0LTViNGItNDFhOS1hYWYxLTg4ZWI5ZDBjOWIzMyINCn0="), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/LinkedServices_Delete.json -func ExampleLinkedServicesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewLinkedServicesClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleLinkedService", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/managedprivateendpoints_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/managedprivateendpoints_client_example_test.go deleted file mode 100644 index d5187c130c44..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/managedprivateendpoints_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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_ListByFactory.json -func ExampleManagedPrivateEndpointsClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedPrivateEndpointsClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", "exampleManagedVirtualNetworkName", 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.ManagedPrivateEndpointListResponse = armdatafactory.ManagedPrivateEndpointListResponse{ - // Value: []*armdatafactory.ManagedPrivateEndpointResource{ - // { - // Name: to.Ptr("exampleManagedPrivateEndpointName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints"), - // Etag: to.Ptr("000046c4-0000-0000-0000-5b2198bf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/exampleManagedVirtualNetworkName/managedPrivateEndpoints/exampleManagedPrivateEndpointName"), - // Properties: &armdatafactory.ManagedPrivateEndpoint{ - // ConnectionState: &armdatafactory.ConnectionStateProperties{ - // Description: to.Ptr(""), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Pending"), - // }, - // Fqdns: []*string{ - // }, - // GroupID: to.Ptr("blob"), - // PrivateLinkResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Create.json -func ExampleManagedPrivateEndpointsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedPrivateEndpointsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleManagedVirtualNetworkName", "exampleManagedPrivateEndpointName", armdatafactory.ManagedPrivateEndpointResource{ - Properties: &armdatafactory.ManagedPrivateEndpoint{ - Fqdns: []*string{}, - GroupID: to.Ptr("blob"), - PrivateLinkResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage"), - }, - }, &armdatafactory.ManagedPrivateEndpointsClientCreateOrUpdateOptions{IfMatch: 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.ManagedPrivateEndpointResource = armdatafactory.ManagedPrivateEndpointResource{ - // Name: to.Ptr("exampleManagedPrivateEndpointName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints"), - // Etag: to.Ptr("000046c4-0000-0000-0000-5b2198bf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/exampleManagedVirtualNetworkName/managedPrivateEndpoints/exampleManagedPrivateEndpointName"), - // Properties: &armdatafactory.ManagedPrivateEndpoint{ - // ConnectionState: &armdatafactory.ConnectionStateProperties{ - // Description: to.Ptr(""), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Pending"), - // }, - // Fqdns: []*string{ - // }, - // GroupID: to.Ptr("blob"), - // PrivateLinkResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Get.json -func ExampleManagedPrivateEndpointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedPrivateEndpointsClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleManagedVirtualNetworkName", "exampleManagedPrivateEndpointName", &armdatafactory.ManagedPrivateEndpointsClientGetOptions{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.ManagedPrivateEndpointResource = armdatafactory.ManagedPrivateEndpointResource{ - // Name: to.Ptr("exampleManagedPrivateEndpointName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints"), - // Etag: to.Ptr("000046c4-0000-0000-0000-5b2198bf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/exampleManagedVirtualNetworkName/managedPrivateEndpoints/exampleManagedPrivateEndpointName"), - // Properties: &armdatafactory.ManagedPrivateEndpoint{ - // ConnectionState: &armdatafactory.ConnectionStateProperties{ - // Description: to.Ptr(""), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Pending"), - // }, - // Fqdns: []*string{ - // }, - // GroupID: to.Ptr("blob"), - // PrivateLinkResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleBlobStorage"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedPrivateEndpoints_Delete.json -func ExampleManagedPrivateEndpointsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewManagedPrivateEndpointsClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleManagedVirtualNetworkName", "exampleManagedPrivateEndpointName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/managedvirtualnetworks_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/managedvirtualnetworks_client_example_test.go deleted file mode 100644 index 1ce768869d8e..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/managedvirtualnetworks_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 armdatafactory_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_ListByFactory.json -func ExampleManagedVirtualNetworksClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedVirtualNetworksClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.ManagedVirtualNetworkListResponse = armdatafactory.ManagedVirtualNetworkListResponse{ - // Value: []*armdatafactory.ManagedVirtualNetworkResource{ - // { - // Name: to.Ptr("exampleManagedVirtualNetworkName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/managedVirtualNetworks"), - // Etag: to.Ptr("0400f1a1-0000-0000-0000-5b2188640000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/exampleManagedVirtualNetworkName"), - // Properties: &armdatafactory.ManagedVirtualNetwork{ - // Alias: to.Ptr("exampleFactoryName"), - // VNetID: to.Ptr("5a7bd944-87e6-454a-8d4d-9fba446514fd"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Create.json -func ExampleManagedVirtualNetworksClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedVirtualNetworksClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleManagedVirtualNetworkName", armdatafactory.ManagedVirtualNetworkResource{ - Properties: &armdatafactory.ManagedVirtualNetwork{}, - }, &armdatafactory.ManagedVirtualNetworksClientCreateOrUpdateOptions{IfMatch: 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.ManagedVirtualNetworkResource = armdatafactory.ManagedVirtualNetworkResource{ - // Name: to.Ptr("exampleManagedVirtualNetworkName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/managedVirtualNetworks"), - // Etag: to.Ptr("000046c4-0000-0000-0000-5b2198bf0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/exampleManagedVirtualNetworkName"), - // Properties: &armdatafactory.ManagedVirtualNetwork{ - // Alias: to.Ptr("exampleFactoryName"), - // VNetID: to.Ptr("12345678-1234-1234-1234-12345678123"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ManagedVirtualNetworks_Get.json -func ExampleManagedVirtualNetworksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedVirtualNetworksClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleManagedVirtualNetworkName", &armdatafactory.ManagedVirtualNetworksClientGetOptions{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.ManagedVirtualNetworkResource = armdatafactory.ManagedVirtualNetworkResource{ - // Name: to.Ptr("exampleManagedVirtualNetworkName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/managedVirtualNetworks"), - // Etag: to.Ptr("15003c4f-0000-0200-0000-5cbe090b0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/exampleManagedVirtualNetworkName"), - // Properties: &armdatafactory.ManagedVirtualNetwork{ - // Alias: to.Ptr("exampleFactoryName"), - // VNetID: to.Ptr("5a7bd944-87e6-454a-8d4d-9fba446514fd"), - // }, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/models.go b/sdk/resourcemanager/datafactory/armdatafactory/models.go index 48c9d158e5f2..d236c057764e 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/models.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/models.go @@ -538,19 +538,105 @@ func (a *AmazonRdsForSQLServerLinkedService) GetLinkedService() *LinkedService { // AmazonRdsForSQLServerLinkedServiceTypeProperties - Amazon Rds for SQL Server linked service properties. type AmazonRdsForSQLServerLinkedServiceTypeProperties struct { - // REQUIRED; The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - ConnectionString any - // Sql always encrypted properties. AlwaysEncryptedSettings *SQLAlwaysEncryptedProperties + // The application workload type when connecting to a server, used by recommended version. Possible values are ReadOnly and + // ReadWrite. Type: string (or Expression with resultType string). + ApplicationIntent any + + // The type used for authentication. Type: string. + AuthenticationType *AmazonRdsForSQLAuthenticationType + + // The default wait time (in seconds) before terminating the attempt to execute a command and generating an error, used by + // recommended version. Type: integer (or Expression with resultType integer). + CommandTimeout any + + // The number of re-connections attempted after identifying that there was an idle connection failure, used by recommended + // version. This must be an integer between 0 and 255. Type: integer (or Expression + // with resultType integer). + ConnectRetryCount any + + // The amount of time (in seconds) between each re-connection attempt after identifying that there was an idle connection + // failure, used by recommended version. This must be an integer between 1 and 60. + // Type: integer (or Expression with resultType integer). + ConnectRetryInterval any + + // The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an + // error, used by recommended version. Type: integer (or Expression with resultType + // integer). + ConnectTimeout any + + // The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + ConnectionString any + + // The name of the database, used by recommended version. Type: string (or Expression with resultType string). + Database any + + // Indicate whether TLS encryption is required for all data sent between the client and server, used by recommended version. + // Possible values are true/yes/mandatory, false/no/optional and strict. Type: + // string (or Expression with resultType string). + Encrypt any + // The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. // Type: string. EncryptedCredential *string + // The name or address of the partner server to connect to if the primary server is down, used by recommended version. Type: + // string (or Expression with resultType string). + FailoverPartner any + + // The host name to use when validating the server certificate for the connection. When not specified, the server name from + // the Data Source is used for certificate validation, used by recommended + // version. Type: string (or Expression with resultType string). + HostNameInCertificate any + + // Indicate whether User ID and Password are specified in the connection (when false) or whether the current Windows account + // credentials are used for authentication (when true), used by recommended + // version. Type: Boolean (or Expression with resultType boolean). + IntegratedSecurity any + + // The minimum time, in seconds, for the connection to live in the connection pool before being destroyed, used by recommended + // version. Type: integer (or Expression with resultType integer). + LoadBalanceTimeout any + + // The maximum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MaxPoolSize any + + // The minimum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MinPoolSize any + + // If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true + // provides faster detection of and connection to the (currently) active + // server, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultiSubnetFailover any + + // When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel + // all result sets from one batch before it can execute any other batch on + // that connection, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultipleActiveResultSets any + + // The size in bytes of the network packets used to communicate with an instance of server, used by recommended version. Type: + // integer (or Expression with resultType integer). + PacketSize any + // The on-premises Windows authentication password. Password SecretBaseClassification + // Indicate whether the connection will be pooled or explicitly opened every time that the connection is requested, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + Pooling any + + // The name or network address of the instance of SQL Server to which to connect, used by recommended version. Type: string + // (or Expression with resultType string). + Server any + + // Indicate whether the channel will be encrypted while bypassing walking the certificate chain to validate trust, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + TrustServerCertificate any + // The on-premises Windows authentication user name. Type: string (or Expression with resultType string). UserName any } @@ -4890,25 +4976,117 @@ func (a *AzureSQLDWLinkedService) GetLinkedService() *LinkedService { // AzureSQLDWLinkedServiceTypeProperties - Azure SQL Data Warehouse linked service properties. type AzureSQLDWLinkedServiceTypeProperties struct { - // REQUIRED; The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString - // or AzureKeyVaultSecretReference. - ConnectionString any + // The application workload type when connecting to a server, used by recommended version. Possible values are ReadOnly and + // ReadWrite. Type: string (or Expression with resultType string). + ApplicationIntent any + + // The type used for authentication. Type: string. + AuthenticationType *AzureSQLDWAuthenticationType // Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, // AzureGermany. Default value is the data factory regions’ cloud type. Type: // string (or Expression with resultType string). AzureCloudType any + // The default wait time (in seconds) before terminating the attempt to execute a command and generating an error, used by + // recommended version. Type: integer (or Expression with resultType integer). + CommandTimeout any + + // The number of re-connections attempted after identifying that there was an idle connection failure, used by recommended + // version. This must be an integer between 0 and 255. Type: integer (or Expression + // with resultType integer). + ConnectRetryCount any + + // The amount of time (in seconds) between each re-connection attempt after identifying that there was an idle connection + // failure, used by recommended version. This must be an integer between 1 and 60. + // Type: integer (or Expression with resultType integer). + ConnectRetryInterval any + + // The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an + // error, used by recommended version. Type: integer (or Expression with resultType + // integer). + ConnectTimeout any + + // The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + ConnectionString any + // The credential reference containing authentication information. Credential *CredentialReference + // The name of the database, used by recommended version. Type: string (or Expression with resultType string). + Database any + + // Indicate whether TLS encryption is required for all data sent between the client and server, used by recommended version. + // Possible values are true/yes/mandatory, false/no/optional and strict. Type: + // string (or Expression with resultType string). + Encrypt any + // The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. // Type: string. EncryptedCredential *string + // The name or address of the partner server to connect to if the primary server is down, used by recommended version. Type: + // string (or Expression with resultType string). + FailoverPartner any + + // The host name to use when validating the server certificate for the connection. When not specified, the server name from + // the Data Source is used for certificate validation, used by recommended + // version. Type: string (or Expression with resultType string). + HostNameInCertificate any + + // Indicate whether User ID and Password are specified in the connection (when false) or whether the current Windows account + // credentials are used for authentication (when true), used by recommended + // version. Type: Boolean (or Expression with resultType boolean). + IntegratedSecurity any + + // The minimum time, in seconds, for the connection to live in the connection pool before being destroyed, used by recommended + // version. Type: integer (or Expression with resultType integer). + LoadBalanceTimeout any + + // The maximum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MaxPoolSize any + + // The minimum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MinPoolSize any + + // If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true + // provides faster detection of and connection to the (currently) active + // server, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultiSubnetFailover any + + // When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel + // all result sets from one batch before it can execute any other batch on + // that connection, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultipleActiveResultSets any + + // The size in bytes of the network packets used to communicate with an instance of server, used by recommended version. Type: + // integer (or Expression with resultType integer). + PacketSize any + // The Azure key vault secret reference of password in connection string. Password *AzureKeyVaultSecretReference + // Indicate whether the connection will be pooled or explicitly opened every time that the connection is requested, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + Pooling any + + // The name or network address of the instance of SQL Server to which to connect, used by recommended version. Type: string + // (or Expression with resultType string). + Server any + + // The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + // servicePrincipalCredential can be SecureString or + // AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can + // only be AzureKeyVaultSecretReference. + ServicePrincipalCredential SecretBaseClassification + + // The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, + // 'ServicePrincipalCert' for certificate. Type: string (or Expression with + // resultType string). + ServicePrincipalCredentialType any + // The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with // resultType string). ServicePrincipalID any @@ -4918,6 +5096,13 @@ type AzureSQLDWLinkedServiceTypeProperties struct { // The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). Tenant any + + // Indicate whether the channel will be encrypted while bypassing walking the certificate chain to validate trust, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + TrustServerCertificate any + + // The user name to be used when connecting to server. Type: string (or Expression with resultType string). + UserName any } // AzureSQLDWTableDataset - The Azure SQL Data Warehouse dataset. @@ -5019,27 +5204,120 @@ func (a *AzureSQLDatabaseLinkedService) GetLinkedService() *LinkedService { // AzureSQLDatabaseLinkedServiceTypeProperties - Azure SQL Database linked service properties. type AzureSQLDatabaseLinkedServiceTypeProperties struct { - // REQUIRED; The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - ConnectionString any - // Sql always encrypted properties. AlwaysEncryptedSettings *SQLAlwaysEncryptedProperties + // The application workload type when connecting to a server, used by recommended version. Possible values are ReadOnly and + // ReadWrite. Type: string (or Expression with resultType string). + ApplicationIntent any + + // The type used for authentication. Type: string. + AuthenticationType *AzureSQLDatabaseAuthenticationType + // Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, // AzureGermany. Default value is the data factory regions’ cloud type. Type: // string (or Expression with resultType string). AzureCloudType any + // The default wait time (in seconds) before terminating the attempt to execute a command and generating an error, used by + // recommended version. Type: integer (or Expression with resultType integer). + CommandTimeout any + + // The number of re-connections attempted after identifying that there was an idle connection failure, used by recommended + // version. This must be an integer between 0 and 255. Type: integer (or Expression + // with resultType integer). + ConnectRetryCount any + + // The amount of time (in seconds) between each re-connection attempt after identifying that there was an idle connection + // failure, used by recommended version. This must be an integer between 1 and 60. + // Type: integer (or Expression with resultType integer). + ConnectRetryInterval any + + // The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an + // error, used by recommended version. Type: integer (or Expression with resultType + // integer). + ConnectTimeout any + + // The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + ConnectionString any + // The credential reference containing authentication information. Credential *CredentialReference + // The name of the database, used by recommended version. Type: string (or Expression with resultType string). + Database any + + // Indicate whether TLS encryption is required for all data sent between the client and server, used by recommended version. + // Possible values are true/yes/mandatory, false/no/optional and strict. Type: + // string (or Expression with resultType string). + Encrypt any + // The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. // Type: string. EncryptedCredential *string + // The name or address of the partner server to connect to if the primary server is down, used by recommended version. Type: + // string (or Expression with resultType string). + FailoverPartner any + + // The host name to use when validating the server certificate for the connection. When not specified, the server name from + // the Data Source is used for certificate validation, used by recommended + // version. Type: string (or Expression with resultType string). + HostNameInCertificate any + + // Indicate whether User ID and Password are specified in the connection (when false) or whether the current Windows account + // credentials are used for authentication (when true), used by recommended + // version. Type: Boolean (or Expression with resultType boolean). + IntegratedSecurity any + + // The minimum time, in seconds, for the connection to live in the connection pool before being destroyed, used by recommended + // version. Type: integer (or Expression with resultType integer). + LoadBalanceTimeout any + + // The maximum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MaxPoolSize any + + // The minimum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MinPoolSize any + + // If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true + // provides faster detection of and connection to the (currently) active + // server, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultiSubnetFailover any + + // When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel + // all result sets from one batch before it can execute any other batch on + // that connection, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultipleActiveResultSets any + + // The size in bytes of the network packets used to communicate with an instance of server, used by recommended version. Type: + // integer (or Expression with resultType integer). + PacketSize any + // The Azure key vault secret reference of password in connection string. Password *AzureKeyVaultSecretReference + // Indicate whether the connection will be pooled or explicitly opened every time that the connection is requested, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + Pooling any + + // The name or network address of the instance of SQL Server to which to connect, used by recommended version. Type: string + // (or Expression with resultType string). + Server any + + // The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + // servicePrincipalCredential can be SecureString or + // AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can + // only be AzureKeyVaultSecretReference. + ServicePrincipalCredential SecretBaseClassification + + // The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, + // 'ServicePrincipalCert' for certificate. Type: string (or Expression with + // resultType string). + ServicePrincipalCredentialType any + // The ID of the service principal used to authenticate against Azure SQL Database. Type: string (or Expression with resultType // string). ServicePrincipalID any @@ -5049,6 +5327,13 @@ type AzureSQLDatabaseLinkedServiceTypeProperties struct { // The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). Tenant any + + // Indicate whether the channel will be encrypted while bypassing walking the certificate chain to validate trust, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + TrustServerCertificate any + + // The user name to be used when connecting to server. Type: string (or Expression with resultType string). + UserName any } // AzureSQLMILinkedService - Azure SQL Managed Instance linked service. @@ -5089,27 +5374,120 @@ func (a *AzureSQLMILinkedService) GetLinkedService() *LinkedService { // AzureSQLMILinkedServiceTypeProperties - Azure SQL Managed Instance linked service properties. type AzureSQLMILinkedServiceTypeProperties struct { - // REQUIRED; The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - ConnectionString any - // Sql always encrypted properties. AlwaysEncryptedSettings *SQLAlwaysEncryptedProperties + // The application workload type when connecting to a server, used by recommended version. Possible values are ReadOnly and + // ReadWrite. Type: string (or Expression with resultType string). + ApplicationIntent any + + // The type used for authentication. Type: string. + AuthenticationType *AzureSQLMIAuthenticationType + // Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, // AzureGermany. Default value is the data factory regions’ cloud type. Type: // string (or Expression with resultType string). AzureCloudType any + // The default wait time (in seconds) before terminating the attempt to execute a command and generating an error, used by + // recommended version. Type: integer (or Expression with resultType integer). + CommandTimeout any + + // The number of re-connections attempted after identifying that there was an idle connection failure, used by recommended + // version. This must be an integer between 0 and 255. Type: integer (or Expression + // with resultType integer). + ConnectRetryCount any + + // The amount of time (in seconds) between each re-connection attempt after identifying that there was an idle connection + // failure, used by recommended version. This must be an integer between 1 and 60. + // Type: integer (or Expression with resultType integer). + ConnectRetryInterval any + + // The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an + // error, used by recommended version. Type: integer (or Expression with resultType + // integer). + ConnectTimeout any + + // The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + ConnectionString any + // The credential reference containing authentication information. Credential *CredentialReference + // The name of the database, used by recommended version. Type: string (or Expression with resultType string). + Database any + + // Indicate whether TLS encryption is required for all data sent between the client and server, used by recommended version. + // Possible values are true/yes/mandatory, false/no/optional and strict. Type: + // string (or Expression with resultType string). + Encrypt any + // The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. // Type: string. EncryptedCredential *string + // The name or address of the partner server to connect to if the primary server is down, used by recommended version. Type: + // string (or Expression with resultType string). + FailoverPartner any + + // The host name to use when validating the server certificate for the connection. When not specified, the server name from + // the Data Source is used for certificate validation, used by recommended + // version. Type: string (or Expression with resultType string). + HostNameInCertificate any + + // Indicate whether User ID and Password are specified in the connection (when false) or whether the current Windows account + // credentials are used for authentication (when true), used by recommended + // version. Type: Boolean (or Expression with resultType boolean). + IntegratedSecurity any + + // The minimum time, in seconds, for the connection to live in the connection pool before being destroyed, used by recommended + // version. Type: integer (or Expression with resultType integer). + LoadBalanceTimeout any + + // The maximum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MaxPoolSize any + + // The minimum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MinPoolSize any + + // If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true + // provides faster detection of and connection to the (currently) active + // server, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultiSubnetFailover any + + // When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel + // all result sets from one batch before it can execute any other batch on + // that connection, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultipleActiveResultSets any + + // The size in bytes of the network packets used to communicate with an instance of server, used by recommended version. Type: + // integer (or Expression with resultType integer). + PacketSize any + // The Azure key vault secret reference of password in connection string. Password *AzureKeyVaultSecretReference + // Indicate whether the connection will be pooled or explicitly opened every time that the connection is requested, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + Pooling any + + // The name or network address of the instance of SQL Server to which to connect, used by recommended version. Type: string + // (or Expression with resultType string). + Server any + + // The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + // servicePrincipalCredential can be SecureString or + // AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can + // only be AzureKeyVaultSecretReference. + ServicePrincipalCredential SecretBaseClassification + + // The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, + // 'ServicePrincipalCert' for certificate. Type: string (or Expression with + // resultType string). + ServicePrincipalCredentialType any + // The ID of the service principal used to authenticate against Azure SQL Managed Instance. Type: string (or Expression with // resultType string). ServicePrincipalID any @@ -5119,6 +5497,13 @@ type AzureSQLMILinkedServiceTypeProperties struct { // The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). Tenant any + + // Indicate whether the channel will be encrypted while bypassing walking the certificate chain to validate trust, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + TrustServerCertificate any + + // The user name to be used when connecting to server. Type: string (or Expression with resultType string). + UserName any } // AzureSQLMITableDataset - The Azure SQL Managed Instance dataset. @@ -8940,13 +9325,20 @@ type DatasetReference struct { // REQUIRED; Reference dataset name. ReferenceName *string - // REQUIRED; Dataset reference type. - Type *DatasetReferenceType + // REQUIRED; Type of reference. + Type *string // Arguments for dataset. Parameters map[string]any } +// GetReference implements the ReferenceClassification interface for type DatasetReference. +func (d *DatasetReference) GetReference() *Reference { + return &Reference{ + Type: d.Type, + } +} + // DatasetResource - Dataset resource type. type DatasetResource struct { // REQUIRED; Dataset properties. @@ -15899,13 +16291,20 @@ type IntegrationRuntimeReference struct { // REQUIRED; Reference integration runtime name. ReferenceName *string - // REQUIRED; Type of integration runtime. - Type *IntegrationRuntimeReferenceType + // REQUIRED; Type of reference. + Type *string // Arguments for integration runtime. Parameters map[string]any } +// GetReference implements the ReferenceClassification interface for type IntegrationRuntimeReference. +func (i *IntegrationRuntimeReference) GetReference() *Reference { + return &Reference{ + Type: i.Type, + } +} + // IntegrationRuntimeRegenerateKeyParameters - Parameters to regenerate the authentication key. type IntegrationRuntimeRegenerateKeyParameters struct { // The name of the authentication key to regenerate. @@ -16901,13 +17300,20 @@ type LinkedServiceReference struct { // REQUIRED; Reference LinkedService name. ReferenceName *string - // REQUIRED; Linked service reference type. - Type *LinkedServiceReferenceType + // REQUIRED; Type of reference. + Type *string // Arguments for LinkedService. Parameters map[string]any } +// GetReference implements the ReferenceClassification interface for type LinkedServiceReference. +func (l *LinkedServiceReference) GetReference() *Reference { + return &Reference{ + Type: l.Type, + } +} + // LinkedServiceResource - Linked service resource type. type LinkedServiceResource struct { // REQUIRED; Properties of linked service. @@ -17222,6 +17628,9 @@ type ManagedIdentityCredential struct { // Credential description. Description *string + + // Managed identity credential properties. + TypeProperties *ManagedIdentityTypeProperties } // GetCredential implements the CredentialClassification interface for type ManagedIdentityCredential. @@ -17234,6 +17643,12 @@ func (m *ManagedIdentityCredential) GetCredential() *Credential { } } +// ManagedIdentityTypeProperties - Managed identity type properties. +type ManagedIdentityTypeProperties struct { + // The resource id of user assigned managed identity + ResourceID *string +} + // ManagedIntegrationRuntime - Managed integration runtime, including managed elastic and managed dedicated integration runtimes. type ManagedIntegrationRuntime struct { // REQUIRED; Type of integration runtime. @@ -21327,13 +21742,20 @@ type PipelineReference struct { // REQUIRED; Reference pipeline name. ReferenceName *string - // REQUIRED; Pipeline reference type. - Type *PipelineReferenceType + // REQUIRED; Type of reference. + Type *string // Reference name. Name *string } +// GetReference implements the ReferenceClassification interface for type PipelineReference. +func (p *PipelineReference) GetReference() *Reference { + return &Reference{ + Type: p.Type, + } +} + // PipelineResource - Pipeline resource type. type PipelineResource struct { // REQUIRED; Properties of the pipeline. @@ -22515,6 +22937,15 @@ type RedshiftUnloadSettings struct { S3LinkedServiceName *LinkedServiceReference } +// Reference - Base reference type. +type Reference struct { + // REQUIRED; Type of reference. + Type *string +} + +// GetReference implements the ReferenceClassification interface for type Reference. +func (r *Reference) GetReference() *Reference { return r } + // RelationalSource - A copy activity source for various relational databases. type RelationalSource struct { // REQUIRED; Copy source type. @@ -23552,19 +23983,105 @@ func (s *SQLServerLinkedService) GetLinkedService() *LinkedService { // SQLServerLinkedServiceTypeProperties - SQL Server linked service properties. type SQLServerLinkedServiceTypeProperties struct { - // REQUIRED; The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - ConnectionString any - // Sql always encrypted properties. AlwaysEncryptedSettings *SQLAlwaysEncryptedProperties + // The application workload type when connecting to a server, used by recommended version. Possible values are ReadOnly and + // ReadWrite. Type: string (or Expression with resultType string). + ApplicationIntent any + + // The type used for authentication. Type: string. + AuthenticationType *SQLServerAuthenticationType + + // The default wait time (in seconds) before terminating the attempt to execute a command and generating an error, used by + // recommended version. Type: integer (or Expression with resultType integer). + CommandTimeout any + + // The number of re-connections attempted after identifying that there was an idle connection failure, used by recommended + // version. This must be an integer between 0 and 255. Type: integer (or Expression + // with resultType integer). + ConnectRetryCount any + + // The amount of time (in seconds) between each re-connection attempt after identifying that there was an idle connection + // failure, used by recommended version. This must be an integer between 1 and 60. + // Type: integer (or Expression with resultType integer). + ConnectRetryInterval any + + // The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an + // error, used by recommended version. Type: integer (or Expression with resultType + // integer). + ConnectTimeout any + + // The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + ConnectionString any + + // The name of the database, used by recommended version. Type: string (or Expression with resultType string). + Database any + + // Indicate whether TLS encryption is required for all data sent between the client and server, used by recommended version. + // Possible values are true/yes/mandatory, false/no/optional and strict. Type: + // string (or Expression with resultType string). + Encrypt any + // The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. // Type: string. EncryptedCredential *string + // The name or address of the partner server to connect to if the primary server is down, used by recommended version. Type: + // string (or Expression with resultType string). + FailoverPartner any + + // The host name to use when validating the server certificate for the connection. When not specified, the server name from + // the Data Source is used for certificate validation, used by recommended + // version. Type: string (or Expression with resultType string). + HostNameInCertificate any + + // Indicate whether User ID and Password are specified in the connection (when false) or whether the current Windows account + // credentials are used for authentication (when true), used by recommended + // version. Type: Boolean (or Expression with resultType boolean). + IntegratedSecurity any + + // The minimum time, in seconds, for the connection to live in the connection pool before being destroyed, used by recommended + // version. Type: integer (or Expression with resultType integer). + LoadBalanceTimeout any + + // The maximum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MaxPoolSize any + + // The minimum number of connections allowed in the connection pool for this specific connection string, used by recommended + // version. Type: integer (or Expression with resultType integer). + MinPoolSize any + + // If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true + // provides faster detection of and connection to the (currently) active + // server, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultiSubnetFailover any + + // When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel + // all result sets from one batch before it can execute any other batch on + // that connection, used by recommended version. Type: Boolean (or Expression with resultType boolean). + MultipleActiveResultSets any + + // The size in bytes of the network packets used to communicate with an instance of server, used by recommended version. Type: + // integer (or Expression with resultType integer). + PacketSize any + // The on-premises Windows authentication password. Password SecretBaseClassification + // Indicate whether the connection will be pooled or explicitly opened every time that the connection is requested, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + Pooling any + + // The name or network address of the instance of SQL Server to which to connect, used by recommended version. Type: string + // (or Expression with resultType string). + Server any + + // Indicate whether the channel will be encrypted while bypassing walking the certificate chain to validate trust, used by + // recommended version. Type: Boolean (or Expression with resultType boolean). + TrustServerCertificate any + // The on-premises Windows authentication user name. Type: string (or Expression with resultType string). UserName any } @@ -26829,8 +27346,9 @@ type ScriptActivityScriptBlock struct { // REQUIRED; The query text. Type: string (or Expression with resultType string). Text any - // REQUIRED; The type of the query. Type: string. - Type *ScriptType + // REQUIRED; The type of the query. Please refer to the ScriptType for valid options. Type: string (or Expression with resultType + // string). + Type any // Array of script parameters. Type: array. Parameters []*ScriptActivityParameter diff --git a/sdk/resourcemanager/datafactory/armdatafactory/models_serde.go b/sdk/resourcemanager/datafactory/armdatafactory/models_serde.go index 3ec25afb5244..54947b924ce4 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/models_serde.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/models_serde.go @@ -1022,9 +1022,29 @@ func (a *AmazonRdsForSQLServerLinkedService) UnmarshalJSON(data []byte) error { func (a AmazonRdsForSQLServerLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alwaysEncryptedSettings", a.AlwaysEncryptedSettings) + populateAny(objectMap, "applicationIntent", a.ApplicationIntent) + populate(objectMap, "authenticationType", a.AuthenticationType) + populateAny(objectMap, "commandTimeout", a.CommandTimeout) + populateAny(objectMap, "connectRetryCount", a.ConnectRetryCount) + populateAny(objectMap, "connectRetryInterval", a.ConnectRetryInterval) + populateAny(objectMap, "connectTimeout", a.ConnectTimeout) populateAny(objectMap, "connectionString", a.ConnectionString) + populateAny(objectMap, "database", a.Database) + populateAny(objectMap, "encrypt", a.Encrypt) populate(objectMap, "encryptedCredential", a.EncryptedCredential) + populateAny(objectMap, "failoverPartner", a.FailoverPartner) + populateAny(objectMap, "hostNameInCertificate", a.HostNameInCertificate) + populateAny(objectMap, "integratedSecurity", a.IntegratedSecurity) + populateAny(objectMap, "loadBalanceTimeout", a.LoadBalanceTimeout) + populateAny(objectMap, "maxPoolSize", a.MaxPoolSize) + populateAny(objectMap, "minPoolSize", a.MinPoolSize) + populateAny(objectMap, "multiSubnetFailover", a.MultiSubnetFailover) + populateAny(objectMap, "multipleActiveResultSets", a.MultipleActiveResultSets) + populateAny(objectMap, "packetSize", a.PacketSize) populate(objectMap, "password", a.Password) + populateAny(objectMap, "pooling", a.Pooling) + populateAny(objectMap, "server", a.Server) + populateAny(objectMap, "trustServerCertificate", a.TrustServerCertificate) populateAny(objectMap, "userName", a.UserName) return json.Marshal(objectMap) } @@ -1041,15 +1061,75 @@ func (a *AmazonRdsForSQLServerLinkedServiceTypeProperties) UnmarshalJSON(data [] case "alwaysEncryptedSettings": err = unpopulate(val, "AlwaysEncryptedSettings", &a.AlwaysEncryptedSettings) delete(rawMsg, key) + case "applicationIntent": + err = unpopulate(val, "ApplicationIntent", &a.ApplicationIntent) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &a.AuthenticationType) + delete(rawMsg, key) + case "commandTimeout": + err = unpopulate(val, "CommandTimeout", &a.CommandTimeout) + delete(rawMsg, key) + case "connectRetryCount": + err = unpopulate(val, "ConnectRetryCount", &a.ConnectRetryCount) + delete(rawMsg, key) + case "connectRetryInterval": + err = unpopulate(val, "ConnectRetryInterval", &a.ConnectRetryInterval) + delete(rawMsg, key) + case "connectTimeout": + err = unpopulate(val, "ConnectTimeout", &a.ConnectTimeout) + delete(rawMsg, key) case "connectionString": err = unpopulate(val, "ConnectionString", &a.ConnectionString) delete(rawMsg, key) + case "database": + err = unpopulate(val, "Database", &a.Database) + delete(rawMsg, key) + case "encrypt": + err = unpopulate(val, "Encrypt", &a.Encrypt) + delete(rawMsg, key) case "encryptedCredential": err = unpopulate(val, "EncryptedCredential", &a.EncryptedCredential) delete(rawMsg, key) + case "failoverPartner": + err = unpopulate(val, "FailoverPartner", &a.FailoverPartner) + delete(rawMsg, key) + case "hostNameInCertificate": + err = unpopulate(val, "HostNameInCertificate", &a.HostNameInCertificate) + delete(rawMsg, key) + case "integratedSecurity": + err = unpopulate(val, "IntegratedSecurity", &a.IntegratedSecurity) + delete(rawMsg, key) + case "loadBalanceTimeout": + err = unpopulate(val, "LoadBalanceTimeout", &a.LoadBalanceTimeout) + delete(rawMsg, key) + case "maxPoolSize": + err = unpopulate(val, "MaxPoolSize", &a.MaxPoolSize) + delete(rawMsg, key) + case "minPoolSize": + err = unpopulate(val, "MinPoolSize", &a.MinPoolSize) + delete(rawMsg, key) + case "multiSubnetFailover": + err = unpopulate(val, "MultiSubnetFailover", &a.MultiSubnetFailover) + delete(rawMsg, key) + case "multipleActiveResultSets": + err = unpopulate(val, "MultipleActiveResultSets", &a.MultipleActiveResultSets) + delete(rawMsg, key) + case "packetSize": + err = unpopulate(val, "PacketSize", &a.PacketSize) + delete(rawMsg, key) case "password": a.Password, err = unmarshalSecretBaseClassification(val) delete(rawMsg, key) + case "pooling": + err = unpopulate(val, "Pooling", &a.Pooling) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &a.Server) + delete(rawMsg, key) + case "trustServerCertificate": + err = unpopulate(val, "TrustServerCertificate", &a.TrustServerCertificate) + delete(rawMsg, key) case "userName": err = unpopulate(val, "UserName", &a.UserName) delete(rawMsg, key) @@ -8249,14 +8329,37 @@ func (a *AzureSQLDWLinkedService) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureSQLDWLinkedServiceTypeProperties. func (a AzureSQLDWLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populateAny(objectMap, "applicationIntent", a.ApplicationIntent) + populate(objectMap, "authenticationType", a.AuthenticationType) populateAny(objectMap, "azureCloudType", a.AzureCloudType) + populateAny(objectMap, "commandTimeout", a.CommandTimeout) + populateAny(objectMap, "connectRetryCount", a.ConnectRetryCount) + populateAny(objectMap, "connectRetryInterval", a.ConnectRetryInterval) + populateAny(objectMap, "connectTimeout", a.ConnectTimeout) populateAny(objectMap, "connectionString", a.ConnectionString) populate(objectMap, "credential", a.Credential) + populateAny(objectMap, "database", a.Database) + populateAny(objectMap, "encrypt", a.Encrypt) populate(objectMap, "encryptedCredential", a.EncryptedCredential) + populateAny(objectMap, "failoverPartner", a.FailoverPartner) + populateAny(objectMap, "hostNameInCertificate", a.HostNameInCertificate) + populateAny(objectMap, "integratedSecurity", a.IntegratedSecurity) + populateAny(objectMap, "loadBalanceTimeout", a.LoadBalanceTimeout) + populateAny(objectMap, "maxPoolSize", a.MaxPoolSize) + populateAny(objectMap, "minPoolSize", a.MinPoolSize) + populateAny(objectMap, "multiSubnetFailover", a.MultiSubnetFailover) + populateAny(objectMap, "multipleActiveResultSets", a.MultipleActiveResultSets) + populateAny(objectMap, "packetSize", a.PacketSize) populate(objectMap, "password", a.Password) + populateAny(objectMap, "pooling", a.Pooling) + populateAny(objectMap, "server", a.Server) + populate(objectMap, "servicePrincipalCredential", a.ServicePrincipalCredential) + populateAny(objectMap, "servicePrincipalCredentialType", a.ServicePrincipalCredentialType) populateAny(objectMap, "servicePrincipalId", a.ServicePrincipalID) populate(objectMap, "servicePrincipalKey", a.ServicePrincipalKey) populateAny(objectMap, "tenant", a.Tenant) + populateAny(objectMap, "trustServerCertificate", a.TrustServerCertificate) + populateAny(objectMap, "userName", a.UserName) return json.Marshal(objectMap) } @@ -8269,21 +8372,84 @@ func (a *AzureSQLDWLinkedServiceTypeProperties) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { + case "applicationIntent": + err = unpopulate(val, "ApplicationIntent", &a.ApplicationIntent) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &a.AuthenticationType) + delete(rawMsg, key) case "azureCloudType": err = unpopulate(val, "AzureCloudType", &a.AzureCloudType) delete(rawMsg, key) + case "commandTimeout": + err = unpopulate(val, "CommandTimeout", &a.CommandTimeout) + delete(rawMsg, key) + case "connectRetryCount": + err = unpopulate(val, "ConnectRetryCount", &a.ConnectRetryCount) + delete(rawMsg, key) + case "connectRetryInterval": + err = unpopulate(val, "ConnectRetryInterval", &a.ConnectRetryInterval) + delete(rawMsg, key) + case "connectTimeout": + err = unpopulate(val, "ConnectTimeout", &a.ConnectTimeout) + delete(rawMsg, key) case "connectionString": err = unpopulate(val, "ConnectionString", &a.ConnectionString) delete(rawMsg, key) case "credential": err = unpopulate(val, "Credential", &a.Credential) delete(rawMsg, key) + case "database": + err = unpopulate(val, "Database", &a.Database) + delete(rawMsg, key) + case "encrypt": + err = unpopulate(val, "Encrypt", &a.Encrypt) + delete(rawMsg, key) case "encryptedCredential": err = unpopulate(val, "EncryptedCredential", &a.EncryptedCredential) delete(rawMsg, key) + case "failoverPartner": + err = unpopulate(val, "FailoverPartner", &a.FailoverPartner) + delete(rawMsg, key) + case "hostNameInCertificate": + err = unpopulate(val, "HostNameInCertificate", &a.HostNameInCertificate) + delete(rawMsg, key) + case "integratedSecurity": + err = unpopulate(val, "IntegratedSecurity", &a.IntegratedSecurity) + delete(rawMsg, key) + case "loadBalanceTimeout": + err = unpopulate(val, "LoadBalanceTimeout", &a.LoadBalanceTimeout) + delete(rawMsg, key) + case "maxPoolSize": + err = unpopulate(val, "MaxPoolSize", &a.MaxPoolSize) + delete(rawMsg, key) + case "minPoolSize": + err = unpopulate(val, "MinPoolSize", &a.MinPoolSize) + delete(rawMsg, key) + case "multiSubnetFailover": + err = unpopulate(val, "MultiSubnetFailover", &a.MultiSubnetFailover) + delete(rawMsg, key) + case "multipleActiveResultSets": + err = unpopulate(val, "MultipleActiveResultSets", &a.MultipleActiveResultSets) + delete(rawMsg, key) + case "packetSize": + err = unpopulate(val, "PacketSize", &a.PacketSize) + delete(rawMsg, key) case "password": err = unpopulate(val, "Password", &a.Password) delete(rawMsg, key) + case "pooling": + err = unpopulate(val, "Pooling", &a.Pooling) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &a.Server) + delete(rawMsg, key) + case "servicePrincipalCredential": + a.ServicePrincipalCredential, err = unmarshalSecretBaseClassification(val) + delete(rawMsg, key) + case "servicePrincipalCredentialType": + err = unpopulate(val, "ServicePrincipalCredentialType", &a.ServicePrincipalCredentialType) + delete(rawMsg, key) case "servicePrincipalId": err = unpopulate(val, "ServicePrincipalID", &a.ServicePrincipalID) delete(rawMsg, key) @@ -8293,6 +8459,12 @@ func (a *AzureSQLDWLinkedServiceTypeProperties) UnmarshalJSON(data []byte) error case "tenant": err = unpopulate(val, "Tenant", &a.Tenant) delete(rawMsg, key) + case "trustServerCertificate": + err = unpopulate(val, "TrustServerCertificate", &a.TrustServerCertificate) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &a.UserName) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -8476,14 +8648,37 @@ func (a *AzureSQLDatabaseLinkedService) UnmarshalJSON(data []byte) error { func (a AzureSQLDatabaseLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alwaysEncryptedSettings", a.AlwaysEncryptedSettings) + populateAny(objectMap, "applicationIntent", a.ApplicationIntent) + populate(objectMap, "authenticationType", a.AuthenticationType) populateAny(objectMap, "azureCloudType", a.AzureCloudType) + populateAny(objectMap, "commandTimeout", a.CommandTimeout) + populateAny(objectMap, "connectRetryCount", a.ConnectRetryCount) + populateAny(objectMap, "connectRetryInterval", a.ConnectRetryInterval) + populateAny(objectMap, "connectTimeout", a.ConnectTimeout) populateAny(objectMap, "connectionString", a.ConnectionString) populate(objectMap, "credential", a.Credential) + populateAny(objectMap, "database", a.Database) + populateAny(objectMap, "encrypt", a.Encrypt) populate(objectMap, "encryptedCredential", a.EncryptedCredential) + populateAny(objectMap, "failoverPartner", a.FailoverPartner) + populateAny(objectMap, "hostNameInCertificate", a.HostNameInCertificate) + populateAny(objectMap, "integratedSecurity", a.IntegratedSecurity) + populateAny(objectMap, "loadBalanceTimeout", a.LoadBalanceTimeout) + populateAny(objectMap, "maxPoolSize", a.MaxPoolSize) + populateAny(objectMap, "minPoolSize", a.MinPoolSize) + populateAny(objectMap, "multiSubnetFailover", a.MultiSubnetFailover) + populateAny(objectMap, "multipleActiveResultSets", a.MultipleActiveResultSets) + populateAny(objectMap, "packetSize", a.PacketSize) populate(objectMap, "password", a.Password) + populateAny(objectMap, "pooling", a.Pooling) + populateAny(objectMap, "server", a.Server) + populate(objectMap, "servicePrincipalCredential", a.ServicePrincipalCredential) + populateAny(objectMap, "servicePrincipalCredentialType", a.ServicePrincipalCredentialType) populateAny(objectMap, "servicePrincipalId", a.ServicePrincipalID) populate(objectMap, "servicePrincipalKey", a.ServicePrincipalKey) populateAny(objectMap, "tenant", a.Tenant) + populateAny(objectMap, "trustServerCertificate", a.TrustServerCertificate) + populateAny(objectMap, "userName", a.UserName) return json.Marshal(objectMap) } @@ -8499,21 +8694,84 @@ func (a *AzureSQLDatabaseLinkedServiceTypeProperties) UnmarshalJSON(data []byte) case "alwaysEncryptedSettings": err = unpopulate(val, "AlwaysEncryptedSettings", &a.AlwaysEncryptedSettings) delete(rawMsg, key) + case "applicationIntent": + err = unpopulate(val, "ApplicationIntent", &a.ApplicationIntent) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &a.AuthenticationType) + delete(rawMsg, key) case "azureCloudType": err = unpopulate(val, "AzureCloudType", &a.AzureCloudType) delete(rawMsg, key) + case "commandTimeout": + err = unpopulate(val, "CommandTimeout", &a.CommandTimeout) + delete(rawMsg, key) + case "connectRetryCount": + err = unpopulate(val, "ConnectRetryCount", &a.ConnectRetryCount) + delete(rawMsg, key) + case "connectRetryInterval": + err = unpopulate(val, "ConnectRetryInterval", &a.ConnectRetryInterval) + delete(rawMsg, key) + case "connectTimeout": + err = unpopulate(val, "ConnectTimeout", &a.ConnectTimeout) + delete(rawMsg, key) case "connectionString": err = unpopulate(val, "ConnectionString", &a.ConnectionString) delete(rawMsg, key) case "credential": err = unpopulate(val, "Credential", &a.Credential) delete(rawMsg, key) + case "database": + err = unpopulate(val, "Database", &a.Database) + delete(rawMsg, key) + case "encrypt": + err = unpopulate(val, "Encrypt", &a.Encrypt) + delete(rawMsg, key) case "encryptedCredential": err = unpopulate(val, "EncryptedCredential", &a.EncryptedCredential) delete(rawMsg, key) + case "failoverPartner": + err = unpopulate(val, "FailoverPartner", &a.FailoverPartner) + delete(rawMsg, key) + case "hostNameInCertificate": + err = unpopulate(val, "HostNameInCertificate", &a.HostNameInCertificate) + delete(rawMsg, key) + case "integratedSecurity": + err = unpopulate(val, "IntegratedSecurity", &a.IntegratedSecurity) + delete(rawMsg, key) + case "loadBalanceTimeout": + err = unpopulate(val, "LoadBalanceTimeout", &a.LoadBalanceTimeout) + delete(rawMsg, key) + case "maxPoolSize": + err = unpopulate(val, "MaxPoolSize", &a.MaxPoolSize) + delete(rawMsg, key) + case "minPoolSize": + err = unpopulate(val, "MinPoolSize", &a.MinPoolSize) + delete(rawMsg, key) + case "multiSubnetFailover": + err = unpopulate(val, "MultiSubnetFailover", &a.MultiSubnetFailover) + delete(rawMsg, key) + case "multipleActiveResultSets": + err = unpopulate(val, "MultipleActiveResultSets", &a.MultipleActiveResultSets) + delete(rawMsg, key) + case "packetSize": + err = unpopulate(val, "PacketSize", &a.PacketSize) + delete(rawMsg, key) case "password": err = unpopulate(val, "Password", &a.Password) delete(rawMsg, key) + case "pooling": + err = unpopulate(val, "Pooling", &a.Pooling) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &a.Server) + delete(rawMsg, key) + case "servicePrincipalCredential": + a.ServicePrincipalCredential, err = unmarshalSecretBaseClassification(val) + delete(rawMsg, key) + case "servicePrincipalCredentialType": + err = unpopulate(val, "ServicePrincipalCredentialType", &a.ServicePrincipalCredentialType) + delete(rawMsg, key) case "servicePrincipalId": err = unpopulate(val, "ServicePrincipalID", &a.ServicePrincipalID) delete(rawMsg, key) @@ -8523,6 +8781,12 @@ func (a *AzureSQLDatabaseLinkedServiceTypeProperties) UnmarshalJSON(data []byte) case "tenant": err = unpopulate(val, "Tenant", &a.Tenant) delete(rawMsg, key) + case "trustServerCertificate": + err = unpopulate(val, "TrustServerCertificate", &a.TrustServerCertificate) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &a.UserName) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -8597,14 +8861,37 @@ func (a *AzureSQLMILinkedService) UnmarshalJSON(data []byte) error { func (a AzureSQLMILinkedServiceTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alwaysEncryptedSettings", a.AlwaysEncryptedSettings) + populateAny(objectMap, "applicationIntent", a.ApplicationIntent) + populate(objectMap, "authenticationType", a.AuthenticationType) populateAny(objectMap, "azureCloudType", a.AzureCloudType) + populateAny(objectMap, "commandTimeout", a.CommandTimeout) + populateAny(objectMap, "connectRetryCount", a.ConnectRetryCount) + populateAny(objectMap, "connectRetryInterval", a.ConnectRetryInterval) + populateAny(objectMap, "connectTimeout", a.ConnectTimeout) populateAny(objectMap, "connectionString", a.ConnectionString) populate(objectMap, "credential", a.Credential) + populateAny(objectMap, "database", a.Database) + populateAny(objectMap, "encrypt", a.Encrypt) populate(objectMap, "encryptedCredential", a.EncryptedCredential) + populateAny(objectMap, "failoverPartner", a.FailoverPartner) + populateAny(objectMap, "hostNameInCertificate", a.HostNameInCertificate) + populateAny(objectMap, "integratedSecurity", a.IntegratedSecurity) + populateAny(objectMap, "loadBalanceTimeout", a.LoadBalanceTimeout) + populateAny(objectMap, "maxPoolSize", a.MaxPoolSize) + populateAny(objectMap, "minPoolSize", a.MinPoolSize) + populateAny(objectMap, "multiSubnetFailover", a.MultiSubnetFailover) + populateAny(objectMap, "multipleActiveResultSets", a.MultipleActiveResultSets) + populateAny(objectMap, "packetSize", a.PacketSize) populate(objectMap, "password", a.Password) + populateAny(objectMap, "pooling", a.Pooling) + populateAny(objectMap, "server", a.Server) + populate(objectMap, "servicePrincipalCredential", a.ServicePrincipalCredential) + populateAny(objectMap, "servicePrincipalCredentialType", a.ServicePrincipalCredentialType) populateAny(objectMap, "servicePrincipalId", a.ServicePrincipalID) populate(objectMap, "servicePrincipalKey", a.ServicePrincipalKey) populateAny(objectMap, "tenant", a.Tenant) + populateAny(objectMap, "trustServerCertificate", a.TrustServerCertificate) + populateAny(objectMap, "userName", a.UserName) return json.Marshal(objectMap) } @@ -8620,21 +8907,84 @@ func (a *AzureSQLMILinkedServiceTypeProperties) UnmarshalJSON(data []byte) error case "alwaysEncryptedSettings": err = unpopulate(val, "AlwaysEncryptedSettings", &a.AlwaysEncryptedSettings) delete(rawMsg, key) + case "applicationIntent": + err = unpopulate(val, "ApplicationIntent", &a.ApplicationIntent) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &a.AuthenticationType) + delete(rawMsg, key) case "azureCloudType": err = unpopulate(val, "AzureCloudType", &a.AzureCloudType) delete(rawMsg, key) + case "commandTimeout": + err = unpopulate(val, "CommandTimeout", &a.CommandTimeout) + delete(rawMsg, key) + case "connectRetryCount": + err = unpopulate(val, "ConnectRetryCount", &a.ConnectRetryCount) + delete(rawMsg, key) + case "connectRetryInterval": + err = unpopulate(val, "ConnectRetryInterval", &a.ConnectRetryInterval) + delete(rawMsg, key) + case "connectTimeout": + err = unpopulate(val, "ConnectTimeout", &a.ConnectTimeout) + delete(rawMsg, key) case "connectionString": err = unpopulate(val, "ConnectionString", &a.ConnectionString) delete(rawMsg, key) case "credential": err = unpopulate(val, "Credential", &a.Credential) delete(rawMsg, key) + case "database": + err = unpopulate(val, "Database", &a.Database) + delete(rawMsg, key) + case "encrypt": + err = unpopulate(val, "Encrypt", &a.Encrypt) + delete(rawMsg, key) case "encryptedCredential": err = unpopulate(val, "EncryptedCredential", &a.EncryptedCredential) delete(rawMsg, key) + case "failoverPartner": + err = unpopulate(val, "FailoverPartner", &a.FailoverPartner) + delete(rawMsg, key) + case "hostNameInCertificate": + err = unpopulate(val, "HostNameInCertificate", &a.HostNameInCertificate) + delete(rawMsg, key) + case "integratedSecurity": + err = unpopulate(val, "IntegratedSecurity", &a.IntegratedSecurity) + delete(rawMsg, key) + case "loadBalanceTimeout": + err = unpopulate(val, "LoadBalanceTimeout", &a.LoadBalanceTimeout) + delete(rawMsg, key) + case "maxPoolSize": + err = unpopulate(val, "MaxPoolSize", &a.MaxPoolSize) + delete(rawMsg, key) + case "minPoolSize": + err = unpopulate(val, "MinPoolSize", &a.MinPoolSize) + delete(rawMsg, key) + case "multiSubnetFailover": + err = unpopulate(val, "MultiSubnetFailover", &a.MultiSubnetFailover) + delete(rawMsg, key) + case "multipleActiveResultSets": + err = unpopulate(val, "MultipleActiveResultSets", &a.MultipleActiveResultSets) + delete(rawMsg, key) + case "packetSize": + err = unpopulate(val, "PacketSize", &a.PacketSize) + delete(rawMsg, key) case "password": err = unpopulate(val, "Password", &a.Password) delete(rawMsg, key) + case "pooling": + err = unpopulate(val, "Pooling", &a.Pooling) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &a.Server) + delete(rawMsg, key) + case "servicePrincipalCredential": + a.ServicePrincipalCredential, err = unmarshalSecretBaseClassification(val) + delete(rawMsg, key) + case "servicePrincipalCredentialType": + err = unpopulate(val, "ServicePrincipalCredentialType", &a.ServicePrincipalCredentialType) + delete(rawMsg, key) case "servicePrincipalId": err = unpopulate(val, "ServicePrincipalID", &a.ServicePrincipalID) delete(rawMsg, key) @@ -8644,6 +8994,12 @@ func (a *AzureSQLMILinkedServiceTypeProperties) UnmarshalJSON(data []byte) error case "tenant": err = unpopulate(val, "Tenant", &a.Tenant) delete(rawMsg, key) + case "trustServerCertificate": + err = unpopulate(val, "TrustServerCertificate", &a.TrustServerCertificate) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &a.UserName) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -15567,7 +15923,7 @@ func (d DatasetReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "parameters", d.Parameters) populate(objectMap, "referenceName", d.ReferenceName) - populate(objectMap, "type", d.Type) + objectMap["type"] = "DatasetReference" return json.Marshal(objectMap) } @@ -27500,7 +27856,7 @@ func (i IntegrationRuntimeReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "parameters", i.Parameters) populate(objectMap, "referenceName", i.ReferenceName) - populate(objectMap, "type", i.Type) + objectMap["type"] = "IntegrationRuntimeReference" return json.Marshal(objectMap) } @@ -29418,7 +29774,7 @@ func (l LinkedServiceReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "parameters", l.Parameters) populate(objectMap, "referenceName", l.ReferenceName) - populate(objectMap, "type", l.Type) + objectMap["type"] = "LinkedServiceReference" return json.Marshal(objectMap) } @@ -29983,6 +30339,7 @@ func (m ManagedIdentityCredential) MarshalJSON() ([]byte, error) { populate(objectMap, "annotations", m.Annotations) populate(objectMap, "description", m.Description) objectMap["type"] = "ManagedIdentity" + populate(objectMap, "typeProperties", m.TypeProperties) if m.AdditionalProperties != nil { for key, val := range m.AdditionalProperties { objectMap[key] = val @@ -30009,6 +30366,9 @@ func (m *ManagedIdentityCredential) UnmarshalJSON(data []byte) error { case "type": err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &m.TypeProperties) + delete(rawMsg, key) default: if m.AdditionalProperties == nil { m.AdditionalProperties = map[string]any{} @@ -30027,6 +30387,33 @@ func (m *ManagedIdentityCredential) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityTypeProperties. +func (m ManagedIdentityTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", m.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityTypeProperties. +func (m *ManagedIdentityTypeProperties) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &m.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntime. func (m ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -37605,7 +37992,7 @@ func (p PipelineReference) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "name", p.Name) populate(objectMap, "referenceName", p.ReferenceName) - populate(objectMap, "type", p.Type) + objectMap["type"] = "PipelineReference" return json.Marshal(objectMap) } @@ -39931,6 +40318,33 @@ func (r *RedshiftUnloadSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Reference. +func (r Reference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = r.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Reference. +func (r *Reference) 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 "type": + err = unpopulate(val, "Type", &r.Type) + 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 RelationalSource. func (r RelationalSource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -41632,9 +42046,29 @@ func (s *SQLServerLinkedService) UnmarshalJSON(data []byte) error { func (s SQLServerLinkedServiceTypeProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "alwaysEncryptedSettings", s.AlwaysEncryptedSettings) + populateAny(objectMap, "applicationIntent", s.ApplicationIntent) + populate(objectMap, "authenticationType", s.AuthenticationType) + populateAny(objectMap, "commandTimeout", s.CommandTimeout) + populateAny(objectMap, "connectRetryCount", s.ConnectRetryCount) + populateAny(objectMap, "connectRetryInterval", s.ConnectRetryInterval) + populateAny(objectMap, "connectTimeout", s.ConnectTimeout) populateAny(objectMap, "connectionString", s.ConnectionString) + populateAny(objectMap, "database", s.Database) + populateAny(objectMap, "encrypt", s.Encrypt) populate(objectMap, "encryptedCredential", s.EncryptedCredential) + populateAny(objectMap, "failoverPartner", s.FailoverPartner) + populateAny(objectMap, "hostNameInCertificate", s.HostNameInCertificate) + populateAny(objectMap, "integratedSecurity", s.IntegratedSecurity) + populateAny(objectMap, "loadBalanceTimeout", s.LoadBalanceTimeout) + populateAny(objectMap, "maxPoolSize", s.MaxPoolSize) + populateAny(objectMap, "minPoolSize", s.MinPoolSize) + populateAny(objectMap, "multiSubnetFailover", s.MultiSubnetFailover) + populateAny(objectMap, "multipleActiveResultSets", s.MultipleActiveResultSets) + populateAny(objectMap, "packetSize", s.PacketSize) populate(objectMap, "password", s.Password) + populateAny(objectMap, "pooling", s.Pooling) + populateAny(objectMap, "server", s.Server) + populateAny(objectMap, "trustServerCertificate", s.TrustServerCertificate) populateAny(objectMap, "userName", s.UserName) return json.Marshal(objectMap) } @@ -41651,15 +42085,75 @@ func (s *SQLServerLinkedServiceTypeProperties) UnmarshalJSON(data []byte) error case "alwaysEncryptedSettings": err = unpopulate(val, "AlwaysEncryptedSettings", &s.AlwaysEncryptedSettings) delete(rawMsg, key) + case "applicationIntent": + err = unpopulate(val, "ApplicationIntent", &s.ApplicationIntent) + delete(rawMsg, key) + case "authenticationType": + err = unpopulate(val, "AuthenticationType", &s.AuthenticationType) + delete(rawMsg, key) + case "commandTimeout": + err = unpopulate(val, "CommandTimeout", &s.CommandTimeout) + delete(rawMsg, key) + case "connectRetryCount": + err = unpopulate(val, "ConnectRetryCount", &s.ConnectRetryCount) + delete(rawMsg, key) + case "connectRetryInterval": + err = unpopulate(val, "ConnectRetryInterval", &s.ConnectRetryInterval) + delete(rawMsg, key) + case "connectTimeout": + err = unpopulate(val, "ConnectTimeout", &s.ConnectTimeout) + delete(rawMsg, key) case "connectionString": err = unpopulate(val, "ConnectionString", &s.ConnectionString) delete(rawMsg, key) + case "database": + err = unpopulate(val, "Database", &s.Database) + delete(rawMsg, key) + case "encrypt": + err = unpopulate(val, "Encrypt", &s.Encrypt) + delete(rawMsg, key) case "encryptedCredential": err = unpopulate(val, "EncryptedCredential", &s.EncryptedCredential) delete(rawMsg, key) + case "failoverPartner": + err = unpopulate(val, "FailoverPartner", &s.FailoverPartner) + delete(rawMsg, key) + case "hostNameInCertificate": + err = unpopulate(val, "HostNameInCertificate", &s.HostNameInCertificate) + delete(rawMsg, key) + case "integratedSecurity": + err = unpopulate(val, "IntegratedSecurity", &s.IntegratedSecurity) + delete(rawMsg, key) + case "loadBalanceTimeout": + err = unpopulate(val, "LoadBalanceTimeout", &s.LoadBalanceTimeout) + delete(rawMsg, key) + case "maxPoolSize": + err = unpopulate(val, "MaxPoolSize", &s.MaxPoolSize) + delete(rawMsg, key) + case "minPoolSize": + err = unpopulate(val, "MinPoolSize", &s.MinPoolSize) + delete(rawMsg, key) + case "multiSubnetFailover": + err = unpopulate(val, "MultiSubnetFailover", &s.MultiSubnetFailover) + delete(rawMsg, key) + case "multipleActiveResultSets": + err = unpopulate(val, "MultipleActiveResultSets", &s.MultipleActiveResultSets) + delete(rawMsg, key) + case "packetSize": + err = unpopulate(val, "PacketSize", &s.PacketSize) + delete(rawMsg, key) case "password": s.Password, err = unmarshalSecretBaseClassification(val) delete(rawMsg, key) + case "pooling": + err = unpopulate(val, "Pooling", &s.Pooling) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &s.Server) + delete(rawMsg, key) + case "trustServerCertificate": + err = unpopulate(val, "TrustServerCertificate", &s.TrustServerCertificate) + delete(rawMsg, key) case "userName": err = unpopulate(val, "UserName", &s.UserName) delete(rawMsg, key) @@ -46913,7 +47407,7 @@ func (s ScriptActivityScriptBlock) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "parameters", s.Parameters) populateAny(objectMap, "text", s.Text) - populate(objectMap, "type", s.Type) + populateAny(objectMap, "type", s.Type) return json.Marshal(objectMap) } diff --git a/sdk/resourcemanager/datafactory/armdatafactory/operations_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/operations_client_example_test.go deleted file mode 100644 index f2d28dc4b403..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/operations_client_example_test.go +++ /dev/null @@ -1,1044 +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 armdatafactory_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().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.OperationListResponse = armdatafactory.OperationListResponse{ - // Value: []*armdatafactory.Operation{ - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the available metrics for datafactories"), - // Operation: to.Ptr("Read datafactories metric definitions"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("datafactories"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armdatafactory.OperationProperties{ - // ServiceSpecification: &armdatafactory.OperationServiceSpecification{ - // MetricSpecifications: []*armdatafactory.OperationMetricSpecification{ - // { - // Name: to.Ptr("FailedRuns"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armdatafactory.OperationMetricAvailability{ - // { - // BlobDuration: to.Ptr("P1D"), - // TimeGrain: to.Ptr("PT1H"), - // }}, - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // Name: to.Ptr("pipelineName"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("activityName"), - // DisplayName: to.Ptr("Activity"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("windowEnd"), - // DisplayName: to.Ptr("Window End"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("windowStart"), - // DisplayName: to.Ptr("Window Start"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Failed Runs"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetricsV1"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("SuccessfulRuns"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armdatafactory.OperationMetricAvailability{ - // { - // BlobDuration: to.Ptr("P1D"), - // TimeGrain: to.Ptr("PT1H"), - // }}, - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // Name: to.Ptr("pipelineName"), - // DisplayName: to.Ptr("Pipeline"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("activityName"), - // DisplayName: to.Ptr("Activity"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("windowEnd"), - // DisplayName: to.Ptr("Window End"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("windowStart"), - // DisplayName: to.Ptr("Window Start"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Successful Runs"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetricsV1"), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("datafactories"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("datafactories"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/providers/Microsoft.Insights/logDefinitions/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the available logs for factories"), - // Operation: to.Ptr("Read factories log definitions"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("The log definition of factories"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armdatafactory.OperationProperties{ - // ServiceSpecification: &armdatafactory.OperationServiceSpecification{ - // LogSpecifications: []*armdatafactory.OperationLogSpecification{ - // { - // Name: to.Ptr("ActivityRuns"), - // BlobDuration: to.Ptr("PT1H"), - // DisplayName: to.Ptr("Pipeline activity runs log"), - // }, - // { - // Name: to.Ptr("PipelineRuns"), - // BlobDuration: to.Ptr("PT1H"), - // DisplayName: to.Ptr("Pipeline runs log"), - // }, - // { - // Name: to.Ptr("TriggerRuns"), - // BlobDuration: to.Ptr("PT1H"), - // DisplayName: to.Ptr("Trigger runs log"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("factories"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("factories"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the available metrics for factories"), - // Operation: to.Ptr("Read metric definitions"), - // Provider: to.Ptr("Microsoft.DataFactory"), - // Resource: to.Ptr("factories"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armdatafactory.OperationProperties{ - // ServiceSpecification: &armdatafactory.OperationServiceSpecification{ - // MetricSpecifications: []*armdatafactory.OperationMetricSpecification{ - // { - // Name: to.Ptr("PipelineFailedRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // 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 metrics"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("PipelineSucceededRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // 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 metrics"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ActivityFailedRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // 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 metrics"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ActivitySucceededRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // 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 metrics"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TriggerFailedRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // 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 metrics"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TriggerSucceededRuns"), - // AggregationType: to.Ptr("Total"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // 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 metrics"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("IntegrationRuntimeCpuPercentage"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // Name: to.Ptr("IntegrationRuntimeName"), - // DisplayName: to.Ptr("Integration Runtime"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("NodeName"), - // DisplayName: to.Ptr("Integration Runtime Node"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Integration runtime CPU utilization"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Percent"), - // }, - // { - // Name: to.Ptr("IntegrationRuntimeAvailableMemory"), - // AggregationType: to.Ptr("Average"), - // Dimensions: []*armdatafactory.OperationMetricDimension{ - // { - // Name: to.Ptr("IntegrationRuntimeName"), - // DisplayName: to.Ptr("Integration Runtime"), - // ToBeExportedForShoebox: to.Ptr(true), - // }, - // { - // Name: to.Ptr("NodeName"), - // DisplayName: to.Ptr("Integration Runtime Node"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayName: to.Ptr("Integration runtime available memory"), - // EnableRegionalMdmAccount: to.Ptr("false"), - // SourceMdmAccount: to.Ptr("MicrosoftDataFactoryProdShoebox"), - // SourceMdmNamespace: to.Ptr("ADFMetrics"), - // Unit: to.Ptr("Bytes"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/register/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Registers the subscription for the Data Factory Resource Provider."), - // Operation: to.Ptr("Register Data Factory Resource Provider"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory Resource Provider"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/unregister/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Unregisters the subscription for the Data Factory Resource Provider."), - // Operation: to.Ptr("Unregister Data Factory Resource Provider"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory Resource Provider"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads the Data Factory."), - // Operation: to.Ptr("Read Data Factory"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates the Data Factory."), - // Operation: to.Ptr("Create or Update Data Factory"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes the Data Factory."), - // Operation: to.Ptr("Delete Data Factory"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/linkedServices/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Linked Service."), - // Operation: to.Ptr("Read Linked Service"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Linked Service"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/linkedServices/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Linked Service."), - // Operation: to.Ptr("Delete Linked Service"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Linked Service"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/linkedServices/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Linked Service."), - // Operation: to.Ptr("Create or Update Linked Service"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Linked Service"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Pipeline."), - // Operation: to.Ptr("Read Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Pipeline."), - // Operation: to.Ptr("Delete Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/pause/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Pauses any Pipeline."), - // Operation: to.Ptr("Pause Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/resume/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Resumes any Pipeline."), - // Operation: to.Ptr("Resume Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/update/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Updates any Pipeline."), - // Operation: to.Ptr("Update Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Pipeline."), - // Operation: to.Ptr("Create or Update Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Dataset."), - // Operation: to.Ptr("Read Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Dataset."), - // Operation: to.Ptr("Delete Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Dataset."), - // Operation: to.Ptr("Create or Update Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/tables/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Dataset."), - // Operation: to.Ptr("Read Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/tables/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Dataset."), - // Operation: to.Ptr("Delete Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/tables/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Dataset."), - // Operation: to.Ptr("Create or Update Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/slices/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the Data Slices in the given period."), - // Operation: to.Ptr("Read Data Slices"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Slice"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/slices/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Update the Status of the Data Slice."), - // Operation: to.Ptr("Update Data Slice Status"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Slice"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/sliceruns/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads the Data Slice Run for the given dataset with the given start time."), - // Operation: to.Ptr("Read Data Slice Run"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Slice"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/runs/loginfo/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads a SAS URI to a blob container containing the logs."), - // Operation: to.Ptr("Read Run Log Info"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Run Log"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/activitywindows/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Activity Windows in the Data Factory with specified parameters."), - // Operation: to.Ptr("Read Activity Windows in any Data Factory"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Activity Windows"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/activitywindows/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Activity Windows for the Pipeline with specified parameters."), - // Operation: to.Ptr("Read Activity Windows for any Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Activity Windows"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datapipelines/activities/activitywindows/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Activity Windows for the Pipeline Activity with specified parameters."), - // Operation: to.Ptr("Read Activity Windows for any Pipeline Activity"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Activity Windows"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/datasets/activitywindows/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Activity Windows for the Dataset with specified parameters."), - // Operation: to.Ptr("Read Activity Windows for any Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Activity Windows"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/gateways/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Gateway."), - // Operation: to.Ptr("Read Gateway"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Gateway"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/gateways/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Gateway."), - // Operation: to.Ptr("Create or Update Gateway"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Gateway"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/gateways/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Gateway."), - // Operation: to.Ptr("Delete Gateway"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Gateway"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/gateways/connectioninfo/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads the Connection Info for any Gateway."), - // Operation: to.Ptr("Read Gateway Connection Info"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Gateway"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/gateways/listauthkeys/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Lists the Authentication Keys for any Gateway."), - // Operation: to.Ptr("List Gateway Authentication Keys"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Gateway"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/datafactories/gateways/regenerateauthkey/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Regenerates the Authentication Keys for any Gateway."), - // Operation: to.Ptr("Regenerate Gateway Authentication Keys"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Gateway"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Data Factory."), - // Operation: to.Ptr("Read Data Factory"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Create or Update Data Factory"), - // Operation: to.Ptr("Create or Update any Data Factory."), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes Data Factory."), - // Operation: to.Ptr("Delete Data Factory"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/linkedServices/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Linked Service."), - // Operation: to.Ptr("Read Linked Service"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Linked Service"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/linkedServices/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes Linked Service."), - // Operation: to.Ptr("Delete Linked Service"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Linked Service"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/linkedServices/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Create or Update Linked Service"), - // Operation: to.Ptr("Create or Update any Linked Service."), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Linked Service"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/pipelines/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Pipeline."), - // Operation: to.Ptr("Read Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/pipelines/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes Pipeline."), - // Operation: to.Ptr("Delete Pipeline"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/pipelines/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Create or Update Pipeline"), - // Operation: to.Ptr("Create or Update any Pipeline."), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/pipelines/createrun/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates a run for the Pipeline."), - // Operation: to.Ptr("Create Pipeline Run"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Pipeline"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/cancelpipelinerun/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Cancels the pipeline run specified by the run ID."), - // Operation: to.Ptr("Cancel any Pipeline Run"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/pipelineruns/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads the Pipeline Runs."), - // Operation: to.Ptr("Read Pipeline Runs"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/pipelineruns/activityruns/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads the activity runs for the specified pipeline run ID."), - // Operation: to.Ptr("Read Activity Runs"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/datasets/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Dataset."), - // Operation: to.Ptr("Read Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/datasets/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Dataset."), - // Operation: to.Ptr("Delete Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/datasets/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Dataset."), - // Operation: to.Ptr("Create or Update Dataset"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Dataset"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Integration Runtime."), - // Operation: to.Ptr("Read Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Integration Runtime."), - // Operation: to.Ptr("Create or Update Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Integration Runtime."), - // Operation: to.Ptr("Delete Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/start/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Starts any Integration Runtime."), - // Operation: to.Ptr("Start Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/stop/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Stops any Integration Runtime."), - // Operation: to.Ptr("Stop Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/getconnectioninfo/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Integration Runtime Connection Info."), - // Operation: to.Ptr("Read Integration Runtime Connection Info"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/getstatus/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads Integration Runtime Status."), - // Operation: to.Ptr("Read Integration Runtime Status"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/listauthkeys/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Lists the Authentication Keys for any Integration Runtime."), - // Operation: to.Ptr("List Integration Runtime Authentication Keys"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/monitoringdata/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Gets the Monitoring Data for any Integration Runtime."), - // Operation: to.Ptr("Get Integration Runtime Monitoring Data"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/nodes/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes the Node for the specified Integration Runtime."), - // Operation: to.Ptr("Delete Integration Runtime Node"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/nodes/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Updates a self-hosted Integration Runtime Node."), - // Operation: to.Ptr("Update Integration Runtime Node"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/nodes/ipAddress/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Returns the IP Address for the specified node of the Integration Runtime."), - // Operation: to.Ptr("Read Integration Runtime Node IP Address"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/synccredentials/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Syncs the Credentials for the specified Integration Runtime."), - // Operation: to.Ptr("Sync Credentials for Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/upgrade/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Upgrades the specified Integration Runtime."), - // Operation: to.Ptr("Upgrade Integration Runtime"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/integrationruntimes/regenerateauthkey/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Regenerates the Authentication Keys for the specified Integration Runtime."), - // Operation: to.Ptr("Regenerate Integration Runtime Authentication Keys"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Integration Runtime"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/triggers/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads any Trigger."), - // Operation: to.Ptr("Read Trigger"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Trigger"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/triggers/write"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Creates or Updates any Trigger."), - // Operation: to.Ptr("Create or Update Trigger"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Trigger"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/triggers/delete"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Deletes any Trigger."), - // Operation: to.Ptr("Delete Trigger"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Trigger"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/triggers/start/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Starts any Trigger."), - // Operation: to.Ptr("Start Trigger"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Trigger"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/triggers/stop/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Stops any Trigger."), - // Operation: to.Ptr("Stop Trigger"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Trigger"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/factories/triggers/triggerruns/read"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Reads the Trigger Runs."), - // Operation: to.Ptr("Read Trigger Runs"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DataFactory/locations/configureFactoryRepo/action"), - // Display: &armdatafactory.OperationDisplay{ - // Description: to.Ptr("Configures the repository for the factory."), - // Operation: to.Ptr("Configure Factory Repository"), - // Provider: to.Ptr("Microsoft Data Factory"), - // Resource: to.Ptr("Data Factory"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/pipelineruns_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/pipelineruns_client_example_test.go deleted file mode 100644 index 17069e786c01..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/pipelineruns_client_example_test.go +++ /dev/null @@ -1,158 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_QueryByFactory.json -func ExamplePipelineRunsClient_QueryByFactory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPipelineRunsClient().QueryByFactory(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.RunFilterParameters{ - Filters: []*armdatafactory.RunQueryFilter{ - { - Operand: to.Ptr(armdatafactory.RunQueryFilterOperandPipelineName), - Operator: to.Ptr(armdatafactory.RunQueryFilterOperatorEquals), - Values: []*string{ - to.Ptr("examplePipeline")}, - }}, - LastUpdatedAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:36:44.334Z"); return t }()), - LastUpdatedBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:49:48.368Z"); return t }()), - }, 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.PipelineRunsQueryResponse = armdatafactory.PipelineRunsQueryResponse{ - // Value: []*armdatafactory.PipelineRun{ - // { - // AdditionalProperties: map[string]any{ - // "annotations": []any{ - // }, - // "runDimension": map[string]any{ - // "JobId": "79c1cc52-265f-41a5-9553-be65e736fbd3", - // }, - // }, - // DurationInMs: to.Ptr[int32](28105), - // InvokedBy: &armdatafactory.PipelineRunInvokedBy{ - // Name: to.Ptr("Manual"), - // ID: to.Ptr("80a01654a9d34ad18b3fcac5d5d76b67"), - // }, - // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:38:12.731Z"); return t}()), - // Message: to.Ptr(""), - // Parameters: map[string]*string{ - // "OutputBlobNameList": to.Ptr("[\"exampleoutput.csv\"]"), - // }, - // PipelineName: to.Ptr("examplePipeline"), - // RunEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:38:12.731Z"); return t}()), - // RunID: to.Ptr("2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"), - // RunStart: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:37:44.625Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // }, - // { - // AdditionalProperties: map[string]any{ - // "annotations": []any{ - // }, - // "runDimension": map[string]any{ - // "JobId": "84a3c493-0628-4b44-852f-ef5b3a11bdab", - // }, - // }, - // InvokedBy: &armdatafactory.PipelineRunInvokedBy{ - // Name: to.Ptr("Manual"), - // ID: to.Ptr("7c5fd7ef7e8a464b98b931cf15fcac66"), - // }, - // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:51.216Z"); return t}()), - // Message: to.Ptr(""), - // Parameters: map[string]*string{ - // "OutputBlobNameList": to.Ptr("[\"exampleoutput.csv\"]"), - // }, - // PipelineName: to.Ptr("examplePipeline"), - // RunID: to.Ptr("16ac5348-ff82-4f95-a80d-638c1d47b721"), - // RunStart: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:49.274Z"); return t}()), - // Status: to.Ptr("Cancelled"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Get.json -func ExamplePipelineRunsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPipelineRunsClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b", 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.PipelineRun = armdatafactory.PipelineRun{ - // AdditionalProperties: map[string]any{ - // "annotations": []any{ - // }, - // }, - // DurationInMs: to.Ptr[int32](28105), - // InvokedBy: &armdatafactory.PipelineRunInvokedBy{ - // Name: to.Ptr("Manual"), - // ID: to.Ptr("80a01654a9d34ad18b3fcac5d5d76b67"), - // }, - // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:38:12.731Z"); return t}()), - // Message: to.Ptr(""), - // Parameters: map[string]*string{ - // "OutputBlobNameList": to.Ptr("[\"exampleoutput.csv\"]"), - // }, - // PipelineName: to.Ptr("examplePipeline"), - // RunEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:38:12.731Z"); return t}()), - // RunID: to.Ptr("2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"), - // RunStart: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:37:44.625Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PipelineRuns_Cancel.json -func ExamplePipelineRunsClient_Cancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPipelineRunsClient().Cancel(ctx, "exampleResourceGroup", "exampleFactoryName", "16ac5348-ff82-4f95-a80d-638c1d47b721", &armdatafactory.PipelineRunsClientCancelOptions{IsRecursive: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/pipelines_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/pipelines_client_example_test.go deleted file mode 100644 index f471b03d0e5b..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/pipelines_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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_ListByFactory.json -func ExamplePipelinesClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPipelinesClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.PipelineListResponse = armdatafactory.PipelineListResponse{ - // Value: []*armdatafactory.PipelineResource{ - // { - // Name: to.Ptr("examplePipeline"), - // Type: to.Ptr("Microsoft.DataFactory/factories/pipelines"), - // Etag: to.Ptr("0a006cd4-0000-0000-0000-5b245bd60000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelines/examplePipeline"), - // Properties: &armdatafactory.Pipeline{ - // Description: to.Ptr("Example description"), - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.ForEachActivity{ - // Name: to.Ptr("ExampleForeachActivity"), - // Type: to.Ptr("ForEach"), - // TypeProperties: &armdatafactory.ForEachActivityTypeProperties{ - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.CopyActivity{ - // Name: to.Ptr("ExampleCopyActivity"), - // Type: to.Ptr("Copy"), - // Inputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": "examplecontainer.csv", - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // Outputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": map[string]any{ - // "type": "Expression", - // "value": "@item()", - // }, - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // TypeProperties: &armdatafactory.CopyActivityTypeProperties{ - // DataIntegrationUnits: float64(32), - // Sink: &armdatafactory.BlobSink{ - // Type: to.Ptr("BlobSink"), - // }, - // Source: &armdatafactory.BlobSource{ - // Type: to.Ptr("BlobSource"), - // }, - // }, - // }}, - // IsSequential: to.Ptr(true), - // Items: &armdatafactory.Expression{ - // Type: to.Ptr(armdatafactory.ExpressionTypeExpression), - // Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"), - // }, - // }, - // }}, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "OutputBlobNameList": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeArray), - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Create.json -func ExamplePipelinesClient_CreateOrUpdate_pipelinesCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPipelinesClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", armdatafactory.PipelineResource{ - Properties: &armdatafactory.Pipeline{ - Activities: []armdatafactory.ActivityClassification{ - &armdatafactory.ForEachActivity{ - Name: to.Ptr("ExampleForeachActivity"), - Type: to.Ptr("ForEach"), - TypeProperties: &armdatafactory.ForEachActivityTypeProperties{ - Activities: []armdatafactory.ActivityClassification{ - &armdatafactory.CopyActivity{ - Name: to.Ptr("ExampleCopyActivity"), - Type: to.Ptr("Copy"), - Inputs: []*armdatafactory.DatasetReference{ - { - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - Parameters: map[string]any{ - "MyFileName": "examplecontainer.csv", - "MyFolderPath": "examplecontainer", - }, - ReferenceName: to.Ptr("exampleDataset"), - }}, - Outputs: []*armdatafactory.DatasetReference{ - { - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - Parameters: map[string]any{ - "MyFileName": map[string]any{ - "type": "Expression", - "value": "@item()", - }, - "MyFolderPath": "examplecontainer", - }, - ReferenceName: to.Ptr("exampleDataset"), - }}, - TypeProperties: &armdatafactory.CopyActivityTypeProperties{ - DataIntegrationUnits: float64(32), - Sink: &armdatafactory.BlobSink{ - Type: to.Ptr("BlobSink"), - }, - Source: &armdatafactory.BlobSource{ - Type: to.Ptr("BlobSource"), - }, - }, - }}, - IsSequential: to.Ptr(true), - Items: &armdatafactory.Expression{ - Type: to.Ptr(armdatafactory.ExpressionTypeExpression), - Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"), - }, - }, - }}, - Parameters: map[string]*armdatafactory.ParameterSpecification{ - "JobId": { - Type: to.Ptr(armdatafactory.ParameterTypeString), - }, - "OutputBlobNameList": { - Type: to.Ptr(armdatafactory.ParameterTypeArray), - }, - }, - Policy: &armdatafactory.PipelinePolicy{ - ElapsedTimeMetric: &armdatafactory.PipelineElapsedTimeMetricPolicy{ - Duration: "0.00:10:00", - }, - }, - RunDimensions: map[string]any{ - "JobId": map[string]any{ - "type": "Expression", - "value": "@pipeline().parameters.JobId", - }, - }, - Variables: map[string]*armdatafactory.VariableSpecification{ - "TestVariableArray": { - Type: to.Ptr(armdatafactory.VariableTypeArray), - }, - }, - }, - }, &armdatafactory.PipelinesClientCreateOrUpdateOptions{IfMatch: 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.PipelineResource = armdatafactory.PipelineResource{ - // Name: to.Ptr("examplePipeline"), - // Type: to.Ptr("Microsoft.DataFactory/factories/pipelines"), - // Etag: to.Ptr("0a0069d4-0000-0000-0000-5b245bd50000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelines/examplePipeline"), - // Properties: &armdatafactory.Pipeline{ - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.ForEachActivity{ - // Name: to.Ptr("ExampleForeachActivity"), - // Type: to.Ptr("ForEach"), - // TypeProperties: &armdatafactory.ForEachActivityTypeProperties{ - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.CopyActivity{ - // Name: to.Ptr("ExampleCopyActivity"), - // Type: to.Ptr("Copy"), - // Inputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": "examplecontainer.csv", - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // Outputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": map[string]any{ - // "type": "Expression", - // "value": "@item()", - // }, - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // TypeProperties: &armdatafactory.CopyActivityTypeProperties{ - // DataIntegrationUnits: float64(32), - // Sink: &armdatafactory.BlobSink{ - // Type: to.Ptr("BlobSink"), - // }, - // Source: &armdatafactory.BlobSource{ - // Type: to.Ptr("BlobSource"), - // }, - // }, - // }}, - // IsSequential: to.Ptr(true), - // Items: &armdatafactory.Expression{ - // Type: to.Ptr(armdatafactory.ExpressionTypeExpression), - // Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"), - // }, - // }, - // }}, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "JobId": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeString), - // }, - // "OutputBlobNameList": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeArray), - // }, - // }, - // RunDimensions: map[string]any{ - // "JobId": map[string]any{ - // "type": "Expression", - // "value": "@pipeline().parameters.JobId", - // }, - // }, - // Variables: map[string]*armdatafactory.VariableSpecification{ - // "TestVariableArray": &armdatafactory.VariableSpecification{ - // Type: to.Ptr(armdatafactory.VariableTypeArray), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Update.json -func ExamplePipelinesClient_CreateOrUpdate_pipelinesUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPipelinesClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", armdatafactory.PipelineResource{ - Properties: &armdatafactory.Pipeline{ - Description: to.Ptr("Example description"), - Activities: []armdatafactory.ActivityClassification{ - &armdatafactory.ForEachActivity{ - Name: to.Ptr("ExampleForeachActivity"), - Type: to.Ptr("ForEach"), - TypeProperties: &armdatafactory.ForEachActivityTypeProperties{ - Activities: []armdatafactory.ActivityClassification{ - &armdatafactory.CopyActivity{ - Name: to.Ptr("ExampleCopyActivity"), - Type: to.Ptr("Copy"), - Inputs: []*armdatafactory.DatasetReference{ - { - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - Parameters: map[string]any{ - "MyFileName": "examplecontainer.csv", - "MyFolderPath": "examplecontainer", - }, - ReferenceName: to.Ptr("exampleDataset"), - }}, - Outputs: []*armdatafactory.DatasetReference{ - { - Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - Parameters: map[string]any{ - "MyFileName": map[string]any{ - "type": "Expression", - "value": "@item()", - }, - "MyFolderPath": "examplecontainer", - }, - ReferenceName: to.Ptr("exampleDataset"), - }}, - TypeProperties: &armdatafactory.CopyActivityTypeProperties{ - DataIntegrationUnits: float64(32), - Sink: &armdatafactory.BlobSink{ - Type: to.Ptr("BlobSink"), - }, - Source: &armdatafactory.BlobSource{ - Type: to.Ptr("BlobSource"), - }, - }, - }}, - IsSequential: to.Ptr(true), - Items: &armdatafactory.Expression{ - Type: to.Ptr(armdatafactory.ExpressionTypeExpression), - Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"), - }, - }, - }}, - Parameters: map[string]*armdatafactory.ParameterSpecification{ - "OutputBlobNameList": { - Type: to.Ptr(armdatafactory.ParameterTypeArray), - }, - }, - Policy: &armdatafactory.PipelinePolicy{ - ElapsedTimeMetric: &armdatafactory.PipelineElapsedTimeMetricPolicy{ - Duration: "0.00:10:00", - }, - }, - }, - }, &armdatafactory.PipelinesClientCreateOrUpdateOptions{IfMatch: 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.PipelineResource = armdatafactory.PipelineResource{ - // Name: to.Ptr("examplePipeline"), - // Type: to.Ptr("Microsoft.DataFactory/factories/pipelines"), - // Etag: to.Ptr("0a006cd4-0000-0000-0000-5b245bd60000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelines/examplePipeline"), - // Properties: &armdatafactory.Pipeline{ - // Description: to.Ptr("Example description"), - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.ForEachActivity{ - // Name: to.Ptr("ExampleForeachActivity"), - // Type: to.Ptr("ForEach"), - // TypeProperties: &armdatafactory.ForEachActivityTypeProperties{ - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.CopyActivity{ - // Name: to.Ptr("ExampleCopyActivity"), - // Type: to.Ptr("Copy"), - // Inputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": "examplecontainer.csv", - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // Outputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": map[string]any{ - // "type": "Expression", - // "value": "@item()", - // }, - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // TypeProperties: &armdatafactory.CopyActivityTypeProperties{ - // DataIntegrationUnits: float64(32), - // Sink: &armdatafactory.BlobSink{ - // Type: to.Ptr("BlobSink"), - // }, - // Source: &armdatafactory.BlobSource{ - // Type: to.Ptr("BlobSource"), - // }, - // }, - // }}, - // IsSequential: to.Ptr(true), - // Items: &armdatafactory.Expression{ - // Type: to.Ptr(armdatafactory.ExpressionTypeExpression), - // Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"), - // }, - // }, - // }}, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "OutputBlobNameList": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeArray), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Get.json -func ExamplePipelinesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPipelinesClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", &armdatafactory.PipelinesClientGetOptions{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.PipelineResource = armdatafactory.PipelineResource{ - // Name: to.Ptr("examplePipeline"), - // Type: to.Ptr("Microsoft.DataFactory/factories/pipelines"), - // Etag: to.Ptr("1500504f-0000-0200-0000-5cbe090f0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelines/examplePipeline"), - // Properties: &armdatafactory.Pipeline{ - // Description: to.Ptr("Example description"), - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.ForEachActivity{ - // Name: to.Ptr("ExampleForeachActivity"), - // Type: to.Ptr("ForEach"), - // TypeProperties: &armdatafactory.ForEachActivityTypeProperties{ - // Activities: []armdatafactory.ActivityClassification{ - // &armdatafactory.CopyActivity{ - // Name: to.Ptr("ExampleCopyActivity"), - // Type: to.Ptr("Copy"), - // Inputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": "examplecontainer.csv", - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // Outputs: []*armdatafactory.DatasetReference{ - // { - // Type: to.Ptr(armdatafactory.DatasetReferenceTypeDatasetReference), - // Parameters: map[string]any{ - // "MyFileName": map[string]any{ - // "type": "Expression", - // "value": "@item()", - // }, - // "MyFolderPath": "examplecontainer", - // }, - // ReferenceName: to.Ptr("exampleDataset"), - // }}, - // TypeProperties: &armdatafactory.CopyActivityTypeProperties{ - // DataIntegrationUnits: float64(32), - // Sink: &armdatafactory.BlobSink{ - // Type: to.Ptr("BlobSink"), - // }, - // Source: &armdatafactory.BlobSource{ - // Type: to.Ptr("BlobSource"), - // }, - // }, - // }}, - // IsSequential: to.Ptr(true), - // Items: &armdatafactory.Expression{ - // Type: to.Ptr(armdatafactory.ExpressionTypeExpression), - // Value: to.Ptr("@pipeline().parameters.OutputBlobNameList"), - // }, - // }, - // }}, - // Parameters: map[string]*armdatafactory.ParameterSpecification{ - // "OutputBlobNameList": &armdatafactory.ParameterSpecification{ - // Type: to.Ptr(armdatafactory.ParameterTypeArray), - // }, - // }, - // Policy: &armdatafactory.PipelinePolicy{ - // ElapsedTimeMetric: &armdatafactory.PipelineElapsedTimeMetricPolicy{ - // Duration: "0.00:10:00", - // }, - // }, - // Variables: map[string]*armdatafactory.VariableSpecification{ - // "TestVariableArray": &armdatafactory.VariableSpecification{ - // Type: to.Ptr(armdatafactory.VariableTypeArray), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_Delete.json -func ExamplePipelinesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPipelinesClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Pipelines_CreateRun.json -func ExamplePipelinesClient_CreateRun() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPipelinesClient().CreateRun(ctx, "exampleResourceGroup", "exampleFactoryName", "examplePipeline", &armdatafactory.PipelinesClientCreateRunOptions{ReferencePipelineRunID: nil, - IsRecovery: nil, - StartActivityName: nil, - StartFromFailure: nil, - Parameters: map[string]any{ - "OutputBlobNameList": []any{ - "exampleoutput.csv", - }, - }, - }) - 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.CreateRunResponse = armdatafactory.CreateRunResponse{ - // RunID: to.Ptr("2f7fdb90-5df1-4b8e-ac2f-064cfa58202b"), - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/privateendpointconnection_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/privateendpointconnection_client_example_test.go deleted file mode 100644 index 4dd6660aa825..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/privateendpointconnection_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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ApproveRejectPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "connection", armdatafactory.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armdatafactory.PrivateLinkConnectionApprovalRequest{ - PrivateEndpoint: &armdatafactory.PrivateEndpoint{ - ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/privateEndpoints/myPrivateEndpoint"), - }, - PrivateLinkServiceConnectionState: &armdatafactory.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, &armdatafactory.PrivateEndpointConnectionClientCreateOrUpdateOptions{IfMatch: 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.PrivateEndpointConnectionResource = armdatafactory.PrivateEndpointConnectionResource{ - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Properties: &armdatafactory.RemotePrivateEndpointConnection{ - // PrivateEndpoint: &armdatafactory.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armdatafactory.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "connection", &armdatafactory.PrivateEndpointConnectionClientGetOptions{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.PrivateEndpointConnectionResource = armdatafactory.PrivateEndpointConnectionResource{ - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Properties: &armdatafactory.RemotePrivateEndpointConnection{ - // PrivateEndpoint: &armdatafactory.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armdatafactory.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/DeletePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPrivateEndpointConnectionClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "connection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/privateendpointconnections_client_example_test.go deleted file mode 100644 index c8c31a19386d..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/privateendpointconnections_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 armdatafactory_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/PrivateEndPointConnections_ListByFactory.json -func ExamplePrivateEndPointConnectionsClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndPointConnectionsClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.PrivateEndpointConnectionListResponse = armdatafactory.PrivateEndpointConnectionListResponse{ - // Value: []*armdatafactory.PrivateEndpointConnectionResource{ - // { - // Name: to.Ptr("factories"), - // Type: to.Ptr("Microsoft.DataFactory/factories/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/privateEndpoints/myPrivateEndpoint"), - // Properties: &armdatafactory.RemotePrivateEndpointConnection{ - // PrivateEndpoint: &armdatafactory.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/managedVirtualNetworks/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armdatafactory.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr("exampleActionsRequired"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/privatelinkresources_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/privatelinkresources_client_example_test.go deleted file mode 100644 index d41cb55161eb..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/privatelinkresources_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 armdatafactory_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/GetPrivateLinkResources.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 := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", 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.PrivateLinkResourcesWrapper = armdatafactory.PrivateLinkResourcesWrapper{ - // Value: []*armdatafactory.PrivateLinkResource{ - // { - // Name: to.Ptr("exampleFactoryName"), - // Type: to.Ptr("Microsoft.DataFactory/factories/privateLinkResources"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName"), - // Properties: &armdatafactory.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("dataFactory"), - // RequiredMembers: []*string{ - // to.Ptr("dataFactory")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.datafactory.azure.net")}, - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/triggerruns_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/triggerruns_client_example_test.go deleted file mode 100644 index 659d76075114..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/triggerruns_client_example_test.go +++ /dev/null @@ -1,103 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Rerun.json -func ExampleTriggerRunsClient_Rerun() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTriggerRunsClient().Rerun(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_Cancel.json -func ExampleTriggerRunsClient_Cancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTriggerRunsClient().Cancel(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/TriggerRuns_QueryByFactory.json -func ExampleTriggerRunsClient_QueryByFactory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTriggerRunsClient().QueryByFactory(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.RunFilterParameters{ - Filters: []*armdatafactory.RunQueryFilter{ - { - Operand: to.Ptr(armdatafactory.RunQueryFilterOperandTriggerName), - Operator: to.Ptr(armdatafactory.RunQueryFilterOperatorEquals), - Values: []*string{ - to.Ptr("exampleTrigger")}, - }}, - LastUpdatedAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:36:44.334Z"); return t }()), - LastUpdatedBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:49:48.368Z"); return t }()), - }, 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.TriggerRunsQueryResponse = armdatafactory.TriggerRunsQueryResponse{ - // Value: []*armdatafactory.TriggerRun{ - // { - // Message: to.Ptr(""), - // Properties: map[string]*string{ - // "ScheduleTime": to.Ptr("6/16/2018 12:43:14 AM"), - // "TriggerTime": to.Ptr("6/16/2018 12:43:15 AM"), - // }, - // Status: to.Ptr(armdatafactory.TriggerRunStatusSucceeded), - // TriggerName: to.Ptr("exampleTrigger"), - // TriggerRunID: to.Ptr("08586724970898148904457116912CU27"), - // TriggerRunTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:43:15.660Z"); return t}()), - // TriggerType: to.Ptr("ScheduleTrigger"), - // TriggeredPipelines: map[string]*string{ - // "examplePipeline": to.Ptr("9f3ce8b3-37d7-43eb-96ac-a656c0476283"), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/datafactory/armdatafactory/triggers_client_example_test.go b/sdk/resourcemanager/datafactory/armdatafactory/triggers_client_example_test.go deleted file mode 100644 index a5527fc2c761..000000000000 --- a/sdk/resourcemanager/datafactory/armdatafactory/triggers_client_example_test.go +++ /dev/null @@ -1,465 +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 armdatafactory_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/datafactory/armdatafactory/v7" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json -func ExampleTriggersClient_NewListByFactoryPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTriggersClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", 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.TriggerListResponse = armdatafactory.TriggerListResponse{ - // Value: []*armdatafactory.TriggerResource{ - // { - // Name: to.Ptr("exampleTrigger"), - // Type: to.Ptr("Microsoft.DataFactory/factories/triggers"), - // Etag: to.Ptr("0a008ed4-0000-0000-0000-5b245c740000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger"), - // Properties: &armdatafactory.ScheduleTrigger{ - // Type: to.Ptr("ScheduleTrigger"), - // Description: to.Ptr("Example description"), - // RuntimeState: to.Ptr(armdatafactory.TriggerRuntimeStateStarted), - // Pipelines: []*armdatafactory.TriggerPipelineReference{ - // { - // Parameters: map[string]any{ - // "OutputBlobNameList": []any{ - // "exampleoutput.csv", - // }, - // }, - // PipelineReference: &armdatafactory.PipelineReference{ - // Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference), - // ReferenceName: to.Ptr("examplePipeline"), - // }, - // }}, - // TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{ - // Recurrence: &armdatafactory.ScheduleTriggerRecurrence{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:14.905Z"); return t}()), - // Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute), - // Interval: to.Ptr[int32](4), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:14.905Z"); return t}()), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json -func ExampleTriggersClient_QueryByFactory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTriggersClient().QueryByFactory(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.TriggerFilterParameters{ - ParentTriggerName: to.Ptr("exampleTrigger"), - }, 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.TriggerQueryResponse = armdatafactory.TriggerQueryResponse{ - // Value: []*armdatafactory.TriggerResource{ - // { - // Name: to.Ptr("exampleRerunTrigger"), - // Type: to.Ptr("Microsoft.DataFactory/factories/triggers"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleRerunTrigger"), - // Properties: &armdatafactory.RerunTumblingWindowTrigger{ - // Type: to.Ptr("RerunTumblingWindowTrigger"), - // Description: to.Ptr("Example description"), - // TypeProperties: &armdatafactory.RerunTumblingWindowTriggerTypeProperties{ - // ParentTrigger: "exampleTrigger", - // RequestedEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:14.905Z"); return t}()), - // RequestedStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:14.905Z"); return t}()), - // RerunConcurrency: to.Ptr[int32](4), - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Create.json -func ExampleTriggersClient_CreateOrUpdate_triggersCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTriggersClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", armdatafactory.TriggerResource{ - Properties: &armdatafactory.ScheduleTrigger{ - Type: to.Ptr("ScheduleTrigger"), - Pipelines: []*armdatafactory.TriggerPipelineReference{ - { - Parameters: map[string]any{ - "OutputBlobNameList": []any{ - "exampleoutput.csv", - }, - }, - PipelineReference: &armdatafactory.PipelineReference{ - Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference), - ReferenceName: to.Ptr("examplePipeline"), - }, - }}, - TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{ - Recurrence: &armdatafactory.ScheduleTriggerRecurrence{ - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:13.844Z"); return t }()), - Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute), - Interval: to.Ptr[int32](4), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:13.844Z"); return t }()), - TimeZone: to.Ptr("UTC"), - }, - }, - }, - }, &armdatafactory.TriggersClientCreateOrUpdateOptions{IfMatch: 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.TriggerResource = armdatafactory.TriggerResource{ - // Name: to.Ptr("exampleTrigger"), - // Type: to.Ptr("Microsoft.DataFactory/factories/triggers"), - // Etag: to.Ptr("0a008ad4-0000-0000-0000-5b245c6e0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger"), - // Properties: &armdatafactory.ScheduleTrigger{ - // Type: to.Ptr("ScheduleTrigger"), - // RuntimeState: to.Ptr(armdatafactory.TriggerRuntimeStateStopped), - // Pipelines: []*armdatafactory.TriggerPipelineReference{ - // { - // Parameters: map[string]any{ - // "OutputBlobNameList": []any{ - // "exampleoutput.csv", - // }, - // }, - // PipelineReference: &armdatafactory.PipelineReference{ - // Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference), - // ReferenceName: to.Ptr("examplePipeline"), - // }, - // }}, - // TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{ - // Recurrence: &armdatafactory.ScheduleTriggerRecurrence{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:13.844Z"); return t}()), - // Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute), - // Interval: to.Ptr[int32](4), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:13.844Z"); return t}()), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Update.json -func ExampleTriggersClient_CreateOrUpdate_triggersUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTriggersClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", armdatafactory.TriggerResource{ - Properties: &armdatafactory.ScheduleTrigger{ - Type: to.Ptr("ScheduleTrigger"), - Description: to.Ptr("Example description"), - Pipelines: []*armdatafactory.TriggerPipelineReference{ - { - Parameters: map[string]any{ - "OutputBlobNameList": []any{ - "exampleoutput.csv", - }, - }, - PipelineReference: &armdatafactory.PipelineReference{ - Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference), - ReferenceName: to.Ptr("examplePipeline"), - }, - }}, - TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{ - Recurrence: &armdatafactory.ScheduleTriggerRecurrence{ - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:14.905Z"); return t }()), - Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute), - Interval: to.Ptr[int32](4), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:14.905Z"); return t }()), - TimeZone: to.Ptr("UTC"), - }, - }, - }, - }, &armdatafactory.TriggersClientCreateOrUpdateOptions{IfMatch: 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.TriggerResource = armdatafactory.TriggerResource{ - // Name: to.Ptr("exampleTrigger"), - // Type: to.Ptr("Microsoft.DataFactory/factories/triggers"), - // Etag: to.Ptr("0a008dd4-0000-0000-0000-5b245c6f0000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger"), - // Properties: &armdatafactory.ScheduleTrigger{ - // Type: to.Ptr("ScheduleTrigger"), - // Description: to.Ptr("Example description"), - // RuntimeState: to.Ptr(armdatafactory.TriggerRuntimeStateStopped), - // Pipelines: []*armdatafactory.TriggerPipelineReference{ - // { - // Parameters: map[string]any{ - // "OutputBlobNameList": []any{ - // "exampleoutput.csv", - // }, - // }, - // PipelineReference: &armdatafactory.PipelineReference{ - // Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference), - // ReferenceName: to.Ptr("examplePipeline"), - // }, - // }}, - // TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{ - // Recurrence: &armdatafactory.ScheduleTriggerRecurrence{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:14.905Z"); return t}()), - // Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute), - // Interval: to.Ptr[int32](4), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:14.905Z"); return t}()), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Get.json -func ExampleTriggersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTriggersClient().Get(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", &armdatafactory.TriggersClientGetOptions{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.TriggerResource = armdatafactory.TriggerResource{ - // Name: to.Ptr("exampleTrigger"), - // Type: to.Ptr("Microsoft.DataFactory/factories/triggers"), - // Etag: to.Ptr("1500544f-0000-0200-0000-5cbe09100000"), - // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger"), - // Properties: &armdatafactory.ScheduleTrigger{ - // Type: to.Ptr("ScheduleTrigger"), - // RuntimeState: to.Ptr(armdatafactory.TriggerRuntimeStateStopped), - // Pipelines: []*armdatafactory.TriggerPipelineReference{ - // { - // Parameters: map[string]any{ - // "OutputBlobNameList": []any{ - // "exampleoutput.csv", - // }, - // }, - // PipelineReference: &armdatafactory.PipelineReference{ - // Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference), - // ReferenceName: to.Ptr("examplePipeline"), - // }, - // }}, - // TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{ - // Recurrence: &armdatafactory.ScheduleTriggerRecurrence{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-22T18:48:52.528Z"); return t}()), - // Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute), - // Interval: to.Ptr[int32](4), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-22T18:32:52.527Z"); return t}()), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Delete.json -func ExampleTriggersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTriggersClient().Delete(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_SubscribeToEvents.json -func ExampleTriggersClient_BeginSubscribeToEvents() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewTriggersClient().BeginSubscribeToEvents(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", 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.TriggerSubscriptionOperationStatus = armdatafactory.TriggerSubscriptionOperationStatus{ - // Status: to.Ptr(armdatafactory.EventSubscriptionStatusEnabled), - // TriggerName: to.Ptr("exampleTrigger"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_GetEventSubscriptionStatus.json -func ExampleTriggersClient_GetEventSubscriptionStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTriggersClient().GetEventSubscriptionStatus(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", 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.TriggerSubscriptionOperationStatus = armdatafactory.TriggerSubscriptionOperationStatus{ - // Status: to.Ptr(armdatafactory.EventSubscriptionStatusEnabled), - // TriggerName: to.Ptr("exampleTrigger"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_UnsubscribeFromEvents.json -func ExampleTriggersClient_BeginUnsubscribeFromEvents() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewTriggersClient().BeginUnsubscribeFromEvents(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", 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.TriggerSubscriptionOperationStatus = armdatafactory.TriggerSubscriptionOperationStatus{ - // Status: to.Ptr(armdatafactory.EventSubscriptionStatusDisabled), - // TriggerName: to.Ptr("exampleTrigger"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Start.json -func ExampleTriggersClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewTriggersClient().BeginStart(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_Stop.json -func ExampleTriggersClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdatafactory.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewTriggersClient().BeginStop(ctx, "exampleResourceGroup", "exampleFactoryName", "exampleTrigger", 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) - } -}