diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/CHANGELOG.md b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/CHANGELOG.md index 3f0dd043ae3c..60420653e794 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/CHANGELOG.md +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/CHANGELOG.md @@ -1,5 +1,59 @@ # Release History +## 4.0.0-beta.3 (2023-10-30) +### Features Added + +- New value `MigrationStateCleaningUp`, `MigrationStateValidationFailed` added to enum type `MigrationState` +- New value `MigrationSubStateCancelingRequestedDBMigrations`, `MigrationSubStateValidationInProgress` added to enum type `MigrationSubState` +- New enum type `MigrationDbState` with values `MigrationDbStateCanceled`, `MigrationDbStateCanceling`, `MigrationDbStateFailed`, `MigrationDbStateInProgress`, `MigrationDbStateSucceeded`, `MigrationDbStateWaitingForCutoverTrigger` +- New enum type `MigrationOption` with values `MigrationOptionMigrate`, `MigrationOptionValidate`, `MigrationOptionValidateAndMigrate` +- New enum type `ReplicationPromoteMode` with values `ReplicationPromoteModeSiteswap`, `ReplicationPromoteModeStandalone` +- New enum type `ReplicationPromoteOption` with values `ReplicationPromoteOptionForced`, `ReplicationPromoteOptionPlanned` +- New enum type `SSLMode` with values `SSLModeAllow`, `SSLModeDisable`, `SSLModePrefer`, `SSLModeRequire`, `SSLModeVerifyCA`, `SSLModeVerifyFull` +- New enum type `SourceType` with values `SourceTypeAWS`, `SourceTypeAzureVM`, `SourceTypeGCP`, `SourceTypeOnPremises`, `SourceTypePostgreSQLSingleServer` +- New enum type `ThreatProtectionName` with values `ThreatProtectionNameDefault` +- New enum type `ThreatProtectionState` with values `ThreatProtectionStateDisabled`, `ThreatProtectionStateEnabled` +- New enum type `ValidationState` with values `ValidationStateFailed`, `ValidationStateSucceeded`, `ValidationStateWarning` +- New enum type `VirtualEndpointType` with values `VirtualEndpointTypeReadWrite` +- New function `*ClientFactory.NewQuotaUsagesClient() *QuotaUsagesClient` +- New function `*ClientFactory.NewServerThreatProtectionSettingsClient() *ServerThreatProtectionSettingsClient` +- New function `*ClientFactory.NewVirtualEndpointsClient() *VirtualEndpointsClient` +- New function `NewQuotaUsagesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*QuotaUsagesClient, error)` +- New function `*QuotaUsagesClient.NewGetPager(string, *QuotaUsagesClientGetOptions) *runtime.Pager[QuotaUsagesClientGetResponse]` +- New function `NewServerThreatProtectionSettingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ServerThreatProtectionSettingsClient, error)` +- New function `*ServerThreatProtectionSettingsClient.BeginCreateOrUpdate(context.Context, string, string, ThreatProtectionName, ServerThreatProtectionSettingsModel, *ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerThreatProtectionSettingsClientCreateOrUpdateResponse], error)` +- New function `*ServerThreatProtectionSettingsClient.Get(context.Context, string, string, ThreatProtectionName, *ServerThreatProtectionSettingsClientGetOptions) (ServerThreatProtectionSettingsClientGetResponse, error)` +- New function `*ServerThreatProtectionSettingsClient.NewListByServerPager(string, string, *ServerThreatProtectionSettingsClientListByServerOptions) *runtime.Pager[ServerThreatProtectionSettingsClientListByServerResponse]` +- New function `NewVirtualEndpointsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VirtualEndpointsClient, error)` +- New function `*VirtualEndpointsClient.BeginCreate(context.Context, string, string, string, VirtualEndpointResource, *VirtualEndpointsClientBeginCreateOptions) (*runtime.Poller[VirtualEndpointsClientCreateResponse], error)` +- New function `*VirtualEndpointsClient.BeginDelete(context.Context, string, string, string, *VirtualEndpointsClientBeginDeleteOptions) (*runtime.Poller[VirtualEndpointsClientDeleteResponse], error)` +- New function `*VirtualEndpointsClient.Get(context.Context, string, string, string, *VirtualEndpointsClientGetOptions) (VirtualEndpointsClientGetResponse, error)` +- New function `*VirtualEndpointsClient.NewListByServerPager(string, string, *VirtualEndpointsClientListByServerOptions) *runtime.Pager[VirtualEndpointsClientListByServerResponse]` +- New function `*VirtualEndpointsClient.BeginUpdate(context.Context, string, string, string, VirtualEndpointResourceForPatch, *VirtualEndpointsClientBeginUpdateOptions) (*runtime.Poller[VirtualEndpointsClientUpdateResponse], error)` +- New struct `DbLevelValidationStatus` +- New struct `DbMigrationStatus` +- New struct `NameProperty` +- New struct `QuotaUsage` +- New struct `QuotaUsagesListResult` +- New struct `Replica` +- New struct `ServerThreatProtectionListResult` +- New struct `ServerThreatProtectionProperties` +- New struct `ServerThreatProtectionSettingsModel` +- New struct `ValidationDetails` +- New struct `ValidationMessage` +- New struct `ValidationSummaryItem` +- New struct `VirtualEndpointResource` +- New struct `VirtualEndpointResourceForPatch` +- New struct `VirtualEndpointResourceProperties` +- New struct `VirtualEndpointsListResult` +- New field `MigrationOption`, `SSLMode`, `SourceType` in struct `MigrationResourceProperties` +- New field `DbDetails`, `ValidationDetails` in struct `MigrationSubStateDetails` +- New field `Replica` in struct `ServerProperties` +- New field `Replica` in struct `ServerPropertiesForUpdate` +- New field `Throughput`, `Type` in struct `Storage` +- New field `MaximumStorageSizeMb`, `SupportedMaximumIops`, `SupportedMaximumThroughput`, `SupportedThroughput` in struct `StorageMbCapability` + + ## 4.0.0-beta.2 (2023-10-27) ### Breaking Changes diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client.go index 8fba366f5442..3a4b80a3c962 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client.go @@ -46,7 +46,7 @@ func NewAdministratorsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreate - Creates a new server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - objectID - Guid of the objectId for the administrator. @@ -71,7 +71,7 @@ func (client *AdministratorsClient) BeginCreate(ctx context.Context, resourceGro // Create - Creates a new server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *AdministratorsClient) create(ctx context.Context, resourceGroupName string, serverName string, objectID string, parameters ActiveDirectoryAdministratorAdd, options *AdministratorsClientBeginCreateOptions) (*http.Response, error) { var err error req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, objectID, parameters, options) @@ -113,7 +113,7 @@ func (client *AdministratorsClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -125,7 +125,7 @@ func (client *AdministratorsClient) createCreateRequest(ctx context.Context, res // BeginDelete - Deletes an Active Directory Administrator associated with the server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - objectID - Guid of the objectId for the administrator. @@ -149,7 +149,7 @@ func (client *AdministratorsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes an Active Directory Administrator associated with the server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *AdministratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, objectID string, options *AdministratorsClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, objectID, options) @@ -191,7 +191,7 @@ func (client *AdministratorsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -200,7 +200,7 @@ func (client *AdministratorsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets information about a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - objectID - Guid of the objectId for the administrator. @@ -247,7 +247,7 @@ func (client *AdministratorsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *AdministratorsClient) getHandleResponse(resp *http.Response) (Admi // NewListByServerPager - List all the AAD administrators for a given server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - AdministratorsClientListByServerOptions contains the optional parameters for the AdministratorsClient.NewListByServerPager @@ -317,7 +317,7 @@ func (client *AdministratorsClient) listByServerCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client_example_test.go deleted file mode 100644 index 3797bb357570..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/administrators_client_example_test.go +++ /dev/null @@ -1,159 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/AdministratorAdd.json -func ExampleAdministratorsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAdministratorsClient().BeginCreate(ctx, "testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", armpostgresqlflexibleservers.ActiveDirectoryAdministratorAdd{ - Properties: &armpostgresqlflexibleservers.AdministratorPropertiesForAdd{ - PrincipalName: to.Ptr("testuser1@microsoft.com"), - PrincipalType: to.Ptr(armpostgresqlflexibleservers.PrincipalTypeUser), - TenantID: to.Ptr("tttttttt-tttt-tttt-tttt-tttttttttttt"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ActiveDirectoryAdministrator = armpostgresqlflexibleservers.ActiveDirectoryAdministrator{ - // Name: to.Ptr("testuser1@microsoft.com"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/administrators"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/administrators/oooooooo-oooo-oooo-oooo-oooooooooooo"), - // Properties: &armpostgresqlflexibleservers.AdministratorProperties{ - // ObjectID: to.Ptr("oooooooo-oooo-oooo-oooo-oooooooooooo"), - // PrincipalName: to.Ptr("testuser1@microsoft.com"), - // PrincipalType: to.Ptr(armpostgresqlflexibleservers.PrincipalTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/AdministratorDelete.json -func ExampleAdministratorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAdministratorsClient().BeginDelete(ctx, "testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/AdministratorGet.json -func ExampleAdministratorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAdministratorsClient().Get(ctx, "testrg", "pgtestsvc1", "oooooooo-oooo-oooo-oooo-oooooooooooo", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ActiveDirectoryAdministrator = armpostgresqlflexibleservers.ActiveDirectoryAdministrator{ - // Name: to.Ptr("testuser1@microsoft.com"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/administrators"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1/administrators/oooooooo-oooo-oooo-oooo-oooooooooooo"), - // Properties: &armpostgresqlflexibleservers.AdministratorProperties{ - // ObjectID: to.Ptr("oooooooo-oooo-oooo-oooo-oooooooooooo"), - // PrincipalName: to.Ptr("testuer1@microsoft.com"), - // PrincipalType: to.Ptr(armpostgresqlflexibleservers.PrincipalTypeUser), - // TenantID: to.Ptr("tttttttt-tttt-tttt-tttt-tttttttttttt"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/AdministratorsListByServer.json -func ExampleAdministratorsClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAdministratorsClient().NewListByServerPager("testrg", "pgtestsvc1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AdministratorListResult = armpostgresqlflexibleservers.AdministratorListResult{ - // Value: []*armpostgresqlflexibleservers.ActiveDirectoryAdministrator{ - // { - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/administrators"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1/administrators/oooooooo-oooo-oooo-oooo-oooooooooooo"), - // Properties: &armpostgresqlflexibleservers.AdministratorProperties{ - // ObjectID: to.Ptr("oooooooo-oooo-oooo-oooo-oooooooooooo"), - // PrincipalName: to.Ptr("testuer1@microsoft.com"), - // PrincipalType: to.Ptr(armpostgresqlflexibleservers.PrincipalTypeUser), - // TenantID: to.Ptr("tttttttt-tttt-tttt-tttt-tttttttttttt"), - // }, - // }, - // { - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/administrators"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1/administrators/gggggggg-gggg-gggg-gggg-gggggggggggg"), - // Properties: &armpostgresqlflexibleservers.AdministratorProperties{ - // ObjectID: to.Ptr("gggggggg-gggg-gggg-gggg-gggggggggggg"), - // PrincipalName: to.Ptr("testgroup1@microsoft.com"), - // PrincipalType: to.Ptr(armpostgresqlflexibleservers.PrincipalTypeGroup), - // TenantID: to.Ptr("tttttttt-tttt-tttt-tttt-tttttttttttt"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/autorest.md b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/autorest.md index 79e479ca69d3..e9d54f0b75d4 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/autorest.md +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/autorest.md @@ -5,10 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/postgresql/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/postgresql/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 4.0.0-beta.2 +module-version: 4.0.0-beta.3 package-flexibleservers: true -tag: package-flexibleserver-2023-03-01-preview ``` \ No newline at end of file diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client.go index d8e116d0f07c..ea65a83062b6 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client.go @@ -46,7 +46,7 @@ func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, // Get - Get specific backup for a given server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - backupName - The name of the backup. @@ -93,7 +93,7 @@ func (client *BackupsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,7 +110,7 @@ func (client *BackupsClient) getHandleResponse(resp *http.Response) (BackupsClie // NewListByServerPager - List all the backups for a given server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - BackupsClientListByServerOptions contains the optional parameters for the BackupsClient.NewListByServerPager @@ -163,7 +163,7 @@ func (client *BackupsClient) listByServerCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client_example_test.go deleted file mode 100644 index e225ee090ca6..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/backups_client_example_test.go +++ /dev/null @@ -1,186 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/BackupGet.json -func ExampleBackupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewBackupsClient().Get(ctx, "TestGroup", "postgresqltestserver", "daily_20210615T160516", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerBackup = armpostgresqlflexibleservers.ServerBackup{ - // Name: to.Ptr("daily_20210615T160516"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210615T160516"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T16:05:19.902522+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/BackupListByServer.json -func ExampleBackupsClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBackupsClient().NewListByServerPager("TestGroup", "postgresqltestserver", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerBackupListResult = armpostgresqlflexibleservers.ServerBackupListResult{ - // Value: []*armpostgresqlflexibleservers.ServerBackup{ - // { - // Name: to.Ptr("daily_20210615T160516"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210615T160516"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-15T16:05:19.902522+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210616T160520"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210616T160520"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T16:05:23.9243453+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210617T160525"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210617T160525"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T16:05:28.1247488+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210618T160529"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210618T160529"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-18T16:05:32.2736701+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210619T160533"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210619T160533"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-19T16:05:36.8603354+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210620T160538"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210620T160538"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-20T16:05:41.9200138+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210621T160543"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210621T160543"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-21T16:05:48.8528447+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210622T160803"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210622T160803"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-22T16:08:06.3121688+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210622T210807"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210622T210807"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-22T21:08:10.5057354+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210623T212413"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210623T212413"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-23T21:24:16.9401531+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }, - // { - // Name: to.Ptr("daily_20210624T061328"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/backups"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestserver/backups/daily_20210624T061328"), - // Properties: &armpostgresqlflexibleservers.ServerBackupProperties{ - // BackupType: to.Ptr(armpostgresqlflexibleservers.OriginFull), - // CompletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-24T06:13:31.4962137+00:00"); return t}()), - // Source: to.Ptr("Automatic"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client.go index 164f96ce66ae..038c571d0d7b 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client.go @@ -46,7 +46,7 @@ func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.Tok // Execute - Check the availability of name for resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - nameAvailabilityRequest - The required parameters for checking if resource name is available. // - options - CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute // method. @@ -80,7 +80,7 @@ func (client *CheckNameAvailabilityClient) executeCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, nameAvailabilityRequest); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client_example_test.go deleted file mode 100644 index bea6dd761964..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailability_client_example_test.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/CheckNameAvailability.json -func ExampleCheckNameAvailabilityClient_Execute() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCheckNameAvailabilityClient().Execute(ctx, armpostgresqlflexibleservers.CheckNameAvailabilityRequest{ - Name: to.Ptr("name1"), - Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NameAvailability = armpostgresqlflexibleservers.NameAvailability{ - // Message: to.Ptr(""), - // NameAvailable: to.Ptr(true), - // Name: to.Ptr("name1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client.go index caf96e9fbc54..e557b6edbac9 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client.go @@ -46,7 +46,7 @@ func NewCheckNameAvailabilityWithLocationClient(subscriptionID string, credentia // Execute - Check the availability of name for resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - locationName - The name of the location. // - nameAvailabilityRequest - The required parameters for checking if resource name is available. // - options - CheckNameAvailabilityWithLocationClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityWithLocationClient.Execute @@ -85,7 +85,7 @@ func (client *CheckNameAvailabilityWithLocationClient) executeCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, nameAvailabilityRequest); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client_example_test.go deleted file mode 100644 index 1cc54296a9f1..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/checknameavailabilitywithlocation_client_example_test.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/CheckNameAvailabilityLocationBased.json -func ExampleCheckNameAvailabilityWithLocationClient_Execute() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCheckNameAvailabilityWithLocationClient().Execute(ctx, "westus", armpostgresqlflexibleservers.CheckNameAvailabilityRequest{ - Name: to.Ptr("name1"), - Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NameAvailability = armpostgresqlflexibleservers.NameAvailability{ - // Message: to.Ptr(""), - // NameAvailable: to.Ptr(true), - // Name: to.Ptr("name1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/client_factory.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/client_factory.go index 5161d167ad41..17a57307dec8 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/client_factory.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/client_factory.go @@ -112,6 +112,11 @@ func (c *ClientFactory) NewPostgreSQLManagementClient() *PostgreSQLManagementCli return subClient } +func (c *ClientFactory) NewQuotaUsagesClient() *QuotaUsagesClient { + subClient, _ := NewQuotaUsagesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewReplicasClient() *ReplicasClient { subClient, _ := NewReplicasClient(c.subscriptionID, c.credential, c.options) return subClient @@ -122,11 +127,21 @@ func (c *ClientFactory) NewServerCapabilitiesClient() *ServerCapabilitiesClient return subClient } +func (c *ClientFactory) NewServerThreatProtectionSettingsClient() *ServerThreatProtectionSettingsClient { + subClient, _ := NewServerThreatProtectionSettingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewServersClient() *ServersClient { subClient, _ := NewServersClient(c.subscriptionID, c.credential, c.options) return subClient } +func (c *ClientFactory) NewVirtualEndpointsClient() *VirtualEndpointsClient { + subClient, _ := NewVirtualEndpointsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewVirtualNetworkSubnetUsageClient() *VirtualNetworkSubnetUsageClient { subClient, _ := NewVirtualNetworkSubnetUsageClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client.go index 4085ede07844..b88d59659552 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client.go @@ -46,7 +46,7 @@ func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCrede // Get - Gets information about a configuration of server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - configurationName - The name of the server configuration. @@ -93,7 +93,7 @@ func (client *ConfigurationsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,7 +110,7 @@ func (client *ConfigurationsClient) getHandleResponse(resp *http.Response) (Conf // NewListByServerPager - List all the configurations in a given server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.NewListByServerPager @@ -163,7 +163,7 @@ func (client *ConfigurationsClient) listByServerCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +181,7 @@ func (client *ConfigurationsClient) listByServerHandleResponse(resp *http.Respon // BeginPut - Updates a configuration of a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - configurationName - The name of the server configuration. @@ -205,7 +205,7 @@ func (client *ConfigurationsClient) BeginPut(ctx context.Context, resourceGroupN // Put - Updates a configuration of a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ConfigurationsClient) put(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginPutOptions) (*http.Response, error) { var err error req, err := client.putCreateRequest(ctx, resourceGroupName, serverName, configurationName, parameters, options) @@ -247,7 +247,7 @@ func (client *ConfigurationsClient) putCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -259,7 +259,7 @@ func (client *ConfigurationsClient) putCreateRequest(ctx context.Context, resour // BeginUpdate - Updates a configuration of a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - configurationName - The name of the server configuration. @@ -284,7 +284,7 @@ func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGro // Update - Updates a configuration of a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ConfigurationsClient) update(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters ConfigurationForUpdate, options *ConfigurationsClientBeginUpdateOptions) (*http.Response, error) { var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, configurationName, parameters, options) @@ -326,7 +326,7 @@ func (client *ConfigurationsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client_example_test.go deleted file mode 100644 index fbc63efeae00..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/configurations_client_example_test.go +++ /dev/null @@ -1,2007 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ConfigurationListByServer.json -func ExampleConfigurationsClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConfigurationsClient().NewListByServerPager("testrg", "testserver", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ConfigurationListResult = armpostgresqlflexibleservers.ConfigurationListResult{ - // Value: []*armpostgresqlflexibleservers.Configuration{ - // { - // Name: to.Ptr("application_name"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/application_name"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the application name to be reported in statistics and logs."), - // AllowedValues: to.Ptr("[A-Za-z0-9._-]*"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr(""), - // Source: to.Ptr("system-default"), - // Value: to.Ptr(""), - // }, - // }, - // { - // Name: to.Ptr("array_nulls"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/array_nulls"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables input of NULL elements in arrays."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Starts the autovacuum subprocess."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_analyze_scale_factor"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_analyze_scale_factor"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples."), - // AllowedValues: to.Ptr("0-100"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.1"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_analyze_threshold"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_analyze_threshold"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Minimum number of tuple inserts, updates, or deletes prior to analyze."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("50"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("50"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_naptime"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_naptime"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Time to sleep between autovacuum runs."), - // AllowedValues: to.Ptr("1-2147483"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("60"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("60"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_vacuum_cost_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_vacuum_cost_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost delay in milliseconds, for autovacuum."), - // AllowedValues: to.Ptr("-1-100"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("2"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_vacuum_cost_limit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_vacuum_cost_limit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost amount available before napping, for autovacuum."), - // AllowedValues: to.Ptr("-1-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("-1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("-1"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_vacuum_scale_factor"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_vacuum_scale_factor"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Number of tuple updates or deletes prior to vacuum as a fraction of reltuples."), - // AllowedValues: to.Ptr("0-100"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.2"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_vacuum_threshold"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_vacuum_threshold"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Minimum number of tuple updates or deletes prior to vacuum."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("50"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("50"), - // }, - // }, - // { - // Name: to.Ptr("autovacuum_work_mem"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/autovacuum_work_mem"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum memory to be used by each autovacuum worker process."), - // AllowedValues: to.Ptr("-1-2097151"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("-1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("-1"), - // }, - // }, - // { - // Name: to.Ptr("backend_flush_after"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/backend_flush_after"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Number of pages after which previously performed writes are flushed to disk."), - // AllowedValues: to.Ptr("0-256"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("backslash_quote"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/backslash_quote"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets whether \"\\'\" is allowed in string literals."), - // AllowedValues: to.Ptr("safe_encoding,on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("safe_encoding"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("safe_encoding"), - // }, - // }, - // { - // Name: to.Ptr("bgwriter_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/bgwriter_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Background writer sleep time between rounds."), - // AllowedValues: to.Ptr("10-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("200"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("200"), - // }, - // }, - // { - // Name: to.Ptr("bgwriter_flush_after"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/bgwriter_flush_after"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Number of pages after which previously performed writes are flushed to disk."), - // AllowedValues: to.Ptr("0-256"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("64"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("64"), - // }, - // }, - // { - // Name: to.Ptr("bgwriter_lru_maxpages"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/bgwriter_lru_maxpages"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Background writer maximum number of LRU pages to flush per round."), - // AllowedValues: to.Ptr("0-1073741823"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("100"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("100"), - // }, - // }, - // { - // Name: to.Ptr("bgwriter_lru_multiplier"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/bgwriter_lru_multiplier"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Multiple of the average buffer usage to free per round."), - // AllowedValues: to.Ptr("0-10"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("2"), - // }, - // }, - // { - // Name: to.Ptr("bytea_output"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/bytea_output"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the output format for bytea."), - // AllowedValues: to.Ptr("escape,hex"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("hex"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("hex"), - // }, - // }, - // { - // Name: to.Ptr("check_function_bodies"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/check_function_bodies"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Checks function bodies during CREATE FUNCTION."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("checkpoint_completion_target"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/checkpoint_completion_target"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval."), - // AllowedValues: to.Ptr("0-1"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.5"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.5"), - // }, - // }, - // { - // Name: to.Ptr("checkpoint_timeout"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/checkpoint_timeout"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum time between automatic WAL checkpoints."), - // AllowedValues: to.Ptr("30-86400"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("300"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("300"), - // }, - // }, - // { - // Name: to.Ptr("checkpoint_warning"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/checkpoint_warning"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables warnings if checkpoint segments are filled more frequently than this."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("30"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("30"), - // }, - // }, - // { - // Name: to.Ptr("client_encoding"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/client_encoding"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the client's character set encoding."), - // AllowedValues: to.Ptr("BIG5,EUC_CN,EUC_JP,EUC_JIS_2004,EUC_KR,EUC_TW,GB18030,GBK,ISO_8859_5,ISO_8859_6,ISO_8859_7,ISO_8859_8,JOHAB,KOI8R,KOI8U,LATIN1,LATIN2,LATIN3,LATIN4,LATIN5,LATIN6,LATIN7,LATIN8,LATIN9,LATIN10,MULE_INTERNAL,SJIS,SHIFT_JIS_2004,SQL_ASCII,UHC,UTF8,WIN866,WIN874,WIN1250,WIN1251,WIN1252,WIN1253,WIN1254,WIN1255,WIN1256,WIN1257,WIN1258"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("sql_ascii"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("sql_ascii"), - // }, - // }, - // { - // Name: to.Ptr("client_min_messages"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/client_min_messages"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the message levels that are sent to the client."), - // AllowedValues: to.Ptr("debug5,debug4,debug3,debug2,debug1,log,notice,warning,error"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("notice"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("notice"), - // }, - // }, - // { - // Name: to.Ptr("commit_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/commit_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the delay in microseconds between transaction commit and flushing WAL to disk."), - // AllowedValues: to.Ptr("0-100000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("commit_siblings"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/commit_siblings"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the minimum concurrent open transactions before performing commit_delay."), - // AllowedValues: to.Ptr("0-1000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("5"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("5"), - // }, - // }, - // { - // Name: to.Ptr("constraint_exclusion"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/constraint_exclusion"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner to use constraints to optimize queries."), - // AllowedValues: to.Ptr("partition,on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("partition"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("partition"), - // }, - // }, - // { - // Name: to.Ptr("cpu_index_tuple_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/cpu_index_tuple_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of processing each index entry during an index scan."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.005"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.005"), - // }, - // }, - // { - // Name: to.Ptr("cpu_operator_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/cpu_operator_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of processing each operator or function call."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.0025"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.0025"), - // }, - // }, - // { - // Name: to.Ptr("cpu_tuple_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/cpu_tuple_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of processing each tuple (row)."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.01"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.01"), - // }, - // }, - // { - // Name: to.Ptr("cursor_tuple_fraction"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/cursor_tuple_fraction"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the fraction of a cursor's rows that will be retrieved."), - // AllowedValues: to.Ptr("0-1"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.1"), - // }, - // }, - // { - // Name: to.Ptr("DateStyle"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/DateStyle"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the display format for date and time values."), - // AllowedValues: to.Ptr("(ISO|POSTGRES|SQL|GERMAN)(, (DMY|MDY|YMD))?"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr("ISO, MDY"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("ISO, MDY"), - // }, - // }, - // { - // Name: to.Ptr("deadlock_timeout"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/deadlock_timeout"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the amount of time, in milliseconds, to wait on a lock before checking for deadlock."), - // AllowedValues: to.Ptr("1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("1000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1000"), - // }, - // }, - // { - // Name: to.Ptr("debug_pretty_print"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/debug_pretty_print"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Indents parse and plan tree displays."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("debug_print_parse"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/debug_print_parse"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs each query's parse tree."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("debug_print_plan"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/debug_print_plan"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs each query's execution plan."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("debug_print_rewritten"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/debug_print_rewritten"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs each query's rewritten parse tree."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("default_statistics_target"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_statistics_target"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the default statistics target."), - // AllowedValues: to.Ptr("1-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("100"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("100"), - // }, - // }, - // { - // Name: to.Ptr("default_tablespace"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_tablespace"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the default tablespace to create tables and indexes in."), - // AllowedValues: to.Ptr("[A-Za-z._]*"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr(""), - // Source: to.Ptr("system-default"), - // Value: to.Ptr(""), - // }, - // }, - // { - // Name: to.Ptr("default_text_search_config"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_text_search_config"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets default text search configuration."), - // AllowedValues: to.Ptr("[A-Za-z._]+"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr("pg_catalog.english"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("pg_catalog.english"), - // }, - // }, - // { - // Name: to.Ptr("default_transaction_deferrable"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_transaction_deferrable"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the default deferrable status of new transactions."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("default_transaction_isolation"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_transaction_isolation"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the transaction isolation level of each new transaction."), - // AllowedValues: to.Ptr("serializable,repeatable read,read committed,read uncommitted"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("read committed"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("read committed"), - // }, - // }, - // { - // Name: to.Ptr("default_transaction_read_only"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_transaction_read_only"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the default read-only status of new transactions."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("default_with_oids"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/default_with_oids"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Creates new tables with OIDs by default."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("effective_cache_size"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/effective_cache_size"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's assumption about the size of the disk cache."), - // AllowedValues: to.Ptr("1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("3145728"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("3145728"), - // }, - // }, - // { - // Name: to.Ptr("enable_bitmapscan"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_bitmapscan"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of bitmap-scan plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_gathermerge"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_gathermerge"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of gather merge plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_hashagg"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_hashagg"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of hashed aggregation plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_hashjoin"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_hashjoin"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of hash join plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_indexonlyscan"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_indexonlyscan"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of index-only-scan plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_indexscan"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_indexscan"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of index-scan plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_material"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_material"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of materialization."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_mergejoin"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_mergejoin"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of merge join plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_nestloop"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_nestloop"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of nested loop join plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_seqscan"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_seqscan"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of sequential-scan plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_sort"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_sort"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of explicit sort steps."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("enable_tidscan"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/enable_tidscan"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables the planner's use of TID scan plans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("escape_string_warning"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/escape_string_warning"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Warns about backslash escapes in ordinary string literals."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("exit_on_error"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/exit_on_error"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Terminates session on any error."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("extra_float_digits"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/extra_float_digits"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the number of digits displayed for floating-point values."), - // AllowedValues: to.Ptr("-15-3"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1"), - // }, - // }, - // { - // Name: to.Ptr("force_parallel_mode"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/force_parallel_mode"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Forces use of parallel query facilities."), - // AllowedValues: to.Ptr("off,on,regress"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("from_collapse_limit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/from_collapse_limit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the FROM-list size beyond which subqueries are not collapsed."), - // AllowedValues: to.Ptr("1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("8"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("8"), - // }, - // }, - // { - // Name: to.Ptr("geqo"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables genetic query optimization."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("geqo_effort"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo_effort"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("GEQO: effort is used to set the default for other GEQO parameters."), - // AllowedValues: to.Ptr("1-10"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("5"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("5"), - // }, - // }, - // { - // Name: to.Ptr("geqo_generations"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo_generations"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("GEQO: number of iterations of the algorithm."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("geqo_pool_size"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo_pool_size"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("GEQO: number of individuals in the population."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("geqo_seed"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo_seed"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("GEQO: seed for random path selection."), - // AllowedValues: to.Ptr("0-1"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("geqo_selection_bias"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo_selection_bias"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("GEQO: selective pressure within the population."), - // AllowedValues: to.Ptr("1.5-2"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("2"), - // }, - // }, - // { - // Name: to.Ptr("geqo_threshold"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/geqo_threshold"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the threshold of FROM items beyond which GEQO is used."), - // AllowedValues: to.Ptr("2-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("12"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("12"), - // }, - // }, - // { - // Name: to.Ptr("gin_fuzzy_search_limit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/gin_fuzzy_search_limit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum allowed result for exact search by GIN."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("gin_pending_list_limit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/gin_pending_list_limit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum size of the pending list for GIN index."), - // AllowedValues: to.Ptr("64-2097151"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("4096"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("4096"), - // }, - // }, - // { - // Name: to.Ptr("idle_in_transaction_session_timeout"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/idle_in_transaction_session_timeout"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum allowed duration of any idling transaction."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("IntervalStyle"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/IntervalStyle"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the display format for interval values."), - // AllowedValues: to.Ptr("postgres,postgres_verbose,sql_standard,iso_8601"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("postgres"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("postgres"), - // }, - // }, - // { - // Name: to.Ptr("join_collapse_limit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/join_collapse_limit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the FROM-list size beyond which JOIN constructs are not flattened."), - // AllowedValues: to.Ptr("1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("8"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("8"), - // }, - // }, - // { - // Name: to.Ptr("lc_monetary"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/lc_monetary"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the locale for formatting monetary amounts."), - // AllowedValues: to.Ptr("[A-Za-z0-9._ -]+"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr("en_US.utf-8"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("en_US.utf-8"), - // }, - // }, - // { - // Name: to.Ptr("lc_numeric"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/lc_numeric"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the locale for formatting numbers."), - // AllowedValues: to.Ptr("[A-Za-z0-9._ -]+"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr("en_US.utf-8"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("en_US.utf-8"), - // }, - // }, - // { - // Name: to.Ptr("lo_compat_privileges"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/lo_compat_privileges"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables backward compatibility mode for privilege checks on large objects."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("lock_timeout"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/lock_timeout"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum allowed duration (in milliseconds) of any wait for a lock. 0 turns this off."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("log_autovacuum_min_duration"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_autovacuum_min_duration"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the minimum execution time above which autovacuum actions will be logged."), - // AllowedValues: to.Ptr("-1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("-1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("-1"), - // }, - // }, - // { - // Name: to.Ptr("log_checkpoints"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_checkpoints"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs each checkpoint."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("log_connections"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_connections"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs each successful connection."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("log_destination"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_destination"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the destination for server log output."), - // AllowedValues: to.Ptr("stderr,csvlog"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("stderr"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("stderr"), - // }, - // }, - // { - // Name: to.Ptr("log_disconnections"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_disconnections"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs end of a session, including duration."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("log_duration"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_duration"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs the duration of each completed SQL statement."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("log_error_verbosity"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_error_verbosity"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the verbosity of logged messages."), - // AllowedValues: to.Ptr("terse,default,verbose"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("default"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("default"), - // }, - // }, - // { - // Name: to.Ptr("log_lock_waits"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_lock_waits"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs long lock waits."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("log_min_duration_statement"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_min_duration_statement"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the minimum execution time (in milliseconds) above which statements will be logged. -1 disables logging statement durations."), - // AllowedValues: to.Ptr("-1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("-1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("-1"), - // }, - // }, - // { - // Name: to.Ptr("log_min_error_statement"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_min_error_statement"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Causes all statements generating error at or above this level to be logged."), - // AllowedValues: to.Ptr("debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal,panic"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("error"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("error"), - // }, - // }, - // { - // Name: to.Ptr("log_min_messages"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_min_messages"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the message levels that are logged."), - // AllowedValues: to.Ptr("debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal,panic"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("warning"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("warning"), - // }, - // }, - // { - // Name: to.Ptr("log_replication_commands"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_replication_commands"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs each replication command."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("log_statement"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_statement"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the type of statements logged."), - // AllowedValues: to.Ptr("none,ddl,mod,all"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("none"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("none"), - // }, - // }, - // { - // Name: to.Ptr("log_statement_stats"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_statement_stats"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("For each query, writes cumulative performance statistics to the server log."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("log_temp_files"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/log_temp_files"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Logs the use of temporary files larger than this number of kilobytes."), - // AllowedValues: to.Ptr("-1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("-1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("-1"), - // }, - // }, - // { - // Name: to.Ptr("maintenance_work_mem"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/maintenance_work_mem"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum memory to be used for maintenance operations."), - // AllowedValues: to.Ptr("1024-2097151"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("332800"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("332800"), - // }, - // }, - // { - // Name: to.Ptr("max_parallel_workers"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_parallel_workers"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum number of parallel workers than can be active at one time."), - // AllowedValues: to.Ptr("0-1024"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("8"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("8"), - // }, - // }, - // { - // Name: to.Ptr("max_parallel_workers_per_gather"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_parallel_workers_per_gather"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum number of parallel processes per executor node."), - // AllowedValues: to.Ptr("0-1024"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("2"), - // }, - // }, - // { - // Name: to.Ptr("max_pred_locks_per_page"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_pred_locks_per_page"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum number of predicate-locked tuples per page."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("2"), - // }, - // }, - // { - // Name: to.Ptr("max_pred_locks_per_relation"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_pred_locks_per_relation"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum number of predicate-locked pages and tuples per relation."), - // AllowedValues: to.Ptr("-2147483648-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("-2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("-2"), - // }, - // }, - // { - // Name: to.Ptr("max_standby_archive_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_standby_archive_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data."), - // AllowedValues: to.Ptr("-1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("30000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("30000"), - // }, - // }, - // { - // Name: to.Ptr("max_standby_streaming_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_standby_streaming_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data."), - // AllowedValues: to.Ptr("-1-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("30000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("30000"), - // }, - // }, - // { - // Name: to.Ptr("max_sync_workers_per_subscription"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_sync_workers_per_subscription"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Maximum number of table synchronization workers per subscription."), - // AllowedValues: to.Ptr("0-262143"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("2"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("2"), - // }, - // }, - // { - // Name: to.Ptr("max_wal_size"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/max_wal_size"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the WAL size that triggers a checkpoint."), - // AllowedValues: to.Ptr("2-2097151"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("1024"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1024"), - // }, - // }, - // { - // Name: to.Ptr("min_parallel_index_scan_size"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/min_parallel_index_scan_size"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the minimum amount of index data for a parallel scan."), - // AllowedValues: to.Ptr("0-715827882"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("64"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("64"), - // }, - // }, - // { - // Name: to.Ptr("min_parallel_table_scan_size"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/min_parallel_table_scan_size"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the minimum amount of table data for a parallel scan."), - // AllowedValues: to.Ptr("0-715827882"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("1024"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1024"), - // }, - // }, - // { - // Name: to.Ptr("min_wal_size"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/min_wal_size"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the minimum size to shrink the WAL to."), - // AllowedValues: to.Ptr("2-2097151"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("80"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("80"), - // }, - // }, - // { - // Name: to.Ptr("operator_precedence_warning"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/operator_precedence_warning"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Emits a warning for constructs that changed meaning since PostgreSQL 9.4."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("parallel_setup_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/parallel_setup_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of starting up worker processes for parallel query."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("1000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1000"), - // }, - // }, - // { - // Name: to.Ptr("parallel_tuple_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/parallel_tuple_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of passing each tuple (row) from worker to master backend."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("0.1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0.1"), - // }, - // }, - // { - // Name: to.Ptr("quote_all_identifiers"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/quote_all_identifiers"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("When generating SQL fragments, quotes all identifiers."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("random_page_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/random_page_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of a nonsequentially fetched disk page."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("4"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("4"), - // }, - // }, - // { - // Name: to.Ptr("row_security"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/row_security"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables row security."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("search_path"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/search_path"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the schema search order for names that are not schema-qualified."), - // AllowedValues: to.Ptr("[A-Za-z.\"$, ]+"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr("\"$user\", public"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("\"$user\", public"), - // }, - // }, - // { - // Name: to.Ptr("seq_page_cost"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/seq_page_cost"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the planner's estimate of the cost of a sequentially fetched disk page."), - // AllowedValues: to.Ptr("0-1.79769e+308"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeNumeric), - // DefaultValue: to.Ptr("1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1"), - // }, - // }, - // { - // Name: to.Ptr("session_replication_role"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/session_replication_role"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the session's behavior for triggers and rewrite rules."), - // AllowedValues: to.Ptr("origin,replica,local"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("origin"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("origin"), - // }, - // }, - // { - // Name: to.Ptr("standard_conforming_strings"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/standard_conforming_strings"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Causes '...' strings to treat backslashes literally."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("statement_timeout"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/statement_timeout"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum allowed duration (in milliseconds) of any statement. 0 turns this off."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("synchronize_seqscans"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/synchronize_seqscans"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enables synchronized sequential scans."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("synchronous_commit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/synchronous_commit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the current transaction's synchronization level."), - // AllowedValues: to.Ptr("local,remote_write,on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("tcp_keepalives_count"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/tcp_keepalives_count"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Maximum number of TCP keepalive retransmits."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("9"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("9"), - // }, - // }, - // { - // Name: to.Ptr("tcp_keepalives_idle"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/tcp_keepalives_idle"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Time between issuing TCP keepalives."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("120"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("120"), - // }, - // }, - // { - // Name: to.Ptr("tcp_keepalives_interval"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/tcp_keepalives_interval"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Time between TCP keepalive retransmits."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("30"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("30"), - // }, - // }, - // { - // Name: to.Ptr("temp_buffers"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/temp_buffers"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum number of temporary buffers used by each database session."), - // AllowedValues: to.Ptr("100-1073741823"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("1024"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1024"), - // }, - // }, - // { - // Name: to.Ptr("temp_tablespaces"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/temp_tablespaces"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the tablespace(s) to use for temporary tables and sort files."), - // AllowedValues: to.Ptr("[A-Za-z._]*"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr(""), - // Source: to.Ptr("system-default"), - // Value: to.Ptr(""), - // }, - // }, - // { - // Name: to.Ptr("TimeZone"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/TimeZone"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the time zone for displaying and interpreting time stamps."), - // AllowedValues: to.Ptr("[A-Za-z0-9/+_-]+"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataType("String")), - // DefaultValue: to.Ptr("UTC"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("track_activities"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/track_activities"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Collects information about executing commands."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("track_counts"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/track_counts"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Collects statistics on database activity."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // }, - // { - // Name: to.Ptr("track_functions"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/track_functions"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Collects function-level statistics on database activity."), - // AllowedValues: to.Ptr("none,pl,all"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("none"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("none"), - // }, - // }, - // { - // Name: to.Ptr("track_io_timing"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/track_io_timing"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Collects timing statistics for database I/O activity."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("transform_null_equals"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/transform_null_equals"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Treats \"expr=NULL\" as \"expr IS NULL\"."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("off"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("off"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_cost_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_cost_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost delay in milliseconds."), - // AllowedValues: to.Ptr("0-100"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_cost_limit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_cost_limit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost amount available before napping."), - // AllowedValues: to.Ptr("1-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("200"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("200"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_cost_page_dirty"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_cost_page_dirty"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost for a page dirtied by vacuum."), - // AllowedValues: to.Ptr("0-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("20"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("20"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_cost_page_hit"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_cost_page_hit"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost for a page found in the buffer cache."), - // AllowedValues: to.Ptr("0-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("1"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("1"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_cost_page_miss"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_cost_page_miss"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Vacuum cost for a page not found in the buffer cache."), - // AllowedValues: to.Ptr("0-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("10"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("10"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_defer_cleanup_age"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_defer_cleanup_age"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Number of transactions by which VACUUM and HOT cleanup should be deferred, if any."), - // AllowedValues: to.Ptr("0-1000000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("0"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("0"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_freeze_min_age"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_freeze_min_age"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Minimum age at which VACUUM should freeze a table row."), - // AllowedValues: to.Ptr("0-1000000000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("50000000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("50000000"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_freeze_table_age"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_freeze_table_age"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Age at which VACUUM should scan whole table to freeze tuples."), - // AllowedValues: to.Ptr("0-2000000000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("150000000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("150000000"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_multixact_freeze_min_age"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_multixact_freeze_min_age"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Minimum age at which VACUUM should freeze a MultiXactId in a table row."), - // AllowedValues: to.Ptr("0-1000000000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("5000000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("5000000"), - // }, - // }, - // { - // Name: to.Ptr("vacuum_multixact_freeze_table_age"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/vacuum_multixact_freeze_table_age"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Multixact age at which VACUUM should scan whole table to freeze tuples."), - // AllowedValues: to.Ptr("0-2000000000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("150000000"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("150000000"), - // }, - // }, - // { - // Name: to.Ptr("wal_receiver_status_interval"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/wal_receiver_status_interval"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the maximum interval between WAL receiver status reports to the primary."), - // AllowedValues: to.Ptr("0-2147483"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("10"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("10"), - // }, - // }, - // { - // Name: to.Ptr("wal_writer_delay"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/wal_writer_delay"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Time between WAL flushes performed in the WAL writer."), - // AllowedValues: to.Ptr("1-10000"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("200"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("200"), - // }, - // }, - // { - // Name: to.Ptr("wal_writer_flush_after"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/wal_writer_flush_after"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Amount of WAL written out by WAL writer that triggers a flush."), - // AllowedValues: to.Ptr("0-2147483647"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("128"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("128"), - // }, - // }, - // { - // Name: to.Ptr("work_mem"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/work_mem"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets the amount of memory to be used by internal sort operations and hash tables before writing to temporary disk files."), - // AllowedValues: to.Ptr("4096-2097151"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeInteger), - // DefaultValue: to.Ptr("115712"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("115712"), - // }, - // }, - // { - // Name: to.Ptr("xmlbinary"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/xmlbinary"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets how binary values are to be encoded in XML."), - // AllowedValues: to.Ptr("base64,hex"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("base64"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("base64"), - // }, - // }, - // { - // Name: to.Ptr("xmloption"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/xmloption"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments."), - // AllowedValues: to.Ptr("content,document"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("content"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("content"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ConfigurationGet.json -func ExampleConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConfigurationsClient().Get(ctx, "testrg", "testserver", "array_nulls", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Configuration = armpostgresqlflexibleservers.Configuration{ - // Name: to.Ptr("array_nulls"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/array_nulls"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Enable input of NULL elements in arrays."), - // AllowedValues: to.Ptr("on,off"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeBoolean), - // DefaultValue: to.Ptr("on"), - // Source: to.Ptr("system-default"), - // Value: to.Ptr("on"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ConfigurationUpdate.json -func ExampleConfigurationsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewConfigurationsClient().BeginUpdate(ctx, "testrg", "testserver", "event_scheduler", armpostgresqlflexibleservers.ConfigurationForUpdate{ - Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - Source: to.Ptr("user-override"), - Value: to.Ptr("on"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Configuration = armpostgresqlflexibleservers.Configuration{ - // Name: to.Ptr("event_scheduler"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/configurations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/event_scheduler"), - // Properties: &armpostgresqlflexibleservers.ConfigurationProperties{ - // Description: to.Ptr("Indicates the status of the Event Scheduler."), - // AllowedValues: to.Ptr("ON,OFF,DISABLED"), - // DataType: to.Ptr(armpostgresqlflexibleservers.ConfigurationDataTypeEnumeration), - // DefaultValue: to.Ptr("OFF"), - // Source: to.Ptr("user-override"), - // Value: to.Ptr("ON"), - // }, - // } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/constants.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/constants.go index 45d817aaa7fa..9d4557a43909 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/constants.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/constants.go @@ -10,7 +10,7 @@ package armpostgresqlflexibleservers const ( moduleName = "armpostgresqlflexibleservers" - moduleVersion = "v4.0.0-beta.2" + moduleVersion = "v4.0.0-beta.3" ) // ActiveDirectoryAuthEnum - If Enabled, Azure Active Directory authentication is enabled. @@ -391,6 +391,30 @@ func PossibleLogicalReplicationOnSourceDbEnumValues() []LogicalReplicationOnSour } } +// MigrationDbState - Migration db state of an individual database +type MigrationDbState string + +const ( + MigrationDbStateCanceled MigrationDbState = "Canceled" + MigrationDbStateCanceling MigrationDbState = "Canceling" + MigrationDbStateFailed MigrationDbState = "Failed" + MigrationDbStateInProgress MigrationDbState = "InProgress" + MigrationDbStateSucceeded MigrationDbState = "Succeeded" + MigrationDbStateWaitingForCutoverTrigger MigrationDbState = "WaitingForCutoverTrigger" +) + +// PossibleMigrationDbStateValues returns the possible values for the MigrationDbState const type. +func PossibleMigrationDbStateValues() []MigrationDbState { + return []MigrationDbState{ + MigrationDbStateCanceled, + MigrationDbStateCanceling, + MigrationDbStateFailed, + MigrationDbStateInProgress, + MigrationDbStateSucceeded, + MigrationDbStateWaitingForCutoverTrigger, + } +} + type MigrationListFilter string const ( @@ -438,14 +462,34 @@ func PossibleMigrationNameAvailabilityReasonValues() []MigrationNameAvailability } } +// MigrationOption - Supported types of migration request include Validate, Migrate and ValidateAndMigrate +type MigrationOption string + +const ( + MigrationOptionMigrate MigrationOption = "Migrate" + MigrationOptionValidate MigrationOption = "Validate" + MigrationOptionValidateAndMigrate MigrationOption = "ValidateAndMigrate" +) + +// PossibleMigrationOptionValues returns the possible values for the MigrationOption const type. +func PossibleMigrationOptionValues() []MigrationOption { + return []MigrationOption{ + MigrationOptionMigrate, + MigrationOptionValidate, + MigrationOptionValidateAndMigrate, + } +} + // MigrationState - Migration state. type MigrationState string const ( MigrationStateCanceled MigrationState = "Canceled" + MigrationStateCleaningUp MigrationState = "CleaningUp" MigrationStateFailed MigrationState = "Failed" MigrationStateInProgress MigrationState = "InProgress" MigrationStateSucceeded MigrationState = "Succeeded" + MigrationStateValidationFailed MigrationState = "ValidationFailed" MigrationStateWaitingForUserAction MigrationState = "WaitingForUserAction" ) @@ -453,9 +497,11 @@ const ( func PossibleMigrationStateValues() []MigrationState { return []MigrationState{ MigrationStateCanceled, + MigrationStateCleaningUp, MigrationStateFailed, MigrationStateInProgress, MigrationStateSucceeded, + MigrationStateValidationFailed, MigrationStateWaitingForUserAction, } } @@ -464,10 +510,12 @@ func PossibleMigrationStateValues() []MigrationState { type MigrationSubState string const ( + MigrationSubStateCancelingRequestedDBMigrations MigrationSubState = "CancelingRequestedDBMigrations" MigrationSubStateCompleted MigrationSubState = "Completed" MigrationSubStateCompletingMigration MigrationSubState = "CompletingMigration" MigrationSubStateMigratingData MigrationSubState = "MigratingData" MigrationSubStatePerformingPreRequisiteSteps MigrationSubState = "PerformingPreRequisiteSteps" + MigrationSubStateValidationInProgress MigrationSubState = "ValidationInProgress" MigrationSubStateWaitingForCutoverTrigger MigrationSubState = "WaitingForCutoverTrigger" MigrationSubStateWaitingForDBsToMigrateSpecification MigrationSubState = "WaitingForDBsToMigrateSpecification" MigrationSubStateWaitingForDataMigrationScheduling MigrationSubState = "WaitingForDataMigrationScheduling" @@ -479,10 +527,12 @@ const ( // PossibleMigrationSubStateValues returns the possible values for the MigrationSubState const type. func PossibleMigrationSubStateValues() []MigrationSubState { return []MigrationSubState{ + MigrationSubStateCancelingRequestedDBMigrations, MigrationSubStateCompleted, MigrationSubStateCompletingMigration, MigrationSubStateMigratingData, MigrationSubStatePerformingPreRequisiteSteps, + MigrationSubStateValidationInProgress, MigrationSubStateWaitingForCutoverTrigger, MigrationSubStateWaitingForDBsToMigrateSpecification, MigrationSubStateWaitingForDataMigrationScheduling, @@ -596,6 +646,38 @@ func PossiblePrincipalTypeValues() []PrincipalType { } } +// ReplicationPromoteMode - Sets the promote mode for a replica server. This is a write only property. +type ReplicationPromoteMode string + +const ( + ReplicationPromoteModeSiteswap ReplicationPromoteMode = "siteswap" + ReplicationPromoteModeStandalone ReplicationPromoteMode = "standalone" +) + +// PossibleReplicationPromoteModeValues returns the possible values for the ReplicationPromoteMode const type. +func PossibleReplicationPromoteModeValues() []ReplicationPromoteMode { + return []ReplicationPromoteMode{ + ReplicationPromoteModeSiteswap, + ReplicationPromoteModeStandalone, + } +} + +// ReplicationPromoteOption - Sets the promote options for a replica server. This is a write only property. +type ReplicationPromoteOption string + +const ( + ReplicationPromoteOptionForced ReplicationPromoteOption = "forced" + ReplicationPromoteOptionPlanned ReplicationPromoteOption = "planned" +) + +// PossibleReplicationPromoteOptionValues returns the possible values for the ReplicationPromoteOption const type. +func PossibleReplicationPromoteOptionValues() []ReplicationPromoteOption { + return []ReplicationPromoteOption{ + ReplicationPromoteOptionForced, + ReplicationPromoteOptionPlanned, + } +} + // ReplicationRole - Used to indicate role of the server in replication set. type ReplicationRole string @@ -651,6 +733,30 @@ func PossibleSKUTierValues() []SKUTier { } } +// SSLMode - Supported SSL modes for migration: Disable, Allow, Prefer, Require, VerifyCA, VerifyFull +type SSLMode string + +const ( + SSLModeAllow SSLMode = "Allow" + SSLModeDisable SSLMode = "Disable" + SSLModePrefer SSLMode = "Prefer" + SSLModeRequire SSLMode = "Require" + SSLModeVerifyCA SSLMode = "VerifyCA" + SSLModeVerifyFull SSLMode = "VerifyFull" +) + +// PossibleSSLModeValues returns the possible values for the SSLMode const type. +func PossibleSSLModeValues() []SSLMode { + return []SSLMode{ + SSLModeAllow, + SSLModeDisable, + SSLModePrefer, + SSLModeRequire, + SSLModeVerifyCA, + SSLModeVerifyFull, + } +} + // ServerHAState - A state of a HA server that is visible to user. type ServerHAState string @@ -739,6 +845,28 @@ func PossibleServerVersionValues() []ServerVersion { } } +// SourceType - Migration source server type : OnPremises, AWS, GCP, AzureVM or PostgreSQLSingleServer +type SourceType string + +const ( + SourceTypeAWS SourceType = "AWS" + SourceTypeAzureVM SourceType = "AzureVM" + SourceTypeGCP SourceType = "GCP" + SourceTypeOnPremises SourceType = "OnPremises" + SourceTypePostgreSQLSingleServer SourceType = "PostgreSQLSingleServer" +) + +// PossibleSourceTypeValues returns the possible values for the SourceType const type. +func PossibleSourceTypeValues() []SourceType { + return []SourceType{ + SourceTypeAWS, + SourceTypeAzureVM, + SourceTypeGCP, + SourceTypeOnPremises, + SourceTypePostgreSQLSingleServer, + } +} + // StartDataMigrationEnum - Indicates whether the data migration should start right away type StartDataMigrationEnum string @@ -788,6 +916,36 @@ func PossibleStorageAutoGrowthSupportedEnumValues() []StorageAutoGrowthSupported } } +type ThreatProtectionName string + +const ( + ThreatProtectionNameDefault ThreatProtectionName = "Default" +) + +// PossibleThreatProtectionNameValues returns the possible values for the ThreatProtectionName const type. +func PossibleThreatProtectionNameValues() []ThreatProtectionName { + return []ThreatProtectionName{ + ThreatProtectionNameDefault, + } +} + +// ThreatProtectionState - Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has +// not been applied yet on the specific server. +type ThreatProtectionState string + +const ( + ThreatProtectionStateDisabled ThreatProtectionState = "Disabled" + ThreatProtectionStateEnabled ThreatProtectionState = "Enabled" +) + +// PossibleThreatProtectionStateValues returns the possible values for the ThreatProtectionState const type. +func PossibleThreatProtectionStateValues() []ThreatProtectionState { + return []ThreatProtectionState{ + ThreatProtectionStateDisabled, + ThreatProtectionStateEnabled, + } +} + // TriggerCutoverEnum - To trigger cutover for entire migration we need to send this flag as True type TriggerCutoverEnum string @@ -804,6 +962,38 @@ func PossibleTriggerCutoverEnumValues() []TriggerCutoverEnum { } } +// ValidationState - Validation status for migration +type ValidationState string + +const ( + ValidationStateFailed ValidationState = "Failed" + ValidationStateSucceeded ValidationState = "Succeeded" + ValidationStateWarning ValidationState = "Warning" +) + +// PossibleValidationStateValues returns the possible values for the ValidationState const type. +func PossibleValidationStateValues() []ValidationState { + return []ValidationState{ + ValidationStateFailed, + ValidationStateSucceeded, + ValidationStateWarning, + } +} + +// VirtualEndpointType - The endpoint type for the virtual endpoint. +type VirtualEndpointType string + +const ( + VirtualEndpointTypeReadWrite VirtualEndpointType = "ReadWrite" +) + +// PossibleVirtualEndpointTypeValues returns the possible values for the VirtualEndpointType const type. +func PossibleVirtualEndpointTypeValues() []VirtualEndpointType { + return []VirtualEndpointType{ + VirtualEndpointTypeReadWrite, + } +} + // ZoneRedundantHaAndGeoBackupSupportedEnum - A value indicating whether Zone Redundant HA and Geo-backup is supported in // this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and // geo-backup is not supported. diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client.go index 2bd73c01ec62..088e317e8f5b 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client.go @@ -46,7 +46,7 @@ func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreate - Creates a new database or updates an existing database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - databaseName - The name of the database. @@ -70,7 +70,7 @@ func (client *DatabasesClient) BeginCreate(ctx context.Context, resourceGroupNam // Create - Creates a new database or updates an existing database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *DatabasesClient) create(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOptions) (*http.Response, error) { var err error req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) @@ -112,7 +112,7 @@ func (client *DatabasesClient) createCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -124,7 +124,7 @@ func (client *DatabasesClient) createCreateRequest(ctx context.Context, resource // BeginDelete - Deletes a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - databaseName - The name of the database. @@ -147,7 +147,7 @@ func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *DatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) @@ -189,7 +189,7 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets information about a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - databaseName - The name of the database. @@ -245,7 +245,7 @@ func (client *DatabasesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,7 @@ func (client *DatabasesClient) getHandleResponse(resp *http.Response) (Databases // NewListByServerPager - List all the databases in a given server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager @@ -315,7 +315,7 @@ func (client *DatabasesClient) listByServerCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client_example_test.go deleted file mode 100644 index 01afe8481eb3..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/databases_client_example_test.go +++ /dev/null @@ -1,153 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/DatabaseCreate.json -func ExampleDatabasesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDatabasesClient().BeginCreate(ctx, "TestGroup", "testserver", "db1", armpostgresqlflexibleservers.Database{ - Properties: &armpostgresqlflexibleservers.DatabaseProperties{ - Charset: to.Ptr("utf8"), - Collation: to.Ptr("en_US.utf8"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Database = armpostgresqlflexibleservers.Database{ - // Name: to.Ptr("db1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/databases"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/databases/db1"), - // Properties: &armpostgresqlflexibleservers.DatabaseProperties{ - // Charset: to.Ptr("utf8"), - // Collation: to.Ptr("en_US.utf8"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/DatabaseDelete.json -func ExampleDatabasesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDatabasesClient().BeginDelete(ctx, "TestGroup", "testserver", "db1", 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/DatabaseGet.json -func ExampleDatabasesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDatabasesClient().Get(ctx, "TestGroup", "testserver", "db1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Database = armpostgresqlflexibleservers.Database{ - // Name: to.Ptr("db1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/databases"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/databases/db1"), - // Properties: &armpostgresqlflexibleservers.DatabaseProperties{ - // Charset: to.Ptr("utf8"), - // Collation: to.Ptr("en_US.utf8"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/DatabasesListByServer.json -func ExampleDatabasesClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDatabasesClient().NewListByServerPager("TestGroup", "testserver", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabaseListResult = armpostgresqlflexibleservers.DatabaseListResult{ - // Value: []*armpostgresqlflexibleservers.Database{ - // { - // Name: to.Ptr("db1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/databases"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/databases/db1"), - // Properties: &armpostgresqlflexibleservers.DatabaseProperties{ - // Charset: to.Ptr("utf8"), - // Collation: to.Ptr("en_US.utf8"), - // }, - // }, - // { - // Name: to.Ptr("db2"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/databases"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/databases/db2"), - // Properties: &armpostgresqlflexibleservers.DatabaseProperties{ - // Charset: to.Ptr("utf8"), - // Collation: to.Ptr("en_US.utf8"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client.go index c43bda09d4e5..a83321e3f4f5 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client.go @@ -46,7 +46,7 @@ func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - firewallRuleName - The name of the server firewall rule. @@ -71,7 +71,7 @@ func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *FirewallRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, parameters, options) @@ -113,7 +113,7 @@ func (client *FirewallRulesClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -125,7 +125,7 @@ func (client *FirewallRulesClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes a PostgreSQL server firewall rule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - firewallRuleName - The name of the server firewall rule. @@ -149,7 +149,7 @@ func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes a PostgreSQL server firewall rule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *FirewallRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, options) @@ -191,7 +191,7 @@ func (client *FirewallRulesClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -200,7 +200,7 @@ func (client *FirewallRulesClient) deleteCreateRequest(ctx context.Context, reso // Get - List all the firewall rules in a given server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - firewallRuleName - The name of the server firewall rule. @@ -247,7 +247,7 @@ func (client *FirewallRulesClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *FirewallRulesClient) getHandleResponse(resp *http.Response) (Firew // NewListByServerPager - List all the firewall rules in a given PostgreSQL server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager @@ -317,7 +317,7 @@ func (client *FirewallRulesClient) listByServerCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client_example_test.go deleted file mode 100644 index 29fd3fa64e29..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/firewallrules_client_example_test.go +++ /dev/null @@ -1,153 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/FirewallRuleCreate.json -func ExampleFirewallRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFirewallRulesClient().BeginCreateOrUpdate(ctx, "testrg", "testserver", "rule1", armpostgresqlflexibleservers.FirewallRule{ - Properties: &armpostgresqlflexibleservers.FirewallRuleProperties{ - EndIPAddress: to.Ptr("255.255.255.255"), - StartIPAddress: to.Ptr("0.0.0.0"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallRule = armpostgresqlflexibleservers.FirewallRule{ - // Name: to.Ptr("rule1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1"), - // Properties: &armpostgresqlflexibleservers.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.255.255.255"), - // StartIPAddress: to.Ptr("0.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/FirewallRuleDelete.json -func ExampleFirewallRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFirewallRulesClient().BeginDelete(ctx, "testrg", "testserver", "rule1", 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/FirewallRuleGet.json -func ExampleFirewallRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallRulesClient().Get(ctx, "testrg", "testserver", "rule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallRule = armpostgresqlflexibleservers.FirewallRule{ - // Name: to.Ptr("rule1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1"), - // Properties: &armpostgresqlflexibleservers.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.255.255.255"), - // StartIPAddress: to.Ptr("0.0.0.0"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/FirewallRuleListByServer.json -func ExampleFirewallRulesClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallRulesClient().NewListByServerPager("testrg", "testserver", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallRuleListResult = armpostgresqlflexibleservers.FirewallRuleListResult{ - // Value: []*armpostgresqlflexibleservers.FirewallRule{ - // { - // Name: to.Ptr("rule1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/firewallRules/rule1"), - // Properties: &armpostgresqlflexibleservers.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.255.255.255"), - // StartIPAddress: to.Ptr("0.0.0.0"), - // }, - // }, - // { - // Name: to.Ptr("rule2"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/firewallRules/rule2"), - // Properties: &armpostgresqlflexibleservers.FirewallRuleProperties{ - // EndIPAddress: to.Ptr("255.0.0.0"), - // StartIPAddress: to.Ptr("1.0.0.0"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client.go index 992b31c7bfe6..023b59524635 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client.go @@ -46,7 +46,7 @@ func NewFlexibleServerClient(subscriptionID string, credential azcore.TokenCrede // BeginStartLtrBackup - Start the Long Term Retention Backup operation // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - parameters - Request body for operation @@ -70,7 +70,7 @@ func (client *FlexibleServerClient) BeginStartLtrBackup(ctx context.Context, res // StartLtrBackup - Start the Long Term Retention Backup operation // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *FlexibleServerClient) startLtrBackup(ctx context.Context, resourceGroupName string, serverName string, parameters LtrBackupRequest, options *FlexibleServerClientBeginStartLtrBackupOptions) (*http.Response, error) { var err error req, err := client.startLtrBackupCreateRequest(ctx, resourceGroupName, serverName, parameters, options) @@ -108,7 +108,7 @@ func (client *FlexibleServerClient) startLtrBackupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -121,7 +121,7 @@ func (client *FlexibleServerClient) startLtrBackupCreateRequest(ctx context.Cont // backup operation to succeed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - parameters - Request body for operation @@ -165,7 +165,7 @@ func (client *FlexibleServerClient) triggerLtrPreBackupCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client_example_test.go deleted file mode 100644 index 9a4f11421589..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/flexibleserver_client_example_test.go +++ /dev/null @@ -1,91 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/LongTermRetentionPreBackup.json -func ExampleFlexibleServerClient_TriggerLtrPreBackup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFlexibleServerClient().TriggerLtrPreBackup(ctx, "rgLongTermRetention", "pgsqlltrtestserver", armpostgresqlflexibleservers.LtrPreBackupRequest{ - BackupSettings: &armpostgresqlflexibleservers.BackupSettings{ - BackupName: to.Ptr("backup1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LtrPreBackupResponse = armpostgresqlflexibleservers.LtrPreBackupResponse{ - // Properties: &armpostgresqlflexibleservers.LtrPreBackupResponseProperties{ - // NumberOfContainers: to.Ptr[int32](1), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/LongTermRetentionBackup.json -func ExampleFlexibleServerClient_BeginStartLtrBackup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFlexibleServerClient().BeginStartLtrBackup(ctx, "rgLongTermRetention", "pgsqlltrtestserver", armpostgresqlflexibleservers.LtrBackupRequest{ - BackupSettings: &armpostgresqlflexibleservers.BackupSettings{ - BackupName: to.Ptr("backup1"), - }, - TargetDetails: &armpostgresqlflexibleservers.BackupStoreDetails{ - SasURIList: []*string{ - to.Ptr("sasuri")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LtrBackupResponse = armpostgresqlflexibleservers.LtrBackupResponse{ - // Properties: &armpostgresqlflexibleservers.LtrBackupOperationResponseProperties{ - // BackupMetadata: to.Ptr("backupmetadata"), - // DataTransferredInBytes: to.Ptr[int64](23), - // DatasourceSizeInBytes: to.Ptr[int64](23), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-13T01:32:30.128Z"); return t}()), - // PercentComplete: to.Ptr[float64](100), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-13T01:32:30.128Z"); return t}()), - // Status: to.Ptr(armpostgresqlflexibleservers.ExecutionStatusRunning), - // }, - // } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client.go index be7b9fb59e77..7b196f258077 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client.go @@ -40,7 +40,7 @@ func NewGetPrivateDNSZoneSuffixClient(credential azcore.TokenCredential, options // Execute - Get private DNS zone suffix in the cloud // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - options - GetPrivateDNSZoneSuffixClientExecuteOptions contains the optional parameters for the GetPrivateDNSZoneSuffixClient.Execute // method. func (client *GetPrivateDNSZoneSuffixClient) Execute(ctx context.Context, options *GetPrivateDNSZoneSuffixClientExecuteOptions) (GetPrivateDNSZoneSuffixClientExecuteResponse, error) { @@ -69,7 +69,7 @@ func (client *GetPrivateDNSZoneSuffixClient) executeCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client_example_test.go deleted file mode 100644 index 4114df42ca05..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/getprivatednszonesuffix_client_example_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/GetPrivateDnsZoneSuffix.json -func ExampleGetPrivateDNSZoneSuffixClient_Execute() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGetPrivateDNSZoneSuffixClient().Execute(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Value = "postgres.database.azure.com" -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.mod b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.mod index 3e052f723154..2968af10d3f7 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.mod +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostg go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/golang-jwt/jwt/v5 v5.0.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.12.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.sum b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.sum index 545850a5189d..b078fe12f439 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.sum +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/go.sum @@ -1,31 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= 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.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= -github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client.go index 0772ad1a9184..46a6e10b2f66 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client.go @@ -45,7 +45,7 @@ func NewLocationBasedCapabilitiesClient(subscriptionID string, credential azcore // NewExecutePager - Get capabilities at specified location in a given subscription. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - locationName - The name of the location. // - options - LocationBasedCapabilitiesClientExecuteOptions contains the optional parameters for the LocationBasedCapabilitiesClient.NewExecutePager // method. @@ -93,7 +93,7 @@ func (client *LocationBasedCapabilitiesClient) executeCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client_example_test.go deleted file mode 100644 index e5c2c441ef67..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/locationbasedcapabilities_client_example_test.go +++ /dev/null @@ -1,1649 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/CapabilitiesByLocation.json -func ExampleLocationBasedCapabilitiesClient_NewExecutePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocationBasedCapabilitiesClient().NewExecutePager("westus", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CapabilitiesListResult = armpostgresqlflexibleservers.CapabilitiesListResult{ - // Value: []*armpostgresqlflexibleservers.FlexibleServerCapability{ - // { - // Name: to.Ptr("FlexibleServerCapabilities"), - // FastProvisioningSupported: to.Ptr(armpostgresqlflexibleservers.FastProvisioningSupportedEnumEnabled), - // GeoBackupSupported: to.Ptr(armpostgresqlflexibleservers.GeoBackupSupportedEnumEnabled), - // OnlineResizeSupported: to.Ptr(armpostgresqlflexibleservers.OnlineResizeSupportedEnumDisabled), - // Restricted: to.Ptr(armpostgresqlflexibleservers.RestrictedEnumDisabled), - // StorageAutoGrowthSupported: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowthSupportedEnumEnabled), - // SupportedFastProvisioningEditions: []*armpostgresqlflexibleservers.FastProvisioningEditionCapability{ - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }, - // { - // ServerCount: to.Ptr[int32](23), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }}, - // SupportedServerEditions: []*armpostgresqlflexibleservers.FlexibleServerEditionCapability{ - // { - // Name: to.Ptr("Burstable"), - // DefaultSKUName: to.Ptr("Standard_B1ms"), - // SupportedServerSKUs: []*armpostgresqlflexibleservers.ServerSKUCapability{ - // { - // Name: to.Ptr("Standard_B1ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](640), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](1), - // }, - // { - // Name: to.Ptr("Standard_B2s"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](1280), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_B2ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](1700), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_B4ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](2400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_B8ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3100), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_B12ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](12), - // }, - // { - // Name: to.Ptr("Standard_B16ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](4300), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_B20ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](5000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](20), - // }}, - // SupportedStorageEditions: []*armpostgresqlflexibleservers.StorageEditionCapability{ - // { - // Name: to.Ptr("ManagedDisk"), - // DefaultStorageSizeMb: to.Ptr[int64](32768), - // SupportedStorageMb: []*armpostgresqlflexibleservers.StorageMbCapability{ - // { - // DefaultIopsTier: to.Ptr("P4"), - // StorageSizeMb: to.Ptr[int64](32768), - // SupportedIops: to.Ptr[int32](120), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P4"), - // Iops: to.Ptr[int32](120), - // }, - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P6"), - // StorageSizeMb: to.Ptr[int64](65536), - // SupportedIops: to.Ptr[int32](240), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P10"), - // StorageSizeMb: to.Ptr[int64](131072), - // SupportedIops: to.Ptr[int32](500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P15"), - // StorageSizeMb: to.Ptr[int64](262144), - // SupportedIops: to.Ptr[int32](1100), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P20"), - // StorageSizeMb: to.Ptr[int64](524288), - // SupportedIops: to.Ptr[int32](2300), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P30"), - // StorageSizeMb: to.Ptr[int64](1048576), - // SupportedIops: to.Ptr[int32](5000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P40"), - // StorageSizeMb: to.Ptr[int64](2097152), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P50"), - // StorageSizeMb: to.Ptr[int64](4194304), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P60"), - // StorageSizeMb: to.Ptr[int64](8388608), - // SupportedIops: to.Ptr[int32](16000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P60"), - // Iops: to.Ptr[int32](16000), - // }, - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P70"), - // StorageSizeMb: to.Ptr[int64](16777216), - // SupportedIops: to.Ptr[int32](18000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P80"), - // StorageSizeMb: to.Ptr[int64](33553408), - // SupportedIops: to.Ptr[int32](20000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }}, - // }}, - // }, - // { - // Name: to.Ptr("GeneralPurpose"), - // DefaultSKUName: to.Ptr("Standard_D2ds_v4"), - // SupportedServerSKUs: []*armpostgresqlflexibleservers.ServerSKUCapability{ - // { - // Name: to.Ptr("Standard_D2s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_D4s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_D8s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_D16s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_D32s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_D48s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_D64s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_D2ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_D4ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_D8ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_D16ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_D32ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_D48ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_D64ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_D2ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_D4ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_D8ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_D16ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_D32ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_D48ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_D64ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_D96ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](96), - // }}, - // SupportedStorageEditions: []*armpostgresqlflexibleservers.StorageEditionCapability{ - // { - // Name: to.Ptr("ManagedDisk"), - // DefaultStorageSizeMb: to.Ptr[int64](65536), - // SupportedStorageMb: []*armpostgresqlflexibleservers.StorageMbCapability{ - // { - // DefaultIopsTier: to.Ptr("P4"), - // StorageSizeMb: to.Ptr[int64](32768), - // SupportedIops: to.Ptr[int32](120), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P4"), - // Iops: to.Ptr[int32](120), - // }, - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P6"), - // StorageSizeMb: to.Ptr[int64](65536), - // SupportedIops: to.Ptr[int32](240), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P10"), - // StorageSizeMb: to.Ptr[int64](131072), - // SupportedIops: to.Ptr[int32](500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P15"), - // StorageSizeMb: to.Ptr[int64](262144), - // SupportedIops: to.Ptr[int32](1100), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P20"), - // StorageSizeMb: to.Ptr[int64](524288), - // SupportedIops: to.Ptr[int32](2300), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P30"), - // StorageSizeMb: to.Ptr[int64](1048576), - // SupportedIops: to.Ptr[int32](5000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P40"), - // StorageSizeMb: to.Ptr[int64](2097152), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P50"), - // StorageSizeMb: to.Ptr[int64](4194304), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P60"), - // StorageSizeMb: to.Ptr[int64](8388608), - // SupportedIops: to.Ptr[int32](16000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P60"), - // Iops: to.Ptr[int32](16000), - // }, - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P70"), - // StorageSizeMb: to.Ptr[int64](16777216), - // SupportedIops: to.Ptr[int32](18000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P80"), - // StorageSizeMb: to.Ptr[int64](33553408), - // SupportedIops: to.Ptr[int32](20000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }}, - // }}, - // }, - // { - // Name: to.Ptr("MemoryOptimized"), - // DefaultSKUName: to.Ptr("Standard_E2ds_v4"), - // SupportedServerSKUs: []*armpostgresqlflexibleservers.ServerSKUCapability{ - // { - // Name: to.Ptr("Standard_E2s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_E4s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_E8s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_E16s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_E32s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_E48s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_E64s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](6912), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_E2ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_E4ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_E8ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_E16ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_E20ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](20), - // }, - // { - // Name: to.Ptr("Standard_E32ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_E48ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_E64ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](6912), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_E2ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_E4ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_E8ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_E16ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_E32ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_E48ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_E64ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_E96ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](7168), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](96), - // }}, - // SupportedStorageEditions: []*armpostgresqlflexibleservers.StorageEditionCapability{ - // { - // Name: to.Ptr("ManagedDisk"), - // DefaultStorageSizeMb: to.Ptr[int64](131072), - // SupportedStorageMb: []*armpostgresqlflexibleservers.StorageMbCapability{ - // { - // DefaultIopsTier: to.Ptr("P4"), - // StorageSizeMb: to.Ptr[int64](32768), - // SupportedIops: to.Ptr[int32](120), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P4"), - // Iops: to.Ptr[int32](120), - // }, - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P6"), - // StorageSizeMb: to.Ptr[int64](65536), - // SupportedIops: to.Ptr[int32](240), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P10"), - // StorageSizeMb: to.Ptr[int64](131072), - // SupportedIops: to.Ptr[int32](500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P15"), - // StorageSizeMb: to.Ptr[int64](262144), - // SupportedIops: to.Ptr[int32](1100), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P20"), - // StorageSizeMb: to.Ptr[int64](524288), - // SupportedIops: to.Ptr[int32](2300), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P30"), - // StorageSizeMb: to.Ptr[int64](1048576), - // SupportedIops: to.Ptr[int32](5000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P40"), - // StorageSizeMb: to.Ptr[int64](2097152), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P50"), - // StorageSizeMb: to.Ptr[int64](4194304), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P60"), - // StorageSizeMb: to.Ptr[int64](8388608), - // SupportedIops: to.Ptr[int32](16000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P60"), - // Iops: to.Ptr[int32](16000), - // }, - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P70"), - // StorageSizeMb: to.Ptr[int64](16777216), - // SupportedIops: to.Ptr[int32](18000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P80"), - // StorageSizeMb: to.Ptr[int64](33553408), - // SupportedIops: to.Ptr[int32](20000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }}, - // }}, - // }}, - // SupportedServerVersions: []*armpostgresqlflexibleservers.ServerVersionCapability{ - // { - // Name: to.Ptr("11"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("12"), - // to.Ptr("13"), - // to.Ptr("14"), - // to.Ptr("15")}, - // }, - // { - // Name: to.Ptr("12"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("13"), - // to.Ptr("14"), - // to.Ptr("15")}, - // }, - // { - // Name: to.Ptr("13"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("14"), - // to.Ptr("15")}, - // }, - // { - // Name: to.Ptr("14"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("15")}, - // }}, - // ZoneRedundantHaAndGeoBackupSupported: to.Ptr(armpostgresqlflexibleservers.ZoneRedundantHaAndGeoBackupSupportedEnumEnabled), - // ZoneRedundantHaSupported: to.Ptr(armpostgresqlflexibleservers.ZoneRedundantHaSupportedEnumEnabled), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client.go index f66b0d741ac2..7ce008c8e618 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client.go @@ -45,7 +45,7 @@ func NewLogFilesClient(subscriptionID string, credential azcore.TokenCredential, // NewListByServerPager - List all the server log files in a given server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - LogFilesClientListByServerOptions contains the optional parameters for the LogFilesClient.NewListByServerPager @@ -98,7 +98,7 @@ func (client *LogFilesClient) listByServerCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client_example_test.go deleted file mode 100644 index c2f290b28915..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/logfiles_client_example_test.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/LogFilesListByServer.json -func ExampleLogFilesClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLogFilesClient().NewListByServerPager("testrg", "postgresqltestsvc1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LogFileListResult = armpostgresqlflexibleservers.LogFileListResult{ - // Value: []*armpostgresqlflexibleservers.LogFile{ - // { - // Name: to.Ptr("postgresql-slow-postgresqltestsvc1-2018022823.log"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/logFiles"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresqltestsvc1/logFiles/postgresql-slow-postgresqltestsvc1-2018022823.log"), - // Properties: &armpostgresqlflexibleservers.LogFileProperties{ - // Type: to.Ptr("slowlog"), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-01T06:09:20+00:00"); return t}()), - // SizeInKb: to.Ptr[int64](1), - // URL: to.Ptr("https://wasd2prodwus1afse42.file.core.windows.net/833c99b2f36c47349e5554b903fe0440/serverlogs/postgresql-slow-postgresqltestsvc1-2018022823.log?sv=2015-04-05&sr=f&se=2018-03-01T07%3A12%3A13Z&sp=r"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client.go index 4544b82a4b97..56b3eae31e7a 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client.go @@ -46,7 +46,7 @@ func NewLtrBackupOperationsClient(subscriptionID string, credential azcore.Token // Get - Gets the result of the give long term retention backup operation for the flexible server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - backupName - The name of the backup. @@ -93,7 +93,7 @@ func (client *LtrBackupOperationsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,7 +110,7 @@ func (client *LtrBackupOperationsClient) getHandleResponse(resp *http.Response) // NewListByServerPager - Gets the result of the give long term retention backup operations for the flexible server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - LtrBackupOperationsClientListByServerOptions contains the optional parameters for the LtrBackupOperationsClient.NewListByServerPager @@ -163,7 +163,7 @@ func (client *LtrBackupOperationsClient) listByServerCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client_example_test.go deleted file mode 100644 index bcf0cb4895e9..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/ltrbackupoperations_client_example_test.go +++ /dev/null @@ -1,96 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/LongTermRetentionOperationGet.json -func ExampleLtrBackupOperationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLtrBackupOperationsClient().Get(ctx, "rgLongTermRetention", "pgsqlltrtestserver", "backup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LtrServerBackupOperation = armpostgresqlflexibleservers.LtrServerBackupOperation{ - // Name: to.Ptr("backup1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/ltrbackupOperations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/rgLongTermRetention/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgsqlltrtestserver"), - // Properties: &armpostgresqlflexibleservers.LtrBackupOperationResponseProperties{ - // BackupMetadata: to.Ptr("backupMetadata"), - // BackupName: to.Ptr("backup1"), - // DataTransferredInBytes: to.Ptr[int64](9), - // DatasourceSizeInBytes: to.Ptr[int64](21), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-13T01:32:30.128Z"); return t}()), - // PercentComplete: to.Ptr[float64](4), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-13T01:32:30.128Z"); return t}()), - // Status: to.Ptr(armpostgresqlflexibleservers.ExecutionStatusRunning), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/LongTermRetentionOperationListByServer.json -func ExampleLtrBackupOperationsClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLtrBackupOperationsClient().NewListByServerPager("rgLongTermRetention", "pgsqlltrtestserver", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LtrServerBackupOperationList = armpostgresqlflexibleservers.LtrServerBackupOperationList{ - // Value: []*armpostgresqlflexibleservers.LtrServerBackupOperation{ - // { - // Name: to.Ptr("backup1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/ltrbackupOperations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/rgLongTermRetention/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgsqlltrtestserver"), - // Properties: &armpostgresqlflexibleservers.LtrBackupOperationResponseProperties{ - // BackupMetadata: to.Ptr("backupMetadata"), - // BackupName: to.Ptr("backup1"), - // DataTransferredInBytes: to.Ptr[int64](9), - // DatasourceSizeInBytes: to.Ptr[int64](21), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-13T01:32:30.128Z"); return t}()), - // PercentComplete: to.Ptr[float64](4), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-13T01:32:30.128Z"); return t}()), - // Status: to.Ptr(armpostgresqlflexibleservers.ExecutionStatusRunning), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client.go index e0e3e13c4b18..b8d09887bc0d 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client.go @@ -43,7 +43,7 @@ func NewMigrationsClient(credential azcore.TokenCredential, options *arm.ClientO // Create - Creates a new migration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - subscriptionID - The subscription ID of the target database server. // - resourceGroupName - The resource group name of the target database server. // - targetDbServerName - The name of the target database server. @@ -92,7 +92,7 @@ func (client *MigrationsClient) createCreateRequest(ctx context.Context, subscri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -113,7 +113,7 @@ func (client *MigrationsClient) createHandleResponse(resp *http.Response) (Migra // Delete - Deletes a migration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - subscriptionID - The subscription ID of the target database server. // - resourceGroupName - The resource group name of the target database server. // - targetDbServerName - The name of the target database server. @@ -160,7 +160,7 @@ func (client *MigrationsClient) deleteCreateRequest(ctx context.Context, subscri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,7 +169,7 @@ func (client *MigrationsClient) deleteCreateRequest(ctx context.Context, subscri // Get - Gets details of a migration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - subscriptionID - The subscription ID of the target database server. // - resourceGroupName - The resource group name of the target database server. // - targetDbServerName - The name of the target database server. @@ -217,7 +217,7 @@ func (client *MigrationsClient) getCreateRequest(ctx context.Context, subscripti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *MigrationsClient) getHandleResponse(resp *http.Response) (Migratio // NewListByTargetServerPager - List all the migrations on a given target server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - subscriptionID - The subscription ID of the target database server. // - resourceGroupName - The resource group name of the target database server. // - targetDbServerName - The name of the target database server. @@ -288,7 +288,7 @@ func (client *MigrationsClient) listByTargetServerCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") if options != nil && options.MigrationListFilter != nil { reqQP.Set("migrationListFilter", string(*options.MigrationListFilter)) } @@ -310,7 +310,7 @@ func (client *MigrationsClient) listByTargetServerHandleResponse(resp *http.Resp // migration definition. Certain property updates initiate migration state transitions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - subscriptionID - The subscription ID of the target database server. // - resourceGroupName - The resource group name of the target database server. // - targetDbServerName - The name of the target database server. @@ -359,7 +359,7 @@ func (client *MigrationsClient) updateCreateRequest(ctx context.Context, subscri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client_example_test.go deleted file mode 100644 index fc8caee66a35..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/migrations_client_example_test.go +++ /dev/null @@ -1,448 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_Create_With_Other_Users.json -func ExampleMigrationsClient_Create_migrationsCreateByPassingUserNames() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMigrationsClient().Create(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", armpostgresqlflexibleservers.MigrationResource{ - Location: to.Ptr("westus"), - Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - DbsToMigrate: []*string{ - to.Ptr("db1"), - to.Ptr("db2"), - to.Ptr("db3"), - to.Ptr("db4")}, - MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline), - SecretParameters: &armpostgresqlflexibleservers.MigrationSecretParameters{ - AdminCredentials: &armpostgresqlflexibleservers.AdminCredentials{ - SourceServerPassword: to.Ptr("xxxxxxxx"), - TargetServerPassword: to.Ptr("xxxxxxxx"), - }, - SourceServerUsername: to.Ptr("newadmin@testsource"), - TargetServerUsername: to.Ptr("targetadmin"), - }, - SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MigrationResource = armpostgresqlflexibleservers.MigrationResource{ - // Name: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"), - // ID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1624": to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - // CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{ - // CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubStateDetails{ - // CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubStatePerformingPreRequisiteSteps), - // }, - // Error: to.Ptr(""), - // State: to.Ptr(armpostgresqlflexibleservers.MigrationStateInProgress), - // }, - // DbsToMigrate: []*string{ - // to.Ptr("db1"), - // to.Ptr("db2"), - // to.Ptr("db3"), - // to.Ptr("db4")}, - // MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline), - // MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-06T16:05:58.895Z"); return t}()), - // OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumFalse), - // SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumFalse), - // SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - // StartDataMigration: to.Ptr(armpostgresqlflexibleservers.StartDataMigrationEnumFalse), - // TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget"), - // TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverEnumFalse), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_Create.json -func ExampleMigrationsClient_Create_migrationsCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMigrationsClient().Create(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", armpostgresqlflexibleservers.MigrationResource{ - Location: to.Ptr("westus"), - Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - DbsToMigrate: []*string{ - to.Ptr("db1"), - to.Ptr("db2"), - to.Ptr("db3"), - to.Ptr("db4")}, - MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline), - OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumTrue), - SecretParameters: &armpostgresqlflexibleservers.MigrationSecretParameters{ - AdminCredentials: &armpostgresqlflexibleservers.AdminCredentials{ - SourceServerPassword: to.Ptr("xxxxxxxx"), - TargetServerPassword: to.Ptr("xxxxxxxx"), - }, - }, - SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MigrationResource = armpostgresqlflexibleservers.MigrationResource{ - // Name: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"), - // ID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1624": to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - // CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{ - // CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubStateDetails{ - // CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubStatePerformingPreRequisiteSteps), - // }, - // Error: to.Ptr(""), - // State: to.Ptr(armpostgresqlflexibleservers.MigrationStateInProgress), - // }, - // DbsToMigrate: []*string{ - // to.Ptr("db1"), - // to.Ptr("db2"), - // to.Ptr("db3"), - // to.Ptr("db4")}, - // MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-06T16:05:58.895Z"); return t}()), - // OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumTrue), - // SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumFalse), - // SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - // StartDataMigration: to.Ptr(armpostgresqlflexibleservers.StartDataMigrationEnumFalse), - // TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget"), - // TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverEnumFalse), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_Get.json -func ExampleMigrationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMigrationsClient().Get(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MigrationResource = armpostgresqlflexibleservers.MigrationResource{ - // Name: to.Ptr("testmigration"), - // Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration"), - // Location: to.Ptr("westus"), - // Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - // CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{ - // CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubStateDetails{ - // CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubStatePerformingPreRequisiteSteps), - // }, - // Error: to.Ptr(""), - // State: to.Ptr(armpostgresqlflexibleservers.MigrationStateInProgress), - // }, - // DbsToMigrate: []*string{ - // to.Ptr("db1"), - // to.Ptr("db2"), - // to.Ptr("db3"), - // to.Ptr("db4")}, - // MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-06T16:05:58.895Z"); return t}()), - // OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumFalse), - // SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumFalse), - // SourceDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("westus"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("B_Gen5_2"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Basic")), - // }, - // StorageMb: to.Ptr[int32](1024), - // Version: to.Ptr("10"), - // }, - // SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - // StartDataMigration: to.Ptr(armpostgresqlflexibleservers.StartDataMigrationEnumFalse), - // TargetDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("westus"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // StorageMb: to.Ptr[int32](2048), - // Version: to.Ptr("11"), - // }, - // TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget"), - // TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverEnumFalse), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_Cancel.json -func ExampleMigrationsClient_Update_cancelMigration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMigrationsClient().Update(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", armpostgresqlflexibleservers.MigrationResourceForPatch{ - Properties: &armpostgresqlflexibleservers.MigrationResourcePropertiesForPatch{ - Cancel: to.Ptr(armpostgresqlflexibleservers.CancelEnumTrue), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MigrationResource = armpostgresqlflexibleservers.MigrationResource{ - // Name: to.Ptr("testmigration"), - // Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration"), - // Location: to.Ptr("westus"), - // Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - // CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{ - // CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubStateDetails{ - // CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubStateCompleted), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.MigrationStateCanceled), - // }, - // DbsToMigrate: []*string{ - // to.Ptr("postgres")}, - // MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOnline), - // MigrationWindowEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-15T07:23:56.3260822Z"); return t}()), - // MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-15T07:22:57.7001251Z"); return t}()), - // OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumTrue), - // SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumTrue), - // SourceDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("eastasia"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("B_Gen5_2"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Basic")), - // }, - // }, - // SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - // TargetDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("East Asia"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("Standard_D2ds_v4"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Standard_D2ds_v4")), - // }, - // }, - // TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_Update.json -func ExampleMigrationsClient_Update_migrationsUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMigrationsClient().Update(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", armpostgresqlflexibleservers.MigrationResourceForPatch{ - Properties: &armpostgresqlflexibleservers.MigrationResourcePropertiesForPatch{ - SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumTrue), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MigrationResource = armpostgresqlflexibleservers.MigrationResource{ - // Name: to.Ptr("testmigration"), - // Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration"), - // Location: to.Ptr("westus"), - // Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - // CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{ - // CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubStateDetails{ - // CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubStatePerformingPreRequisiteSteps), - // }, - // Error: to.Ptr(""), - // State: to.Ptr(armpostgresqlflexibleservers.MigrationStateInProgress), - // }, - // DbsToMigrate: []*string{ - // to.Ptr("db1"), - // to.Ptr("db2"), - // to.Ptr("db3"), - // to.Ptr("db4")}, - // MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-06T16:05:58.895Z"); return t}()), - // OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumFalse), - // SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumTrue), - // SourceDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("westus"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("B_Gen5_2"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Basic")), - // }, - // StorageMb: to.Ptr[int32](1024), - // Version: to.Ptr("10"), - // }, - // SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - // StartDataMigration: to.Ptr(armpostgresqlflexibleservers.StartDataMigrationEnumFalse), - // TargetDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("westus"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // StorageMb: to.Ptr[int32](2048), - // Version: to.Ptr("11"), - // }, - // TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget"), - // TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverEnumFalse), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_Delete.json -func ExampleMigrationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewMigrationsClient().Delete(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/Migrations_ListByTargetServer.json -func ExampleMigrationsClient_NewListByTargetServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMigrationsClient().NewListByTargetServerPager("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", &armpostgresqlflexibleservers.MigrationsClientListByTargetServerOptions{MigrationListFilter: to.Ptr(armpostgresqlflexibleservers.MigrationListFilterAll)}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.MigrationResourceListResult = armpostgresqlflexibleservers.MigrationResourceListResult{ - // Value: []*armpostgresqlflexibleservers.MigrationResource{ - // { - // Name: to.Ptr("testmigration"), - // Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration"), - // Location: to.Ptr("westus"), - // Properties: &armpostgresqlflexibleservers.MigrationResourceProperties{ - // CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{ - // CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubStateDetails{ - // CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubStatePerformingPreRequisiteSteps), - // }, - // Error: to.Ptr(""), - // State: to.Ptr(armpostgresqlflexibleservers.MigrationStateInProgress), - // }, - // DbsToMigrate: []*string{ - // to.Ptr("db1"), - // to.Ptr("db2"), - // to.Ptr("db3"), - // to.Ptr("db4")}, - // MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"), - // MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-06T16:05:58.895Z"); return t}()), - // OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDbsInTargetEnumFalse), - // SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceDbEnumFalse), - // SourceDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("westus"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("B_Gen5_2"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Basic")), - // }, - // StorageMb: to.Ptr[int32](1024), - // Version: to.Ptr("10"), - // }, - // SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource"), - // StartDataMigration: to.Ptr(armpostgresqlflexibleservers.StartDataMigrationEnumFalse), - // TargetDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{ - // Location: to.Ptr("westus"), - // SKU: &armpostgresqlflexibleservers.ServerSKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // StorageMb: to.Ptr[int32](2048), - // Version: to.Ptr("11"), - // }, - // TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget"), - // TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverEnumFalse), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models.go index 86f077e7e883..2901c8307e66 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models.go @@ -262,9 +262,75 @@ type DatabaseProperties struct { Collation *string } +// DbLevelValidationStatus - Validation status summary for an individual database +type DbLevelValidationStatus struct { + // Name of the database + DatabaseName *string + + // End date-time of a database level validation + EndedOn *time.Time + + // Start date-time of a database level validation + StartedOn *time.Time + + // Summary of database level validations + Summary []*ValidationSummaryItem +} + +// DbMigrationStatus - Migration status of an individual database +type DbMigrationStatus struct { + // CDC applied changes counter + AppliedChanges *int32 + + // CDC delete counter + CdcDeleteCounter *int32 + + // CDC insert counter + CdcInsertCounter *int32 + + // CDC update counter + CdcUpdateCounter *int32 + + // Name of the database + DatabaseName *string + + // End date-time of a migration state + EndedOn *time.Time + + // Number of tables loaded during the migration of a DB + FullLoadCompletedTables *int32 + + // Number of tables errored out during the migration of a DB + FullLoadErroredTables *int32 + + // Number of tables loading during the migration of a DB + FullLoadLoadingTables *int32 + + // Number of tables queued for the migration of a DB + FullLoadQueuedTables *int32 + + // CDC incoming changes counter + IncomingChanges *int32 + + // Lag in seconds between source and target during online phase + Latency *int32 + + // Error message, if any, for the migration state + Message *string + + // Migration operation of an individual database + MigrationOperation *string + + // Migration db state of an individual database + MigrationState *MigrationDbState + + // Start date-time of a migration state + StartedOn *time.Time +} + // DbServerMetadata - Database server metadata. type DbServerMetadata struct { - // SKU for the database server + // SKU for the database server. This object is empty for PG single server SKU *ServerSKU // Storage size in MB for database server @@ -662,6 +728,9 @@ type MigrationResourceProperties struct { // There are two types of migration modes Online and Offline MigrationMode *MigrationMode + // This indicates the supported Migration option for the migration + MigrationOption *MigrationOption + // End time in UTC for migration window MigrationWindowEndTimeInUTC *time.Time @@ -673,6 +742,9 @@ type MigrationResourceProperties struct { // already exists. OverwriteDbsInTarget *OverwriteDbsInTargetEnum + // SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source types + SSLMode *SSLMode + // Migration secret parameters SecretParameters *MigrationSecretParameters @@ -683,9 +755,13 @@ type MigrationResourceProperties struct { // for connection SourceDbServerFullyQualifiedDomainName *string - // ResourceId of the source database server + // ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types this + // should be ipaddress:port@username or hostname:port@username SourceDbServerResourceID *string + // migration source server type : OnPremises, AWS, GCP, AzureVM or PostgreSQLSingleServer + SourceType *SourceType + // Indicates whether the data migration should start right away StartDataMigration *StartDataMigrationEnum @@ -787,6 +863,12 @@ type MigrationStatus struct { // MigrationSubStateDetails - Migration sub state details. type MigrationSubStateDetails struct { + // Dictionary of + DbDetails map[string]*DbMigrationStatus + + // Details for the validation for migration + ValidationDetails *ValidationDetails + // READ-ONLY; Migration sub state. CurrentSubState *MigrationSubState } @@ -809,6 +891,15 @@ type NameAvailability struct { Type *string } +// NameProperty - Name property for quota usage +type NameProperty struct { + // Localized name + LocalizedValue *string + + // Name value + Value *string +} + // Network properties of a server. type Network struct { // Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, @@ -821,7 +912,7 @@ type Network struct { // update the value for Private DNS zone. PrivateDNSZoneArmResourceID *string - // READ-ONLY; public network access is enabled or not + // public network access is enabled or not PublicNetworkAccess *ServerPublicNetworkAccessState } @@ -867,6 +958,52 @@ type OperationListResult struct { Value []*Operation } +// QuotaUsage - Quota usage for flexible servers +type QuotaUsage struct { + // Current Quota usage value + CurrentValue *int64 + + // Fully qualified ARM resource Id + ID *string + + // Quota limit + Limit *int64 + + // Name of quota usage for flexible servers + Name *NameProperty + + // Quota unit + Unit *string +} + +// QuotaUsagesListResult - Capability for the PostgreSQL server +type QuotaUsagesListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; A list of quota usages. + Value []*QuotaUsage +} + +// Replica properties of a server +type Replica struct { + // Sets the promote mode for a replica server. This is a write only property. + PromoteMode *ReplicationPromoteMode + + // Sets the promote options for a replica server. This is a write only property. + PromoteOption *ReplicationPromoteOption + + // Used to indicate role of the server in replication set. + Role *ReplicationRole + + // READ-ONLY; Replicas allowed for a server. + Capacity *int32 + + // READ-ONLY; Gets the link state of a replica server. This property is returned only for replicas api call. Supported values + // are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring + LinkState *string +} + // RestartParameter - Represents server restart parameters. type RestartParameter struct { // Failover mode. @@ -1016,6 +1153,9 @@ type ServerProperties struct { // or 'GeoRestore' or 'ReviveDropped'. PointInTimeUTC *time.Time + // Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server. + Replica *Replica + // Replication role of the server ReplicationRole *ReplicationRole @@ -1068,6 +1208,9 @@ type ServerPropertiesForUpdate struct { // Network properties of a server. These are required to be passed only in case if server is a private access server. Network *Network + // Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server. + Replica *Replica + // Replication role of the server ReplicationRole *ReplicationRole @@ -1080,10 +1223,10 @@ type ServerPropertiesForUpdate struct { // ServerSKU - Sku information related properties of a server. type ServerSKU struct { - // REQUIRED; The name of the sku, typically, tier + family + cores, e.g. StandardD4sv3. + // The name of the sku, typically, tier + family + cores, e.g. StandardD4sv3. Name *string - // REQUIRED; The tier of the particular SKU, e.g. Burstable. + // The tier of the particular SKU, e.g. Burstable. Tier *SKUTier } @@ -1114,6 +1257,43 @@ type ServerSKUCapability struct { VCores *int32 } +// ServerThreatProtectionListResult - A list of the server's Threat Protection settings. +type ServerThreatProtectionListResult struct { + // READ-ONLY; Link to retrieve next page of results. + NextLink *string + + // READ-ONLY; Array of results. + Value []*ServerThreatProtectionSettingsModel +} + +// ServerThreatProtectionProperties - Properties of server Threat Protection state. +type ServerThreatProtectionProperties struct { + // REQUIRED; Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied + // yet on the specific server. + State *ThreatProtectionState + + // READ-ONLY; Specifies the UTC creation time of the policy. + CreationTime *time.Time +} + +// ServerThreatProtectionSettingsModel - Server's Threat Protection settings. +type ServerThreatProtectionSettingsModel struct { + // Resource properties. + Properties *ServerThreatProtectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + // ServerVersionCapability - Server version capabilities. type ServerVersionCapability struct { // READ-ONLY; Server version @@ -1134,14 +1314,20 @@ type Storage struct { // Flag to enable / disable Storage Auto grow for flexible server. AutoGrow *StorageAutoGrow + // Storage tier IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS + Iops *int32 + // Max storage allowed for a server. StorageSizeGB *int32 + // Storage throughput for the server. This is required to be set for storage Type PremiumV2_LRS + Throughput *int32 + // Name of storage tier for IOPS. Tier *AzureManagedDiskPerformanceTiers - // READ-ONLY; Storage tier IOPS quantity. - Iops *int32 + // Storage type for the server. Allowed values are PremiumLRS and PremiumV2LRS, and default is Premium_LRS if not specified + Type *string } // StorageEditionCapability - Storage edition capability @@ -1167,6 +1353,9 @@ type StorageMbCapability struct { // READ-ONLY; Default tier for IOPS DefaultIopsTier *string + // READ-ONLY; Maximum value of Storage size in MB + MaximumStorageSizeMb *int64 + // READ-ONLY; The reason for the capability not being available. Reason *string @@ -1181,6 +1370,15 @@ type StorageMbCapability struct { // READ-ONLY; List of available options to upgrade the storage performance SupportedIopsTiers []*StorageTierCapability + + // READ-ONLY; Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size + SupportedMaximumIops *int32 + + // READ-ONLY; Maximum values of throughput in MB/s + SupportedMaximumThroughput *int32 + + // READ-ONLY; Values of throughput in MB/s + SupportedThroughput *int32 } // StorageTierCapability - Represents capability of a storage tier @@ -1240,6 +1438,90 @@ type UserIdentity struct { PrincipalID *string } +// ValidationDetails - Details for the validation for migration +type ValidationDetails struct { + // Details of server level validations + DbLevelValidationDetails []*DbLevelValidationStatus + + // Details of server level validations + ServerLevelValidationDetails []*ValidationSummaryItem + + // Validation status for migration + Status *ValidationState + + // Validation End date-time in UTC + ValidationEndTimeInUTC *time.Time + + // Validation Start date-time in UTC + ValidationStartTimeInUTC *time.Time +} + +// ValidationMessage - Validation message object +type ValidationMessage struct { + // Validation message string + Message *string + + // Severity of validation message + State *ValidationState +} + +// ValidationSummaryItem - Validation summary object +type ValidationSummaryItem struct { + // Validation messages + Messages []*ValidationMessage + + // Validation status for migration + State *ValidationState + + // Validation type + Type *string +} + +// VirtualEndpointResource - Represents a virtual endpoint for a server. +type VirtualEndpointResource struct { + // Properties of the virtual endpoint resource. + Properties *VirtualEndpointResourceProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// VirtualEndpointResourceForPatch - Represents a virtual endpoint for a server. +type VirtualEndpointResourceForPatch struct { + // Properties of the virtual endpoint resource. + Properties *VirtualEndpointResourceProperties +} + +// VirtualEndpointResourceProperties - The properties of a virtual endpoint. +type VirtualEndpointResourceProperties struct { + // The endpoint type for the virtual endpoint. + EndpointType *VirtualEndpointType + + // List of members for a virtual endpoint + Members []*string + + // READ-ONLY; List of virtual endpoints for a server + VirtualEndpoints []*string +} + +// VirtualEndpointsListResult - A list of virtual endpoints. +type VirtualEndpointsListResult struct { + // The link used to get the next page of operations. + NextLink *string + + // The list of virtual endpoints + Value []*VirtualEndpointResource +} + // VirtualNetworkSubnetUsageParameter - Virtual network subnet usage parameter type VirtualNetworkSubnetUsageParameter struct { // Virtual network resource id. diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models_serde.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models_serde.go index d946ff4bf2b2..a490cb877de7 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models_serde.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/models_serde.go @@ -731,6 +731,132 @@ func (d *DatabaseProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DbLevelValidationStatus. +func (d DbLevelValidationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", d.DatabaseName) + populateTimeRFC3339(objectMap, "endedOn", d.EndedOn) + populateTimeRFC3339(objectMap, "startedOn", d.StartedOn) + populate(objectMap, "summary", d.Summary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DbLevelValidationStatus. +func (d *DbLevelValidationStatus) 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 "databaseName": + err = unpopulate(val, "DatabaseName", &d.DatabaseName) + delete(rawMsg, key) + case "endedOn": + err = unpopulateTimeRFC3339(val, "EndedOn", &d.EndedOn) + delete(rawMsg, key) + case "startedOn": + err = unpopulateTimeRFC3339(val, "StartedOn", &d.StartedOn) + delete(rawMsg, key) + case "summary": + err = unpopulate(val, "Summary", &d.Summary) + 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 DbMigrationStatus. +func (d DbMigrationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliedChanges", d.AppliedChanges) + populate(objectMap, "cdcDeleteCounter", d.CdcDeleteCounter) + populate(objectMap, "cdcInsertCounter", d.CdcInsertCounter) + populate(objectMap, "cdcUpdateCounter", d.CdcUpdateCounter) + populate(objectMap, "databaseName", d.DatabaseName) + populateTimeRFC3339(objectMap, "endedOn", d.EndedOn) + populate(objectMap, "fullLoadCompletedTables", d.FullLoadCompletedTables) + populate(objectMap, "fullLoadErroredTables", d.FullLoadErroredTables) + populate(objectMap, "fullLoadLoadingTables", d.FullLoadLoadingTables) + populate(objectMap, "fullLoadQueuedTables", d.FullLoadQueuedTables) + populate(objectMap, "incomingChanges", d.IncomingChanges) + populate(objectMap, "latency", d.Latency) + populate(objectMap, "message", d.Message) + populate(objectMap, "migrationOperation", d.MigrationOperation) + populate(objectMap, "migrationState", d.MigrationState) + populateTimeRFC3339(objectMap, "startedOn", d.StartedOn) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DbMigrationStatus. +func (d *DbMigrationStatus) 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 "appliedChanges": + err = unpopulate(val, "AppliedChanges", &d.AppliedChanges) + delete(rawMsg, key) + case "cdcDeleteCounter": + err = unpopulate(val, "CdcDeleteCounter", &d.CdcDeleteCounter) + delete(rawMsg, key) + case "cdcInsertCounter": + err = unpopulate(val, "CdcInsertCounter", &d.CdcInsertCounter) + delete(rawMsg, key) + case "cdcUpdateCounter": + err = unpopulate(val, "CdcUpdateCounter", &d.CdcUpdateCounter) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &d.DatabaseName) + delete(rawMsg, key) + case "endedOn": + err = unpopulateTimeRFC3339(val, "EndedOn", &d.EndedOn) + delete(rawMsg, key) + case "fullLoadCompletedTables": + err = unpopulate(val, "FullLoadCompletedTables", &d.FullLoadCompletedTables) + delete(rawMsg, key) + case "fullLoadErroredTables": + err = unpopulate(val, "FullLoadErroredTables", &d.FullLoadErroredTables) + delete(rawMsg, key) + case "fullLoadLoadingTables": + err = unpopulate(val, "FullLoadLoadingTables", &d.FullLoadLoadingTables) + delete(rawMsg, key) + case "fullLoadQueuedTables": + err = unpopulate(val, "FullLoadQueuedTables", &d.FullLoadQueuedTables) + delete(rawMsg, key) + case "incomingChanges": + err = unpopulate(val, "IncomingChanges", &d.IncomingChanges) + delete(rawMsg, key) + case "latency": + err = unpopulate(val, "Latency", &d.Latency) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "migrationOperation": + err = unpopulate(val, "MigrationOperation", &d.MigrationOperation) + delete(rawMsg, key) + case "migrationState": + err = unpopulate(val, "MigrationState", &d.MigrationState) + delete(rawMsg, key) + case "startedOn": + err = unpopulateTimeRFC3339(val, "StartedOn", &d.StartedOn) + 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 DbServerMetadata. func (d DbServerMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1712,14 +1838,17 @@ func (m MigrationResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "dbsToTriggerCutoverOn", m.DbsToTriggerCutoverOn) populate(objectMap, "migrationId", m.MigrationID) populate(objectMap, "migrationMode", m.MigrationMode) + populate(objectMap, "migrationOption", m.MigrationOption) populateTimeRFC3339(objectMap, "migrationWindowEndTimeInUtc", m.MigrationWindowEndTimeInUTC) populateTimeRFC3339(objectMap, "migrationWindowStartTimeInUtc", m.MigrationWindowStartTimeInUTC) populate(objectMap, "overwriteDbsInTarget", m.OverwriteDbsInTarget) + populate(objectMap, "sslMode", m.SSLMode) populate(objectMap, "secretParameters", m.SecretParameters) populate(objectMap, "setupLogicalReplicationOnSourceDbIfNeeded", m.SetupLogicalReplicationOnSourceDbIfNeeded) populate(objectMap, "sourceDbServerFullyQualifiedDomainName", m.SourceDbServerFullyQualifiedDomainName) populate(objectMap, "sourceDbServerMetadata", m.SourceDbServerMetadata) populate(objectMap, "sourceDbServerResourceId", m.SourceDbServerResourceID) + populate(objectMap, "sourceType", m.SourceType) populate(objectMap, "startDataMigration", m.StartDataMigration) populate(objectMap, "targetDbServerFullyQualifiedDomainName", m.TargetDbServerFullyQualifiedDomainName) populate(objectMap, "targetDbServerMetadata", m.TargetDbServerMetadata) @@ -1758,6 +1887,9 @@ func (m *MigrationResourceProperties) UnmarshalJSON(data []byte) error { case "migrationMode": err = unpopulate(val, "MigrationMode", &m.MigrationMode) delete(rawMsg, key) + case "migrationOption": + err = unpopulate(val, "MigrationOption", &m.MigrationOption) + delete(rawMsg, key) case "migrationWindowEndTimeInUtc": err = unpopulateTimeRFC3339(val, "MigrationWindowEndTimeInUTC", &m.MigrationWindowEndTimeInUTC) delete(rawMsg, key) @@ -1767,6 +1899,9 @@ func (m *MigrationResourceProperties) UnmarshalJSON(data []byte) error { case "overwriteDbsInTarget": err = unpopulate(val, "OverwriteDbsInTarget", &m.OverwriteDbsInTarget) delete(rawMsg, key) + case "sslMode": + err = unpopulate(val, "SSLMode", &m.SSLMode) + delete(rawMsg, key) case "secretParameters": err = unpopulate(val, "SecretParameters", &m.SecretParameters) delete(rawMsg, key) @@ -1782,6 +1917,9 @@ func (m *MigrationResourceProperties) UnmarshalJSON(data []byte) error { case "sourceDbServerResourceId": err = unpopulate(val, "SourceDbServerResourceID", &m.SourceDbServerResourceID) delete(rawMsg, key) + case "sourceType": + err = unpopulate(val, "SourceType", &m.SourceType) + delete(rawMsg, key) case "startDataMigration": err = unpopulate(val, "StartDataMigration", &m.StartDataMigration) delete(rawMsg, key) @@ -1958,6 +2096,8 @@ func (m *MigrationStatus) UnmarshalJSON(data []byte) error { func (m MigrationSubStateDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "currentSubState", m.CurrentSubState) + populate(objectMap, "dbDetails", m.DbDetails) + populate(objectMap, "validationDetails", m.ValidationDetails) return json.Marshal(objectMap) } @@ -1973,6 +2113,12 @@ func (m *MigrationSubStateDetails) UnmarshalJSON(data []byte) error { case "currentSubState": err = unpopulate(val, "CurrentSubState", &m.CurrentSubState) delete(rawMsg, key) + case "dbDetails": + err = unpopulate(val, "DbDetails", &m.DbDetails) + delete(rawMsg, key) + case "validationDetails": + err = unpopulate(val, "ValidationDetails", &m.ValidationDetails) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2024,6 +2170,37 @@ func (n *NameAvailability) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NameProperty. +func (n NameProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", n.LocalizedValue) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameProperty. +func (n *NameProperty) 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", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &n.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Network. func (n Network) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2172,6 +2349,123 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type QuotaUsage. +func (q QuotaUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", q.CurrentValue) + populate(objectMap, "id", q.ID) + populate(objectMap, "limit", q.Limit) + populate(objectMap, "name", q.Name) + populate(objectMap, "unit", q.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaUsage. +func (q *QuotaUsage) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &q.CurrentValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &q.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &q.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &q.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaUsagesListResult. +func (q QuotaUsagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", q.NextLink) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaUsagesListResult. +func (q *QuotaUsagesListResult) 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", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &q.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Replica. +func (r Replica) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", r.Capacity) + populate(objectMap, "linkState", r.LinkState) + populate(objectMap, "promoteMode", r.PromoteMode) + populate(objectMap, "promoteOption", r.PromoteOption) + populate(objectMap, "role", r.Role) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Replica. +func (r *Replica) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &r.Capacity) + delete(rawMsg, key) + case "linkState": + err = unpopulate(val, "LinkState", &r.LinkState) + delete(rawMsg, key) + case "promoteMode": + err = unpopulate(val, "PromoteMode", &r.PromoteMode) + delete(rawMsg, key) + case "promoteOption": + err = unpopulate(val, "PromoteOption", &r.PromoteOption) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &r.Role) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type RestartParameter. func (r RestartParameter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2488,6 +2782,7 @@ func (s ServerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "minorVersion", s.MinorVersion) populate(objectMap, "network", s.Network) populateTimeRFC3339(objectMap, "pointInTimeUTC", s.PointInTimeUTC) + populate(objectMap, "replica", s.Replica) populate(objectMap, "replicaCapacity", s.ReplicaCapacity) populate(objectMap, "replicationRole", s.ReplicationRole) populate(objectMap, "sourceServerResourceId", s.SourceServerResourceID) @@ -2545,6 +2840,9 @@ func (s *ServerProperties) UnmarshalJSON(data []byte) error { case "pointInTimeUTC": err = unpopulateTimeRFC3339(val, "PointInTimeUTC", &s.PointInTimeUTC) delete(rawMsg, key) + case "replica": + err = unpopulate(val, "Replica", &s.Replica) + delete(rawMsg, key) case "replicaCapacity": err = unpopulate(val, "ReplicaCapacity", &s.ReplicaCapacity) delete(rawMsg, key) @@ -2582,6 +2880,7 @@ func (s ServerPropertiesForUpdate) MarshalJSON() ([]byte, error) { populate(objectMap, "highAvailability", s.HighAvailability) populate(objectMap, "maintenanceWindow", s.MaintenanceWindow) populate(objectMap, "network", s.Network) + populate(objectMap, "replica", s.Replica) populate(objectMap, "replicationRole", s.ReplicationRole) populate(objectMap, "storage", s.Storage) populate(objectMap, "version", s.Version) @@ -2621,6 +2920,9 @@ func (s *ServerPropertiesForUpdate) UnmarshalJSON(data []byte) error { case "network": err = unpopulate(val, "Network", &s.Network) delete(rawMsg, key) + case "replica": + err = unpopulate(val, "Replica", &s.Replica) + delete(rawMsg, key) case "replicationRole": err = unpopulate(val, "ReplicationRole", &s.ReplicationRole) delete(rawMsg, key) @@ -2724,6 +3026,111 @@ func (s *ServerSKUCapability) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ServerThreatProtectionListResult. +func (s ServerThreatProtectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerThreatProtectionListResult. +func (s *ServerThreatProtectionListResult) 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 "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + 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 ServerThreatProtectionProperties. +func (s ServerThreatProtectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populate(objectMap, "state", s.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerThreatProtectionProperties. +func (s *ServerThreatProtectionProperties) 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 "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + 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 ServerThreatProtectionSettingsModel. +func (s ServerThreatProtectionSettingsModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerThreatProtectionSettingsModel. +func (s *ServerThreatProtectionSettingsModel) 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 "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + 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 ServerVersionCapability. func (s ServerVersionCapability) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2769,7 +3176,9 @@ func (s Storage) MarshalJSON() ([]byte, error) { populate(objectMap, "autoGrow", s.AutoGrow) populate(objectMap, "iops", s.Iops) populate(objectMap, "storageSizeGB", s.StorageSizeGB) + populate(objectMap, "throughput", s.Throughput) populate(objectMap, "tier", s.Tier) + populate(objectMap, "type", s.Type) return json.Marshal(objectMap) } @@ -2791,9 +3200,15 @@ func (s *Storage) UnmarshalJSON(data []byte) error { case "storageSizeGB": err = unpopulate(val, "StorageSizeGB", &s.StorageSizeGB) delete(rawMsg, key) + case "throughput": + err = unpopulate(val, "Throughput", &s.Throughput) + delete(rawMsg, key) case "tier": err = unpopulate(val, "Tier", &s.Tier) delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -2849,11 +3264,15 @@ func (s *StorageEditionCapability) UnmarshalJSON(data []byte) error { func (s StorageMbCapability) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "defaultIopsTier", s.DefaultIopsTier) + populate(objectMap, "maximumStorageSizeMb", s.MaximumStorageSizeMb) populate(objectMap, "reason", s.Reason) populate(objectMap, "status", s.Status) populate(objectMap, "storageSizeMb", s.StorageSizeMb) populate(objectMap, "supportedIops", s.SupportedIops) populate(objectMap, "supportedIopsTiers", s.SupportedIopsTiers) + populate(objectMap, "supportedMaximumIops", s.SupportedMaximumIops) + populate(objectMap, "supportedMaximumThroughput", s.SupportedMaximumThroughput) + populate(objectMap, "supportedThroughput", s.SupportedThroughput) return json.Marshal(objectMap) } @@ -2869,6 +3288,9 @@ func (s *StorageMbCapability) UnmarshalJSON(data []byte) error { case "defaultIopsTier": err = unpopulate(val, "DefaultIopsTier", &s.DefaultIopsTier) delete(rawMsg, key) + case "maximumStorageSizeMb": + err = unpopulate(val, "MaximumStorageSizeMb", &s.MaximumStorageSizeMb) + delete(rawMsg, key) case "reason": err = unpopulate(val, "Reason", &s.Reason) delete(rawMsg, key) @@ -2884,6 +3306,15 @@ func (s *StorageMbCapability) UnmarshalJSON(data []byte) error { case "supportedIopsTiers": err = unpopulate(val, "SupportedIopsTiers", &s.SupportedIopsTiers) delete(rawMsg, key) + case "supportedMaximumIops": + err = unpopulate(val, "SupportedMaximumIops", &s.SupportedMaximumIops) + delete(rawMsg, key) + case "supportedMaximumThroughput": + err = unpopulate(val, "SupportedMaximumThroughput", &s.SupportedMaximumThroughput) + delete(rawMsg, key) + case "supportedThroughput": + err = unpopulate(val, "SupportedThroughput", &s.SupportedThroughput) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -3044,6 +3475,251 @@ func (u *UserIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ValidationDetails. +func (v ValidationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dbLevelValidationDetails", v.DbLevelValidationDetails) + populate(objectMap, "serverLevelValidationDetails", v.ServerLevelValidationDetails) + populate(objectMap, "status", v.Status) + populateTimeRFC3339(objectMap, "validationEndTimeInUtc", v.ValidationEndTimeInUTC) + populateTimeRFC3339(objectMap, "validationStartTimeInUtc", v.ValidationStartTimeInUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidationDetails. +func (v *ValidationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dbLevelValidationDetails": + err = unpopulate(val, "DbLevelValidationDetails", &v.DbLevelValidationDetails) + delete(rawMsg, key) + case "serverLevelValidationDetails": + err = unpopulate(val, "ServerLevelValidationDetails", &v.ServerLevelValidationDetails) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &v.Status) + delete(rawMsg, key) + case "validationEndTimeInUtc": + err = unpopulateTimeRFC3339(val, "ValidationEndTimeInUTC", &v.ValidationEndTimeInUTC) + delete(rawMsg, key) + case "validationStartTimeInUtc": + err = unpopulateTimeRFC3339(val, "ValidationStartTimeInUTC", &v.ValidationStartTimeInUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidationMessage. +func (v ValidationMessage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", v.Message) + populate(objectMap, "state", v.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidationMessage. +func (v *ValidationMessage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &v.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidationSummaryItem. +func (v ValidationSummaryItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "messages", v.Messages) + populate(objectMap, "state", v.State) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidationSummaryItem. +func (v *ValidationSummaryItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "messages": + err = unpopulate(val, "Messages", &v.Messages) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &v.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualEndpointResource. +func (v VirtualEndpointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "systemData", v.SystemData) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualEndpointResource. +func (v *VirtualEndpointResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &v.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualEndpointResourceForPatch. +func (v VirtualEndpointResourceForPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualEndpointResourceForPatch. +func (v *VirtualEndpointResourceForPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualEndpointResourceProperties. +func (v VirtualEndpointResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpointType", v.EndpointType) + populate(objectMap, "members", v.Members) + populate(objectMap, "virtualEndpoints", v.VirtualEndpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualEndpointResourceProperties. +func (v *VirtualEndpointResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpointType": + err = unpopulate(val, "EndpointType", &v.EndpointType) + delete(rawMsg, key) + case "members": + err = unpopulate(val, "Members", &v.Members) + delete(rawMsg, key) + case "virtualEndpoints": + err = unpopulate(val, "VirtualEndpoints", &v.VirtualEndpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualEndpointsListResult. +func (v VirtualEndpointsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualEndpointsListResult. +func (v *VirtualEndpointsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkSubnetUsageParameter. func (v VirtualNetworkSubnetUsageParameter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client.go index dc9b86e32364..d12b84ef7926 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // List - Lists all of the available REST API operations. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error) { var err error @@ -68,7 +68,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client_example_test.go deleted file mode 100644 index 5f58a80d32d6..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/operations_client_example_test.go +++ /dev/null @@ -1,204 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/OperationList.json -func ExampleOperationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationsClient().List(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.OperationListResult = armpostgresqlflexibleservers.OperationListResult{ - // Value: []*armpostgresqlflexibleservers.Operation{ - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/read"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Return the list of servers or gets the properties for the specified server."), - // Operation: to.Ptr("List/Get PostgreSQL Servers"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("PostgreSQL Server"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/write"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Creates a server with the specified parameters or update the properties or tags for the specified server."), - // Operation: to.Ptr("Create/Update PostgreSQL Server"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("PostgreSQL Server"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/delete"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Deletes an existing server."), - // Operation: to.Ptr("Delete PostgreSQL Server"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("PostgreSQL Server"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/read"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Return the list of firewall rules for a server or gets the properties for the specified firewall rule."), - // Operation: to.Ptr("List/Get Firewall Rules"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("Firewall Rules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/write"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Creates a firewall rule with the specified parameters or update an existing rule."), - // Operation: to.Ptr("Create/Update Firewall Rule"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("Firewall Rules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/delete"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Deletes an existing firewall rule."), - // Operation: to.Ptr("Delete Firewall Rule"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("Firewall Rules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Return types of metrics that are available for databases"), - // Operation: to.Ptr("Get database metric definitions"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("Database Metric Definition"), - // }, - // Properties: map[string]any{ - // "serviceSpecification": map[string]any{ - // "metricSpecifications":[]any{ - // map[string]any{ - // "name": "cpu_percent", - // "aggregationType": "Average", - // "displayDescription": "CPU percent", - // "displayName": "CPU percent", - // "fillGapWithZero": true, - // "unit": "Percent", - // }, - // map[string]any{ - // "name": "compute_limit", - // "aggregationType": "Average", - // "displayDescription": "Compute Unit limit", - // "displayName": "Compute Unit limit", - // "unit": "Count", - // }, - // map[string]any{ - // "name": "compute_consumption_percent", - // "aggregationType": "Average", - // "displayDescription": "Compute Unit percentage", - // "displayName": "Compute Unit percentage", - // "fillGapWithZero": true, - // "unit": "Percent", - // }, - // map[string]any{ - // "name": "memory_percent", - // "aggregationType": "Average", - // "displayDescription": "Memory percent", - // "displayName": "Memory percent", - // "fillGapWithZero": true, - // "unit": "Percent", - // }, - // map[string]any{ - // "name": "io_consumption_percent", - // "aggregationType": "Average", - // "displayDescription": "IO percent", - // "displayName": "IO percent", - // "fillGapWithZero": true, - // "unit": "Percent", - // }, - // map[string]any{ - // "name": "storage_percent", - // "aggregationType": "Average", - // "displayDescription": "Storage percentage", - // "displayName": "Storage percentage", - // "unit": "Percent", - // }, - // map[string]any{ - // "name": "storage_used", - // "aggregationType": "Average", - // "displayDescription": "Storage used", - // "displayName": "Storage used", - // "unit": "Bytes", - // }, - // map[string]any{ - // "name": "storage_limit", - // "aggregationType": "Average", - // "displayDescription": "Storage limit", - // "displayName": "Storage limit", - // "unit": "Bytes", - // }, - // map[string]any{ - // "name": "active_connections", - // "aggregationType": "Average", - // "displayDescription": "Total active connections", - // "displayName": "Total active connections", - // "fillGapWithZero": true, - // "unit": "Count", - // }, - // map[string]any{ - // "name": "connections_failed", - // "aggregationType": "Average", - // "displayDescription": "Total failed connections", - // "displayName": "Total failed connections", - // "fillGapWithZero": true, - // "unit": "Count", - // }, - // }, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Gets the disagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("Database Metric Definition"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armpostgresqlflexibleservers.OperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft DB for PostgreSQL"), - // Resource: to.Ptr("Database Metric Definition"), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/options.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/options.go index 3c5b63f17e48..88882955e5af 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/options.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/options.go @@ -201,6 +201,11 @@ type PostgreSQLManagementClientCheckMigrationNameAvailabilityOptions struct { // placeholder for future optional parameters } +// QuotaUsagesClientGetOptions contains the optional parameters for the QuotaUsagesClient.NewGetPager method. +type QuotaUsagesClientGetOptions struct { + // placeholder for future optional parameters +} + // ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager method. type ReplicasClientListByServerOptions struct { // placeholder for future optional parameters @@ -211,6 +216,25 @@ type ServerCapabilitiesClientListOptions struct { // placeholder for future optional parameters } +// ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerThreatProtectionSettingsClient.BeginCreateOrUpdate +// method. +type ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServerThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerThreatProtectionSettingsClient.Get +// method. +type ServerThreatProtectionSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServerThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerThreatProtectionSettingsClient.NewListByServerPager +// method. +type ServerThreatProtectionSettingsClientListByServerOptions struct { + // placeholder for future optional parameters +} + // ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method. type ServersClientBeginCreateOptions struct { // Resumes the LRO from the provided token. @@ -266,6 +290,35 @@ type ServersClientListOptions struct { // placeholder for future optional parameters } +// VirtualEndpointsClientBeginCreateOptions contains the optional parameters for the VirtualEndpointsClient.BeginCreate method. +type VirtualEndpointsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualEndpointsClientBeginDeleteOptions contains the optional parameters for the VirtualEndpointsClient.BeginDelete method. +type VirtualEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualEndpointsClientBeginUpdateOptions contains the optional parameters for the VirtualEndpointsClient.BeginUpdate method. +type VirtualEndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualEndpointsClientGetOptions contains the optional parameters for the VirtualEndpointsClient.Get method. +type VirtualEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualEndpointsClientListByServerOptions contains the optional parameters for the VirtualEndpointsClient.NewListByServerPager +// method. +type VirtualEndpointsClientListByServerOptions struct { + // placeholder for future optional parameters +} + // VirtualNetworkSubnetUsageClientExecuteOptions contains the optional parameters for the VirtualNetworkSubnetUsageClient.Execute // method. type VirtualNetworkSubnetUsageClientExecuteOptions struct { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client.go index 8b463515b494..5f7df41fb210 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client.go @@ -43,7 +43,7 @@ func NewPostgreSQLManagementClient(credential azcore.TokenCredential, options *a // CheckMigrationNameAvailability - This method checks whether a proposed migration name is valid and available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - subscriptionID - The subscription ID of the target database server. // - resourceGroupName - The resource group name of the target database server. // - targetDbServerName - The name of the target database server. @@ -88,7 +88,7 @@ func (client *PostgreSQLManagementClient) checkMigrationNameAvailabilityCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client_example_test.go deleted file mode 100644 index 51faeb918e3e..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/postgresqlmanagement_client_example_test.go +++ /dev/null @@ -1,47 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/CheckMigrationNameAvailability.json -func ExamplePostgreSQLManagementClient_CheckMigrationNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostgreSQLManagementClient().CheckMigrationNameAvailability(ctx, "ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", armpostgresqlflexibleservers.MigrationNameAvailabilityResource{ - Name: to.Ptr("name1"), - Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MigrationNameAvailabilityResource = armpostgresqlflexibleservers.MigrationNameAvailabilityResource{ - // Name: to.Ptr("name1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), - // NameAvailable: to.Ptr(true), - // } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/quotausages_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/quotausages_client.go new file mode 100644 index 000000000000..6bce98acd86f --- /dev/null +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/quotausages_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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armpostgresqlflexibleservers + +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" +) + +// QuotaUsagesClient contains the methods for the QuotaUsages group. +// Don't use this type directly, use NewQuotaUsagesClient() instead. +type QuotaUsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewQuotaUsagesClient creates a new instance of QuotaUsagesClient 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 NewQuotaUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotaUsagesClient, error) { + cl, err := arm.NewClient(moduleName+".QuotaUsagesClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &QuotaUsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewGetPager - Get quota usages at specified location in a given subscription. +// +// Generated from API version 2023-06-01-preview +// - locationName - The name of the location. +// - options - QuotaUsagesClientGetOptions contains the optional parameters for the QuotaUsagesClient.NewGetPager method. +func (client *QuotaUsagesClient) NewGetPager(locationName string, options *QuotaUsagesClientGetOptions) *runtime.Pager[QuotaUsagesClientGetResponse] { + return runtime.NewPager(runtime.PagingHandler[QuotaUsagesClientGetResponse]{ + More: func(page QuotaUsagesClientGetResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *QuotaUsagesClientGetResponse) (QuotaUsagesClientGetResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.getCreateRequest(ctx, locationName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return QuotaUsagesClientGetResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return QuotaUsagesClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return QuotaUsagesClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) + }, + }) +} + +// getCreateRequest creates the Get request. +func (client *QuotaUsagesClient) getCreateRequest(ctx context.Context, locationName string, options *QuotaUsagesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *QuotaUsagesClient) getHandleResponse(resp *http.Response) (QuotaUsagesClientGetResponse, error) { + result := QuotaUsagesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.QuotaUsagesListResult); err != nil { + return QuotaUsagesClientGetResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client.go index 26c212355b4d..128db5ada520 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client.go @@ -45,7 +45,7 @@ func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, // NewListByServerPager - List all the replicas for a given server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager @@ -92,7 +92,7 @@ func (client *ReplicasClient) listByServerCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client_example_test.go deleted file mode 100644 index 7dfb7421eb87..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/replicas_client_example_test.go +++ /dev/null @@ -1,100 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ReplicasListByServer.json -func ExampleReplicasClient_NewListByServerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewReplicasClient().NewListByServerPager("testrg", "sourcepgservername", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerListResult = armpostgresqlflexibleservers.ServerListResult{ - // Value: []*armpostgresqlflexibleservers.Server{ - // { - // Name: to.Ptr("pgtestsvc5rep"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5rep"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("2"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-27T00:28:17.7279547+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc5rep.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // ReplicaCapacity: to.Ptr[int32](0), - // ReplicationRole: to.Ptr(armpostgresqlflexibleservers.ReplicationRoleAsyncReplica), - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/response_types.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/response_types.go index de6f4e9dbca5..85fc1e4eb668 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/response_types.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/response_types.go @@ -211,6 +211,12 @@ type PostgreSQLManagementClientCheckMigrationNameAvailabilityResponse struct { MigrationNameAvailabilityResource } +// QuotaUsagesClientGetResponse contains the response from method QuotaUsagesClient.NewGetPager. +type QuotaUsagesClientGetResponse struct { + // Capability for the PostgreSQL server + QuotaUsagesListResult +} + // ReplicasClientListByServerResponse contains the response from method ReplicasClient.NewListByServerPager. type ReplicasClientListByServerResponse struct { // A list of servers. @@ -223,6 +229,24 @@ type ServerCapabilitiesClientListResponse struct { CapabilitiesListResult } +// ServerThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method ServerThreatProtectionSettingsClient.BeginCreateOrUpdate. +type ServerThreatProtectionSettingsClientCreateOrUpdateResponse struct { + // Server's Threat Protection settings. + ServerThreatProtectionSettingsModel +} + +// ServerThreatProtectionSettingsClientGetResponse contains the response from method ServerThreatProtectionSettingsClient.Get. +type ServerThreatProtectionSettingsClientGetResponse struct { + // Server's Threat Protection settings. + ServerThreatProtectionSettingsModel +} + +// ServerThreatProtectionSettingsClientListByServerResponse contains the response from method ServerThreatProtectionSettingsClient.NewListByServerPager. +type ServerThreatProtectionSettingsClientListByServerResponse struct { + // A list of the server's Threat Protection settings. + ServerThreatProtectionListResult +} + // ServersClientCreateResponse contains the response from method ServersClient.BeginCreate. type ServersClientCreateResponse struct { // Represents a server. @@ -273,6 +297,35 @@ type ServersClientUpdateResponse struct { Server } +// VirtualEndpointsClientCreateResponse contains the response from method VirtualEndpointsClient.BeginCreate. +type VirtualEndpointsClientCreateResponse struct { + // Represents a virtual endpoint for a server. + VirtualEndpointResource +} + +// VirtualEndpointsClientDeleteResponse contains the response from method VirtualEndpointsClient.BeginDelete. +type VirtualEndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualEndpointsClientGetResponse contains the response from method VirtualEndpointsClient.Get. +type VirtualEndpointsClientGetResponse struct { + // Represents a virtual endpoint for a server. + VirtualEndpointResource +} + +// VirtualEndpointsClientListByServerResponse contains the response from method VirtualEndpointsClient.NewListByServerPager. +type VirtualEndpointsClientListByServerResponse struct { + // A list of virtual endpoints. + VirtualEndpointsListResult +} + +// VirtualEndpointsClientUpdateResponse contains the response from method VirtualEndpointsClient.BeginUpdate. +type VirtualEndpointsClientUpdateResponse struct { + // Represents a virtual endpoint for a server. + VirtualEndpointResource +} + // VirtualNetworkSubnetUsageClientExecuteResponse contains the response from method VirtualNetworkSubnetUsageClient.Execute. type VirtualNetworkSubnetUsageClientExecuteResponse struct { // Virtual network subnet usage data. diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client.go index a4dcf9e8e52a..fe4c3f0ae045 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client.go @@ -45,7 +45,7 @@ func NewServerCapabilitiesClient(subscriptionID string, credential azcore.TokenC // NewListPager - Get capabilities for a flexible server. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ServerCapabilitiesClientListOptions contains the optional parameters for the ServerCapabilitiesClient.NewListPager @@ -98,7 +98,7 @@ func (client *ServerCapabilitiesClient) listCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client_example_test.go deleted file mode 100644 index 2c537454ebd3..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servercapabilities_client_example_test.go +++ /dev/null @@ -1,1649 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCapabilities.json -func ExampleServerCapabilitiesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewServerCapabilitiesClient().NewListPager("testrg", "pgtestsvc4", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CapabilitiesListResult = armpostgresqlflexibleservers.CapabilitiesListResult{ - // Value: []*armpostgresqlflexibleservers.FlexibleServerCapability{ - // { - // Name: to.Ptr("FlexibleServerCapabilities"), - // FastProvisioningSupported: to.Ptr(armpostgresqlflexibleservers.FastProvisioningSupportedEnumEnabled), - // GeoBackupSupported: to.Ptr(armpostgresqlflexibleservers.GeoBackupSupportedEnumEnabled), - // OnlineResizeSupported: to.Ptr(armpostgresqlflexibleservers.OnlineResizeSupportedEnumDisabled), - // Restricted: to.Ptr(armpostgresqlflexibleservers.RestrictedEnumDisabled), - // StorageAutoGrowthSupported: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowthSupportedEnumEnabled), - // SupportedFastProvisioningEditions: []*armpostgresqlflexibleservers.FastProvisioningEditionCapability{ - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("12"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("13"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }, - // { - // ServerCount: to.Ptr[int32](23), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("14"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_b1ms"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_b2s"), - // SupportedStorageGb: to.Ptr[int32](32), - // SupportedTier: to.Ptr("Burstable"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_d2s_v3"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_d2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](128), - // SupportedTier: to.Ptr("GeneralPurpose"), - // }, - // { - // ServerCount: to.Ptr[int32](0), - // SupportedServerVersions: to.Ptr("15"), - // SupportedSKU: to.Ptr("standard_e2ds_v4"), - // SupportedStorageGb: to.Ptr[int32](512), - // SupportedTier: to.Ptr("MemoryOptimized"), - // }}, - // SupportedServerEditions: []*armpostgresqlflexibleservers.FlexibleServerEditionCapability{ - // { - // Name: to.Ptr("Burstable"), - // DefaultSKUName: to.Ptr("Standard_B1ms"), - // SupportedServerSKUs: []*armpostgresqlflexibleservers.ServerSKUCapability{ - // { - // Name: to.Ptr("Standard_B1ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](640), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](1), - // }, - // { - // Name: to.Ptr("Standard_B2s"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](1280), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_B2ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](1700), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_B4ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](2400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_B8ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3100), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_B12ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](12), - // }, - // { - // Name: to.Ptr("Standard_B16ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](4300), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_B20ms"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](5000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](2048), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](20), - // }}, - // SupportedStorageEditions: []*armpostgresqlflexibleservers.StorageEditionCapability{ - // { - // Name: to.Ptr("ManagedDisk"), - // DefaultStorageSizeMb: to.Ptr[int64](32768), - // SupportedStorageMb: []*armpostgresqlflexibleservers.StorageMbCapability{ - // { - // DefaultIopsTier: to.Ptr("P4"), - // StorageSizeMb: to.Ptr[int64](32768), - // SupportedIops: to.Ptr[int32](120), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P4"), - // Iops: to.Ptr[int32](120), - // }, - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P6"), - // StorageSizeMb: to.Ptr[int64](65536), - // SupportedIops: to.Ptr[int32](240), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P10"), - // StorageSizeMb: to.Ptr[int64](131072), - // SupportedIops: to.Ptr[int32](500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P15"), - // StorageSizeMb: to.Ptr[int64](262144), - // SupportedIops: to.Ptr[int32](1100), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P20"), - // StorageSizeMb: to.Ptr[int64](524288), - // SupportedIops: to.Ptr[int32](2300), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P30"), - // StorageSizeMb: to.Ptr[int64](1048576), - // SupportedIops: to.Ptr[int32](5000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P40"), - // StorageSizeMb: to.Ptr[int64](2097152), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P50"), - // StorageSizeMb: to.Ptr[int64](4194304), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P60"), - // StorageSizeMb: to.Ptr[int64](8388608), - // SupportedIops: to.Ptr[int32](16000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P60"), - // Iops: to.Ptr[int32](16000), - // }, - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P70"), - // StorageSizeMb: to.Ptr[int64](16777216), - // SupportedIops: to.Ptr[int32](18000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P80"), - // StorageSizeMb: to.Ptr[int64](33553408), - // SupportedIops: to.Ptr[int32](20000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }}, - // }}, - // }, - // { - // Name: to.Ptr("GeneralPurpose"), - // DefaultSKUName: to.Ptr("Standard_D2ds_v4"), - // SupportedServerSKUs: []*armpostgresqlflexibleservers.ServerSKUCapability{ - // { - // Name: to.Ptr("Standard_D2s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_D4s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_D8s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_D16s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_D32s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_D48s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_D64s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_D2ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_D4ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_D8ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_D16ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_D32ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_D48ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_D64ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_D2ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_D4ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_D8ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_D16ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_D32ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_D48ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_D64ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_D96ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](4096), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](96), - // }}, - // SupportedStorageEditions: []*armpostgresqlflexibleservers.StorageEditionCapability{ - // { - // Name: to.Ptr("ManagedDisk"), - // DefaultStorageSizeMb: to.Ptr[int64](65536), - // SupportedStorageMb: []*armpostgresqlflexibleservers.StorageMbCapability{ - // { - // DefaultIopsTier: to.Ptr("P4"), - // StorageSizeMb: to.Ptr[int64](32768), - // SupportedIops: to.Ptr[int32](120), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P4"), - // Iops: to.Ptr[int32](120), - // }, - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P6"), - // StorageSizeMb: to.Ptr[int64](65536), - // SupportedIops: to.Ptr[int32](240), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P10"), - // StorageSizeMb: to.Ptr[int64](131072), - // SupportedIops: to.Ptr[int32](500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P15"), - // StorageSizeMb: to.Ptr[int64](262144), - // SupportedIops: to.Ptr[int32](1100), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P20"), - // StorageSizeMb: to.Ptr[int64](524288), - // SupportedIops: to.Ptr[int32](2300), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P30"), - // StorageSizeMb: to.Ptr[int64](1048576), - // SupportedIops: to.Ptr[int32](5000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P40"), - // StorageSizeMb: to.Ptr[int64](2097152), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P50"), - // StorageSizeMb: to.Ptr[int64](4194304), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P60"), - // StorageSizeMb: to.Ptr[int64](8388608), - // SupportedIops: to.Ptr[int32](16000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P60"), - // Iops: to.Ptr[int32](16000), - // }, - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P70"), - // StorageSizeMb: to.Ptr[int64](16777216), - // SupportedIops: to.Ptr[int32](18000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P80"), - // StorageSizeMb: to.Ptr[int64](33553408), - // SupportedIops: to.Ptr[int32](20000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }}, - // }}, - // }, - // { - // Name: to.Ptr("MemoryOptimized"), - // DefaultSKUName: to.Ptr("Standard_E2ds_v4"), - // SupportedServerSKUs: []*armpostgresqlflexibleservers.ServerSKUCapability{ - // { - // Name: to.Ptr("Standard_E2s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_E4s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_E8s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_E16s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_E32s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_E48s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_E64s_v3"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](6912), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_E2ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_E4ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_E8ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_E16ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_E20ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](20), - // }, - // { - // Name: to.Ptr("Standard_E32ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_E48ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_E64ds_v4"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](6912), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_E2ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](3200), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](2), - // }, - // { - // Name: to.Ptr("Standard_E4ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](6400), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](4), - // }, - // { - // Name: to.Ptr("Standard_E8ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](12800), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](8), - // }, - // { - // Name: to.Ptr("Standard_E16ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](16), - // }, - // { - // Name: to.Ptr("Standard_E32ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](32), - // }, - // { - // Name: to.Ptr("Standard_E48ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](48), - // }, - // { - // Name: to.Ptr("Standard_E64ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](8192), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](64), - // }, - // { - // Name: to.Ptr("Standard_E96ads_v5"), - // SupportedHaMode: []*armpostgresqlflexibleservers.HaMode{ - // to.Ptr(armpostgresqlflexibleservers.HaModeSameZone), - // to.Ptr(armpostgresqlflexibleservers.HaModeZoneRedundant)}, - // SupportedIops: to.Ptr[int32](20000), - // SupportedMemoryPerVcoreMb: to.Ptr[int64](7168), - // SupportedZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // VCores: to.Ptr[int32](96), - // }}, - // SupportedStorageEditions: []*armpostgresqlflexibleservers.StorageEditionCapability{ - // { - // Name: to.Ptr("ManagedDisk"), - // DefaultStorageSizeMb: to.Ptr[int64](131072), - // SupportedStorageMb: []*armpostgresqlflexibleservers.StorageMbCapability{ - // { - // DefaultIopsTier: to.Ptr("P4"), - // StorageSizeMb: to.Ptr[int64](32768), - // SupportedIops: to.Ptr[int32](120), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P4"), - // Iops: to.Ptr[int32](120), - // }, - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P6"), - // StorageSizeMb: to.Ptr[int64](65536), - // SupportedIops: to.Ptr[int32](240), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P6"), - // Iops: to.Ptr[int32](240), - // }, - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P10"), - // StorageSizeMb: to.Ptr[int64](131072), - // SupportedIops: to.Ptr[int32](500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P10"), - // Iops: to.Ptr[int32](500), - // }, - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P15"), - // StorageSizeMb: to.Ptr[int64](262144), - // SupportedIops: to.Ptr[int32](1100), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P15"), - // Iops: to.Ptr[int32](1100), - // }, - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P20"), - // StorageSizeMb: to.Ptr[int64](524288), - // SupportedIops: to.Ptr[int32](2300), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P20"), - // Iops: to.Ptr[int32](2300), - // }, - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P30"), - // StorageSizeMb: to.Ptr[int64](1048576), - // SupportedIops: to.Ptr[int32](5000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P30"), - // Iops: to.Ptr[int32](5000), - // }, - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P40"), - // StorageSizeMb: to.Ptr[int64](2097152), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P40"), - // Iops: to.Ptr[int32](7500), - // }, - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P50"), - // StorageSizeMb: to.Ptr[int64](4194304), - // SupportedIops: to.Ptr[int32](7500), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P50"), - // Iops: to.Ptr[int32](7500), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P60"), - // StorageSizeMb: to.Ptr[int64](8388608), - // SupportedIops: to.Ptr[int32](16000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P60"), - // Iops: to.Ptr[int32](16000), - // }, - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P70"), - // StorageSizeMb: to.Ptr[int64](16777216), - // SupportedIops: to.Ptr[int32](18000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P70"), - // Iops: to.Ptr[int32](18000), - // }, - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }, - // { - // DefaultIopsTier: to.Ptr("P80"), - // StorageSizeMb: to.Ptr[int64](33553408), - // SupportedIops: to.Ptr[int32](20000), - // SupportedIopsTiers: []*armpostgresqlflexibleservers.StorageTierCapability{ - // { - // Name: to.Ptr("P80"), - // Iops: to.Ptr[int32](20000), - // }}, - // }}, - // }}, - // }}, - // SupportedServerVersions: []*armpostgresqlflexibleservers.ServerVersionCapability{ - // { - // Name: to.Ptr("11"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("12"), - // to.Ptr("13"), - // to.Ptr("14"), - // to.Ptr("15")}, - // }, - // { - // Name: to.Ptr("12"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("13"), - // to.Ptr("14"), - // to.Ptr("15")}, - // }, - // { - // Name: to.Ptr("13"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("14"), - // to.Ptr("15")}, - // }, - // { - // Name: to.Ptr("14"), - // SupportedVersionsToUpgrade: []*string{ - // to.Ptr("15")}, - // }}, - // ZoneRedundantHaAndGeoBackupSupported: to.Ptr(armpostgresqlflexibleservers.ZoneRedundantHaAndGeoBackupSupportedEnumEnabled), - // ZoneRedundantHaSupported: to.Ptr(armpostgresqlflexibleservers.ZoneRedundantHaSupportedEnumEnabled), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client.go index 884ab0cc2689..83ffe3a92114 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client.go @@ -46,7 +46,7 @@ func NewServersClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a new server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - parameters - The required parameters for creating or updating a server. @@ -69,7 +69,7 @@ func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName // Create - Creates a new server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ServersClient) create(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOptions) (*http.Response, error) { var err error req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, parameters, options) @@ -107,7 +107,7 @@ func (client *ServersClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -119,7 +119,7 @@ func (client *ServersClient) createCreateRequest(ctx context.Context, resourceGr // BeginDelete - Deletes a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method. @@ -141,7 +141,7 @@ func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ServersClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, options) @@ -179,7 +179,7 @@ func (client *ServersClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *ServersClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets information about a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ServersClientGetOptions contains the optional parameters for the ServersClient.Get method. @@ -230,7 +230,7 @@ func (client *ServersClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *ServersClient) getHandleResponse(resp *http.Response) (ServersClie // NewListPager - List all the servers in a given subscription. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - options - ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method. func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServersClientListResponse]{ @@ -289,7 +289,7 @@ func (client *ServersClient) listCreateRequest(ctx context.Context, options *Ser return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *ServersClient) listHandleResponse(resp *http.Response) (ServersCli // NewListByResourceGroupPager - List all the servers in a given resource group. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager // method. @@ -354,7 +354,7 @@ func (client *ServersClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -372,7 +372,7 @@ func (client *ServersClient) listByResourceGroupHandleResponse(resp *http.Respon // BeginRestart - Restarts a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method. @@ -394,7 +394,7 @@ func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName // Restart - Restarts a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ServersClient) restart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginRestartOptions) (*http.Response, error) { var err error req, err := client.restartCreateRequest(ctx, resourceGroupName, serverName, options) @@ -432,7 +432,7 @@ func (client *ServersClient) restartCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -447,7 +447,7 @@ func (client *ServersClient) restartCreateRequest(ctx context.Context, resourceG // BeginStart - Starts a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ServersClientBeginStartOptions contains the optional parameters for the ServersClient.BeginStart method. @@ -469,7 +469,7 @@ func (client *ServersClient) BeginStart(ctx context.Context, resourceGroupName s // Start - Starts a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ServersClient) start(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStartOptions) (*http.Response, error) { var err error req, err := client.startCreateRequest(ctx, resourceGroupName, serverName, options) @@ -507,7 +507,7 @@ func (client *ServersClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -516,7 +516,7 @@ func (client *ServersClient) startCreateRequest(ctx context.Context, resourceGro // BeginStop - Stops a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - options - ServersClientBeginStopOptions contains the optional parameters for the ServersClient.BeginStop method. @@ -538,7 +538,7 @@ func (client *ServersClient) BeginStop(ctx context.Context, resourceGroupName st // Stop - Stops a server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ServersClient) stop(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStopOptions) (*http.Response, error) { var err error req, err := client.stopCreateRequest(ctx, resourceGroupName, serverName, options) @@ -576,7 +576,7 @@ func (client *ServersClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -586,7 +586,7 @@ func (client *ServersClient) stopCreateRequest(ctx context.Context, resourceGrou // server definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - serverName - The name of the server. // - parameters - The required parameters for updating a server. @@ -610,7 +610,7 @@ func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName // definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview func (client *ServersClient) update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForUpdate, options *ServersClientBeginUpdateOptions) (*http.Response, error) { var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) @@ -648,7 +648,7 @@ func (client *ServersClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client_example_test.go deleted file mode 100644 index 72eb6561a3c9..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/servers_client_example_test.go +++ /dev/null @@ -1,1757 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreateGeoRestoreWithDataEncryptionEnabled.json -func ExampleServersClient_BeginCreate_createADatabaseAsAGeoRestoreInGeoPairedLocation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc5geo", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("eastus"), - Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity": {}, - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": {}, - }, - }, - Properties: &armpostgresqlflexibleservers.ServerProperties{ - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeGeoRestore), - DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - GeoBackupKeyURI: to.Ptr("https://test-geo-kv.vault.azure.net/keys/test-key1/66f57315bab34b0189daa113fbc78787"), - GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity"), - PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - }, - PointInTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-27T00:04:59.4078005+00:00"); return t }()), - SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc5geo"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5geo"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - // Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("0a4e0c6e-7751-4078-ae1f-a477306c11e9"), - // }, - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("0a4e0c6e-7751-4078-ae1f-a477306c11e9"), - // }, - // }, - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("2"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-27T00:28:17.7279547+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumEnabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - // GeoBackupEncryptionKeyStatus: to.Ptr(armpostgresqlflexibleservers.KeyStatusEnumValid), - // GeoBackupKeyURI: to.Ptr("https://test-geo-kv.vault.azure.net/keys/test-key1/66f57315bab34b0189daa113fbc78787"), - // GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity"), - // PrimaryEncryptionKeyStatus: to.Ptr(armpostgresqlflexibleservers.KeyStatusEnumValid), - // PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - // PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc5geo.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreatePointInTimeRestore.json -func ExampleServersClient_BeginCreate_createADatabaseAsAPointInTimeRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc5", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("westus"), - Properties: &armpostgresqlflexibleservers.ServerProperties{ - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModePointInTimeRestore), - PointInTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-27T00:04:59.4078005+00:00"); return t }()), - SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc5"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("2"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-27T00:28:17.7279547+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc5.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreate.json -func ExampleServersClient_BeginCreate_createANewServer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc4", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "ElasticServer": to.Ptr("1"), - }, - Properties: &armpostgresqlflexibleservers.ServerProperties{ - AdministratorLogin: to.Ptr("cloudsa"), - AdministratorLoginPassword: to.Ptr("password"), - AvailabilityZone: to.Ptr("1"), - Backup: &armpostgresqlflexibleservers.Backup{ - BackupRetentionDays: to.Ptr[int32](7), - GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - }, - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeCreate), - HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - }, - Network: &armpostgresqlflexibleservers.Network{ - DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - }, - Storage: &armpostgresqlflexibleservers.Storage{ - AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - StorageSizeGB: to.Ptr[int32](512), - Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - }, - Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - }, - SKU: &armpostgresqlflexibleservers.SKU{ - Name: to.Ptr("Standard_D4s_v3"), - Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:08:06.7197478+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreateWithAadAuthEnabled.json -func ExampleServersClient_BeginCreate_createANewServerWithActiveDirectoryAuthenticationEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc4", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "ElasticServer": to.Ptr("1"), - }, - Properties: &armpostgresqlflexibleservers.ServerProperties{ - AdministratorLogin: to.Ptr("cloudsa"), - AdministratorLoginPassword: to.Ptr("password"), - AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumEnabled), - PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - TenantID: to.Ptr("tttttt-tttt-tttt-tttt-tttttttttttt"), - }, - AvailabilityZone: to.Ptr("1"), - Backup: &armpostgresqlflexibleservers.Backup{ - BackupRetentionDays: to.Ptr[int32](7), - GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - }, - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeCreate), - DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - }, - HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - }, - Network: &armpostgresqlflexibleservers.Network{ - DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - }, - Storage: &armpostgresqlflexibleservers.Storage{ - AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - StorageSizeGB: to.Ptr[int32](512), - Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - }, - Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - }, - SKU: &armpostgresqlflexibleservers.SKU{ - Name: to.Ptr("Standard_D4s_v3"), - Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumEnabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // TenantID: to.Ptr("tttttt-tttt-tttt-tttt-tttttttttttt"), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:08:06.7197478+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreateReplica.json -func ExampleServersClient_BeginCreate_serverCreateReplica() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc5rep", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("westus"), - Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": {}, - }, - }, - Properties: &armpostgresqlflexibleservers.ServerProperties{ - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeReplica), - DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - GeoBackupKeyURI: to.Ptr(""), - GeoBackupUserAssignedIdentityID: to.Ptr(""), - PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - }, - PointInTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-27T00:04:59.4078005+00:00"); return t }()), - SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc5rep"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5rep"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - // Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("0a4e0c6e-7751-4078-ae1f-a477306c11e9"), - // }, - // }, - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("2"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-27T00:28:17.7279547+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - // PrimaryEncryptionKeyStatus: to.Ptr(armpostgresqlflexibleservers.KeyStatusEnumValid), - // PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - // PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc5rep.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // ReplicaCapacity: to.Ptr[int32](0), - // ReplicationRole: to.Ptr(armpostgresqlflexibleservers.ReplicationRoleAsyncReplica), - // SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreateReviveDropped.json -func ExampleServersClient_BeginCreate_serverCreateReviveDropped() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc5-rev", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("westus"), - Properties: &armpostgresqlflexibleservers.ServerProperties{ - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeReviveDropped), - PointInTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T00:04:59.4078005+00:00"); return t }()), - SourceServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc5-rev"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5-rev"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("2"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-27T00:28:17.7279547+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc5-rev.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // ReplicaCapacity: to.Ptr[int32](0), - // ReplicationRole: to.Ptr(armpostgresqlflexibleservers.ReplicationRolePrimary), - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerCreateWithDataEncryptionEnabled.json -func ExampleServersClient_BeginCreate_serverCreateWithDataEncryptionEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "pgtestsvc4", armpostgresqlflexibleservers.Server{ - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "ElasticServer": to.Ptr("1"), - }, - Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": {}, - }, - }, - Properties: &armpostgresqlflexibleservers.ServerProperties{ - AdministratorLogin: to.Ptr("cloudsa"), - AdministratorLoginPassword: to.Ptr("password"), - AvailabilityZone: to.Ptr("1"), - Backup: &armpostgresqlflexibleservers.Backup{ - BackupRetentionDays: to.Ptr[int32](7), - GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - }, - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeCreate), - DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - GeoBackupKeyURI: to.Ptr(""), - GeoBackupUserAssignedIdentityID: to.Ptr(""), - PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - }, - HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - }, - Network: &armpostgresqlflexibleservers.Network{ - DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - }, - Storage: &armpostgresqlflexibleservers.Storage{ - AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - StorageSizeGB: to.Ptr[int32](512), - }, - Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - }, - SKU: &armpostgresqlflexibleservers.SKU{ - Name: to.Ptr("Standard_D4s_v3"), - Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - // Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("0a4e0c6e-7751-4078-ae1f-a477306c11e9"), - // }, - // }, - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumEnabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:08:06.7197478+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - // PrimaryEncryptionKeyStatus: to.Ptr(armpostgresqlflexibleservers.KeyStatusEnumValid), - // PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - // PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdate.json -func ExampleServersClient_BeginUpdate_serverUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "TestGroup", "pgtestsvc4", armpostgresqlflexibleservers.ServerForUpdate{ - Properties: &armpostgresqlflexibleservers.ServerPropertiesForUpdate{ - AdministratorLoginPassword: to.Ptr("newpassword"), - Backup: &armpostgresqlflexibleservers.Backup{ - BackupRetentionDays: to.Ptr[int32](20), - }, - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeForUpdateUpdate), - Storage: &armpostgresqlflexibleservers.Storage{ - AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowEnabled), - StorageSizeGB: to.Ptr[int32](1024), - Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP30), - }, - }, - SKU: &armpostgresqlflexibleservers.SKU{ - Name: to.Ptr("Standard_D8s_v3"), - Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](20), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowEnabled), - // Iops: to.Ptr[int32](5000), - // StorageSizeGB: to.Ptr[int32](1024), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP30), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D8s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithAadAuthEnabled.json -func ExampleServersClient_BeginUpdate_serverUpdateWithAadAuthEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "TestGroup", "pgtestsvc4", armpostgresqlflexibleservers.ServerForUpdate{ - Properties: &armpostgresqlflexibleservers.ServerPropertiesForUpdate{ - AdministratorLoginPassword: to.Ptr("newpassword"), - AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumEnabled), - PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - TenantID: to.Ptr("tttttt-tttt-tttt-tttt-tttttttttttt"), - }, - Backup: &armpostgresqlflexibleservers.Backup{ - BackupRetentionDays: to.Ptr[int32](20), - }, - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeForUpdateUpdate), - Storage: &armpostgresqlflexibleservers.Storage{ - AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - StorageSizeGB: to.Ptr[int32](1024), - Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP30), - }, - }, - SKU: &armpostgresqlflexibleservers.SKU{ - Name: to.Ptr("Standard_D8s_v3"), - Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumEnabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // TenantID: to.Ptr("tttttt-tttt-tttt-tttt-tttttttttttt"), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](20), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](5000), - // StorageSizeGB: to.Ptr[int32](1024), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP30), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D8s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json -func ExampleServersClient_BeginUpdate_serverUpdateWithCustomerMaintenanceWindow() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "pgtestsvc4", armpostgresqlflexibleservers.ServerForUpdate{ - Properties: &armpostgresqlflexibleservers.ServerPropertiesForUpdate{ - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeForUpdateUpdate), - MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - CustomWindow: to.Ptr("Enabled"), - DayOfWeek: to.Ptr[int32](0), - StartHour: to.Ptr[int32](8), - StartMinute: to.Ptr[int32](0), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Enabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](8), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithDataEncryptionEnabled.json -func ExampleServersClient_BeginUpdate_serverUpdateWithDataEncryptionEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "TestGroup", "pgtestsvc4", armpostgresqlflexibleservers.ServerForUpdate{ - Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity": {}, - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": {}, - }, - }, - Properties: &armpostgresqlflexibleservers.ServerPropertiesForUpdate{ - AdministratorLoginPassword: to.Ptr("newpassword"), - Backup: &armpostgresqlflexibleservers.Backup{ - BackupRetentionDays: to.Ptr[int32](20), - }, - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeForUpdateUpdate), - DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - GeoBackupKeyURI: to.Ptr("https://test-geo-kv.vault.azure.net/keys/test-key1/66f57315bab34b0189daa113fbc78787"), - GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity"), - PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - }, - }, - SKU: &armpostgresqlflexibleservers.SKU{ - Name: to.Ptr("Standard_D8s_v3"), - Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Identity: &armpostgresqlflexibleservers.UserAssignedIdentity{ - // Type: to.Ptr(armpostgresqlflexibleservers.IdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armpostgresqlflexibleservers.UserIdentity{ - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("0a4e0c6e-7751-4078-ae1f-a477306c11e9"), - // }, - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("0a4e0c6e-7751-4078-ae1f-a477306c11e9"), - // }, - // "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity-1": &armpostgresqlflexibleservers.UserIdentity{ - // ClientID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), - // PrincipalID: to.Ptr("90008082-e024-4cc3-8fcf-63bcdb9cf6b6"), - // }, - // }, - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](20), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumEnabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeAzureKeyVault), - // GeoBackupEncryptionKeyStatus: to.Ptr(armpostgresqlflexibleservers.KeyStatusEnumValid), - // GeoBackupKeyURI: to.Ptr("https://test-geo-kv.vault.azure.net/keys/test-key1/66f57315bab34b0189daa113fbc78787"), - // GeoBackupUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity"), - // PrimaryEncryptionKeyStatus: to.Ptr(armpostgresqlflexibleservers.KeyStatusEnumValid), - // PrimaryKeyURI: to.Ptr("https://test-kv.vault.azure.net/keys/test-key1/77f57315bab34b0189daa113fbc78787"), - // PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity"), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](5000), - // StorageSizeGB: to.Ptr[int32](1024), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP30), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D8s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithMajorVersionUpgrade.json -func ExampleServersClient_BeginUpdate_serverUpdateWithMajorVersionUpgrade() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "pgtestsvc4", armpostgresqlflexibleservers.ServerForUpdate{ - Properties: &armpostgresqlflexibleservers.ServerPropertiesForUpdate{ - CreateMode: to.Ptr(armpostgresqlflexibleservers.CreateModeForUpdateUpdate), - Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionFourteen), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // DataEncryption: &armpostgresqlflexibleservers.DataEncryption{ - // Type: to.Ptr(armpostgresqlflexibleservers.ArmServerKeyTypeSystemManaged), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowEnabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionFourteen), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerDelete.json -func ExampleServersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginDelete(ctx, "testrg", "testserver", 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerGet.json -func ExampleServersClient_Get_serverGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServersClient().Get(ctx, "testrg", "pgtestsvc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T23:07:25.8166567+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc1.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerGetWithVnet.json -func ExampleServersClient_Get_serverGetWithVnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServersClient().Get(ctx, "testrg", "pgtestsvc4", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Server = armpostgresqlflexibleservers.Server{ - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MaintenanceWindow: &armpostgresqlflexibleservers.MaintenanceWindow{ - // CustomWindow: to.Ptr("Disabled"), - // DayOfWeek: to.Ptr[int32](0), - // StartHour: to.Ptr[int32](0), - // StartMinute: to.Ptr[int32](0), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerListByResourceGroup.json -func ExampleServersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewServersClient().NewListByResourceGroupPager("testrg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerListResult = armpostgresqlflexibleservers.ServerListResult{ - // Value: []*armpostgresqlflexibleservers.Server{ - // { - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // }, - // { - // Name: to.Ptr("pgtestsvc1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T23:15:38.8131437+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc1.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerList.json -func ExampleServersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewServersClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerListResult = armpostgresqlflexibleservers.ServerListResult{ - // Value: []*armpostgresqlflexibleservers.Server{ - // { - // Name: to.Ptr("pgtestsvc4"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4"), - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T01:16:58.3723361+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeZoneRedundant), - // StandbyAvailabilityZone: to.Ptr("2"), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateHealthy), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // DelegatedSubnetResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), - // PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"), - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateDisabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowDisabled), - // StorageSizeGB: to.Ptr[int32](512), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // }, - // { - // Name: to.Ptr("pgtestsvc1"), - // Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers"), - // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1"), - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "ElasticServer": to.Ptr("1"), - // }, - // Properties: &armpostgresqlflexibleservers.ServerProperties{ - // AdministratorLogin: to.Ptr("cloudsa"), - // AuthConfig: &armpostgresqlflexibleservers.AuthConfig{ - // ActiveDirectoryAuth: to.Ptr(armpostgresqlflexibleservers.ActiveDirectoryAuthEnumDisabled), - // PasswordAuth: to.Ptr(armpostgresqlflexibleservers.PasswordAuthEnumEnabled), - // }, - // AvailabilityZone: to.Ptr("1"), - // Backup: &armpostgresqlflexibleservers.Backup{ - // BackupRetentionDays: to.Ptr[int32](7), - // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-26T23:15:38.8131437+00:00"); return t}()), - // GeoRedundantBackup: to.Ptr(armpostgresqlflexibleservers.GeoRedundantBackupEnumDisabled), - // }, - // FullyQualifiedDomainName: to.Ptr("pgtestsvc1.postgres.database.azure.com"), - // HighAvailability: &armpostgresqlflexibleservers.HighAvailability{ - // Mode: to.Ptr(armpostgresqlflexibleservers.HighAvailabilityModeDisabled), - // State: to.Ptr(armpostgresqlflexibleservers.ServerHAStateNotEnabled), - // }, - // MinorVersion: to.Ptr("6"), - // Network: &armpostgresqlflexibleservers.Network{ - // PublicNetworkAccess: to.Ptr(armpostgresqlflexibleservers.ServerPublicNetworkAccessStateEnabled), - // }, - // State: to.Ptr(armpostgresqlflexibleservers.ServerStateReady), - // Storage: &armpostgresqlflexibleservers.Storage{ - // AutoGrow: to.Ptr(armpostgresqlflexibleservers.StorageAutoGrowEnabled), - // Iops: to.Ptr[int32](2300), - // StorageSizeGB: to.Ptr[int32](512), - // Tier: to.Ptr(armpostgresqlflexibleservers.AzureManagedDiskPerformanceTiersP20), - // }, - // Version: to.Ptr(armpostgresqlflexibleservers.ServerVersionTwelve), - // }, - // SKU: &armpostgresqlflexibleservers.SKU{ - // Name: to.Ptr("Standard_D4s_v3"), - // Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerRestart.json -func ExampleServersClient_BeginRestart_serverRestart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginRestart(ctx, "testrg", "testserver", &armpostgresqlflexibleservers.ServersClientBeginRestartOptions{Parameters: 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerRestartWithFailover.json -func ExampleServersClient_BeginRestart_serverRestartWithFailover() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginRestart(ctx, "testrg", "testserver", &armpostgresqlflexibleservers.ServersClientBeginRestartOptions{Parameters: &armpostgresqlflexibleservers.RestartParameter{ - FailoverMode: to.Ptr(armpostgresqlflexibleservers.FailoverModeForcedFailover), - RestartWithFailover: to.Ptr(true), - }, - }) - 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerStart.json -func ExampleServersClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginStart(ctx, "testrg", "testserver", 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerStop.json -func ExampleServersClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServersClient().BeginStop(ctx, "testrg", "testserver", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/serverthreatprotectionsettings_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/serverthreatprotectionsettings_client.go new file mode 100644 index 000000000000..b04509da673b --- /dev/null +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/serverthreatprotectionsettings_client.go @@ -0,0 +1,259 @@ +//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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armpostgresqlflexibleservers + +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" +) + +// ServerThreatProtectionSettingsClient contains the methods for the ServerThreatProtectionSettings group. +// Don't use this type directly, use NewServerThreatProtectionSettingsClient() instead. +type ServerThreatProtectionSettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServerThreatProtectionSettingsClient creates a new instance of ServerThreatProtectionSettingsClient 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 NewServerThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerThreatProtectionSettingsClient, error) { + cl, err := arm.NewClient(moduleName+".ServerThreatProtectionSettingsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServerThreatProtectionSettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a server's Advanced Threat Protection settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - threatProtectionName - The name of the Threat Protection state. +// - parameters - The Advanced Threat Protection state for the flexible server. +// - options - ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerThreatProtectionSettingsClient.BeginCreateOrUpdate +// method. +func (client *ServerThreatProtectionSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, threatProtectionName ThreatProtectionName, parameters ServerThreatProtectionSettingsModel, options *ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerThreatProtectionSettingsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, threatProtectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServerThreatProtectionSettingsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[ServerThreatProtectionSettingsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// CreateOrUpdate - Creates or updates a server's Advanced Threat Protection settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +func (client *ServerThreatProtectionSettingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, threatProtectionName ThreatProtectionName, parameters ServerThreatProtectionSettingsModel, options *ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, threatProtectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServerThreatProtectionSettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, threatProtectionName ThreatProtectionName, parameters ServerThreatProtectionSettingsModel, options *ServerThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if threatProtectionName == "" { + return nil, errors.New("parameter threatProtectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{threatProtectionName}", url.PathEscape(string(threatProtectionName))) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Get a server's Threat Protection settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - threatProtectionName - The name of the Threat Protection state. +// - options - ServerThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerThreatProtectionSettingsClient.Get +// method. +func (client *ServerThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, threatProtectionName ThreatProtectionName, options *ServerThreatProtectionSettingsClientGetOptions) (ServerThreatProtectionSettingsClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, threatProtectionName, options) + if err != nil { + return ServerThreatProtectionSettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerThreatProtectionSettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServerThreatProtectionSettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServerThreatProtectionSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, threatProtectionName ThreatProtectionName, options *ServerThreatProtectionSettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if threatProtectionName == "" { + return nil, errors.New("parameter threatProtectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{threatProtectionName}", url.PathEscape(string(threatProtectionName))) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServerThreatProtectionSettingsClient) getHandleResponse(resp *http.Response) (ServerThreatProtectionSettingsClientGetResponse, error) { + result := ServerThreatProtectionSettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerThreatProtectionSettingsModel); err != nil { + return ServerThreatProtectionSettingsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - Get a list of server's Threat Protection state. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - options - ServerThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerThreatProtectionSettingsClient.NewListByServerPager +// method. +func (client *ServerThreatProtectionSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerThreatProtectionSettingsClientListByServerOptions) *runtime.Pager[ServerThreatProtectionSettingsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[ServerThreatProtectionSettingsClientListByServerResponse]{ + More: func(page ServerThreatProtectionSettingsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServerThreatProtectionSettingsClientListByServerResponse) (ServerThreatProtectionSettingsClientListByServerResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ServerThreatProtectionSettingsClientListByServerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServerThreatProtectionSettingsClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServerThreatProtectionSettingsClientListByServerResponse{}, runtime.NewResponseError(resp) + } + return client.listByServerHandleResponse(resp) + }, + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *ServerThreatProtectionSettingsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *ServerThreatProtectionSettingsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *ServerThreatProtectionSettingsClient) listByServerHandleResponse(resp *http.Response) (ServerThreatProtectionSettingsClientListByServerResponse, error) { + result := ServerThreatProtectionSettingsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServerThreatProtectionListResult); err != nil { + return ServerThreatProtectionSettingsClientListByServerResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualendpoints_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualendpoints_client.go new file mode 100644 index 000000000000..77dce4bfa44f --- /dev/null +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualendpoints_client.go @@ -0,0 +1,414 @@ +//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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armpostgresqlflexibleservers + +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" +) + +// VirtualEndpointsClient contains the methods for the VirtualEndpoints group. +// Don't use this type directly, use NewVirtualEndpointsClient() instead. +type VirtualEndpointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualEndpointsClient creates a new instance of VirtualEndpointsClient 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 NewVirtualEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualEndpointsClient, error) { + cl, err := arm.NewClient(moduleName+".VirtualEndpointsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualEndpointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a new virtual endpoint for PostgreSQL flexible server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - virtualEndpointName - The name of the virtual endpoint. +// - parameters - The required parameters for creating or updating virtual endpoints. +// - options - VirtualEndpointsClientBeginCreateOptions contains the optional parameters for the VirtualEndpointsClient.BeginCreate +// method. +func (client *VirtualEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, parameters VirtualEndpointResource, options *VirtualEndpointsClientBeginCreateOptions) (*runtime.Poller[VirtualEndpointsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, serverName, virtualEndpointName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualEndpointsClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[VirtualEndpointsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Create - Creates a new virtual endpoint for PostgreSQL flexible server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +func (client *VirtualEndpointsClient) create(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, parameters VirtualEndpointResource, options *VirtualEndpointsClientBeginCreateOptions) (*http.Response, error) { + var err error + req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, virtualEndpointName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *VirtualEndpointsClient) createCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, parameters VirtualEndpointResource, options *VirtualEndpointsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualEndpointName == "" { + return nil, errors.New("parameter virtualEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualEndpointName}", url.PathEscape(virtualEndpointName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a virtual endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - virtualEndpointName - The name of the virtual endpoint. +// - options - VirtualEndpointsClientBeginDeleteOptions contains the optional parameters for the VirtualEndpointsClient.BeginDelete +// method. +func (client *VirtualEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, options *VirtualEndpointsClientBeginDeleteOptions) (*runtime.Poller[VirtualEndpointsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, virtualEndpointName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualEndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[VirtualEndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Delete - Deletes a virtual endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +func (client *VirtualEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, options *VirtualEndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, virtualEndpointName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualEndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, options *VirtualEndpointsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualEndpointName == "" { + return nil, errors.New("parameter virtualEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualEndpointName}", url.PathEscape(virtualEndpointName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about a virtual endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - virtualEndpointName - The name of the virtual endpoint. +// - options - VirtualEndpointsClientGetOptions contains the optional parameters for the VirtualEndpointsClient.Get method. +func (client *VirtualEndpointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, options *VirtualEndpointsClientGetOptions) (VirtualEndpointsClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, serverName, virtualEndpointName, options) + if err != nil { + return VirtualEndpointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualEndpointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualEndpointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualEndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, options *VirtualEndpointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualEndpointName == "" { + return nil, errors.New("parameter virtualEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualEndpointName}", url.PathEscape(virtualEndpointName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualEndpointsClient) getHandleResponse(resp *http.Response) (VirtualEndpointsClientGetResponse, error) { + result := VirtualEndpointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualEndpointResource); err != nil { + return VirtualEndpointsClientGetResponse{}, err + } + return result, nil +} + +// NewListByServerPager - List all the servers in a given resource group. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - options - VirtualEndpointsClientListByServerOptions contains the optional parameters for the VirtualEndpointsClient.NewListByServerPager +// method. +func (client *VirtualEndpointsClient) NewListByServerPager(resourceGroupName string, serverName string, options *VirtualEndpointsClientListByServerOptions) *runtime.Pager[VirtualEndpointsClientListByServerResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualEndpointsClientListByServerResponse]{ + More: func(page VirtualEndpointsClientListByServerResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualEndpointsClientListByServerResponse) (VirtualEndpointsClientListByServerResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByServerCreateRequest(ctx, resourceGroupName, serverName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualEndpointsClientListByServerResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualEndpointsClientListByServerResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualEndpointsClientListByServerResponse{}, runtime.NewResponseError(resp) + } + return client.listByServerHandleResponse(resp) + }, + }) +} + +// listByServerCreateRequest creates the ListByServer request. +func (client *VirtualEndpointsClient) listByServerCreateRequest(ctx context.Context, resourceGroupName string, serverName string, options *VirtualEndpointsClientListByServerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServerHandleResponse handles the ListByServer response. +func (client *VirtualEndpointsClient) listByServerHandleResponse(resp *http.Response) (VirtualEndpointsClientListByServerResponse, error) { + result := VirtualEndpointsClientListByServerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualEndpointsListResult); err != nil { + return VirtualEndpointsClientListByServerResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an existing virtual endpoint. The request body can contain one to many of the properties present +// in the normal virtual endpoint definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serverName - The name of the server. +// - virtualEndpointName - The name of the virtual endpoint. +// - parameters - The required parameters for updating a server. +// - options - VirtualEndpointsClientBeginUpdateOptions contains the optional parameters for the VirtualEndpointsClient.BeginUpdate +// method. +func (client *VirtualEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, parameters VirtualEndpointResourceForPatch, options *VirtualEndpointsClientBeginUpdateOptions) (*runtime.Poller[VirtualEndpointsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serverName, virtualEndpointName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualEndpointsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[VirtualEndpointsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Update - Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the +// normal virtual endpoint definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-06-01-preview +func (client *VirtualEndpointsClient) update(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, parameters VirtualEndpointResourceForPatch, options *VirtualEndpointsClientBeginUpdateOptions) (*http.Response, error) { + var err error + req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, virtualEndpointName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *VirtualEndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serverName string, virtualEndpointName string, parameters VirtualEndpointResourceForPatch, options *VirtualEndpointsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}" + 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 serverName == "" { + return nil, errors.New("parameter serverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serverName}", url.PathEscape(serverName)) + if virtualEndpointName == "" { + return nil, errors.New("parameter virtualEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualEndpointName}", url.PathEscape(virtualEndpointName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client.go index ce6d7f9c29b7..4d4aeb2fe1f6 100644 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client.go +++ b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client.go @@ -46,7 +46,7 @@ func NewVirtualNetworkSubnetUsageClient(subscriptionID string, credential azcore // Execute - Get virtual network subnet usage for a given vNet resource id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01-preview +// Generated from API version 2023-06-01-preview // - locationName - The name of the location. // - parameters - The required parameters for creating or updating a server. // - options - VirtualNetworkSubnetUsageClientExecuteOptions contains the optional parameters for the VirtualNetworkSubnetUsageClient.Execute @@ -85,7 +85,7 @@ func (client *VirtualNetworkSubnetUsageClient) executeCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01-preview") + reqQP.Set("api-version", "2023-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client_example_test.go b/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client_example_test.go deleted file mode 100644 index c3b8ef2f072f..000000000000 --- a/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/virtualnetworksubnetusage_client_example_test.go +++ /dev/null @@ -1,54 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armpostgresqlflexibleservers_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/postgresql/armpostgresqlflexibleservers/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/VirtualNetworkSubnetUsage.json -func ExampleVirtualNetworkSubnetUsageClient_Execute() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVirtualNetworkSubnetUsageClient().Execute(ctx, "westus", armpostgresqlflexibleservers.VirtualNetworkSubnetUsageParameter{ - VirtualNetworkArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.VirtualNetworkSubnetUsageResult = armpostgresqlflexibleservers.VirtualNetworkSubnetUsageResult{ - // DelegatedSubnetsUsage: []*armpostgresqlflexibleservers.DelegatedSubnetUsage{ - // { - // SubnetName: to.Ptr("test-subnet-1"), - // Usage: to.Ptr[int64](2), - // }, - // { - // SubnetName: to.Ptr("test-subnet-2"), - // Usage: to.Ptr[int64](3), - // }}, - // Location: to.Ptr("westus"), - // SubscriptionID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff"), - // } -}