diff --git a/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md b/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md index 315745e40a7f..c957b2aba08b 100644 --- a/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md +++ b/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md @@ -1,5 +1,31 @@ # Release History +## 2.0.0 (2023-07-28) +### Breaking Changes + +- `LanguageExtensionImageNamePython3912`, `LanguageExtensionImageNamePython3912IncludeDeepLearning` from enum `LanguageExtensionImageName` has been removed + +### Features Added + +- New value `StateMigrated` added to enum type `State` +- New enum type `MigrationClusterRole` with values `MigrationClusterRoleDestination`, `MigrationClusterRoleSource` +- New function `*ClientFactory.NewDatabaseClient() *DatabaseClient` +- New function `*ClustersClient.BeginMigrate(context.Context, string, string, ClusterMigrateRequest, *ClustersClientBeginMigrateOptions) (*runtime.Poller[ClustersClientMigrateResponse], error)` +- New function `NewDatabaseClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseClient, error)` +- New function `*DatabaseClient.InviteFollower(context.Context, string, string, string, DatabaseInviteFollowerRequest, *DatabaseClientInviteFollowerOptions) (DatabaseClientInviteFollowerResponse, error)` +- New struct `ClusterMigrateRequest` +- New struct `DatabaseInviteFollowerRequest` +- New struct `DatabaseInviteFollowerResult` +- New struct `MigrationClusterProperties` +- New struct `SuspensionDetails` +- New field `MigrationCluster` in struct `ClusterProperties` +- New field `NextLink` in struct `DatabaseListResult` +- New field `Skiptoken`, `Top` in struct `DatabasesClientListByClusterOptions` +- New field `AzureAsyncOperation` in struct `OperationsResultsLocationClientGetResponse` +- New field `SuspensionDetails` in struct `ReadOnlyFollowingDatabaseProperties` +- New field `KeyVaultProperties`, `SuspensionDetails` in struct `ReadWriteDatabaseProperties` + + ## 1.3.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go b/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go index 09fecd2f3603..115a69f8ed45 100644 --- a/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go +++ b/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go @@ -29,8 +29,7 @@ type AttachedDatabaseConfigurationsClient struct { } // NewAttachedDatabaseConfigurationsClient creates a new instance of AttachedDatabaseConfigurationsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAttachedDatabaseConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AttachedDatabaseConfigurationsClient, error) { @@ -48,8 +47,8 @@ func NewAttachedDatabaseConfigurationsClient(subscriptionID string, credential a // CheckNameAvailability - Checks that the attached database configuration resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - resourceName - The name of the resource. // - options - AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.CheckNameAvailability @@ -89,7 +88,7 @@ func (client *AttachedDatabaseConfigurationsClient) checkNameAvailabilityCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resourceName) @@ -107,8 +106,8 @@ func (client *AttachedDatabaseConfigurationsClient) checkNameAvailabilityHandleR // BeginCreateOrUpdate - Creates or updates an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - attachedDatabaseConfigurationName - The name of the attached database configuration. // - parameters - The database parameters supplied to the CreateOrUpdate operation. @@ -120,7 +119,9 @@ func (client *AttachedDatabaseConfigurationsClient) BeginCreateOrUpdate(ctx cont if err != nil { return nil, err } - return runtime.NewPoller[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -129,7 +130,7 @@ func (client *AttachedDatabaseConfigurationsClient) BeginCreateOrUpdate(ctx cont // CreateOrUpdate - Creates or updates an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *AttachedDatabaseConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, parameters AttachedDatabaseConfiguration, options *AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters, options) if err != nil { @@ -169,7 +170,7 @@ func (client *AttachedDatabaseConfigurationsClient) createOrUpdateCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -178,8 +179,8 @@ func (client *AttachedDatabaseConfigurationsClient) createOrUpdateCreateRequest( // BeginDelete - Deletes the attached database configuration with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - attachedDatabaseConfigurationName - The name of the attached database configuration. // - options - AttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginDelete @@ -190,7 +191,9 @@ func (client *AttachedDatabaseConfigurationsClient) BeginDelete(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[AttachedDatabaseConfigurationsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AttachedDatabaseConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[AttachedDatabaseConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -199,7 +202,7 @@ func (client *AttachedDatabaseConfigurationsClient) BeginDelete(ctx context.Cont // Delete - Deletes the attached database configuration with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *AttachedDatabaseConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, options *AttachedDatabaseConfigurationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName, options) if err != nil { @@ -239,7 +242,7 @@ func (client *AttachedDatabaseConfigurationsClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,8 +251,8 @@ func (client *AttachedDatabaseConfigurationsClient) deleteCreateRequest(ctx cont // Get - Returns an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - attachedDatabaseConfigurationName - The name of the attached database configuration. // - options - AttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.Get @@ -293,7 +296,7 @@ func (client *AttachedDatabaseConfigurationsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,8 +313,8 @@ func (client *AttachedDatabaseConfigurationsClient) getHandleResponse(resp *http // NewListByClusterPager - Returns the list of attached database configurations of the given Kusto cluster. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - AttachedDatabaseConfigurationsClientListByClusterOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.NewListByClusterPager // method. @@ -357,7 +360,7 @@ func (client *AttachedDatabaseConfigurationsClient) listByClusterCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client_example_test.go index 3334af6a379c..544b99bf737c 100644 --- a/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json func ExampleAttachedDatabaseConfigurationsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleAttachedDatabaseConfigurationsClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationsListByCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsListByCluster.json func ExampleAttachedDatabaseConfigurationsClient_NewListByClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -116,7 +116,7 @@ func ExampleAttachedDatabaseConfigurationsClient_NewListByClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsGet.json func ExampleAttachedDatabaseConfigurationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -149,7 +149,7 @@ func ExampleAttachedDatabaseConfigurationsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json func ExampleAttachedDatabaseConfigurationsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -222,7 +222,7 @@ func ExampleAttachedDatabaseConfigurationsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsDelete.json func ExampleAttachedDatabaseConfigurationsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/autorest.md b/sdk/resourcemanager/kusto/armkusto/autorest.md index 65014577f5da..4c5415e64336 100644 --- a/sdk/resourcemanager/kusto/armkusto/autorest.md +++ b/sdk/resourcemanager/kusto/armkusto/autorest.md @@ -5,8 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.3.1 +module-version: 2.0.0 +tag: package-2023-05 ``` diff --git a/sdk/resourcemanager/kusto/armkusto/client_factory.go b/sdk/resourcemanager/kusto/armkusto/client_factory.go index 8c6e17fc67b5..4e608b5419a9 100644 --- a/sdk/resourcemanager/kusto/armkusto/client_factory.go +++ b/sdk/resourcemanager/kusto/armkusto/client_factory.go @@ -24,8 +24,7 @@ type ClientFactory struct { // NewClientFactory creates a new instance of ClientFactory with the specified values. // The parameter values will be propagated to any client created from this factory. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { @@ -69,6 +68,11 @@ func (c *ClientFactory) NewManagedPrivateEndpointsClient() *ManagedPrivateEndpoi return subClient } +func (c *ClientFactory) NewDatabaseClient() *DatabaseClient { + subClient, _ := NewDatabaseClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewDatabasePrincipalAssignmentsClient() *DatabasePrincipalAssignmentsClient { subClient, _ := NewDatabasePrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go b/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go index 1aa1de467029..482317dcf98a 100644 --- a/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go +++ b/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go @@ -29,8 +29,7 @@ type ClusterPrincipalAssignmentsClient struct { } // NewClusterPrincipalAssignmentsClient creates a new instance of ClusterPrincipalAssignmentsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClusterPrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterPrincipalAssignmentsClient, error) { @@ -48,8 +47,8 @@ func NewClusterPrincipalAssignmentsClient(subscriptionID string, credential azco // CheckNameAvailability - Checks that the principal assignment name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the principal assignment. // - options - ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.CheckNameAvailability @@ -89,7 +88,7 @@ func (client *ClusterPrincipalAssignmentsClient) checkNameAvailabilityCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, principalAssignmentName) @@ -107,8 +106,8 @@ func (client *ClusterPrincipalAssignmentsClient) checkNameAvailabilityHandleResp // BeginCreateOrUpdate - Create a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - parameters - The Kusto cluster principalAssignment's parameters supplied for the operation. @@ -120,7 +119,9 @@ func (client *ClusterPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx context if err != nil { return nil, err } - return runtime.NewPoller[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -129,7 +130,7 @@ func (client *ClusterPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClusterPrincipalAssignmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, parameters ClusterPrincipalAssignment, options *ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, principalAssignmentName, parameters, options) if err != nil { @@ -169,7 +170,7 @@ func (client *ClusterPrincipalAssignmentsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -178,8 +179,8 @@ func (client *ClusterPrincipalAssignmentsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - options - ClusterPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginDelete @@ -190,7 +191,9 @@ func (client *ClusterPrincipalAssignmentsClient) BeginDelete(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[ClusterPrincipalAssignmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClusterPrincipalAssignmentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClusterPrincipalAssignmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -199,7 +202,7 @@ func (client *ClusterPrincipalAssignmentsClient) BeginDelete(ctx context.Context // Delete - Deletes a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClusterPrincipalAssignmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, options *ClusterPrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, principalAssignmentName, options) if err != nil { @@ -239,7 +242,7 @@ func (client *ClusterPrincipalAssignmentsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,8 +251,8 @@ func (client *ClusterPrincipalAssignmentsClient) deleteCreateRequest(ctx context // Get - Gets a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - options - ClusterPrincipalAssignmentsClientGetOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.Get @@ -293,7 +296,7 @@ func (client *ClusterPrincipalAssignmentsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,8 +313,8 @@ func (client *ClusterPrincipalAssignmentsClient) getHandleResponse(resp *http.Re // NewListPager - Lists all Kusto cluster principalAssignments. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClusterPrincipalAssignmentsClientListOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.NewListPager // method. @@ -357,7 +360,7 @@ func (client *ClusterPrincipalAssignmentsClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client_example_test.go index d5f5c50e933a..be29eeb2a767 100644 --- a/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json func ExampleClusterPrincipalAssignmentsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleClusterPrincipalAssignmentsClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsGet.json func ExampleClusterPrincipalAssignmentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleClusterPrincipalAssignmentsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json func ExampleClusterPrincipalAssignmentsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -127,7 +127,7 @@ func ExampleClusterPrincipalAssignmentsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsDelete.json func ExampleClusterPrincipalAssignmentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -148,7 +148,7 @@ func ExampleClusterPrincipalAssignmentsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsList.json func ExampleClusterPrincipalAssignmentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/clusters_client.go b/sdk/resourcemanager/kusto/armkusto/clusters_client.go index 0b393ebdbf74..245dac098d48 100644 --- a/sdk/resourcemanager/kusto/armkusto/clusters_client.go +++ b/sdk/resourcemanager/kusto/armkusto/clusters_client.go @@ -29,8 +29,7 @@ type ClustersClient struct { } // NewClustersClient creates a new instance of ClustersClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error) { @@ -48,8 +47,8 @@ func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, // BeginAddLanguageExtensions - Add a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - languageExtensionsToAdd - The language extensions to add. // - options - ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions @@ -60,7 +59,9 @@ func (client *ClustersClient) BeginAddLanguageExtensions(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientAddLanguageExtensionsResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientAddLanguageExtensionsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientAddLanguageExtensionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -69,7 +70,7 @@ func (client *ClustersClient) BeginAddLanguageExtensions(ctx context.Context, re // AddLanguageExtensions - Add a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) addLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*http.Response, error) { req, err := client.addLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, languageExtensionsToAdd, options) if err != nil { @@ -105,7 +106,7 @@ func (client *ClustersClient) addLanguageExtensionsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, languageExtensionsToAdd) @@ -114,8 +115,8 @@ func (client *ClustersClient) addLanguageExtensionsCreateRequest(ctx context.Con // CheckNameAvailability - Checks that the cluster name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. +// Generated from API version 2023-05-02 +// - location - The name of Azure region. // - clusterName - The name of the cluster. // - options - ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability // method. @@ -150,7 +151,7 @@ func (client *ClustersClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, clusterName) @@ -168,8 +169,8 @@ func (client *ClustersClient) checkNameAvailabilityHandleResponse(resp *http.Res // BeginCreateOrUpdate - Create or update a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - parameters - The Kusto cluster parameters supplied to the CreateOrUpdate operation. // - options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate @@ -180,7 +181,9 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -189,7 +192,7 @@ func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { @@ -225,7 +228,7 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -240,8 +243,8 @@ func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error) { @@ -250,7 +253,9 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -259,7 +264,7 @@ func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -295,7 +300,7 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,8 +309,8 @@ func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceG // BeginDetachFollowerDatabases - Detaches all followers of a database owned by this cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - followerDatabaseToRemove - The follower databases properties to remove. // - options - ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases @@ -316,7 +321,9 @@ func (client *ClustersClient) BeginDetachFollowerDatabases(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientDetachFollowerDatabasesResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDetachFollowerDatabasesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientDetachFollowerDatabasesResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -325,7 +332,7 @@ func (client *ClustersClient) BeginDetachFollowerDatabases(ctx context.Context, // DetachFollowerDatabases - Detaches all followers of a database owned by this cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) detachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*http.Response, error) { req, err := client.detachFollowerDatabasesCreateRequest(ctx, resourceGroupName, clusterName, followerDatabaseToRemove, options) if err != nil { @@ -361,7 +368,7 @@ func (client *ClustersClient) detachFollowerDatabasesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, followerDatabaseToRemove) @@ -371,8 +378,8 @@ func (client *ClustersClient) detachFollowerDatabasesCreateRequest(ctx context.C // on. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork // method. @@ -394,7 +401,7 @@ func (client *ClustersClient) BeginDiagnoseVirtualNetwork(ctx context.Context, r // on. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) diagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*http.Response, error) { req, err := client.diagnoseVirtualNetworkCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -430,7 +437,7 @@ func (client *ClustersClient) diagnoseVirtualNetworkCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -439,8 +446,8 @@ func (client *ClustersClient) diagnoseVirtualNetworkCreateRequest(ctx context.Co // Get - Gets a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error) { @@ -478,7 +485,7 @@ func (client *ClustersClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -495,7 +502,7 @@ func (client *ClustersClient) getHandleResponse(resp *http.Response) (ClustersCl // NewListPager - Lists all Kusto clusters within a subscription. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 // - options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ClustersClientListResponse]{ @@ -531,7 +538,7 @@ func (client *ClustersClient) listCreateRequest(ctx context.Context, options *Cl return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -548,8 +555,8 @@ func (client *ClustersClient) listHandleResponse(resp *http.Response) (ClustersC // NewListByResourceGroupPager - Lists all Kusto clusters within a resource group. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager // method. func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse] { @@ -590,7 +597,7 @@ func (client *ClustersClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -608,8 +615,8 @@ func (client *ClustersClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListFollowerDatabasesPager - Returns a list of databases that are owned by this cluster and were followed by another // cluster. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesPager // method. @@ -655,7 +662,7 @@ func (client *ClustersClient) listFollowerDatabasesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -672,8 +679,8 @@ func (client *ClustersClient) listFollowerDatabasesHandleResponse(resp *http.Res // NewListLanguageExtensionsPager - Returns a list of language extensions that can run within KQL queries. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.NewListLanguageExtensionsPager // method. @@ -719,7 +726,7 @@ func (client *ClustersClient) listLanguageExtensionsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -736,8 +743,8 @@ func (client *ClustersClient) listLanguageExtensionsHandleResponse(resp *http.Re // NewListOutboundNetworkDependenciesEndpointsPager - Gets the network endpoints of all outbound dependencies of a Kusto cluster // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager // method. @@ -789,7 +796,7 @@ func (client *ClustersClient) listOutboundNetworkDependenciesEndpointsCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -806,7 +813,7 @@ func (client *ClustersClient) listOutboundNetworkDependenciesEndpointsHandleResp // NewListSKUsPager - Lists eligible SKUs for Kusto resource provider. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 // - options - ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.NewListSKUsPager method. func (client *ClustersClient) NewListSKUsPager(options *ClustersClientListSKUsOptions) *runtime.Pager[ClustersClientListSKUsResponse] { return runtime.NewPager(runtime.PagingHandler[ClustersClientListSKUsResponse]{ @@ -842,7 +849,7 @@ func (client *ClustersClient) listSKUsCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -859,8 +866,8 @@ func (client *ClustersClient) listSKUsHandleResponse(resp *http.Response) (Clust // NewListSKUsByResourcePager - Returns the SKUs available for the provided resource. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.NewListSKUsByResourcePager // method. @@ -906,7 +913,7 @@ func (client *ClustersClient) listSKUsByResourceCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -921,11 +928,78 @@ func (client *ClustersClient) listSKUsByResourceHandleResponse(resp *http.Respon return result, nil } +// BeginMigrate - Migrate data from a Kusto cluster to another cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - clusterMigrateRequest - The cluster migrate request parameters. +// - options - ClustersClientBeginMigrateOptions contains the optional parameters for the ClustersClient.BeginMigrate method. +func (client *ClustersClient) BeginMigrate(ctx context.Context, resourceGroupName string, clusterName string, clusterMigrateRequest ClusterMigrateRequest, options *ClustersClientBeginMigrateOptions) (*runtime.Poller[ClustersClientMigrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrate(ctx, resourceGroupName, clusterName, clusterMigrateRequest, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientMigrateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[ClustersClientMigrateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Migrate - Migrate data from a Kusto cluster to another cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-02 +func (client *ClustersClient) migrate(ctx context.Context, resourceGroupName string, clusterName string, clusterMigrateRequest ClusterMigrateRequest, options *ClustersClientBeginMigrateOptions) (*http.Response, error) { + req, err := client.migrateCreateRequest(ctx, resourceGroupName, clusterName, clusterMigrateRequest, options) + if err != nil { + return nil, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// migrateCreateRequest creates the Migrate request. +func (client *ClustersClient) migrateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, clusterMigrateRequest ClusterMigrateRequest, options *ClustersClientBeginMigrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/migrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, clusterMigrateRequest) +} + // BeginRemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - languageExtensionsToRemove - The language extensions to remove. // - options - ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions @@ -936,7 +1010,9 @@ func (client *ClustersClient) BeginRemoveLanguageExtensions(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientRemoveLanguageExtensionsResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientRemoveLanguageExtensionsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientRemoveLanguageExtensionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -945,7 +1021,7 @@ func (client *ClustersClient) BeginRemoveLanguageExtensions(ctx context.Context, // RemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) removeLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*http.Response, error) { req, err := client.removeLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, languageExtensionsToRemove, options) if err != nil { @@ -981,7 +1057,7 @@ func (client *ClustersClient) removeLanguageExtensionsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, languageExtensionsToRemove) @@ -990,8 +1066,8 @@ func (client *ClustersClient) removeLanguageExtensionsCreateRequest(ctx context. // BeginStart - Starts a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method. func (client *ClustersClient) BeginStart(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*runtime.Poller[ClustersClientStartResponse], error) { @@ -1000,7 +1076,9 @@ func (client *ClustersClient) BeginStart(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientStartResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1009,7 +1087,7 @@ func (client *ClustersClient) BeginStart(ctx context.Context, resourceGroupName // Start - Starts a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) start(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -1045,7 +1123,7 @@ func (client *ClustersClient) startCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1054,8 +1132,8 @@ func (client *ClustersClient) startCreateRequest(ctx context.Context, resourceGr // BeginStop - Stops a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method. func (client *ClustersClient) BeginStop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*runtime.Poller[ClustersClientStopResponse], error) { @@ -1064,7 +1142,9 @@ func (client *ClustersClient) BeginStop(ctx context.Context, resourceGroupName s if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientStopResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1073,7 +1153,7 @@ func (client *ClustersClient) BeginStop(ctx context.Context, resourceGroupName s // Stop - Stops a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) stop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { @@ -1109,7 +1189,7 @@ func (client *ClustersClient) stopCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1118,8 +1198,8 @@ func (client *ClustersClient) stopCreateRequest(ctx context.Context, resourceGro // BeginUpdate - Update a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - parameters - The Kusto cluster parameters supplied to the Update operation. // - options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. @@ -1129,7 +1209,9 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClustersClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ClustersClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -1138,7 +1220,7 @@ func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Update a Kusto cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) if err != nil { @@ -1174,7 +1256,7 @@ func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/kusto/armkusto/clusters_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/clusters_client_example_test.go index 1259eda2045f..bc7341ddb1c9 100644 --- a/sdk/resourcemanager/kusto/armkusto/clusters_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/clusters_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersGet.json func ExampleClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -64,6 +64,12 @@ func ExampleClustersClient_Get() { // KeyVaultURI: to.Ptr("https://dummy.keyvault.com"), // KeyVersion: to.Ptr("keyVersion"), // }, + // MigrationCluster: &armkusto.MigrationClusterProperties{ + // DataIngestionURI: to.Ptr("https://ingest-kustocluster2.westus.kusto.windows.net"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"), + // Role: to.Ptr(armkusto.MigrationClusterRoleDestination), + // URI: to.Ptr("https://kustocluster2.westus.kusto.windows.net"), + // }, // PrivateEndpointConnections: []*armkusto.PrivateEndpointConnection{ // { // Name: to.Ptr("privateEndpointTest"), @@ -103,7 +109,7 @@ func ExampleClustersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCreateOrUpdate.json func ExampleClustersClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,8 +132,19 @@ func ExampleClustersClient_BeginCreateOrUpdate() { EnableDoubleEncryption: to.Ptr(false), EnablePurge: to.Ptr(true), EnableStreamingIngest: to.Ptr(true), - PublicIPType: to.Ptr(armkusto.PublicIPTypeDualStack), - PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled), + LanguageExtensions: &armkusto.LanguageExtensionsList{ + Value: []*armkusto.LanguageExtension{ + { + LanguageExtensionImageName: to.Ptr(armkusto.LanguageExtensionImageNamePython3108), + LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON), + }, + { + LanguageExtensionImageName: to.Ptr(armkusto.LanguageExtensionImageNameR), + LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR), + }}, + }, + PublicIPType: to.Ptr(armkusto.PublicIPTypeDualStack), + PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled), }, SKU: &armkusto.AzureSKU{ Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3), @@ -174,6 +191,17 @@ func ExampleClustersClient_BeginCreateOrUpdate() { // KeyVaultURI: to.Ptr("https://dummy.keyvault.com"), // KeyVersion: to.Ptr("keyVersion"), // }, + // LanguageExtensions: &armkusto.LanguageExtensionsList{ + // Value: []*armkusto.LanguageExtension{ + // { + // LanguageExtensionImageName: to.Ptr(armkusto.LanguageExtensionImageNamePython3108), + // LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON), + // }, + // { + // LanguageExtensionImageName: to.Ptr(armkusto.LanguageExtensionImageNameR), + // LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR), + // }}, + // }, // ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded), // PublicIPType: to.Ptr(armkusto.PublicIPTypeDualStack), // PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled), @@ -187,7 +215,7 @@ func ExampleClustersClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersUpdate.json func ExampleClustersClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -247,7 +275,7 @@ func ExampleClustersClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDelete.json func ExampleClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -268,7 +296,7 @@ func ExampleClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersStop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStop.json func ExampleClustersClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -289,7 +317,7 @@ func ExampleClustersClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStart.json func ExampleClustersClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -310,7 +338,30 @@ func ExampleClustersClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterListFollowerDatabases.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterMigrate.json +func ExampleClustersClient_BeginMigrate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armkusto.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewClustersClient().BeginMigrate(ctx, "kustorptest", "kustoCluster1", armkusto.ClusterMigrateRequest{ + ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/clusters/kustoCluster2"), + }, 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListFollowerDatabases.json func ExampleClustersClient_NewListFollowerDatabasesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -364,7 +415,7 @@ func ExampleClustersClient_NewListFollowerDatabasesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterDetachFollowerDatabases.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterDetachFollowerDatabases.json func ExampleClustersClient_BeginDetachFollowerDatabases() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -388,7 +439,7 @@ func ExampleClustersClient_BeginDetachFollowerDatabases() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersDiagnoseVirtualNetwork.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDiagnoseVirtualNetwork.json func ExampleClustersClient_BeginDiagnoseVirtualNetwork() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -416,7 +467,7 @@ func ExampleClustersClient_BeginDiagnoseVirtualNetwork() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListByResourceGroup.json func ExampleClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -459,6 +510,12 @@ func ExampleClustersClient_NewListByResourceGroupPager() { // KeyVaultURI: to.Ptr("https://dummy.keyvault.com"), // KeyVersion: to.Ptr("keyVersion"), // }, + // MigrationCluster: &armkusto.MigrationClusterProperties{ + // DataIngestionURI: to.Ptr("https://ingest-kustocluster2.westus.kusto.windows.net"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"), + // Role: to.Ptr(armkusto.MigrationClusterRoleDestination), + // URI: to.Ptr("https://kustocluster2.westus.kusto.windows.net"), + // }, // ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagDisabled), @@ -495,7 +552,7 @@ func ExampleClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersList.json func ExampleClustersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -539,6 +596,12 @@ func ExampleClustersClient_NewListPager() { // KeyVaultURI: to.Ptr("https://dummy.keyvault.com"), // KeyVersion: to.Ptr("keyVersion"), // }, + // MigrationCluster: &armkusto.MigrationClusterProperties{ + // DataIngestionURI: to.Ptr("https://ingest-kustocluster2.westus.kusto.windows.net"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"), + // Role: to.Ptr(armkusto.MigrationClusterRoleDestination), + // URI: to.Ptr("https://kustocluster2.westus.kusto.windows.net"), + // }, // PrivateEndpointConnections: []*armkusto.PrivateEndpointConnection{ // { // Name: to.Ptr("privateEndpointTest"), @@ -597,7 +660,7 @@ func ExampleClustersClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersListSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListSkus.json func ExampleClustersClient_NewListSKUsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -705,7 +768,7 @@ func ExampleClustersClient_NewListSKUsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCheckNameAvailability.json func ExampleClustersClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -733,7 +796,7 @@ func ExampleClustersClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersListResourceSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListResourceSkus.json func ExampleClustersClient_NewListSKUsByResourcePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -813,7 +876,7 @@ func ExampleClustersClient_NewListSKUsByResourcePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoOutboundNetworkDependenciesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOutboundNetworkDependenciesList.json func ExampleClustersClient_NewListOutboundNetworkDependenciesEndpointsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -993,7 +1056,7 @@ func ExampleClustersClient_NewListOutboundNetworkDependenciesEndpointsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterListLanguageExtensions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListLanguageExtensions.json func ExampleClustersClient_NewListLanguageExtensionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1027,7 +1090,7 @@ func ExampleClustersClient_NewListLanguageExtensionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterAddLanguageExtensions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterAddLanguageExtensions.json func ExampleClustersClient_BeginAddLanguageExtensions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1056,7 +1119,7 @@ func ExampleClustersClient_BeginAddLanguageExtensions() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterRemoveLanguageExtensions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterRemoveLanguageExtensions.json func ExampleClustersClient_BeginRemoveLanguageExtensions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/constants.go b/sdk/resourcemanager/kusto/armkusto/constants.go index 76c5a28052ae..69f76ab086e0 100644 --- a/sdk/resourcemanager/kusto/armkusto/constants.go +++ b/sdk/resourcemanager/kusto/armkusto/constants.go @@ -11,7 +11,7 @@ package armkusto const ( moduleName = "armkusto" - moduleVersion = "v1.3.1" + moduleVersion = "v2.0.0" ) // AzureSKUName - SKU name. @@ -593,11 +593,9 @@ func PossibleKindValues() []Kind { type LanguageExtensionImageName string const ( - LanguageExtensionImageNamePython3108 LanguageExtensionImageName = "Python3_10_8" - LanguageExtensionImageNamePython365 LanguageExtensionImageName = "Python3_6_5" - LanguageExtensionImageNamePython3912 LanguageExtensionImageName = "Python3_9_12" - LanguageExtensionImageNamePython3912IncludeDeepLearning LanguageExtensionImageName = "Python3_9_12IncludeDeepLearning" - LanguageExtensionImageNameR LanguageExtensionImageName = "R" + LanguageExtensionImageNamePython3108 LanguageExtensionImageName = "Python3_10_8" + LanguageExtensionImageNamePython365 LanguageExtensionImageName = "Python3_6_5" + LanguageExtensionImageNameR LanguageExtensionImageName = "R" ) // PossibleLanguageExtensionImageNameValues returns the possible values for the LanguageExtensionImageName const type. @@ -605,8 +603,6 @@ func PossibleLanguageExtensionImageNameValues() []LanguageExtensionImageName { return []LanguageExtensionImageName{ LanguageExtensionImageNamePython3108, LanguageExtensionImageNamePython365, - LanguageExtensionImageNamePython3912, - LanguageExtensionImageNamePython3912IncludeDeepLearning, LanguageExtensionImageNameR, } } @@ -627,6 +623,22 @@ func PossibleLanguageExtensionNameValues() []LanguageExtensionName { } } +// MigrationClusterRole - The role of the cluster in the migration process. +type MigrationClusterRole string + +const ( + MigrationClusterRoleDestination MigrationClusterRole = "Destination" + MigrationClusterRoleSource MigrationClusterRole = "Source" +) + +// PossibleMigrationClusterRoleValues returns the possible values for the MigrationClusterRole const type. +func PossibleMigrationClusterRoleValues() []MigrationClusterRole { + return []MigrationClusterRole{ + MigrationClusterRoleDestination, + MigrationClusterRoleSource, + } +} + // PrincipalType - Principal type. type PrincipalType string @@ -745,6 +757,7 @@ const ( StateCreating State = "Creating" StateDeleted State = "Deleted" StateDeleting State = "Deleting" + StateMigrated State = "Migrated" StateRunning State = "Running" StateStarting State = "Starting" StateStopped State = "Stopped" @@ -759,6 +772,7 @@ func PossibleStateValues() []State { StateCreating, StateDeleted, StateDeleting, + StateMigrated, StateRunning, StateStarting, StateStopped, diff --git a/sdk/resourcemanager/kusto/armkusto/database_client.go b/sdk/resourcemanager/kusto/armkusto/database_client.go new file mode 100644 index 000000000000..b8ce8f15f7c9 --- /dev/null +++ b/sdk/resourcemanager/kusto/armkusto/database_client.go @@ -0,0 +1,108 @@ +//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 armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseClient contains the methods for the Database group. +// Don't use this type directly, use NewDatabaseClient() instead. +type DatabaseClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseClient creates a new instance of DatabaseClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseClient, error) { + cl, err := arm.NewClient(moduleName+".DatabaseClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// InviteFollower - Generates an invitation token that allows attaching a follower database to this database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - databaseName - The name of the database in the Kusto cluster. +// - parameters - The follower invitation request parameters. +// - options - DatabaseClientInviteFollowerOptions contains the optional parameters for the DatabaseClient.InviteFollower method. +func (client *DatabaseClient) InviteFollower(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseInviteFollowerRequest, options *DatabaseClientInviteFollowerOptions) (DatabaseClientInviteFollowerResponse, error) { + req, err := client.inviteFollowerCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) + if err != nil { + return DatabaseClientInviteFollowerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseClientInviteFollowerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DatabaseClientInviteFollowerResponse{}, runtime.NewResponseError(resp) + } + return client.inviteFollowerHandleResponse(resp) +} + +// inviteFollowerCreateRequest creates the InviteFollower request. +func (client *DatabaseClient) inviteFollowerCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseInviteFollowerRequest, options *DatabaseClientInviteFollowerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/inviteFollower" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, parameters) +} + +// inviteFollowerHandleResponse handles the InviteFollower response. +func (client *DatabaseClient) inviteFollowerHandleResponse(resp *http.Response) (DatabaseClientInviteFollowerResponse, error) { + result := DatabaseClientInviteFollowerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseInviteFollowerResult); err != nil { + return DatabaseClientInviteFollowerResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/kusto/armkusto/database_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/database_client_example_test.go new file mode 100644 index 000000000000..4f7ce944e536 --- /dev/null +++ b/sdk/resourcemanager/kusto/armkusto/database_client_example_test.go @@ -0,0 +1,61 @@ +//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 armkusto_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/kusto/armkusto/v2" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseInviteFollower.json +func ExampleDatabaseClient_InviteFollower() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armkusto.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDatabaseClient().InviteFollower(ctx, "kustorptest", "kustoCluster", "database", armkusto.DatabaseInviteFollowerRequest{ + InviteeEmail: to.Ptr("invitee@contoso.com"), + TableLevelSharingProperties: &armkusto.TableLevelSharingProperties{ + ExternalTablesToExclude: []*string{}, + ExternalTablesToInclude: []*string{ + to.Ptr("ExternalTable*")}, + FunctionsToExclude: []*string{ + to.Ptr("functionsToExclude2")}, + FunctionsToInclude: []*string{ + to.Ptr("functionsToInclude1")}, + MaterializedViewsToExclude: []*string{ + to.Ptr("MaterializedViewTable2")}, + MaterializedViewsToInclude: []*string{ + to.Ptr("MaterializedViewTable1")}, + TablesToExclude: []*string{ + to.Ptr("Table2")}, + TablesToInclude: []*string{ + to.Ptr("Table1")}, + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.DatabaseInviteFollowerResult = armkusto.DatabaseInviteFollowerResult{ + // GeneratedInvitation: to.Ptr("eyJ0eXAiOiJKVInvitationToken"), + // } +} diff --git a/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go b/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go index 0598f8ab279e..c07fa78a1401 100644 --- a/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go +++ b/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go @@ -29,8 +29,7 @@ type DatabasePrincipalAssignmentsClient struct { } // NewDatabasePrincipalAssignmentsClient creates a new instance of DatabasePrincipalAssignmentsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDatabasePrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasePrincipalAssignmentsClient, error) { @@ -48,8 +47,8 @@ func NewDatabasePrincipalAssignmentsClient(subscriptionID string, credential azc // CheckNameAvailability - Checks that the database principal assignment is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the resource. @@ -94,7 +93,7 @@ func (client *DatabasePrincipalAssignmentsClient) checkNameAvailabilityCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, principalAssignmentName) @@ -112,8 +111,8 @@ func (client *DatabasePrincipalAssignmentsClient) checkNameAvailabilityHandleRes // BeginCreateOrUpdate - Creates a Kusto cluster database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. @@ -126,7 +125,9 @@ func (client *DatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -135,7 +136,7 @@ func (client *DatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(ctx contex // CreateOrUpdate - Creates a Kusto cluster database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DatabasePrincipalAssignmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, parameters DatabasePrincipalAssignment, options *DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters, options) if err != nil { @@ -179,7 +180,7 @@ func (client *DatabasePrincipalAssignmentsClient) createOrUpdateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -188,8 +189,8 @@ func (client *DatabasePrincipalAssignmentsClient) createOrUpdateCreateRequest(ct // BeginDelete - Deletes a Kusto principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. @@ -201,7 +202,9 @@ func (client *DatabasePrincipalAssignmentsClient) BeginDelete(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[DatabasePrincipalAssignmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasePrincipalAssignmentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DatabasePrincipalAssignmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -210,7 +213,7 @@ func (client *DatabasePrincipalAssignmentsClient) BeginDelete(ctx context.Contex // Delete - Deletes a Kusto principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DatabasePrincipalAssignmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, options *DatabasePrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, options) if err != nil { @@ -254,7 +257,7 @@ func (client *DatabasePrincipalAssignmentsClient) deleteCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,8 +266,8 @@ func (client *DatabasePrincipalAssignmentsClient) deleteCreateRequest(ctx contex // Get - Gets a Kusto cluster database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. @@ -313,7 +316,7 @@ func (client *DatabasePrincipalAssignmentsClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,8 +333,8 @@ func (client *DatabasePrincipalAssignmentsClient) getHandleResponse(resp *http.R // NewListPager - Lists all Kusto cluster database principalAssignments. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.NewListPager @@ -382,7 +385,7 @@ func (client *DatabasePrincipalAssignmentsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client_example_test.go index fe8e58d69743..9a6016e8f87f 100644 --- a/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json func ExampleDatabasePrincipalAssignmentsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleDatabasePrincipalAssignmentsClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsGet.json func ExampleDatabasePrincipalAssignmentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleDatabasePrincipalAssignmentsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json func ExampleDatabasePrincipalAssignmentsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -127,7 +127,7 @@ func ExampleDatabasePrincipalAssignmentsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsDelete.json func ExampleDatabasePrincipalAssignmentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -148,7 +148,7 @@ func ExampleDatabasePrincipalAssignmentsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsList.json func ExampleDatabasePrincipalAssignmentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/databases_client.go b/sdk/resourcemanager/kusto/armkusto/databases_client.go index 8960d3e6e254..292e6483e692 100644 --- a/sdk/resourcemanager/kusto/armkusto/databases_client.go +++ b/sdk/resourcemanager/kusto/armkusto/databases_client.go @@ -18,6 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -29,8 +30,7 @@ type DatabasesClient struct { } // NewDatabasesClient creates a new instance of DatabasesClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error) { @@ -48,8 +48,8 @@ func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential // AddPrincipals - Add Database principals permissions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - databasePrincipalsToAdd - List of database principals to add. @@ -93,7 +93,7 @@ func (client *DatabasesClient) addPrincipalsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, databasePrincipalsToAdd) @@ -111,8 +111,8 @@ func (client *DatabasesClient) addPrincipalsHandleResponse(resp *http.Response) // CheckNameAvailability - Checks that the databases resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - resourceName - The name of the resource. // - options - DatabasesClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasesClient.CheckNameAvailability @@ -152,7 +152,7 @@ func (client *DatabasesClient) checkNameAvailabilityCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resourceName) @@ -170,8 +170,8 @@ func (client *DatabasesClient) checkNameAvailabilityHandleResponse(resp *http.Re // BeginCreateOrUpdate - Creates or updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - parameters - The database parameters supplied to the CreateOrUpdate operation. @@ -183,7 +183,9 @@ func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[DatabasesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DatabasesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -192,7 +194,7 @@ func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Creates or updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseClassification, options *DatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) if err != nil { @@ -232,7 +234,7 @@ func (client *DatabasesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") if options != nil && options.CallerRole != nil { reqQP.Set("callerRole", string(*options.CallerRole)) } @@ -244,8 +246,8 @@ func (client *DatabasesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes the database with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. @@ -255,7 +257,9 @@ func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller[DatabasesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DatabasesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -264,7 +268,7 @@ func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes the database with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { @@ -304,7 +308,7 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -313,8 +317,8 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource // Get - Returns a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method. @@ -357,7 +361,7 @@ func (client *DatabasesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -374,18 +378,24 @@ func (client *DatabasesClient) getHandleResponse(resp *http.Response) (Databases // NewListByClusterPager - Returns the list of databases of the given Kusto cluster. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.NewListByClusterPager // method. func (client *DatabasesClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *DatabasesClientListByClusterOptions) *runtime.Pager[DatabasesClientListByClusterResponse] { return runtime.NewPager(runtime.PagingHandler[DatabasesClientListByClusterResponse]{ More: func(page DatabasesClientListByClusterResponse) bool { - return false + return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DatabasesClientListByClusterResponse) (DatabasesClientListByClusterResponse, error) { - req, err := client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + var req *policy.Request + var err error + if page == nil { + req, err = client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } if err != nil { return DatabasesClientListByClusterResponse{}, err } @@ -421,7 +431,13 @@ func (client *DatabasesClient) listByClusterCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skiptoken != nil { + reqQP.Set("$skiptoken", *options.Skiptoken) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,8 +454,8 @@ func (client *DatabasesClient) listByClusterHandleResponse(resp *http.Response) // NewListPrincipalsPager - Returns a list of database principals of the given Kusto cluster and database. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.NewListPrincipalsPager @@ -490,7 +506,7 @@ func (client *DatabasesClient) listPrincipalsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -508,8 +524,8 @@ func (client *DatabasesClient) listPrincipalsHandleResponse(resp *http.Response) // RemovePrincipals - Remove Database principals permissions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - databasePrincipalsToRemove - List of database principals to remove. @@ -554,7 +570,7 @@ func (client *DatabasesClient) removePrincipalsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, databasePrincipalsToRemove) @@ -572,8 +588,8 @@ func (client *DatabasesClient) removePrincipalsHandleResponse(resp *http.Respons // BeginUpdate - Updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - parameters - The database parameters supplied to the Update operation. @@ -584,7 +600,9 @@ func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller[DatabasesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DatabasesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -593,7 +611,7 @@ func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupNam // Update - Updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DatabasesClient) update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseClassification, options *DatabasesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) if err != nil { @@ -633,7 +651,7 @@ func (client *DatabasesClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") if options != nil && options.CallerRole != nil { reqQP.Set("callerRole", string(*options.CallerRole)) } diff --git a/sdk/resourcemanager/kusto/armkusto/databases_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/databases_client_example_test.go index 5696832ef4a6..d468a9c57f3c 100644 --- a/sdk/resourcemanager/kusto/armkusto/databases_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/databases_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCheckNameAvailability.json func ExampleDatabasesClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleDatabasesClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesListByCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesListByCluster.json func ExampleDatabasesClient_NewListByClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,9 @@ func ExampleDatabasesClient_NewListByClusterPager() { if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := clientFactory.NewDatabasesClient().NewListByClusterPager("kustorptest", "kustoCluster", nil) + pager := clientFactory.NewDatabasesClient().NewListByClusterPager("kustorptest", "kustoCluster", &armkusto.DatabasesClientListByClusterOptions{Top: nil, + Skiptoken: nil, + }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { @@ -115,13 +117,28 @@ func ExampleDatabasesClient_NewListByClusterPager() { // to.Ptr("Table1")}, // }, // }, + // }, + // &armkusto.ReadWriteDatabase{ + // Name: to.Ptr("kustoCluster/KustoDatabase10"), + // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase10"), + // Kind: to.Ptr(armkusto.KindReadWrite), + // Location: to.Ptr("westus"), + // Properties: &armkusto.ReadWriteDatabaseProperties{ + // HotCachePeriod: to.Ptr("P1D"), + // ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded), + // SoftDeletePeriod: to.Ptr("P1D"), + // SuspensionDetails: &armkusto.SuspensionDetails{ + // SuspensionStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-16T15:06:54.2757906Z"); return t}()), + // }, + // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesGet.json -func ExampleDatabasesClient_Get() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesGet.json +func ExampleDatabasesClient_Get_kustoDatabasesGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -153,7 +170,43 @@ func ExampleDatabasesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabaseReadonlyUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSuspendedDatabasesGet.json +func ExampleDatabasesClient_Get_kustoSuspendedDatabasesGet() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armkusto.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewDatabasesClient().Get(ctx, "kustorptest", "kustoCluster", "KustoDatabase9", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res = armkusto.DatabasesClientGetResponse{ + // DatabaseClassification: &armkusto.ReadWriteDatabase{ + // Name: to.Ptr("kustoCluster/KustoDatabase9"), + // Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"), + // ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase9"), + // Kind: to.Ptr(armkusto.KindReadWrite), + // Location: to.Ptr("westus"), + // Properties: &armkusto.ReadWriteDatabaseProperties{ + // ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded), + // SoftDeletePeriod: to.Ptr("P1D"), + // SuspensionDetails: &armkusto.SuspensionDetails{ + // SuspensionStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-16T15:06:54.2757906Z"); return t}()), + // }, + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseReadonlyUpdate.json func ExampleDatabasesClient_BeginCreateOrUpdate_kustoReadOnlyDatabaseUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -192,7 +245,7 @@ func ExampleDatabasesClient_BeginCreateOrUpdate_kustoReadOnlyDatabaseUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCreateOrUpdate.json func ExampleDatabasesClient_BeginCreateOrUpdate_kustoReadWriteDatabaseCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -231,7 +284,7 @@ func ExampleDatabasesClient_BeginCreateOrUpdate_kustoReadWriteDatabaseCreateOrUp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesUpdate.json func ExampleDatabasesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -273,7 +326,7 @@ func ExampleDatabasesClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesDelete.json func ExampleDatabasesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -294,7 +347,7 @@ func ExampleDatabasesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabaseListPrincipals.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseListPrincipals.json func ExampleDatabasesClient_NewListPrincipalsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -346,7 +399,7 @@ func ExampleDatabasesClient_NewListPrincipalsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabaseAddPrincipals.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseAddPrincipals.json func ExampleDatabasesClient_AddPrincipals() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -419,7 +472,7 @@ func ExampleDatabasesClient_AddPrincipals() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabaseRemovePrincipals.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseRemovePrincipals.json func ExampleDatabasesClient_RemovePrincipals() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go b/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go index ce3318676860..7a3f985c9108 100644 --- a/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go +++ b/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go @@ -29,8 +29,7 @@ type DataConnectionsClient struct { } // NewDataConnectionsClient creates a new instance of DataConnectionsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataConnectionsClient, error) { @@ -48,8 +47,8 @@ func NewDataConnectionsClient(subscriptionID string, credential azcore.TokenCred // CheckNameAvailability - Checks that the data connection name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -94,7 +93,7 @@ func (client *DataConnectionsClient) checkNameAvailabilityCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dataConnectionName) @@ -112,8 +111,8 @@ func (client *DataConnectionsClient) checkNameAvailabilityHandleResponse(resp *h // BeginCreateOrUpdate - Creates or updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -126,7 +125,9 @@ func (client *DataConnectionsClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[DataConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DataConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -135,7 +136,7 @@ func (client *DataConnectionsClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Creates or updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DataConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *DataConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, parameters, options) if err != nil { @@ -179,7 +180,7 @@ func (client *DataConnectionsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -188,8 +189,8 @@ func (client *DataConnectionsClient) createOrUpdateCreateRequest(ctx context.Con // BeginDataConnectionValidation - Checks that the data connection parameters are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - parameters - The data connection parameters supplied to the CreateOrUpdate operation. @@ -212,7 +213,7 @@ func (client *DataConnectionsClient) BeginDataConnectionValidation(ctx context.C // DataConnectionValidation - Checks that the data connection parameters are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DataConnectionsClient) dataConnectionValidation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DataConnectionValidation, options *DataConnectionsClientBeginDataConnectionValidationOptions) (*http.Response, error) { req, err := client.dataConnectionValidationCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) if err != nil { @@ -252,7 +253,7 @@ func (client *DataConnectionsClient) dataConnectionValidationCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -261,8 +262,8 @@ func (client *DataConnectionsClient) dataConnectionValidationCreateRequest(ctx c // BeginDelete - Deletes the data connection with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -274,7 +275,9 @@ func (client *DataConnectionsClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[DataConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DataConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -283,7 +286,7 @@ func (client *DataConnectionsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes the data connection with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DataConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, options *DataConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, options) if err != nil { @@ -327,7 +330,7 @@ func (client *DataConnectionsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -336,8 +339,8 @@ func (client *DataConnectionsClient) deleteCreateRequest(ctx context.Context, re // Get - Returns a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -385,7 +388,7 @@ func (client *DataConnectionsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -402,8 +405,8 @@ func (client *DataConnectionsClient) getHandleResponse(resp *http.Response) (Dat // NewListByDatabasePager - Returns the list of data connections of the given Kusto database. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DataConnectionsClientListByDatabaseOptions contains the optional parameters for the DataConnectionsClient.NewListByDatabasePager @@ -454,7 +457,7 @@ func (client *DataConnectionsClient) listByDatabaseCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -472,8 +475,8 @@ func (client *DataConnectionsClient) listByDatabaseHandleResponse(resp *http.Res // BeginUpdate - Updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -486,7 +489,9 @@ func (client *DataConnectionsClient) BeginUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[DataConnectionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[DataConnectionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -495,7 +500,7 @@ func (client *DataConnectionsClient) BeginUpdate(ctx context.Context, resourceGr // Update - Updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *DataConnectionsClient) update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *DataConnectionsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, parameters, options) if err != nil { @@ -539,7 +544,7 @@ func (client *DataConnectionsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/kusto/armkusto/dataconnections_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/dataconnections_client_example_test.go index 7897ab969508..8896a6f6f58b 100644 --- a/sdk/resourcemanager/kusto/armkusto/dataconnections_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/dataconnections_client_example_test.go @@ -17,10 +17,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsListByDatabase.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsListByDatabase.json func ExampleDataConnectionsClient_NewListByDatabasePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -110,7 +110,7 @@ func ExampleDataConnectionsClient_NewListByDatabasePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionEventGridValidationAsync.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionEventGridValidationAsync.json func ExampleDataConnectionsClient_BeginDataConnectionValidation_kustoDataConnectionEventGridValidation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -154,7 +154,7 @@ func ExampleDataConnectionsClient_BeginDataConnectionValidation_kustoDataConnect // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionValidationAsync.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionValidationAsync.json func ExampleDataConnectionsClient_BeginDataConnectionValidation_kustoDataConnectionValidation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -194,7 +194,7 @@ func ExampleDataConnectionsClient_BeginDataConnectionValidation_kustoDataConnect // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCheckNameAvailability.json func ExampleDataConnectionsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -223,7 +223,7 @@ func ExampleDataConnectionsClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCosmosDbGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbGet.json func ExampleDataConnectionsClient_Get_kustoDataConnectionsCosmosDbGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -263,7 +263,7 @@ func ExampleDataConnectionsClient_Get_kustoDataConnectionsCosmosDbGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsEventGridGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridGet.json func ExampleDataConnectionsClient_Get_kustoDataConnectionsEventGridGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -307,7 +307,7 @@ func ExampleDataConnectionsClient_Get_kustoDataConnectionsEventGridGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsGet.json func ExampleDataConnectionsClient_Get_kustoDataConnectionsGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -351,7 +351,7 @@ func ExampleDataConnectionsClient_Get_kustoDataConnectionsGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json func ExampleDataConnectionsClient_BeginCreateOrUpdate_kustoDataConnectionsCosmosDbCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -406,7 +406,7 @@ func ExampleDataConnectionsClient_BeginCreateOrUpdate_kustoDataConnectionsCosmos // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCreateOrUpdate.json func ExampleDataConnectionsClient_BeginCreateOrUpdate_kustoDataConnectionsCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -453,7 +453,7 @@ func ExampleDataConnectionsClient_BeginCreateOrUpdate_kustoDataConnectionsCreate // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsEventGridCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridCreateOrUpdate.json func ExampleDataConnectionsClient_BeginCreateOrUpdate_kustoDataConnectionsEventGridCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -516,7 +516,7 @@ func ExampleDataConnectionsClient_BeginCreateOrUpdate_kustoDataConnectionsEventG // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCosmosDbUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbUpdate.json func ExampleDataConnectionsClient_BeginUpdate_kustoDataConnectionsCosmosDbUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -571,7 +571,7 @@ func ExampleDataConnectionsClient_BeginUpdate_kustoDataConnectionsCosmosDbUpdate // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsEventGridUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridUpdate.json func ExampleDataConnectionsClient_BeginUpdate_kustoDataConnectionsEventGridUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -634,7 +634,7 @@ func ExampleDataConnectionsClient_BeginUpdate_kustoDataConnectionsEventGridUpdat // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsUpdate.json func ExampleDataConnectionsClient_BeginUpdate_kustoDataConnectionsUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -681,7 +681,7 @@ func ExampleDataConnectionsClient_BeginUpdate_kustoDataConnectionsUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsDelete.json func ExampleDataConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/go.mod b/sdk/resourcemanager/kusto/armkusto/go.mod index be2f1b6defc5..e3f7548f8f2f 100644 --- a/sdk/resourcemanager/kusto/armkusto/go.mod +++ b/sdk/resourcemanager/kusto/armkusto/go.mod @@ -1,21 +1,21 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect ) diff --git a/sdk/resourcemanager/kusto/armkusto/go.sum b/sdk/resourcemanager/kusto/armkusto/go.sum index 8ba445a8c4da..21718b486698 100644 --- a/sdk/resourcemanager/kusto/armkusto/go.sum +++ b/sdk/resourcemanager/kusto/armkusto/go.sum @@ -1,13 +1,13 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -18,14 +18,14 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go b/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go index 72beb4131634..c0a85ff22c77 100644 --- a/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go +++ b/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go @@ -29,8 +29,7 @@ type ManagedPrivateEndpointsClient struct { } // NewManagedPrivateEndpointsClient creates a new instance of ManagedPrivateEndpointsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagedPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedPrivateEndpointsClient, error) { @@ -48,8 +47,8 @@ func NewManagedPrivateEndpointsClient(subscriptionID string, credential azcore.T // CheckNameAvailability - Checks that the managed private endpoints resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - resourceName - The name of the resource. // - options - ManagedPrivateEndpointsClientCheckNameAvailabilityOptions contains the optional parameters for the ManagedPrivateEndpointsClient.CheckNameAvailability @@ -89,7 +88,7 @@ func (client *ManagedPrivateEndpointsClient) checkNameAvailabilityCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, resourceName) @@ -107,8 +106,8 @@ func (client *ManagedPrivateEndpointsClient) checkNameAvailabilityHandleResponse // BeginCreateOrUpdate - Creates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - parameters - The managed private endpoint parameters. @@ -120,7 +119,9 @@ func (client *ManagedPrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Con if err != nil { return nil, err } - return runtime.NewPoller[ManagedPrivateEndpointsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedPrivateEndpointsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ManagedPrivateEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -129,7 +130,7 @@ func (client *ManagedPrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ManagedPrivateEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, parameters ManagedPrivateEndpoint, options *ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, parameters, options) if err != nil { @@ -169,7 +170,7 @@ func (client *ManagedPrivateEndpointsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -178,8 +179,8 @@ func (client *ManagedPrivateEndpointsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - options - ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete @@ -190,7 +191,9 @@ func (client *ManagedPrivateEndpointsClient) BeginDelete(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[ManagedPrivateEndpointsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedPrivateEndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ManagedPrivateEndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -199,7 +202,7 @@ func (client *ManagedPrivateEndpointsClient) BeginDelete(ctx context.Context, re // Delete - Deletes a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ManagedPrivateEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, options) if err != nil { @@ -239,7 +242,7 @@ func (client *ManagedPrivateEndpointsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,8 +251,8 @@ func (client *ManagedPrivateEndpointsClient) deleteCreateRequest(ctx context.Con // Get - Gets a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - options - ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get @@ -293,7 +296,7 @@ func (client *ManagedPrivateEndpointsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,8 +313,8 @@ func (client *ManagedPrivateEndpointsClient) getHandleResponse(resp *http.Respon // NewListPager - Returns the list of managed private endpoints. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.NewListPager // method. @@ -357,7 +360,7 @@ func (client *ManagedPrivateEndpointsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -375,8 +378,8 @@ func (client *ManagedPrivateEndpointsClient) listHandleResponse(resp *http.Respo // BeginUpdate - Updates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - parameters - The managed private endpoint parameters. @@ -388,7 +391,9 @@ func (client *ManagedPrivateEndpointsClient) BeginUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[ManagedPrivateEndpointsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedPrivateEndpointsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ManagedPrivateEndpointsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -397,7 +402,7 @@ func (client *ManagedPrivateEndpointsClient) BeginUpdate(ctx context.Context, re // Update - Updates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ManagedPrivateEndpointsClient) update(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, parameters ManagedPrivateEndpoint, options *ManagedPrivateEndpointsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, parameters, options) if err != nil { @@ -437,7 +442,7 @@ func (client *ManagedPrivateEndpointsClient) updateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client_example_test.go index a35c34936418..014e95a4e592 100644 --- a/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json func ExampleManagedPrivateEndpointsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleManagedPrivateEndpointsClient_CheckNameAvailability() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoManagedPrivateEndpointsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsList.json func ExampleManagedPrivateEndpointsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -94,7 +94,7 @@ func ExampleManagedPrivateEndpointsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoManagedPrivateEndpointsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsGet.json func ExampleManagedPrivateEndpointsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -124,7 +124,7 @@ func ExampleManagedPrivateEndpointsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json func ExampleManagedPrivateEndpointsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -164,7 +164,7 @@ func ExampleManagedPrivateEndpointsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoManagedPrivateEndpointsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsUpdate.json func ExampleManagedPrivateEndpointsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -204,7 +204,7 @@ func ExampleManagedPrivateEndpointsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoManagedPrivateEndpointsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsDelete.json func ExampleManagedPrivateEndpointsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/models.go b/sdk/resourcemanager/kusto/armkusto/models.go index 24f044949510..f0d1122b0811 100644 --- a/sdk/resourcemanager/kusto/armkusto/models.go +++ b/sdk/resourcemanager/kusto/armkusto/models.go @@ -228,6 +228,12 @@ type ClusterListResult struct { Value []*Cluster } +// ClusterMigrateRequest - A cluster migrate request. +type ClusterMigrateRequest struct { + // REQUIRED; Resource ID of the destination cluster or kusto pool. + ClusterResourceID *string +} + // ClusterPrincipalAssignment - Class representing a cluster principal assignment. type ClusterPrincipalAssignment struct { // The cluster principal. @@ -380,6 +386,9 @@ type ClusterProperties struct { // READ-ONLY; The cluster data ingestion URI. DataIngestionURI *string + // READ-ONLY; Properties of the peer cluster involved in a migration to/from this cluster. + MigrationCluster *MigrationClusterProperties + // READ-ONLY; A list of private endpoint connections. PrivateEndpointConnections []*PrivateEndpointConnection @@ -462,6 +471,12 @@ type ClustersClientBeginDiagnoseVirtualNetworkOptions struct { ResumeToken string } +// ClustersClientBeginMigrateOptions contains the optional parameters for the ClustersClient.BeginMigrate method. +type ClustersClientBeginMigrateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions // method. type ClustersClientBeginRemoveLanguageExtensionsOptions struct { @@ -753,8 +768,31 @@ type Database struct { // GetDatabase implements the DatabaseClassification interface for type Database. func (d *Database) GetDatabase() *Database { return d } +// DatabaseClientInviteFollowerOptions contains the optional parameters for the DatabaseClient.InviteFollower method. +type DatabaseClientInviteFollowerOptions struct { + // placeholder for future optional parameters +} + +// DatabaseInviteFollowerRequest - The request to invite a follower to a database. +type DatabaseInviteFollowerRequest struct { + // REQUIRED; The email of the invited user for which the follower invitation is generated. + InviteeEmail *string + + // Table level sharing specifications + TableLevelSharingProperties *TableLevelSharingProperties +} + +// DatabaseInviteFollowerResult - The result returned from a follower invitation generation request. +type DatabaseInviteFollowerResult struct { + // The generated invitation token. + GeneratedInvitation *string +} + // DatabaseListResult - The list Kusto databases operation response. type DatabaseListResult struct { + // Link to the next page of results + NextLink *string + // The list of Kusto databases. Value []DatabaseClassification } @@ -935,7 +973,12 @@ type DatabasesClientGetOptions struct { // DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.NewListByClusterPager method. type DatabasesClientListByClusterOptions struct { - // placeholder for future optional parameters + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. + Skiptoken *string + // limit the number of results + Top *int32 } // DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.NewListPrincipalsPager method. @@ -1349,6 +1392,21 @@ type ManagedPrivateEndpointsClientListOptions struct { // placeholder for future optional parameters } +// MigrationClusterProperties - Represents a properties of a cluster that is part of a migration. +type MigrationClusterProperties struct { + // READ-ONLY; The public data ingestion URL of the cluster. + DataIngestionURI *string + + // READ-ONLY; The resource ID of the cluster. + ID *string + + // READ-ONLY; The role of the cluster in the migration process. + Role *MigrationClusterRole + + // READ-ONLY; The public URL of the cluster. + URI *string +} + // Operation - A REST API operation type Operation struct { // The object that describes the operation. @@ -1701,6 +1759,10 @@ type ReadOnlyFollowingDatabaseProperties struct { // READ-ONLY; The statistics of the database. Statistics *DatabaseStatistics + // READ-ONLY; The database suspension details. If the database is suspended, this object contains information related to the + // database's suspension state. + SuspensionDetails *SuspensionDetails + // READ-ONLY; Table level sharing specifications TableLevelSharingProperties *TableLevelSharingProperties } @@ -1742,6 +1804,9 @@ type ReadWriteDatabaseProperties struct { // The time the data should be kept in cache for fast queries in TimeSpan. HotCachePeriod *string + // KeyVault properties for the database encryption. + KeyVaultProperties *KeyVaultProperties + // The time the data should be kept before it stops being accessible to queries in TimeSpan. SoftDeletePeriod *string @@ -1753,6 +1818,10 @@ type ReadWriteDatabaseProperties struct { // READ-ONLY; The statistics of the database. Statistics *DatabaseStatistics + + // READ-ONLY; The database suspension details. If the database is suspended, this object contains information related to the + // database's suspension state. + SuspensionDetails *SuspensionDetails } // ResourceSKUCapabilities - Describes The SKU capabilities object. @@ -1907,6 +1976,13 @@ type ScriptsClientListByDatabaseOptions struct { // placeholder for future optional parameters } +// SuspensionDetails - The database suspension details. If the database is suspended, this object contains information related +// to the database's suspension state. +type SuspensionDetails struct { + // The starting date and time of the suspension state. + SuspensionStartDate *time.Time +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). diff --git a/sdk/resourcemanager/kusto/armkusto/models_serde.go b/sdk/resourcemanager/kusto/armkusto/models_serde.go index a34f8dff5210..66fc0cb37a4a 100644 --- a/sdk/resourcemanager/kusto/armkusto/models_serde.go +++ b/sdk/resourcemanager/kusto/armkusto/models_serde.go @@ -503,6 +503,33 @@ func (c *ClusterListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ClusterMigrateRequest. +func (c ClusterMigrateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterResourceId", c.ClusterResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMigrateRequest. +func (c *ClusterMigrateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterResourceId": + err = unpopulate(val, "ClusterResourceID", &c.ClusterResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignment. func (c ClusterPrincipalAssignment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -670,6 +697,7 @@ func (c ClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "engineType", c.EngineType) populate(objectMap, "keyVaultProperties", c.KeyVaultProperties) populate(objectMap, "languageExtensions", c.LanguageExtensions) + populate(objectMap, "migrationCluster", c.MigrationCluster) populate(objectMap, "optimizedAutoscale", c.OptimizedAutoscale) populate(objectMap, "privateEndpointConnections", c.PrivateEndpointConnections) populate(objectMap, "provisioningState", c.ProvisioningState) @@ -730,6 +758,9 @@ func (c *ClusterProperties) UnmarshalJSON(data []byte) error { case "languageExtensions": err = unpopulate(val, "LanguageExtensions", &c.LanguageExtensions) delete(rawMsg, key) + case "migrationCluster": + err = unpopulate(val, "MigrationCluster", &c.MigrationCluster) + delete(rawMsg, key) case "optimizedAutoscale": err = unpopulate(val, "OptimizedAutoscale", &c.OptimizedAutoscale) delete(rawMsg, key) @@ -1195,9 +1226,68 @@ func (d *Database) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DatabaseInviteFollowerRequest. +func (d DatabaseInviteFollowerRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inviteeEmail", d.InviteeEmail) + populate(objectMap, "tableLevelSharingProperties", d.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseInviteFollowerRequest. +func (d *DatabaseInviteFollowerRequest) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inviteeEmail": + err = unpopulate(val, "InviteeEmail", &d.InviteeEmail) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &d.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseInviteFollowerResult. +func (d DatabaseInviteFollowerResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "generatedInvitation", d.GeneratedInvitation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseInviteFollowerResult. +func (d *DatabaseInviteFollowerResult) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "generatedInvitation": + err = unpopulate(val, "GeneratedInvitation", &d.GeneratedInvitation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DatabaseListResult. func (d DatabaseListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } @@ -1211,6 +1301,9 @@ func (d *DatabaseListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) case "value": d.Value, err = unmarshalDatabaseClassificationArray(val) delete(rawMsg, key) @@ -2318,6 +2411,45 @@ func (m *ManagedPrivateEndpointsCheckNameRequest) UnmarshalJSON(data []byte) err return nil } +// MarshalJSON implements the json.Marshaller interface for type MigrationClusterProperties. +func (m MigrationClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataIngestionUri", m.DataIngestionURI) + populate(objectMap, "id", m.ID) + populate(objectMap, "role", m.Role) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationClusterProperties. +func (m *MigrationClusterProperties) 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 "dataIngestionUri": + err = unpopulate(val, "DataIngestionURI", &m.DataIngestionURI) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &m.Role) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + 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 Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3031,6 +3163,7 @@ func (r ReadOnlyFollowingDatabaseProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) populate(objectMap, "statistics", r.Statistics) + populate(objectMap, "suspensionDetails", r.SuspensionDetails) populate(objectMap, "tableLevelSharingProperties", r.TableLevelSharingProperties) return json.Marshal(objectMap) } @@ -3071,6 +3204,9 @@ func (r *ReadOnlyFollowingDatabaseProperties) UnmarshalJSON(data []byte) error { case "statistics": err = unpopulate(val, "Statistics", &r.Statistics) delete(rawMsg, key) + case "suspensionDetails": + err = unpopulate(val, "SuspensionDetails", &r.SuspensionDetails) + delete(rawMsg, key) case "tableLevelSharingProperties": err = unpopulate(val, "TableLevelSharingProperties", &r.TableLevelSharingProperties) delete(rawMsg, key) @@ -3134,9 +3270,11 @@ func (r ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "hotCachePeriod", r.HotCachePeriod) populate(objectMap, "isFollowed", r.IsFollowed) + populate(objectMap, "keyVaultProperties", r.KeyVaultProperties) populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) populate(objectMap, "statistics", r.Statistics) + populate(objectMap, "suspensionDetails", r.SuspensionDetails) return json.Marshal(objectMap) } @@ -3155,6 +3293,9 @@ func (r *ReadWriteDatabaseProperties) UnmarshalJSON(data []byte) error { case "isFollowed": err = unpopulate(val, "IsFollowed", &r.IsFollowed) delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &r.KeyVaultProperties) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) delete(rawMsg, key) @@ -3164,6 +3305,9 @@ func (r *ReadWriteDatabaseProperties) UnmarshalJSON(data []byte) error { case "statistics": err = unpopulate(val, "Statistics", &r.Statistics) delete(rawMsg, key) + case "suspensionDetails": + err = unpopulate(val, "SuspensionDetails", &r.SuspensionDetails) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", r, err) @@ -3491,6 +3635,33 @@ func (s *ScriptProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SuspensionDetails. +func (s SuspensionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "suspensionStartDate", s.SuspensionStartDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SuspensionDetails. +func (s *SuspensionDetails) 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", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "suspensionStartDate": + err = unpopulateTimeRFC3339(val, "SuspensionStartDate", &s.SuspensionStartDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/kusto/armkusto/operations_client.go b/sdk/resourcemanager/kusto/armkusto/operations_client.go index dccd3175265c..85d6dd371d35 100644 --- a/sdk/resourcemanager/kusto/armkusto/operations_client.go +++ b/sdk/resourcemanager/kusto/armkusto/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists available operations for the Microsoft.Kusto provider. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/operations_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/operations_client_example_test.go index f29ee14e7d84..a7e8b5832d03 100644 --- a/sdk/resourcemanager/kusto/armkusto/operations_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoOperationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go b/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go index 66c4336b95e3..e742f771a585 100644 --- a/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go +++ b/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go @@ -29,8 +29,7 @@ type OperationsResultsClient struct { } // NewOperationsResultsClient creates a new instance of OperationsResultsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsClient, error) { @@ -48,9 +47,9 @@ func NewOperationsResultsClient(subscriptionID string, credential azcore.TokenCr // Get - Returns operation results. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. -// - operationID - The Guid of the operation ID +// Generated from API version 2023-05-02 +// - location - The name of Azure region. +// - operationID - The ID of an ongoing async operation. // - options - OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. func (client *OperationsResultsClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsClientGetOptions) (OperationsResultsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, location, operationID, options) @@ -87,7 +86,7 @@ func (client *OperationsResultsClient) getCreateRequest(ctx context.Context, loc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/operationsresults_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/operationsresults_client_example_test.go index 3e5389b997b2..cf6cd0c11256 100644 --- a/sdk/resourcemanager/kusto/armkusto/operationsresults_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/operationsresults_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoOperationResultsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsGet.json func ExampleOperationsResultsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go b/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go index 0e189c1766e7..0047d2b7c367 100644 --- a/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go +++ b/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go @@ -29,8 +29,7 @@ type OperationsResultsLocationClient struct { } // NewOperationsResultsLocationClient creates a new instance of OperationsResultsLocationClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsResultsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsLocationClient, error) { @@ -48,9 +47,9 @@ func NewOperationsResultsLocationClient(subscriptionID string, credential azcore // Get - Returns operation results. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. -// - operationID - The Guid of the operation ID +// Generated from API version 2023-05-02 +// - location - The name of Azure region. +// - operationID - The ID of an ongoing async operation. // - options - OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get // method. func (client *OperationsResultsLocationClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsLocationClientGetOptions) (OperationsResultsLocationClientGetResponse, error) { @@ -65,7 +64,7 @@ func (client *OperationsResultsLocationClient) Get(ctx context.Context, location if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { return OperationsResultsLocationClientGetResponse{}, runtime.NewResponseError(resp) } - return OperationsResultsLocationClientGetResponse{}, nil + return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. @@ -88,7 +87,16 @@ func (client *OperationsResultsLocationClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } + +// getHandleResponse handles the Get response. +func (client *OperationsResultsLocationClient) getHandleResponse(resp *http.Response) (OperationsResultsLocationClientGetResponse, error) { + result := OperationsResultsLocationClientGetResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } + return result, nil +} diff --git a/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client_example_test.go index 70560df4f011..fa25074d7833 100644 --- a/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoOperationResultsOperationResultResponseTypeGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsOperationResultResponseTypeGet.json func ExampleOperationsResultsLocationClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go b/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go index 6ef92bd243da..6ccdbb79dfec 100644 --- a/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go +++ b/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go @@ -29,8 +29,7 @@ type PrivateEndpointConnectionsClient struct { } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { @@ -48,8 +47,8 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - privateEndpointConnectionName - The name of the private endpoint connection. // - options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate @@ -60,7 +59,9 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -69,7 +70,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, parameters, options) if err != nil { @@ -109,7 +110,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -118,8 +119,8 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - privateEndpointConnectionName - The name of the private endpoint connection. // - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete @@ -130,7 +131,9 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -139,7 +142,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) if err != nil { @@ -179,7 +182,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,8 +191,8 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - privateEndpointConnectionName - The name of the private endpoint connection. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get @@ -233,7 +236,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,8 +253,8 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - Returns the list of private endpoint connections. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager // method. @@ -297,7 +300,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client_example_test.go index 89badadaa93f..9fdc8e826ee6 100644 --- a/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoPrivateEndpointConnectionsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsList.json func ExamplePrivateEndpointConnectionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExamplePrivateEndpointConnectionsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoPrivateEndpointConnectionsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsGet.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoPrivateEndpointConnectionsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsDelete.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go b/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go index 4cf6159c909e..1030bed568a5 100644 --- a/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go +++ b/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go @@ -29,8 +29,7 @@ type PrivateLinkResourcesClient struct { } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { @@ -48,8 +47,8 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets a private link resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - privateLinkResourceName - The name of the private link resource. // - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get @@ -93,7 +92,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,8 +109,8 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // NewListPager - Returns the list of private link resources. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager // method. @@ -157,7 +156,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client_example_test.go index 086b6c277260..45d8c0f1b4ee 100644 --- a/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoPrivateLinkResourcesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesList.json func ExamplePrivateLinkResourcesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExamplePrivateLinkResourcesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoPrivateLinkResourcesGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesGet.json func ExamplePrivateLinkResourcesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/response_types.go b/sdk/resourcemanager/kusto/armkusto/response_types.go index 58c8fbd8bd4e..9c59744d3c60 100644 --- a/sdk/resourcemanager/kusto/armkusto/response_types.go +++ b/sdk/resourcemanager/kusto/armkusto/response_types.go @@ -129,6 +129,11 @@ type ClustersClientListSKUsResponse struct { SKUDescriptionList } +// ClustersClientMigrateResponse contains the response from method ClustersClient.BeginMigrate. +type ClustersClientMigrateResponse struct { + // placeholder for future response values +} + // ClustersClientRemoveLanguageExtensionsResponse contains the response from method ClustersClient.BeginRemoveLanguageExtensions. type ClustersClientRemoveLanguageExtensionsResponse struct { // placeholder for future response values @@ -214,6 +219,11 @@ func (d *DataConnectionsClientUpdateResponse) UnmarshalJSON(data []byte) error { return nil } +// DatabaseClientInviteFollowerResponse contains the response from method DatabaseClient.InviteFollower. +type DatabaseClientInviteFollowerResponse struct { + DatabaseInviteFollowerResult +} + // DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method DatabasePrincipalAssignmentsClient.CheckNameAvailability. type DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse struct { CheckNameResult @@ -356,7 +366,8 @@ type OperationsResultsClientGetResponse struct { // OperationsResultsLocationClientGetResponse contains the response from method OperationsResultsLocationClient.Get. type OperationsResultsLocationClientGetResponse struct { - // placeholder for future response values + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. + AzureAsyncOperation *string } // PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. diff --git a/sdk/resourcemanager/kusto/armkusto/scripts_client.go b/sdk/resourcemanager/kusto/armkusto/scripts_client.go index 7d9e7e86a4e4..5260dbf85b92 100644 --- a/sdk/resourcemanager/kusto/armkusto/scripts_client.go +++ b/sdk/resourcemanager/kusto/armkusto/scripts_client.go @@ -29,8 +29,7 @@ type ScriptsClient struct { } // NewScriptsClient creates a new instance of ScriptsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScriptsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptsClient, error) { @@ -48,8 +47,8 @@ func NewScriptsClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks that the script name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the script. @@ -94,7 +93,7 @@ func (client *ScriptsClient) checkNameAvailabilityCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, scriptName) @@ -112,8 +111,8 @@ func (client *ScriptsClient) checkNameAvailabilityHandleResponse(resp *http.Resp // BeginCreateOrUpdate - Creates a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -126,7 +125,9 @@ func (client *ScriptsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[ScriptsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ScriptsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ScriptsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -135,7 +136,7 @@ func (client *ScriptsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // CreateOrUpdate - Creates a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ScriptsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, parameters Script, options *ScriptsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, parameters, options) if err != nil { @@ -179,17 +180,17 @@ func (client *ScriptsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) } -// BeginDelete - Deletes a Kusto principalAssignment. +// BeginDelete - Deletes a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -200,16 +201,18 @@ func (client *ScriptsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ScriptsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ScriptsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ScriptsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } -// Delete - Deletes a Kusto principalAssignment. +// Delete - Deletes a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ScriptsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, options *ScriptsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, options) if err != nil { @@ -253,7 +256,7 @@ func (client *ScriptsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,8 +265,8 @@ func (client *ScriptsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets a Kusto cluster database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -311,7 +314,7 @@ func (client *ScriptsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,8 +331,8 @@ func (client *ScriptsClient) getHandleResponse(resp *http.Response) (ScriptsClie // NewListByDatabasePager - Returns the list of database scripts for given database. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - ScriptsClientListByDatabaseOptions contains the optional parameters for the ScriptsClient.NewListByDatabasePager @@ -380,7 +383,7 @@ func (client *ScriptsClient) listByDatabaseCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -398,8 +401,8 @@ func (client *ScriptsClient) listByDatabaseHandleResponse(resp *http.Response) ( // BeginUpdate - Updates a database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2023-05-02 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -411,7 +414,9 @@ func (client *ScriptsClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ScriptsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ScriptsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[ScriptsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -420,7 +425,7 @@ func (client *ScriptsClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Updates a database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2023-05-02 func (client *ScriptsClient) update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, parameters Script, options *ScriptsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, parameters, options) if err != nil { @@ -464,7 +469,7 @@ func (client *ScriptsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/kusto/armkusto/scripts_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/scripts_client_example_test.go index 7cdfd49e6c3b..83d44dab06c5 100644 --- a/sdk/resourcemanager/kusto/armkusto/scripts_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/scripts_client_example_test.go @@ -15,10 +15,10 @@ import ( "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/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoScriptsListByDatabase.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsListByDatabase.json func ExampleScriptsClient_NewListByDatabasePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleScriptsClient_NewListByDatabasePager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoScriptsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsGet.json func ExampleScriptsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -120,7 +120,7 @@ func ExampleScriptsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoScriptsCreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCreateOrUpdate.json func ExampleScriptsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -169,7 +169,7 @@ func ExampleScriptsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoScriptsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsUpdate.json func ExampleScriptsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -218,7 +218,7 @@ func ExampleScriptsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoScriptsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsDelete.json func ExampleScriptsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -239,7 +239,7 @@ func ExampleScriptsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoScriptsCheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCheckNameAvailability.json func ExampleScriptsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/kusto/armkusto/skus_client.go b/sdk/resourcemanager/kusto/armkusto/skus_client.go index ac8fd77f4022..b2f1e5de43f7 100644 --- a/sdk/resourcemanager/kusto/armkusto/skus_client.go +++ b/sdk/resourcemanager/kusto/armkusto/skus_client.go @@ -29,8 +29,7 @@ type SKUsClient struct { } // NewSKUsClient creates a new instance of SKUsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { @@ -47,8 +46,8 @@ func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, opt // NewListPager - Lists eligible region SKUs for Kusto resource provider by Azure region. // -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. +// Generated from API version 2023-05-02 +// - location - The name of Azure region. // - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. func (client *SKUsClient) NewListPager(location string, options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ @@ -88,7 +87,7 @@ func (client *SKUsClient) listCreateRequest(ctx context.Context, location string return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2023-05-02") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/kusto/armkusto/skus_client_example_test.go b/sdk/resourcemanager/kusto/armkusto/skus_client_example_test.go index ba14adb7a31d..1a65436f9805 100644 --- a/sdk/resourcemanager/kusto/armkusto/skus_client_example_test.go +++ b/sdk/resourcemanager/kusto/armkusto/skus_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSkus.json func ExampleSKUsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {