Documentation ¶
Index ¶
- type CheckNameAvailabilityClient
- type CheckNameAvailabilityClientExecuteOptions
- type CheckNameAvailabilityClientExecuteResponse
- type ClientFactory
- func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient
- func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
- func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
- func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
- func (c *ClientFactory) NewLocationBasedPerformanceTierClient() *LocationBasedPerformanceTierClient
- func (c *ClientFactory) NewLogFilesClient() *LogFilesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewRecoverableServersClient() *RecoverableServersClient
- func (c *ClientFactory) NewReplicasClient() *ReplicasClient
- func (c *ClientFactory) NewServerAdministratorsClient() *ServerAdministratorsClient
- func (c *ClientFactory) NewServerBasedPerformanceTierClient() *ServerBasedPerformanceTierClient
- func (c *ClientFactory) NewServerKeysClient() *ServerKeysClient
- func (c *ClientFactory) NewServerParametersClient() *ServerParametersClient
- func (c *ClientFactory) NewServerSecurityAlertPoliciesClient() *ServerSecurityAlertPoliciesClient
- func (c *ClientFactory) NewServersClient() *ServersClient
- func (c *ClientFactory) NewVirtualNetworkRulesClient() *VirtualNetworkRulesClient
- type Configuration
- type ConfigurationListResult
- type ConfigurationProperties
- type ConfigurationsClient
- func (client *ConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ConfigurationsClientCreateOrUpdateResponse], error)
- func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ConfigurationsClientGetResponse, error)
- func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ConfigurationsClientListByServerResponse]
- type ConfigurationsClientBeginCreateOrUpdateOptions
- type ConfigurationsClientCreateOrUpdateResponse
- type ConfigurationsClientGetOptions
- type ConfigurationsClientGetResponse
- type ConfigurationsClientListByServerOptions
- type ConfigurationsClientListByServerResponse
- type CreateMode
- type Database
- type DatabaseListResult
- type DatabaseProperties
- type DatabasesClient
- func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)
- func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientDeleteResponse], error)
- func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabasesClientGetResponse, error)
- func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[DatabasesClientListByServerResponse]
- type DatabasesClientBeginCreateOrUpdateOptions
- type DatabasesClientBeginDeleteOptions
- type DatabasesClientCreateOrUpdateResponse
- type DatabasesClientDeleteResponse
- type DatabasesClientGetOptions
- type DatabasesClientGetResponse
- type DatabasesClientListByServerOptions
- type DatabasesClientListByServerResponse
- type ErrorAdditionalInfo
- type ErrorResponse
- type FirewallRule
- type FirewallRuleListResult
- type FirewallRuleProperties
- type FirewallRulesClient
- func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)
- func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)
- func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientGetResponse, error)
- func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[FirewallRulesClientListByServerResponse]
- type FirewallRulesClientBeginCreateOrUpdateOptions
- type FirewallRulesClientBeginDeleteOptions
- type FirewallRulesClientCreateOrUpdateResponse
- type FirewallRulesClientDeleteResponse
- type FirewallRulesClientGetOptions
- type FirewallRulesClientGetResponse
- type FirewallRulesClientListByServerOptions
- type FirewallRulesClientListByServerResponse
- type GeoRedundantBackup
- type IdentityType
- type InfrastructureEncryption
- type LocationBasedPerformanceTierClient
- type LocationBasedPerformanceTierClientListOptions
- type LocationBasedPerformanceTierClientListResponse
- type LogFile
- type LogFileListResult
- type LogFileProperties
- type LogFilesClient
- type LogFilesClientListByServerOptions
- type LogFilesClientListByServerResponse
- type MinimalTLSVersionEnum
- type NameAvailability
- type NameAvailabilityRequest
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationOrigin
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PerformanceTierListResult
- type PerformanceTierProperties
- type PerformanceTierServiceLevelObjectives
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateTagsResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse]
- type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientBeginUpdateTagsOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListByServerOptions
- type PrivateEndpointConnectionsClientListByServerResponse
- type PrivateEndpointConnectionsClientUpdateTagsResponse
- type PrivateEndpointProperty
- type PrivateEndpointProvisioningState
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (PrivateLinkResourcesClientGetResponse, error)
- func (client *PrivateLinkResourcesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse]
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListByServerOptions
- type PrivateLinkResourcesClientListByServerResponse
- type PrivateLinkServiceConnectionStateActionsRequire
- type PrivateLinkServiceConnectionStateProperty
- type PrivateLinkServiceConnectionStateStatus
- type ProxyResource
- type PublicNetworkAccessEnum
- type RecoverableServerProperties
- type RecoverableServerResource
- type RecoverableServersClient
- type RecoverableServersClientGetOptions
- type RecoverableServersClientGetResponse
- type ReplicasClient
- type ReplicasClientListByServerOptions
- type ReplicasClientListByServerResponse
- type Resource
- type ResourceIdentity
- type SKU
- type SKUTier
- type SSLEnforcementEnum
- type SecurityAlertPolicyName
- type SecurityAlertPolicyProperties
- type Server
- type ServerAdministratorProperties
- type ServerAdministratorResource
- type ServerAdministratorResourceListResult
- type ServerAdministratorsClient
- func (client *ServerAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerAdministratorsClientCreateOrUpdateResponse], error)
- func (client *ServerAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerAdministratorsClientDeleteResponse], error)
- func (client *ServerAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAdministratorsClientGetResponse, error)
- func (client *ServerAdministratorsClient) NewListPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerAdministratorsClientListResponse]
- type ServerAdministratorsClientBeginCreateOrUpdateOptions
- type ServerAdministratorsClientBeginDeleteOptions
- type ServerAdministratorsClientCreateOrUpdateResponse
- type ServerAdministratorsClientDeleteResponse
- type ServerAdministratorsClientGetOptions
- type ServerAdministratorsClientGetResponse
- type ServerAdministratorsClientListOptions
- type ServerAdministratorsClientListResponse
- type ServerBasedPerformanceTierClient
- type ServerBasedPerformanceTierClientListOptions
- type ServerBasedPerformanceTierClientListResponse
- type ServerForCreate
- type ServerKey
- type ServerKeyListResult
- type ServerKeyProperties
- type ServerKeyType
- type ServerKeysClient
- func (client *ServerKeysClient) BeginCreateOrUpdate(ctx context.Context, serverName string, keyName string, ...) (*runtime.Poller[ServerKeysClientCreateOrUpdateResponse], error)
- func (client *ServerKeysClient) BeginDelete(ctx context.Context, serverName string, keyName string, ...) (*runtime.Poller[ServerKeysClientDeleteResponse], error)
- func (client *ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerKeysClientGetResponse, error)
- func (client *ServerKeysClient) NewListPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerKeysClientListResponse]
- type ServerKeysClientBeginCreateOrUpdateOptions
- type ServerKeysClientBeginDeleteOptions
- type ServerKeysClientCreateOrUpdateResponse
- type ServerKeysClientDeleteResponse
- type ServerKeysClientGetOptions
- type ServerKeysClientGetResponse
- type ServerKeysClientListOptions
- type ServerKeysClientListResponse
- type ServerListResult
- type ServerParametersClient
- type ServerParametersClientBeginListUpdateConfigurationsOptions
- type ServerParametersClientListUpdateConfigurationsResponse
- type ServerPrivateEndpointConnection
- type ServerPrivateEndpointConnectionProperties
- type ServerPrivateLinkServiceConnectionStateProperty
- type ServerProperties
- type ServerPropertiesForCreate
- type ServerPropertiesForCreateClassification
- type ServerPropertiesForDefaultCreate
- type ServerPropertiesForGeoRestore
- type ServerPropertiesForReplica
- type ServerPropertiesForRestore
- type ServerSecurityAlertPoliciesClient
- func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], ...)
- func (client *ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerSecurityAlertPoliciesClientGetResponse, error)
- func (client *ServerSecurityAlertPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse]
- type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions
- type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse
- type ServerSecurityAlertPoliciesClientGetOptions
- type ServerSecurityAlertPoliciesClientGetResponse
- type ServerSecurityAlertPoliciesClientListByServerOptions
- type ServerSecurityAlertPoliciesClientListByServerResponse
- type ServerSecurityAlertPolicy
- type ServerSecurityAlertPolicyListResult
- type ServerSecurityAlertPolicyState
- type ServerState
- type ServerUpdateParameters
- type ServerUpdateParametersProperties
- type ServerVersion
- type ServersClient
- func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientCreateResponse], error)
- func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientDeleteResponse], error)
- func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientRestartResponse], error)
- func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientUpdateResponse], error)
- func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServersClientGetResponse, error)
- func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
- func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
- type ServersClientBeginCreateOptions
- type ServersClientBeginDeleteOptions
- type ServersClientBeginRestartOptions
- type ServersClientBeginUpdateOptions
- type ServersClientCreateResponse
- type ServersClientDeleteResponse
- type ServersClientGetOptions
- type ServersClientGetResponse
- type ServersClientListByResourceGroupOptions
- type ServersClientListByResourceGroupResponse
- type ServersClientListOptions
- type ServersClientListResponse
- type ServersClientRestartResponse
- type ServersClientUpdateResponse
- type StorageAutogrow
- type StorageProfile
- type TagsObject
- type TrackedResource
- type VirtualNetworkRule
- type VirtualNetworkRuleListResult
- type VirtualNetworkRuleProperties
- type VirtualNetworkRuleState
- type VirtualNetworkRulesClient
- func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)
- func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error)
- func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VirtualNetworkRulesClientGetResponse, error)
- func (client *VirtualNetworkRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse]
- type VirtualNetworkRulesClientBeginCreateOrUpdateOptions
- type VirtualNetworkRulesClientBeginDeleteOptions
- type VirtualNetworkRulesClientCreateOrUpdateResponse
- type VirtualNetworkRulesClientDeleteResponse
- type VirtualNetworkRulesClientGetOptions
- type VirtualNetworkRulesClientGetResponse
- type VirtualNetworkRulesClientListByServerOptions
- type VirtualNetworkRulesClientListByServerResponse
Examples ¶
- CheckNameAvailabilityClient.Execute
- ConfigurationsClient.BeginCreateOrUpdate
- ConfigurationsClient.Get
- ConfigurationsClient.NewListByServerPager
- DatabasesClient.BeginCreateOrUpdate
- DatabasesClient.BeginDelete
- DatabasesClient.Get
- DatabasesClient.NewListByServerPager
- FirewallRulesClient.BeginCreateOrUpdate
- FirewallRulesClient.BeginDelete
- FirewallRulesClient.Get
- FirewallRulesClient.NewListByServerPager
- LocationBasedPerformanceTierClient.NewListPager
- LogFilesClient.NewListByServerPager
- OperationsClient.List
- PrivateEndpointConnectionsClient.BeginCreateOrUpdate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.BeginUpdateTags
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListByServerPager
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.NewListByServerPager
- RecoverableServersClient.Get
- ReplicasClient.NewListByServerPager
- ServerAdministratorsClient.BeginCreateOrUpdate
- ServerAdministratorsClient.BeginDelete
- ServerAdministratorsClient.Get
- ServerAdministratorsClient.NewListPager
- ServerBasedPerformanceTierClient.NewListPager
- ServerKeysClient.BeginCreateOrUpdate
- ServerKeysClient.BeginDelete
- ServerKeysClient.Get
- ServerKeysClient.NewListPager
- ServerParametersClient.BeginListUpdateConfigurations
- ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate (UpdateAServersThreatDetectionPolicyWithAllParameters)
- ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate (UpdateAServersThreatDetectionPolicyWithMinimalParameters)
- ServerSecurityAlertPoliciesClient.Get
- ServerSecurityAlertPoliciesClient.NewListByServerPager
- ServersClient.BeginCreate (CreateADatabaseAsAPointInTimeRestore)
- ServersClient.BeginCreate (CreateANewServer)
- ServersClient.BeginCreate (CreateAReplicaServer)
- ServersClient.BeginCreate (CreateAServerAsAGeoRestore)
- ServersClient.BeginDelete
- ServersClient.BeginRestart
- ServersClient.BeginUpdate
- ServersClient.Get
- ServersClient.NewListByResourceGroupPager
- ServersClient.NewListPager
- VirtualNetworkRulesClient.BeginCreateOrUpdate
- VirtualNetworkRulesClient.BeginDelete
- VirtualNetworkRulesClient.Get
- VirtualNetworkRulesClient.NewListByServerPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckNameAvailabilityClient ¶
type CheckNameAvailabilityClient struct {
// contains filtered or unexported fields
}
CheckNameAvailabilityClient contains the methods for the CheckNameAvailability group. Don't use this type directly, use NewCheckNameAvailabilityClient() instead.
func NewCheckNameAvailabilityClient ¶
func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckNameAvailabilityClient, error)
NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient 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 (*CheckNameAvailabilityClient) Execute ¶
func (client *CheckNameAvailabilityClient) Execute(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest, options *CheckNameAvailabilityClientExecuteOptions) (CheckNameAvailabilityClientExecuteResponse, error)
Execute - Check the availability of name for resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- nameAvailabilityRequest - The required parameters for checking if resource name is available.
- options - CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/CheckNameAvailability.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCheckNameAvailabilityClient().Execute(ctx, armpostgresql.NameAvailabilityRequest{ Name: to.Ptr("name1"), Type: to.Ptr("Microsoft.DBforPostgreSQL"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your 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 = armpostgresql.NameAvailability{ // Message: to.Ptr(""), // NameAvailable: to.Ptr(true), // Reason: to.Ptr(""), // } }
Output:
type CheckNameAvailabilityClientExecuteOptions ¶
type CheckNameAvailabilityClientExecuteOptions struct { }
CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.
type CheckNameAvailabilityClientExecuteResponse ¶
type CheckNameAvailabilityClientExecuteResponse struct { // Represents a resource name availability. NameAvailability }
CheckNameAvailabilityClientExecuteResponse contains the response from method CheckNameAvailabilityClient.Execute.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - 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 (*ClientFactory) NewCheckNameAvailabilityClient ¶
func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient
NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient.
func (*ClientFactory) NewConfigurationsClient ¶
func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
NewConfigurationsClient creates a new instance of ConfigurationsClient.
func (*ClientFactory) NewDatabasesClient ¶
func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
NewDatabasesClient creates a new instance of DatabasesClient.
func (*ClientFactory) NewFirewallRulesClient ¶
func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
NewFirewallRulesClient creates a new instance of FirewallRulesClient.
func (*ClientFactory) NewLocationBasedPerformanceTierClient ¶
func (c *ClientFactory) NewLocationBasedPerformanceTierClient() *LocationBasedPerformanceTierClient
NewLocationBasedPerformanceTierClient creates a new instance of LocationBasedPerformanceTierClient.
func (*ClientFactory) NewLogFilesClient ¶
func (c *ClientFactory) NewLogFilesClient() *LogFilesClient
NewLogFilesClient creates a new instance of LogFilesClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewRecoverableServersClient ¶
func (c *ClientFactory) NewRecoverableServersClient() *RecoverableServersClient
NewRecoverableServersClient creates a new instance of RecoverableServersClient.
func (*ClientFactory) NewReplicasClient ¶
func (c *ClientFactory) NewReplicasClient() *ReplicasClient
NewReplicasClient creates a new instance of ReplicasClient.
func (*ClientFactory) NewServerAdministratorsClient ¶
func (c *ClientFactory) NewServerAdministratorsClient() *ServerAdministratorsClient
NewServerAdministratorsClient creates a new instance of ServerAdministratorsClient.
func (*ClientFactory) NewServerBasedPerformanceTierClient ¶
func (c *ClientFactory) NewServerBasedPerformanceTierClient() *ServerBasedPerformanceTierClient
NewServerBasedPerformanceTierClient creates a new instance of ServerBasedPerformanceTierClient.
func (*ClientFactory) NewServerKeysClient ¶
func (c *ClientFactory) NewServerKeysClient() *ServerKeysClient
NewServerKeysClient creates a new instance of ServerKeysClient.
func (*ClientFactory) NewServerParametersClient ¶
func (c *ClientFactory) NewServerParametersClient() *ServerParametersClient
NewServerParametersClient creates a new instance of ServerParametersClient.
func (*ClientFactory) NewServerSecurityAlertPoliciesClient ¶
func (c *ClientFactory) NewServerSecurityAlertPoliciesClient() *ServerSecurityAlertPoliciesClient
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient.
func (*ClientFactory) NewServersClient ¶
func (c *ClientFactory) NewServersClient() *ServersClient
NewServersClient creates a new instance of ServersClient.
func (*ClientFactory) NewVirtualNetworkRulesClient ¶
func (c *ClientFactory) NewVirtualNetworkRulesClient() *VirtualNetworkRulesClient
NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient.
type Configuration ¶
type Configuration struct { // The properties of a configuration. Properties *ConfigurationProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Configuration - Represents a Configuration.
func (Configuration) MarshalJSON ¶
func (c Configuration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Configuration.
func (*Configuration) UnmarshalJSON ¶
func (c *Configuration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Configuration.
type ConfigurationListResult ¶
type ConfigurationListResult struct { // The list of server configurations. Value []*Configuration }
ConfigurationListResult - A list of server configurations.
func (ConfigurationListResult) MarshalJSON ¶
func (c ConfigurationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationListResult.
func (*ConfigurationListResult) UnmarshalJSON ¶
func (c *ConfigurationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationListResult.
type ConfigurationProperties ¶
type ConfigurationProperties struct { // Source of the configuration. Source *string // Value of the configuration. Value *string // READ-ONLY; Allowed values of the configuration. AllowedValues *string // READ-ONLY; Data type of the configuration. DataType *string // READ-ONLY; Default value of the configuration. DefaultValue *string // READ-ONLY; Description of the configuration. Description *string }
ConfigurationProperties - The properties of a configuration.
func (ConfigurationProperties) MarshalJSON ¶
func (c ConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProperties.
func (*ConfigurationProperties) UnmarshalJSON ¶
func (c *ConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProperties.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
// contains filtered or unexported fields
}
ConfigurationsClient contains the methods for the Configurations group. Don't use this type directly, use NewConfigurationsClient() instead.
func NewConfigurationsClient ¶
func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error)
NewConfigurationsClient creates a new instance of ConfigurationsClient 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 (*ConfigurationsClient) BeginCreateOrUpdate ¶
func (client *ConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a configuration of a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
- parameters - The required parameters for updating a server configuration.
- options - ConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ConfigurationCreateOrUpdate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConfigurationsClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "array_nulls", armpostgresql.Configuration{ Properties: &armpostgresql.ConfigurationProperties{ Source: to.Ptr("user-override"), Value: to.Ptr("off"), }, }, 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 = armpostgresql.Configuration{ // Name: to.Ptr("array_nulls"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enable input of NULL elements in arrays."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("user-override"), // Value: to.Ptr("off"), // }, // } }
Output:
func (*ConfigurationsClient) Get ¶
func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string, options *ConfigurationsClientGetOptions) (ConfigurationsClientGetResponse, error)
Get - Gets information about a configuration of server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
- options - ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ConfigurationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewConfigurationsClient().Get(ctx, "TestGroup", "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 = armpostgresql.Configuration{ // Name: to.Ptr("array_nulls"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enable input of NULL elements in arrays."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // } }
Output:
func (*ConfigurationsClient) NewListByServerPager ¶
func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ConfigurationsClientListByServerOptions) *runtime.Pager[ConfigurationsClientListByServerResponse]
NewListByServerPager - List all the configurations in a given server.
Generated from API version 2017-12-01
- 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 method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ConfigurationListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewConfigurationsClient().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.ConfigurationListResult = armpostgresql.ConfigurationListResult{ // Value: []*armpostgresql.Configuration{ // { // Name: to.Ptr("array_nulls"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enable input of NULL elements in arrays."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("backslash_quote"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/backslash_quote"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets whether \"\\'\" is allowed in string literals."), // AllowedValues: to.Ptr("safe_encoding,on,off"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("safe_encoding"), // Source: to.Ptr("system-default"), // Value: to.Ptr("safe_encoding"), // }, // }, // { // Name: to.Ptr("bytea_output"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/bytea_output"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the output format for bytea."), // AllowedValues: to.Ptr("escape,hex"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("hex"), // Source: to.Ptr("system-default"), // Value: to.Ptr("hex"), // }, // }, // { // Name: to.Ptr("check_function_bodies"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/check_function_bodies"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Check function bodies during CREATE FUNCTION."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("client_encoding"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/client_encoding"), // Properties: &armpostgresql.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("Enumeration"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/client_min_messages"), // Properties: &armpostgresql.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("Enumeration"), // DefaultValue: to.Ptr("notice"), // Source: to.Ptr("system-default"), // Value: to.Ptr("notice"), // }, // }, // { // Name: to.Ptr("constraint_exclusion"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/constraint_exclusion"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner to use constraints to optimize queries."), // AllowedValues: to.Ptr("partition,on,off"), // DataType: to.Ptr("Enumeration"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cpu_index_tuple_cost"), // Properties: &armpostgresql.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("Numeric"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cpu_operator_cost"), // Properties: &armpostgresql.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("Numeric"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cpu_tuple_cost"), // Properties: &armpostgresql.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("Numeric"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cursor_tuple_fraction"), // Properties: &armpostgresql.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("Numeric"), // DefaultValue: to.Ptr("0.1"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0.1"), // }, // }, // { // Name: to.Ptr("datestyle"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/datestyle"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the display format for date and time values."), // AllowedValues: to.Ptr("(iso|postgres|sql|german)\\,\\s(dmy|mdy|ymd)"), // DataType: to.Ptr("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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/deadlock_timeout"), // Properties: &armpostgresql.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("Integer"), // DefaultValue: to.Ptr("1000"), // Source: to.Ptr("system-default"), // Value: to.Ptr("1000"), // }, // }, // { // Name: to.Ptr("debug_print_parse"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/debug_print_parse"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs each query's parse tree."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("debug_print_plan"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/debug_print_plan"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs each query's execution plan."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("debug_print_rewritten"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/debug_print_rewritten"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs each query's rewritten parse tree."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("default_statistics_target"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_statistics_target"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the default statistics target."), // AllowedValues: to.Ptr("1-10000"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("100"), // Source: to.Ptr("system-default"), // Value: to.Ptr("100"), // }, // }, // { // Name: to.Ptr("default_text_search_config"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_text_search_config"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets default text search configuration."), // AllowedValues: to.Ptr("[A-Za-z\\._]+"), // DataType: to.Ptr("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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_transaction_deferrable"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the default deferrable status of new transactions."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("default_transaction_isolation"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_transaction_isolation"), // Properties: &armpostgresql.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("Enumeration"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_transaction_read_only"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the default read-only status of new transactions."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("default_with_oids"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_with_oids"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Create new tables with OIDs by default."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("enable_bitmapscan"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_bitmapscan"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of bitmap-scan plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_hashagg"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_hashagg"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of hashed aggregation plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_hashjoin"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_hashjoin"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of hash join plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_indexonlyscan"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_indexonlyscan"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of index-only-scan plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_indexscan"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_indexscan"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of index-scan plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_material"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_material"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of materialization."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_mergejoin"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_mergejoin"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of merge join plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_nestloop"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_nestloop"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of nested-loop join plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_seqscan"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_seqscan"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of sequential-scan plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_sort"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_sort"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of explicit sort steps."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("enable_tidscan"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_tidscan"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables the planner's use of TID scan plans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("escape_string_warning"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/escape_string_warning"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Warn about backslash escapes in ordinary string literals."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("exit_on_error"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/exit_on_error"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Terminate session on any error."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("extra_float_digits"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/extra_float_digits"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the number of digits displayed for floating-point values."), // AllowedValues: to.Ptr("-15-3"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("from_collapse_limit"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/from_collapse_limit"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the FROM-list size beyond which subqueries are not collapsed."), // AllowedValues: to.Ptr("1-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("8"), // Source: to.Ptr("system-default"), // Value: to.Ptr("8"), // }, // }, // { // Name: to.Ptr("geqo"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enables genetic query optimization."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("geqo_effort"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_effort"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("GEQO: effort is used to set the default for other GEQO parameters."), // AllowedValues: to.Ptr("1-10"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("5"), // Source: to.Ptr("system-default"), // Value: to.Ptr("5"), // }, // }, // { // Name: to.Ptr("geqo_generations"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_generations"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("GEQO: number of iterations of the algorithm."), // AllowedValues: to.Ptr("0-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("geqo_pool_size"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_pool_size"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("GEQO: number of individuals in the population."), // AllowedValues: to.Ptr("0-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("geqo_seed"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_seed"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("GEQO: seed for random path selection."), // AllowedValues: to.Ptr("0-1"), // DataType: to.Ptr("Numeric"), // DefaultValue: to.Ptr("0.0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0.0"), // }, // }, // { // Name: to.Ptr("geqo_selection_bias"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_selection_bias"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("GEQO: selective pressure within the population."), // AllowedValues: to.Ptr("1.5-2"), // DataType: to.Ptr("Numeric"), // DefaultValue: to.Ptr("2.0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("2.0"), // }, // }, // { // Name: to.Ptr("geqo_threshold"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_threshold"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the threshold of FROM items beyond which GEQO is used."), // AllowedValues: to.Ptr("2-2147483647"), // DataType: to.Ptr("Integer"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/gin_fuzzy_search_limit"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the maximum allowed result for exact search by GIN."), // AllowedValues: to.Ptr("0-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("intervalstyle"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/intervalstyle"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the display format for interval values."), // AllowedValues: to.Ptr("postgres,postgres_verbose,sql_standard,iso_8601"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("postgres"), // Source: to.Ptr("system-default"), // Value: to.Ptr("postgres"), // }, // }, // { // Name: to.Ptr("join_collapse_limit"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/join_collapse_limit"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the FROM-list size beyond which JOIN constructs are not flattened."), // AllowedValues: to.Ptr("1-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("8"), // Source: to.Ptr("system-default"), // Value: to.Ptr("8"), // }, // }, // { // Name: to.Ptr("lock_timeout"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/lock_timeout"), // Properties: &armpostgresql.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("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("log_checkpoints"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_checkpoints"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs each checkpoint."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("log_connections"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_connections"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs each successful connection."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("log_disconnections"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_disconnections"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs end of a session, including duration."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("log_duration"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_duration"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs the duration of each completed SQL statement."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("log_error_verbosity"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_error_verbosity"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the verbosity of logged messages."), // AllowedValues: to.Ptr("terse,default,verbose"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("default"), // Source: to.Ptr("system-default"), // Value: to.Ptr("default"), // }, // }, // { // Name: to.Ptr("log_lock_waits"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_lock_waits"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Logs long lock waits."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_min_duration_statement"), // Properties: &armpostgresql.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("Integer"), // 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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_min_error_statement"), // Properties: &armpostgresql.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("Enumeration"), // DefaultValue: to.Ptr("error"), // Source: to.Ptr("system-default"), // Value: to.Ptr("error"), // }, // }, // { // Name: to.Ptr("log_min_messages"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_min_messages"), // Properties: &armpostgresql.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("Enumeration"), // DefaultValue: to.Ptr("warning"), // Source: to.Ptr("system-default"), // Value: to.Ptr("warning"), // }, // }, // { // Name: to.Ptr("log_statement"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_statement"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the type of statements logged."), // AllowedValues: to.Ptr("none,ddl,mod,all"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("none"), // Source: to.Ptr("system-default"), // Value: to.Ptr("none"), // }, // }, // { // Name: to.Ptr("max_locks_per_transaction"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_locks_per_transaction"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the maximum number of locks per transaction."), // AllowedValues: to.Ptr("10-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("64"), // Source: to.Ptr("system-default"), // Value: to.Ptr("64"), // }, // }, // { // Name: to.Ptr("max_pred_locks_per_transaction"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_pred_locks_per_transaction"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the maximum number of predicate locks per transaction."), // AllowedValues: to.Ptr("10-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("64"), // Source: to.Ptr("system-default"), // Value: to.Ptr("64"), // }, // }, // { // Name: to.Ptr("max_prepared_transactions"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_prepared_transactions"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the maximum number of simultaneously prepared transactions."), // AllowedValues: to.Ptr("0-8388607"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("quote_all_identifiers"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/quote_all_identifiers"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("When generating SQL fragments, quote all identifiers."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("random_page_cost"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/random_page_cost"), // Properties: &armpostgresql.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("Numeric"), // DefaultValue: to.Ptr("4.0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("4.0"), // }, // }, // { // Name: to.Ptr("search_path"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/search_path"), // Properties: &armpostgresql.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("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/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/seq_page_cost"), // Properties: &armpostgresql.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("Numeric"), // DefaultValue: to.Ptr("1.0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("1.0"), // }, // }, // { // Name: to.Ptr("sql_inheritance"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/sql_inheritance"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Causes subtables to be included by default in various commands."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("standard_conforming_strings"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/standard_conforming_strings"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Causes '...' strings to treat backslashes literally."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("statement_timeout"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/statement_timeout"), // Properties: &armpostgresql.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("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("synchronize_seqscans"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/synchronize_seqscans"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enable synchronized sequential scans."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("synchronous_commit"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/synchronous_commit"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the current transaction's synchronization level."), // AllowedValues: to.Ptr("local,remote_write,on,off"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("transform_null_equals"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/transform_null_equals"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Treats \"expr=NULL\" as \"expr IS NULL\"."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("xmlbinary"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/xmlbinary"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets how binary values are to be encoded in XML."), // AllowedValues: to.Ptr("base64,hex"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("base64"), // Source: to.Ptr("system-default"), // Value: to.Ptr("base64"), // }, // }, // { // Name: to.Ptr("xmloption"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/xmloption"), // Properties: &armpostgresql.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("Enumeration"), // DefaultValue: to.Ptr("content"), // Source: to.Ptr("system-default"), // Value: to.Ptr("content"), // }, // }, // { // Name: to.Ptr("force_parallel_mode"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/force_parallel_mode"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Forces use of parallel query facilities."), // AllowedValues: to.Ptr("off,on,regress"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("off"), // Source: to.Ptr("system-default"), // Value: to.Ptr("off"), // }, // }, // { // Name: to.Ptr("idle_in_transaction_session_timeout"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/idle_in_transaction_session_timeout"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the maximum allowed duration of any idling transaction."), // AllowedValues: to.Ptr("0-2147483647"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("max_parallel_workers_per_gather"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_parallel_workers_per_gather"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the maximum number of parallel processes per executor node."), // AllowedValues: to.Ptr("0-1024"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("0"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0"), // }, // }, // { // Name: to.Ptr("min_parallel_relation_size"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/min_parallel_relation_size"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets the minimum size of relations to be considered for parallel scan."), // AllowedValues: to.Ptr("0-715827882"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("8388608"), // Source: to.Ptr("system-default"), // Value: to.Ptr("8388608"), // }, // }, // { // Name: to.Ptr("parallel_setup_cost"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/parallel_setup_cost"), // Properties: &armpostgresql.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("Numeric"), // DefaultValue: to.Ptr("1000"), // Source: to.Ptr("system-default"), // Value: to.Ptr("1000"), // }, // }, // { // Name: to.Ptr("parallel_tuple_cost"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/parallel_tuple_cost"), // Properties: &armpostgresql.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("Numeric"), // DefaultValue: to.Ptr("0.1"), // Source: to.Ptr("system-default"), // Value: to.Ptr("0.1"), // }, // }, // { // Name: to.Ptr("log_retention_days"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_retention_days"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets how many days a log file is saved for."), // AllowedValues: to.Ptr("1-7"), // DataType: to.Ptr("Integer"), // DefaultValue: to.Ptr("3"), // Source: to.Ptr("system-default"), // Value: to.Ptr("3"), // }, // }}, // } } }
Output:
type ConfigurationsClientBeginCreateOrUpdateOptions ¶
type ConfigurationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginCreateOrUpdate method.
type ConfigurationsClientCreateOrUpdateResponse ¶
type ConfigurationsClientCreateOrUpdateResponse struct { // Represents a Configuration. Configuration }
ConfigurationsClientCreateOrUpdateResponse contains the response from method ConfigurationsClient.BeginCreateOrUpdate.
type ConfigurationsClientGetOptions ¶
type ConfigurationsClientGetOptions struct { }
ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
type ConfigurationsClientGetResponse ¶
type ConfigurationsClientGetResponse struct { // Represents a Configuration. Configuration }
ConfigurationsClientGetResponse contains the response from method ConfigurationsClient.Get.
type ConfigurationsClientListByServerOptions ¶
type ConfigurationsClientListByServerOptions struct { }
ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.NewListByServerPager method.
type ConfigurationsClientListByServerResponse ¶
type ConfigurationsClientListByServerResponse struct { // A list of server configurations. ConfigurationListResult }
ConfigurationsClientListByServerResponse contains the response from method ConfigurationsClient.NewListByServerPager.
type CreateMode ¶
type CreateMode string
CreateMode - The mode to create a new server.
const ( CreateModeDefault CreateMode = "Default" CreateModeGeoRestore CreateMode = "GeoRestore" CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" CreateModeReplica CreateMode = "Replica" )
func PossibleCreateModeValues ¶
func PossibleCreateModeValues() []CreateMode
PossibleCreateModeValues returns the possible values for the CreateMode const type.
type Database ¶
type Database struct { // The properties of a database. Properties *DatabaseProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Database - Represents a Database.
func (Database) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Database.
func (*Database) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Database.
type DatabaseListResult ¶
type DatabaseListResult struct { // The list of databases housed in a server Value []*Database }
DatabaseListResult - A List of databases.
func (DatabaseListResult) MarshalJSON ¶
func (d DatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseListResult.
func (*DatabaseListResult) UnmarshalJSON ¶
func (d *DatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult.
type DatabaseProperties ¶
type DatabaseProperties struct { // The charset of the database. Charset *string // The collation of the database. Collation *string }
DatabaseProperties - The properties of a database.
func (DatabaseProperties) MarshalJSON ¶
func (d DatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseProperties.
func (*DatabaseProperties) UnmarshalJSON ¶
func (d *DatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseProperties.
type DatabasesClient ¶
type DatabasesClient struct {
// contains filtered or unexported fields
}
DatabasesClient contains the methods for the Databases group. Don't use this type directly, use NewDatabasesClient() instead.
func NewDatabasesClient ¶
func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error)
NewDatabasesClient creates a new instance of DatabasesClient 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 (*DatabasesClient) BeginCreateOrUpdate ¶
func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The required parameters for creating or updating a database.
- options - DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/DatabaseCreate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "db1", armpostgresql.Database{ Properties: &armpostgresql.DatabaseProperties{ Charset: to.Ptr("UTF8"), Collation: to.Ptr("English_United States.1252"), }, }, 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 = armpostgresql.Database{ // Name: to.Ptr("db1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1"), // Properties: &armpostgresql.DatabaseProperties{ // Charset: to.Ptr("UTF8"), // Collation: to.Ptr("English_United States.1252"), // }, // } }
Output:
func (*DatabasesClient) BeginDelete ¶
func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*runtime.Poller[DatabasesClientDeleteResponse], error)
BeginDelete - Deletes a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/DatabaseDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", 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) } }
Output:
func (*DatabasesClient) Get ¶
func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error)
Get - Gets information about a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/DatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", 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 = armpostgresql.Database{ // Name: to.Ptr("db1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1"), // Properties: &armpostgresql.DatabaseProperties{ // Charset: to.Ptr("UTF8"), // Collation: to.Ptr("English_United States.1252"), // }, // } }
Output:
func (*DatabasesClient) NewListByServerPager ¶
func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse]
NewListByServerPager - List all the databases in a given server.
Generated from API version 2017-12-01
- 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 method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/DatabaseListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", 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 = armpostgresql.DatabaseListResult{ // Value: []*armpostgresql.Database{ // { // Name: to.Ptr("db1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1"), // Properties: &armpostgresql.DatabaseProperties{ // Charset: to.Ptr("UTF8"), // Collation: to.Ptr("English_United States.1252"), // }, // }, // { // Name: to.Ptr("db2"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db2"), // Properties: &armpostgresql.DatabaseProperties{ // Charset: to.Ptr("UTF8"), // Collation: to.Ptr("English_United States.1252"), // }, // }}, // } } }
Output:
type DatabasesClientBeginCreateOrUpdateOptions ¶
type DatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
type DatabasesClientBeginDeleteOptions ¶
type DatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
type DatabasesClientCreateOrUpdateResponse ¶
type DatabasesClientCreateOrUpdateResponse struct { // Represents a Database. Database }
DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate.
type DatabasesClientDeleteResponse ¶
type DatabasesClientDeleteResponse struct { }
DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete.
type DatabasesClientGetOptions ¶
type DatabasesClientGetOptions struct { }
DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
type DatabasesClientGetResponse ¶
type DatabasesClientGetResponse struct { // Represents a Database. Database }
DatabasesClientGetResponse contains the response from method DatabasesClient.Get.
type DatabasesClientListByServerOptions ¶
type DatabasesClientListByServerOptions struct { }
DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
type DatabasesClientListByServerResponse ¶
type DatabasesClientListByServerResponse struct { // A List of databases. DatabaseListResult }
DatabasesClientListByServerResponse contains the response from method DatabasesClient.NewListByServerPager.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorResponse ¶
type ErrorResponse struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorResponse // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type FirewallRule ¶
type FirewallRule struct { // REQUIRED; The properties of a firewall rule. Properties *FirewallRuleProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
FirewallRule - Represents a server firewall rule.
func (FirewallRule) MarshalJSON ¶
func (f FirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRule.
func (*FirewallRule) UnmarshalJSON ¶
func (f *FirewallRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule.
type FirewallRuleListResult ¶
type FirewallRuleListResult struct { // The list of firewall rules in a server. Value []*FirewallRule }
FirewallRuleListResult - A list of firewall rules.
func (FirewallRuleListResult) MarshalJSON ¶
func (f FirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult.
func (*FirewallRuleListResult) UnmarshalJSON ¶
func (f *FirewallRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleListResult.
type FirewallRuleProperties ¶
type FirewallRuleProperties struct { // REQUIRED; The end IP address of the server firewall rule. Must be IPv4 format. EndIPAddress *string // REQUIRED; The start IP address of the server firewall rule. Must be IPv4 format. StartIPAddress *string }
FirewallRuleProperties - The properties of a server firewall rule.
func (FirewallRuleProperties) MarshalJSON ¶
func (f FirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRuleProperties.
func (*FirewallRuleProperties) UnmarshalJSON ¶
func (f *FirewallRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleProperties.
type FirewallRulesClient ¶
type FirewallRulesClient struct {
// contains filtered or unexported fields
}
FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.
func NewFirewallRulesClient ¶
func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)
NewFirewallRulesClient creates a new instance of FirewallRulesClient 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 (*FirewallRulesClient) BeginCreateOrUpdate ¶
func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)
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 2017-12-01
- 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.
- parameters - The required parameters for creating or updating a firewall rule.
- options - FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/FirewallRuleCreate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFirewallRulesClient().BeginCreateOrUpdate(ctx, "TestGroup", "testserver", "rule1", armpostgresql.FirewallRule{ Properties: &armpostgresql.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 = armpostgresql.FirewallRule{ // Name: to.Ptr("rule1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/firewallRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1"), // Properties: &armpostgresql.FirewallRuleProperties{ // EndIPAddress: to.Ptr("255.255.255.255"), // StartIPAddress: to.Ptr("0.0.0.0"), // }, // } }
Output:
func (*FirewallRulesClient) BeginDelete ¶
func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)
BeginDelete - Deletes a server firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
- options - FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFirewallRulesClient().BeginDelete(ctx, "TestGroup", "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) } }
Output:
func (*FirewallRulesClient) Get ¶
func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)
Get - Gets information about a server firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
- options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFirewallRulesClient().Get(ctx, "TestGroup", "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 = armpostgresql.FirewallRule{ // Name: to.Ptr("rule1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/firewallRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1"), // Properties: &armpostgresql.FirewallRuleProperties{ // EndIPAddress: to.Ptr("255.255.255.255"), // StartIPAddress: to.Ptr("0.0.0.0"), // }, // } }
Output:
func (*FirewallRulesClient) NewListByServerPager ¶
func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse]
NewListByServerPager - List all the firewall rules in a given server.
Generated from API version 2017-12-01
- 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 method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/FirewallRuleListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFirewallRulesClient().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.FirewallRuleListResult = armpostgresql.FirewallRuleListResult{ // Value: []*armpostgresql.FirewallRule{ // { // Name: to.Ptr("rule1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/firewallRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1"), // Properties: &armpostgresql.FirewallRuleProperties{ // EndIPAddress: to.Ptr("255.255.255.255"), // StartIPAddress: to.Ptr("0.0.0.0"), // }, // }, // { // Name: to.Ptr("rule2"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/firewallRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule2"), // Properties: &armpostgresql.FirewallRuleProperties{ // EndIPAddress: to.Ptr("255.0.0.0"), // StartIPAddress: to.Ptr("1.0.0.0"), // }, // }}, // } } }
Output:
type FirewallRulesClientBeginCreateOrUpdateOptions ¶
type FirewallRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
type FirewallRulesClientBeginDeleteOptions ¶
type FirewallRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
type FirewallRulesClientCreateOrUpdateResponse ¶
type FirewallRulesClientCreateOrUpdateResponse struct { // Represents a server firewall rule. FirewallRule }
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.BeginCreateOrUpdate.
type FirewallRulesClientDeleteResponse ¶
type FirewallRulesClientDeleteResponse struct { }
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.BeginDelete.
type FirewallRulesClientGetOptions ¶
type FirewallRulesClientGetOptions struct { }
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
type FirewallRulesClientGetResponse ¶
type FirewallRulesClientGetResponse struct { // Represents a server firewall rule. FirewallRule }
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
type FirewallRulesClientListByServerOptions ¶
type FirewallRulesClientListByServerOptions struct { }
FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
type FirewallRulesClientListByServerResponse ¶
type FirewallRulesClientListByServerResponse struct { // A list of firewall rules. FirewallRuleListResult }
FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager.
type GeoRedundantBackup ¶
type GeoRedundantBackup string
GeoRedundantBackup - Enable Geo-redundant or not for server backup.
const ( GeoRedundantBackupDisabled GeoRedundantBackup = "Disabled" GeoRedundantBackupEnabled GeoRedundantBackup = "Enabled" )
func PossibleGeoRedundantBackupValues ¶
func PossibleGeoRedundantBackupValues() []GeoRedundantBackup
PossibleGeoRedundantBackupValues returns the possible values for the GeoRedundantBackup const type.
type IdentityType ¶
type IdentityType string
IdentityType - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.
const (
IdentityTypeSystemAssigned IdentityType = "SystemAssigned"
)
func PossibleIdentityTypeValues ¶
func PossibleIdentityTypeValues() []IdentityType
PossibleIdentityTypeValues returns the possible values for the IdentityType const type.
type InfrastructureEncryption ¶
type InfrastructureEncryption string
InfrastructureEncryption - Add a second layer of encryption for your data using new encryption algorithm which gives additional data protection. Value is optional but if passed in, must be 'Disabled' or 'Enabled'.
const ( // InfrastructureEncryptionDisabled - Additional (2nd) layer of encryption for data at rest InfrastructureEncryptionDisabled InfrastructureEncryption = "Disabled" // InfrastructureEncryptionEnabled - Default value for single layer of encryption for data at rest. InfrastructureEncryptionEnabled InfrastructureEncryption = "Enabled" )
func PossibleInfrastructureEncryptionValues ¶
func PossibleInfrastructureEncryptionValues() []InfrastructureEncryption
PossibleInfrastructureEncryptionValues returns the possible values for the InfrastructureEncryption const type.
type LocationBasedPerformanceTierClient ¶
type LocationBasedPerformanceTierClient struct {
// contains filtered or unexported fields
}
LocationBasedPerformanceTierClient contains the methods for the LocationBasedPerformanceTier group. Don't use this type directly, use NewLocationBasedPerformanceTierClient() instead.
func NewLocationBasedPerformanceTierClient ¶
func NewLocationBasedPerformanceTierClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationBasedPerformanceTierClient, error)
NewLocationBasedPerformanceTierClient creates a new instance of LocationBasedPerformanceTierClient 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 (*LocationBasedPerformanceTierClient) NewListPager ¶
func (client *LocationBasedPerformanceTierClient) NewListPager(locationName string, options *LocationBasedPerformanceTierClientListOptions) *runtime.Pager[LocationBasedPerformanceTierClientListResponse]
NewListPager - List all the performance tiers at specified location in a given subscription.
Generated from API version 2017-12-01
- locationName - The name of the location.
- options - LocationBasedPerformanceTierClientListOptions contains the optional parameters for the LocationBasedPerformanceTierClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/PerformanceTiersListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLocationBasedPerformanceTierClient().NewListPager("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.PerformanceTierListResult = armpostgresql.PerformanceTierListResult{ // Value: []*armpostgresql.PerformanceTierProperties{ // { // ID: to.Ptr("Basic"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxLargeStorageMB: to.Ptr[int32](0), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinLargeStorageMB: to.Ptr[int32](0), // MinStorageMB: to.Ptr[int32](5120), // ServiceLevelObjectives: []*armpostgresql.PerformanceTierServiceLevelObjectives{ // { // Edition: to.Ptr("Basic"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("B_Gen5_1"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](1048576), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](1), // }, // { // Edition: to.Ptr("Basic"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("B_Gen5_2"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](1048576), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](2), // }}, // }, // { // ID: to.Ptr("GeneralPurpose"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxLargeStorageMB: to.Ptr[int32](16777216), // MaxStorageMB: to.Ptr[int32](16777216), // MinBackupRetentionDays: to.Ptr[int32](7), // MinLargeStorageMB: to.Ptr[int32](0), // MinStorageMB: to.Ptr[int32](5120), // ServiceLevelObjectives: []*armpostgresql.PerformanceTierServiceLevelObjectives{ // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_2"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](2), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_4"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](4), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_8"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](8), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_16"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](16), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_32"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](32), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_64"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](32), // }}, // }, // { // ID: to.Ptr("MemoryOptimized"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxLargeStorageMB: to.Ptr[int32](16777216), // MaxStorageMB: to.Ptr[int32](16777216), // MinBackupRetentionDays: to.Ptr[int32](7), // MinLargeStorageMB: to.Ptr[int32](0), // MinStorageMB: to.Ptr[int32](5120), // ServiceLevelObjectives: []*armpostgresql.PerformanceTierServiceLevelObjectives{ // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_2"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](2), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_4"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](4), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_8"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](8), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_16"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](16), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_32"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](32), // }}, // }}, // } } }
Output:
type LocationBasedPerformanceTierClientListOptions ¶
type LocationBasedPerformanceTierClientListOptions struct { }
LocationBasedPerformanceTierClientListOptions contains the optional parameters for the LocationBasedPerformanceTierClient.NewListPager method.
type LocationBasedPerformanceTierClientListResponse ¶
type LocationBasedPerformanceTierClientListResponse struct { // A list of performance tiers. PerformanceTierListResult }
LocationBasedPerformanceTierClientListResponse contains the response from method LocationBasedPerformanceTierClient.NewListPager.
type LogFile ¶
type LogFile struct { // The properties of the log file. Properties *LogFileProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
LogFile - Represents a log file.
func (LogFile) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LogFile.
func (*LogFile) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type LogFile.
type LogFileListResult ¶
type LogFileListResult struct { // The list of log files. Value []*LogFile }
LogFileListResult - A list of log files.
func (LogFileListResult) MarshalJSON ¶
func (l LogFileListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogFileListResult.
func (*LogFileListResult) UnmarshalJSON ¶
func (l *LogFileListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogFileListResult.
type LogFileProperties ¶
type LogFileProperties struct { // Size of the log file. SizeInKB *int64 // Type of the log file. Type *string // The url to download the log file from. URL *string // READ-ONLY; Creation timestamp of the log file. CreatedTime *time.Time // READ-ONLY; Last modified timestamp of the log file. LastModifiedTime *time.Time }
LogFileProperties - The properties of a log file.
func (LogFileProperties) MarshalJSON ¶
func (l LogFileProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogFileProperties.
func (*LogFileProperties) UnmarshalJSON ¶
func (l *LogFileProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogFileProperties.
type LogFilesClient ¶
type LogFilesClient struct {
// contains filtered or unexported fields
}
LogFilesClient contains the methods for the LogFiles group. Don't use this type directly, use NewLogFilesClient() instead.
func NewLogFilesClient ¶
func NewLogFilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogFilesClient, error)
NewLogFilesClient creates a new instance of LogFilesClient 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 (*LogFilesClient) NewListByServerPager ¶
func (client *LogFilesClient) NewListByServerPager(resourceGroupName string, serverName string, options *LogFilesClientListByServerOptions) *runtime.Pager[LogFilesClientListByServerResponse]
NewListByServerPager - List all the log files in a given server.
Generated from API version 2017-12-01
- 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 method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/LogFileListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLogFilesClient().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.LogFileListResult = armpostgresql.LogFileListResult{ // Value: []*armpostgresql.LogFile{ // { // Name: to.Ptr("postgresql-2017-06-22_010000.log"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/logFiles"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/logFiles/postgresql-2017-06-22_010000.log"), // Properties: &armpostgresql.LogFileProperties{ // Type: to.Ptr("text"), // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-22T01:59:36.000Z"); return t}()), // SizeInKB: to.Ptr[int64](4), // URL: to.Ptr("https://wasd2stageneu1btlm4.file.core.windows.net/42679871f6cc4302b39ab9c2e3044df3/pg_log/postgresql-2017-06-22_010000.log?sv=2015-04-05&sr=f&sig=gqIQsa6VyGyUNpzYYPWLP5gM%2BeF1so9GYbHKu6Zs0DM%3D&se=2017-06-22T03%3A21%3A09Z&sp=r"), // }, // }, // { // Name: to.Ptr("postgresql-2017-06-22_020000.log"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/logFiles"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/logFiles/postgresql-2017-06-22_020000.log"), // Properties: &armpostgresql.LogFileProperties{ // Type: to.Ptr("text"), // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-22T02:19:36.000Z"); return t}()), // SizeInKB: to.Ptr[int64](1), // URL: to.Ptr("https://wasd2stageneu1btlm4.file.core.windows.net/42679871f6cc4302b39ab9c2e3044df3/pg_log/postgresql-2017-06-22_020000.log?sv=2015-04-05&sr=f&sig=i99UWBlYfR0tKaxix8yHAOnfym4HV9Auto6BbZogyRs%3D&se=2017-06-22T03%3A21%3A09Z&sp=r"), // }, // }}, // } } }
Output:
type LogFilesClientListByServerOptions ¶
type LogFilesClientListByServerOptions struct { }
LogFilesClientListByServerOptions contains the optional parameters for the LogFilesClient.NewListByServerPager method.
type LogFilesClientListByServerResponse ¶
type LogFilesClientListByServerResponse struct { // A list of log files. LogFileListResult }
LogFilesClientListByServerResponse contains the response from method LogFilesClient.NewListByServerPager.
type MinimalTLSVersionEnum ¶
type MinimalTLSVersionEnum string
MinimalTLSVersionEnum - Enforce a minimal Tls version for the server.
const ( MinimalTLSVersionEnumTLS10 MinimalTLSVersionEnum = "TLS1_0" MinimalTLSVersionEnumTLS11 MinimalTLSVersionEnum = "TLS1_1" MinimalTLSVersionEnumTLS12 MinimalTLSVersionEnum = "TLS1_2" MinimalTLSVersionEnumTLSEnforcementDisabled MinimalTLSVersionEnum = "TLSEnforcementDisabled" )
func PossibleMinimalTLSVersionEnumValues ¶
func PossibleMinimalTLSVersionEnumValues() []MinimalTLSVersionEnum
PossibleMinimalTLSVersionEnumValues returns the possible values for the MinimalTLSVersionEnum const type.
type NameAvailability ¶
type NameAvailability struct { // Error Message. Message *string // Indicates whether the resource name is available. NameAvailable *bool // Reason for name being unavailable. Reason *string }
NameAvailability - Represents a resource name availability.
func (NameAvailability) MarshalJSON ¶
func (n NameAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailability.
func (*NameAvailability) UnmarshalJSON ¶
func (n *NameAvailability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability.
type NameAvailabilityRequest ¶
type NameAvailabilityRequest struct { // REQUIRED; Resource name to verify. Name *string // Resource type used for verification. Type *string }
NameAvailabilityRequest - Request from client to check resource name availability.
func (NameAvailabilityRequest) MarshalJSON ¶
func (n NameAvailabilityRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailabilityRequest.
func (*NameAvailabilityRequest) UnmarshalJSON ¶
func (n *NameAvailabilityRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityRequest.
type Operation ¶
type Operation struct { // READ-ONLY; The localized display information for this particular operation or action. Display *OperationDisplay // READ-ONLY; The name of the operation being performed on this particular object. Name *string // READ-ONLY; The intended executor of the operation. Origin *OperationOrigin // READ-ONLY; Additional descriptions for the operation. Properties map[string]any }
Operation - REST API operation definition.
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; Operation description. Description *string // READ-ONLY; Localized friendly name for the operation. Operation *string // READ-ONLY; Operation resource provider name. Provider *string // READ-ONLY; Resource on which the operation is performed. Resource *string }
OperationDisplay - Display metadata associated with the operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // The list of resource provider operations. Value []*Operation }
OperationListResult - A list of resource provider operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationOrigin ¶
type OperationOrigin string
OperationOrigin - The intended executor of the operation.
const ( OperationOriginNotSpecified OperationOrigin = "NotSpecified" OperationOriginSystem OperationOrigin = "system" OperationOriginUser OperationOrigin = "user" )
func PossibleOperationOriginValues ¶
func PossibleOperationOriginValues() []OperationOrigin
PossibleOperationOriginValues returns the possible values for the OperationOrigin const type.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) List ¶
func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error)
List - Lists all of the available REST API operations. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/OperationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", 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 = armpostgresql.OperationListResult{ // Value: []*armpostgresql.Operation{ // { // Name: to.Ptr("Microsoft.DBforPostgreSQL/locations/performanceTiers/read"), // Display: &armpostgresql.OperationDisplay{ // Description: to.Ptr("Returns the list of Performance Tiers available."), // Operation: to.Ptr("List Performance Tiers"), // Provider: to.Ptr("Microsoft DB for PostgreSQL"), // Resource: to.Ptr("Performance Tiers"), // }, // }, // { // Name: to.Ptr("Microsoft.DBforPostgreSQL/servers/read"), // Display: &armpostgresql.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/servers/write"), // Display: &armpostgresql.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/servers/delete"), // Display: &armpostgresql.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/performanceTiers/read"), // Display: &armpostgresql.OperationDisplay{ // Description: to.Ptr("Returns the list of Performance Tiers available."), // Operation: to.Ptr("List Performance Tiers"), // Provider: to.Ptr("Microsoft DB for PostgreSQL"), // Resource: to.Ptr("Performance Tiers"), // }, // }, // { // Name: to.Ptr("Microsoft.DBforPostgreSQL/servers/firewallRules/read"), // Display: &armpostgresql.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/servers/firewallRules/write"), // Display: &armpostgresql.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/servers/firewallRules/delete"), // Display: &armpostgresql.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/servers/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armpostgresql.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": "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/servers/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armpostgresql.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/servers/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armpostgresql.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"), // }, // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of resource provider operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.List.
type PerformanceTierListResult ¶
type PerformanceTierListResult struct { // The list of performance tiers Value []*PerformanceTierProperties }
PerformanceTierListResult - A list of performance tiers.
func (PerformanceTierListResult) MarshalJSON ¶
func (p PerformanceTierListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerformanceTierListResult.
func (*PerformanceTierListResult) UnmarshalJSON ¶
func (p *PerformanceTierListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PerformanceTierListResult.
type PerformanceTierProperties ¶
type PerformanceTierProperties struct { // ID of the performance tier. ID *string // Maximum Backup retention in days for the performance tier edition MaxBackupRetentionDays *int32 // Max storage allowed for a server. MaxLargeStorageMB *int32 // Max storage allowed for a server. MaxStorageMB *int32 // Minimum Backup retention in days for the performance tier edition MinBackupRetentionDays *int32 // Max storage allowed for a server. MinLargeStorageMB *int32 // Max storage allowed for a server. MinStorageMB *int32 // Service level objectives associated with the performance tier ServiceLevelObjectives []*PerformanceTierServiceLevelObjectives }
PerformanceTierProperties - Performance tier properties
func (PerformanceTierProperties) MarshalJSON ¶
func (p PerformanceTierProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerformanceTierProperties.
func (*PerformanceTierProperties) UnmarshalJSON ¶
func (p *PerformanceTierProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PerformanceTierProperties.
type PerformanceTierServiceLevelObjectives ¶
type PerformanceTierServiceLevelObjectives struct { // Edition of the performance tier. Edition *string // Hardware generation associated with the service level objective HardwareGeneration *string // ID for the service level objective. ID *string // Maximum Backup retention in days for the performance tier edition MaxBackupRetentionDays *int32 // Max storage allowed for a server. MaxStorageMB *int32 // Minimum Backup retention in days for the performance tier edition MinBackupRetentionDays *int32 // Max storage allowed for a server. MinStorageMB *int32 // vCore associated with the service level objective VCore *int32 }
PerformanceTierServiceLevelObjectives - Service level objectives for performance tier.
func (PerformanceTierServiceLevelObjectives) MarshalJSON ¶
func (p PerformanceTierServiceLevelObjectives) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerformanceTierServiceLevelObjectives.
func (*PerformanceTierServiceLevelObjectives) UnmarshalJSON ¶
func (p *PerformanceTierServiceLevelObjectives) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PerformanceTierServiceLevelObjectives.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnection - A private endpoint connection
func (PrivateEndpointConnection) MarshalJSON ¶
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*PrivateEndpointConnection }
PrivateEndpointConnectionListResult - A list of private endpoint connections.
func (PrivateEndpointConnectionListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // Private endpoint which the connection belongs to. PrivateEndpoint *PrivateEndpointProperty // Connection state of the private endpoint connection. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty // READ-ONLY; State of the private endpoint connection. ProvisioningState *string }
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient 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 (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateEndpointConnectionUpdate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "Default", "test-svr", "private-endpoint-connection-name", armpostgresql.PrivateEndpointConnection{ Properties: &armpostgresql.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armpostgresql.PrivateLinkServiceConnectionStateProperty{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr("Approved"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armpostgresql.PrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armpostgresql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateEndpointConnectionDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "Default", "test-svr", "private-endpoint-connection-name", 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) } }
Output:
func (*PrivateEndpointConnectionsClient) BeginUpdateTags ¶
func (client *PrivateEndpointConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject, options *PrivateEndpointConnectionsClientBeginUpdateTagsOptions) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateTagsResponse], error)
BeginUpdateTags - Updates private endpoint connection with the specified tags. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- parameters - Parameters supplied to the Update private endpoint connection Tags operation.
- options - PrivateEndpointConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdateTags method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateEndpointConnectionUpdateTags.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginUpdateTags(ctx, "Default", "test-svr", "private-endpoint-connection-name", armpostgresql.TagsObject{ Tags: map[string]*string{ "key1": to.Ptr("val1"), "key2": to.Ptr("val2"), "key3": to.Ptr("val3"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armpostgresql.PrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armpostgresql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Gets a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateEndpointConnectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "Default", "test-svr", "private-endpoint-connection-name", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armpostgresql.PrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armpostgresql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) NewListByServerPager ¶
func (client *PrivateEndpointConnectionsClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateEndpointConnectionsClientListByServerOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse]
NewListByServerPager - Gets all private endpoint connections on a server.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateEndpointConnectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByServerPager("Default", "test-svr", 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.PrivateEndpointConnectionListResult = armpostgresql.PrivateEndpointConnectionListResult{ // Value: []*armpostgresql.PrivateEndpointConnection{ // { // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2"), // Properties: &armpostgresql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }, // { // Name: to.Ptr("private-endpoint-connection-name-2"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2"), // Properties: &armpostgresql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientBeginUpdateTagsOptions ¶
type PrivateEndpointConnectionsClientBeginUpdateTagsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdateTags method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶
type PrivateEndpointConnectionsClientGetResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByServerOptions ¶
type PrivateEndpointConnectionsClientListByServerOptions struct { }
PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
type PrivateEndpointConnectionsClientListByServerResponse ¶
type PrivateEndpointConnectionsClientListByServerResponse struct { // A list of private endpoint connections. PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListByServerResponse contains the response from method PrivateEndpointConnectionsClient.NewListByServerPager.
type PrivateEndpointConnectionsClientUpdateTagsResponse ¶
type PrivateEndpointConnectionsClientUpdateTagsResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientUpdateTagsResponse contains the response from method PrivateEndpointConnectionsClient.BeginUpdateTags.
type PrivateEndpointProperty ¶
type PrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string }
func (PrivateEndpointProperty) MarshalJSON ¶
func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty.
func (*PrivateEndpointProperty) UnmarshalJSON ¶
func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty.
type PrivateEndpointProvisioningState ¶
type PrivateEndpointProvisioningState string
PrivateEndpointProvisioningState - State of the private endpoint connection.
const ( PrivateEndpointProvisioningStateApproving PrivateEndpointProvisioningState = "Approving" PrivateEndpointProvisioningStateDropping PrivateEndpointProvisioningState = "Dropping" PrivateEndpointProvisioningStateFailed PrivateEndpointProvisioningState = "Failed" PrivateEndpointProvisioningStateReady PrivateEndpointProvisioningState = "Ready" PrivateEndpointProvisioningStateRejecting PrivateEndpointProvisioningState = "Rejecting" )
func PossiblePrivateEndpointProvisioningStateValues ¶
func PossiblePrivateEndpointProvisioningStateValues() []PrivateEndpointProvisioningState
PossiblePrivateEndpointProvisioningStateValues returns the possible values for the PrivateEndpointProvisioningState const type.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // 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; The private link resource group id. Properties *PrivateLinkResourceProperties // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*PrivateLinkResource }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient 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 (*PrivateLinkResourcesClient) Get ¶
func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)
Get - Gets a private link resource for PostgreSQL server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- groupName - The name of the private link resource.
- options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateLinkResourcesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "Default", "test-svr", "plr", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateLinkResource = armpostgresql.PrivateLinkResource{ // Name: to.Ptr("plr"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateLinkResources/plr"), // Properties: &armpostgresql.PrivateLinkResourceProperties{ // GroupID: to.Ptr("postgresqlServer"), // RequiredMembers: []*string{ // to.Ptr("postgresqlServer")}, // }, // } }
Output:
func (*PrivateLinkResourcesClient) NewListByServerPager ¶
func (client *PrivateLinkResourcesClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateLinkResourcesClientListByServerOptions) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse]
NewListByServerPager - Gets the private link resources for PostgreSQL server.
Generated from API version 2018-06-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/PrivateLinkResourcesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateLinkResourcesClient().NewListByServerPager("Default", "test-svr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateLinkResourceListResult = armpostgresql.PrivateLinkResourceListResult{ // Value: []*armpostgresql.PrivateLinkResource{ // { // Name: to.Ptr("plr"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateLinkResources/plr"), // Properties: &armpostgresql.PrivateLinkResourceProperties{ // GroupID: to.Ptr("postgresqlServer"), // RequiredMembers: []*string{ // to.Ptr("postgresqlServer")}, // }, // }}, // } } }
Output:
type PrivateLinkResourcesClientGetOptions ¶
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶
type PrivateLinkResourcesClientGetResponse struct { // A private link resource PrivateLinkResource }
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByServerOptions ¶
type PrivateLinkResourcesClientListByServerOptions struct { }
PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager method.
type PrivateLinkResourcesClientListByServerResponse ¶
type PrivateLinkResourcesClientListByServerResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByServerResponse contains the response from method PrivateLinkResourcesClient.NewListByServerPager.
type PrivateLinkServiceConnectionStateActionsRequire ¶
type PrivateLinkServiceConnectionStateActionsRequire string
PrivateLinkServiceConnectionStateActionsRequire - The actions required for private link service connection.
const (
PrivateLinkServiceConnectionStateActionsRequireNone PrivateLinkServiceConnectionStateActionsRequire = "None"
)
func PossiblePrivateLinkServiceConnectionStateActionsRequireValues ¶
func PossiblePrivateLinkServiceConnectionStateActionsRequireValues() []PrivateLinkServiceConnectionStateActionsRequire
PossiblePrivateLinkServiceConnectionStateActionsRequireValues returns the possible values for the PrivateLinkServiceConnectionStateActionsRequire const type.
type PrivateLinkServiceConnectionStateProperty ¶
type PrivateLinkServiceConnectionStateProperty struct { // REQUIRED; The private link service connection description. Description *string // REQUIRED; The private link service connection status. Status *string // READ-ONLY; The actions required for private link service connection. ActionsRequired *string }
func (PrivateLinkServiceConnectionStateProperty) MarshalJSON ¶
func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty.
func (*PrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶
func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty.
type PrivateLinkServiceConnectionStateStatus ¶
type PrivateLinkServiceConnectionStateStatus string
PrivateLinkServiceConnectionStateStatus - The private link service connection status.
const ( PrivateLinkServiceConnectionStateStatusApproved PrivateLinkServiceConnectionStateStatus = "Approved" PrivateLinkServiceConnectionStateStatusDisconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" PrivateLinkServiceConnectionStateStatusPending PrivateLinkServiceConnectionStateStatus = "Pending" PrivateLinkServiceConnectionStateStatusRejected PrivateLinkServiceConnectionStateStatus = "Rejected" )
func PossiblePrivateLinkServiceConnectionStateStatusValues ¶
func PossiblePrivateLinkServiceConnectionStateStatusValues() []PrivateLinkServiceConnectionStateStatus
PossiblePrivateLinkServiceConnectionStateStatusValues returns the possible values for the PrivateLinkServiceConnectionStateStatus const type.
type ProxyResource ¶
type ProxyResource struct { // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type PublicNetworkAccessEnum ¶
type PublicNetworkAccessEnum string
PublicNetworkAccessEnum - Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'
const ( PublicNetworkAccessEnumDisabled PublicNetworkAccessEnum = "Disabled" PublicNetworkAccessEnumEnabled PublicNetworkAccessEnum = "Enabled" )
func PossiblePublicNetworkAccessEnumValues ¶
func PossiblePublicNetworkAccessEnumValues() []PublicNetworkAccessEnum
PossiblePublicNetworkAccessEnumValues returns the possible values for the PublicNetworkAccessEnum const type.
type RecoverableServerProperties ¶
type RecoverableServerProperties struct { // READ-ONLY; Edition of the performance tier. Edition *string // READ-ONLY; Hardware generation associated with the service level objective HardwareGeneration *string // READ-ONLY; The last available backup date time. LastAvailableBackupDateTime *string // READ-ONLY; The service level objective ServiceLevelObjective *string // READ-ONLY; vCore associated with the service level objective VCore *int32 // READ-ONLY; The PostgreSQL version Version *string }
RecoverableServerProperties - The recoverable server's properties.
func (RecoverableServerProperties) MarshalJSON ¶
func (r RecoverableServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableServerProperties.
func (*RecoverableServerProperties) UnmarshalJSON ¶
func (r *RecoverableServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableServerProperties.
type RecoverableServerResource ¶
type RecoverableServerResource struct { // Resource properties. Properties *RecoverableServerProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
RecoverableServerResource - A recoverable server resource.
func (RecoverableServerResource) MarshalJSON ¶
func (r RecoverableServerResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableServerResource.
func (*RecoverableServerResource) UnmarshalJSON ¶
func (r *RecoverableServerResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableServerResource.
type RecoverableServersClient ¶
type RecoverableServersClient struct {
// contains filtered or unexported fields
}
RecoverableServersClient contains the methods for the RecoverableServers group. Don't use this type directly, use NewRecoverableServersClient() instead.
func NewRecoverableServersClient ¶
func NewRecoverableServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoverableServersClient, error)
NewRecoverableServersClient creates a new instance of RecoverableServersClient 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 (*RecoverableServersClient) Get ¶
func (client *RecoverableServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *RecoverableServersClientGetOptions) (RecoverableServersClientGetResponse, error)
Get - Gets a recoverable PostgreSQL Server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - RecoverableServersClientGetOptions contains the optional parameters for the RecoverableServersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/RecoverableServersGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRecoverableServersClient().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.RecoverableServerResource = armpostgresql.RecoverableServerResource{ // Name: to.Ptr("recoverableServers"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/recoverableServers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/recoverableServers"), // Properties: &armpostgresql.RecoverableServerProperties{ // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // LastAvailableBackupDateTime: to.Ptr("2020-11-20T01:06:29.78Z"), // ServiceLevelObjective: to.Ptr("GP_Gen5_2"), // VCore: to.Ptr[int32](2), // Version: to.Ptr("9.6"), // }, // } }
Output:
type RecoverableServersClientGetOptions ¶
type RecoverableServersClientGetOptions struct { }
RecoverableServersClientGetOptions contains the optional parameters for the RecoverableServersClient.Get method.
type RecoverableServersClientGetResponse ¶
type RecoverableServersClientGetResponse struct { // A recoverable server resource. RecoverableServerResource }
RecoverableServersClientGetResponse contains the response from method RecoverableServersClient.Get.
type ReplicasClient ¶
type ReplicasClient struct {
// contains filtered or unexported fields
}
ReplicasClient contains the methods for the Replicas group. Don't use this type directly, use NewReplicasClient() instead.
func NewReplicasClient ¶
func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicasClient, error)
NewReplicasClient creates a new instance of ReplicasClient 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 (*ReplicasClient) NewListByServerPager ¶
func (client *ReplicasClient) NewListByServerPager(resourceGroupName string, serverName string, options *ReplicasClientListByServerOptions) *runtime.Pager[ReplicasClientListByServerResponse]
NewListByServerPager - List all the replicas for a given server.
Generated from API version 2017-12-01
- 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 method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ReplicasListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewReplicasClient().NewListByServerPager("TestGroup_WestCentralUS", "testserver-master", 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 = armpostgresql.ServerListResult{ // Value: []*armpostgresql.Server{ // { // Name: to.Ptr("testserver-replica1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica1"), // Location: to.Ptr("westcentralus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("postgres"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-12T00:05:03.269Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("testserver-replica1.postgres.database.azure.com"), // MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr("Replica"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumDisabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](2048000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_16"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("testserver-replica2"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica2"), // Location: to.Ptr("westcentralus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("postgres"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-12T00:05:03.269Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("testserver-replica2.postgres.database.azure.com"), // MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr("Replica"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumDisabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](2048000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_16"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("testserver-replica3"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica3"), // Location: to.Ptr("westcentralus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("postgres"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-12T00:05:03.269Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("testserver-replica3.postgres.database.azure.com"), // MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr("Replica"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumDisabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](2048000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_16"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("testserver-replica4"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica4"), // Location: to.Ptr("westcentralus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("postgres"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-12T00:05:03.269Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("testserver-replica4.postgres.database.azure.com"), // MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr("Replica"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumDisabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](2048000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_16"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("testserver-replica5"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica5"), // Location: to.Ptr("westcentralus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("postgres"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-12T00:05:03.269Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("testserver-replica5.postgres.database.azure.com"), // MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr("Replica"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumDisabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](2048000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_16"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }}, // } } }
Output:
type ReplicasClientListByServerOptions ¶
type ReplicasClientListByServerOptions struct { }
ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager method.
type ReplicasClientListByServerResponse ¶
type ReplicasClientListByServerResponse struct { // A list of servers. ServerListResult }
ReplicasClientListByServerResponse contains the response from method ReplicasClient.NewListByServerPager.
type Resource ¶
type Resource struct { // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceIdentity ¶
type ResourceIdentity struct { // The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal // for the resource. Type *IdentityType // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string // READ-ONLY; The Azure Active Directory tenant id. TenantID *string }
ResourceIdentity - Azure Active Directory identity configuration for a resource.
func (ResourceIdentity) MarshalJSON ¶
func (r ResourceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceIdentity.
func (*ResourceIdentity) UnmarshalJSON ¶
func (r *ResourceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceIdentity.
type SKU ¶
type SKU struct { // REQUIRED; The name of the sku, typically, tier + family + cores, e.g. BGen41, GPGen58. Name *string // The scale up/out capacity, representing server's compute units. Capacity *int32 // The family of hardware. Family *string // The size code, to be interpreted by resource as appropriate. Size *string // The tier of the particular SKU, e.g. Basic. Tier *SKUTier }
SKU - Billing information related properties of a server.
func (SKU) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUTier ¶
type SKUTier string
SKUTier - The tier of the particular SKU, e.g. Basic.
func PossibleSKUTierValues ¶
func PossibleSKUTierValues() []SKUTier
PossibleSKUTierValues returns the possible values for the SKUTier const type.
type SSLEnforcementEnum ¶
type SSLEnforcementEnum string
SSLEnforcementEnum - Enable ssl enforcement or not when connect to server.
const ( SSLEnforcementEnumDisabled SSLEnforcementEnum = "Disabled" SSLEnforcementEnumEnabled SSLEnforcementEnum = "Enabled" )
func PossibleSSLEnforcementEnumValues ¶
func PossibleSSLEnforcementEnumValues() []SSLEnforcementEnum
PossibleSSLEnforcementEnumValues returns the possible values for the SSLEnforcementEnum const type.
type SecurityAlertPolicyName ¶
type SecurityAlertPolicyName string
const (
SecurityAlertPolicyNameDefault SecurityAlertPolicyName = "Default"
)
func PossibleSecurityAlertPolicyNameValues ¶
func PossibleSecurityAlertPolicyNameValues() []SecurityAlertPolicyName
PossibleSecurityAlertPolicyNameValues returns the possible values for the SecurityAlertPolicyName const type.
type SecurityAlertPolicyProperties ¶
type SecurityAlertPolicyProperties struct { // REQUIRED; Specifies the state of the policy, whether it is enabled or disabled. State *ServerSecurityAlertPolicyState // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly DisabledAlerts []*string // Specifies that the alert is sent to the account administrators. EmailAccountAdmins *bool // Specifies an array of e-mail addresses to which the alert is sent. EmailAddresses []*string // Specifies the number of days to keep in the Threat Detection audit logs. RetentionDays *int32 // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat // Detection audit logs. StorageEndpoint *string }
SecurityAlertPolicyProperties - Properties of a security alert policy.
func (SecurityAlertPolicyProperties) MarshalJSON ¶
func (s SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityAlertPolicyProperties.
func (*SecurityAlertPolicyProperties) UnmarshalJSON ¶
func (s *SecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertPolicyProperties.
type Server ¶
type Server struct { // REQUIRED; The geo-location where the resource lives Location *string // The Azure Active Directory identity of the server. Identity *ResourceIdentity // Properties of the server. Properties *ServerProperties // The SKU (pricing tier) of the server. SKU *SKU // Resource tags. Tags map[string]*string // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Server - Represents a server.
func (Server) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Server.
func (*Server) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Server.
type ServerAdministratorProperties ¶
type ServerAdministratorProperties struct { // CONSTANT; The type of administrator. // Field has constant value "ActiveDirectory", any specified value is ignored. AdministratorType *string // REQUIRED; The server administrator login account name. Login *string // REQUIRED; The server administrator Sid (Secure ID). Sid *string // REQUIRED; The server Active Directory Administrator tenant id. TenantID *string }
ServerAdministratorProperties - The properties of an server Administrator.
func (ServerAdministratorProperties) MarshalJSON ¶
func (s ServerAdministratorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAdministratorProperties.
func (*ServerAdministratorProperties) UnmarshalJSON ¶
func (s *ServerAdministratorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAdministratorProperties.
type ServerAdministratorResource ¶
type ServerAdministratorResource struct { // Properties of the server AAD administrator. Properties *ServerAdministratorProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ServerAdministratorResource - Represents a and external administrator to be created.
func (ServerAdministratorResource) MarshalJSON ¶
func (s ServerAdministratorResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAdministratorResource.
func (*ServerAdministratorResource) UnmarshalJSON ¶
func (s *ServerAdministratorResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAdministratorResource.
type ServerAdministratorResourceListResult ¶
type ServerAdministratorResourceListResult struct { // The list of server Active Directory Administrators for the server. Value []*ServerAdministratorResource }
ServerAdministratorResourceListResult - The response to a list Active Directory Administrators request.
func (ServerAdministratorResourceListResult) MarshalJSON ¶
func (s ServerAdministratorResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAdministratorResourceListResult.
func (*ServerAdministratorResourceListResult) UnmarshalJSON ¶
func (s *ServerAdministratorResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAdministratorResourceListResult.
type ServerAdministratorsClient ¶
type ServerAdministratorsClient struct {
// contains filtered or unexported fields
}
ServerAdministratorsClient contains the methods for the ServerAdministrators group. Don't use this type directly, use NewServerAdministratorsClient() instead.
func NewServerAdministratorsClient ¶
func NewServerAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAdministratorsClient, error)
NewServerAdministratorsClient creates a new instance of ServerAdministratorsClient 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 (*ServerAdministratorsClient) BeginCreateOrUpdate ¶
func (client *ServerAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, properties ServerAdministratorResource, options *ServerAdministratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAdministratorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- properties - The required parameters for creating or updating an AAD server administrator.
- options - ServerAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdministratorsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerAdminCreateUpdate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAdministratorsClient().BeginCreateOrUpdate(ctx, "testrg", "pgtestsvc4", armpostgresql.ServerAdministratorResource{ Properties: &armpostgresql.ServerAdministratorProperties{ AdministratorType: to.Ptr("ActiveDirectory"), Login: to.Ptr("bob@contoso.com"), Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAdministratorResource = armpostgresql.ServerAdministratorResource{ // Name: to.Ptr("activeDirectory"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/administrators"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory"), // Properties: &armpostgresql.ServerAdministratorProperties{ // AdministratorType: to.Ptr("ActiveDirectory"), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // }, // } }
Output:
func (*ServerAdministratorsClient) BeginDelete ¶
func (client *ServerAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServerAdministratorsClientBeginDeleteOptions) (*runtime.Poller[ServerAdministratorsClientDeleteResponse], error)
BeginDelete - Deletes server active directory administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServerAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAdministratorsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerAdminDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAdministratorsClient().BeginDelete(ctx, "testrg", "pgtestsvc4", 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) } }
Output:
func (*ServerAdministratorsClient) Get ¶
func (client *ServerAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServerAdministratorsClientGetOptions) (ServerAdministratorsClientGetResponse, error)
Get - Gets information about a AAD server administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServerAdministratorsClientGetOptions contains the optional parameters for the ServerAdministratorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerAdminGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAdministratorsClient().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.ServerAdministratorResource = armpostgresql.ServerAdministratorResource{ // Name: to.Ptr("activeDirectory"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/administrators"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory"), // Properties: &armpostgresql.ServerAdministratorProperties{ // AdministratorType: to.Ptr("ActiveDirectory"), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // }, // } }
Output:
func (*ServerAdministratorsClient) NewListPager ¶
func (client *ServerAdministratorsClient) NewListPager(resourceGroupName string, serverName string, options *ServerAdministratorsClientListOptions) *runtime.Pager[ServerAdministratorsClientListResponse]
NewListPager - Returns a list of server Administrators.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServerAdministratorsClientListOptions contains the optional parameters for the ServerAdministratorsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerAdminList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerAdministratorsClient().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.ServerAdministratorResourceListResult = armpostgresql.ServerAdministratorResourceListResult{ // Value: []*armpostgresql.ServerAdministratorResource{ // { // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/administrators"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory"), // Properties: &armpostgresql.ServerAdministratorProperties{ // AdministratorType: to.Ptr("ActiveDirectory"), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // }, // }}, // } } }
Output:
type ServerAdministratorsClientBeginCreateOrUpdateOptions ¶
type ServerAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdministratorsClient.BeginCreateOrUpdate method.
type ServerAdministratorsClientBeginDeleteOptions ¶
type ServerAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAdministratorsClient.BeginDelete method.
type ServerAdministratorsClientCreateOrUpdateResponse ¶
type ServerAdministratorsClientCreateOrUpdateResponse struct { // Represents a and external administrator to be created. ServerAdministratorResource }
ServerAdministratorsClientCreateOrUpdateResponse contains the response from method ServerAdministratorsClient.BeginCreateOrUpdate.
type ServerAdministratorsClientDeleteResponse ¶
type ServerAdministratorsClientDeleteResponse struct { }
ServerAdministratorsClientDeleteResponse contains the response from method ServerAdministratorsClient.BeginDelete.
type ServerAdministratorsClientGetOptions ¶
type ServerAdministratorsClientGetOptions struct { }
ServerAdministratorsClientGetOptions contains the optional parameters for the ServerAdministratorsClient.Get method.
type ServerAdministratorsClientGetResponse ¶
type ServerAdministratorsClientGetResponse struct { // Represents a and external administrator to be created. ServerAdministratorResource }
ServerAdministratorsClientGetResponse contains the response from method ServerAdministratorsClient.Get.
type ServerAdministratorsClientListOptions ¶
type ServerAdministratorsClientListOptions struct { }
ServerAdministratorsClientListOptions contains the optional parameters for the ServerAdministratorsClient.NewListPager method.
type ServerAdministratorsClientListResponse ¶
type ServerAdministratorsClientListResponse struct { // The response to a list Active Directory Administrators request. ServerAdministratorResourceListResult }
ServerAdministratorsClientListResponse contains the response from method ServerAdministratorsClient.NewListPager.
type ServerBasedPerformanceTierClient ¶
type ServerBasedPerformanceTierClient struct {
// contains filtered or unexported fields
}
ServerBasedPerformanceTierClient contains the methods for the ServerBasedPerformanceTier group. Don't use this type directly, use NewServerBasedPerformanceTierClient() instead.
func NewServerBasedPerformanceTierClient ¶
func NewServerBasedPerformanceTierClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerBasedPerformanceTierClient, error)
NewServerBasedPerformanceTierClient creates a new instance of ServerBasedPerformanceTierClient 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 (*ServerBasedPerformanceTierClient) NewListPager ¶
func (client *ServerBasedPerformanceTierClient) NewListPager(resourceGroupName string, serverName string, options *ServerBasedPerformanceTierClientListOptions) *runtime.Pager[ServerBasedPerformanceTierClientListResponse]
NewListPager - List all the performance tiers for a PostgreSQL server.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServerBasedPerformanceTierClientListOptions contains the optional parameters for the ServerBasedPerformanceTierClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/PerformanceTiersListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerBasedPerformanceTierClient().NewListPager("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.PerformanceTierListResult = armpostgresql.PerformanceTierListResult{ // Value: []*armpostgresql.PerformanceTierProperties{ // { // ID: to.Ptr("Basic"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxLargeStorageMB: to.Ptr[int32](0), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinLargeStorageMB: to.Ptr[int32](0), // MinStorageMB: to.Ptr[int32](5120), // ServiceLevelObjectives: []*armpostgresql.PerformanceTierServiceLevelObjectives{ // { // Edition: to.Ptr("Basic"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("B_Gen5_1"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](1048576), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](1), // }, // { // Edition: to.Ptr("Basic"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("B_Gen5_2"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](1048576), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](2), // }}, // }, // { // ID: to.Ptr("GeneralPurpose"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxLargeStorageMB: to.Ptr[int32](16777216), // MaxStorageMB: to.Ptr[int32](16777216), // MinBackupRetentionDays: to.Ptr[int32](7), // MinLargeStorageMB: to.Ptr[int32](0), // MinStorageMB: to.Ptr[int32](5120), // ServiceLevelObjectives: []*armpostgresql.PerformanceTierServiceLevelObjectives{ // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_2"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](2), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_4"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](4), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_8"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](8), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_16"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](16), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_32"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](32), // }, // { // Edition: to.Ptr("GeneralPurpose"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("GP_Gen5_64"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](32), // }}, // }, // { // ID: to.Ptr("MemoryOptimized"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxLargeStorageMB: to.Ptr[int32](16777216), // MaxStorageMB: to.Ptr[int32](16777216), // MinBackupRetentionDays: to.Ptr[int32](7), // MinLargeStorageMB: to.Ptr[int32](0), // MinStorageMB: to.Ptr[int32](5120), // ServiceLevelObjectives: []*armpostgresql.PerformanceTierServiceLevelObjectives{ // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_2"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](2), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_4"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](4), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_8"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](8), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_16"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](16), // }, // { // Edition: to.Ptr("MemoryOptimized"), // HardwareGeneration: to.Ptr("Gen5"), // ID: to.Ptr("MO_Gen5_32"), // MaxBackupRetentionDays: to.Ptr[int32](35), // MaxStorageMB: to.Ptr[int32](2097152), // MinBackupRetentionDays: to.Ptr[int32](7), // MinStorageMB: to.Ptr[int32](5120), // VCore: to.Ptr[int32](32), // }}, // }}, // } } }
Output:
type ServerBasedPerformanceTierClientListOptions ¶
type ServerBasedPerformanceTierClientListOptions struct { }
ServerBasedPerformanceTierClientListOptions contains the optional parameters for the ServerBasedPerformanceTierClient.NewListPager method.
type ServerBasedPerformanceTierClientListResponse ¶
type ServerBasedPerformanceTierClientListResponse struct { // A list of performance tiers. PerformanceTierListResult }
ServerBasedPerformanceTierClientListResponse contains the response from method ServerBasedPerformanceTierClient.NewListPager.
type ServerForCreate ¶
type ServerForCreate struct { // REQUIRED; The location the resource resides in. Location *string // REQUIRED; Properties of the server. Properties ServerPropertiesForCreateClassification // The Azure Active Directory identity of the server. Identity *ResourceIdentity // The SKU (pricing tier) of the server. SKU *SKU // Application-specific metadata in the form of key-value pairs. Tags map[string]*string }
ServerForCreate - Represents a server to be created.
func (ServerForCreate) MarshalJSON ¶
func (s ServerForCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerForCreate.
func (*ServerForCreate) UnmarshalJSON ¶
func (s *ServerForCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerForCreate.
type ServerKey ¶
type ServerKey struct { // Properties of the ServerKey Resource. Properties *ServerKeyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; Kind of encryption protector used to protect the key. Kind *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ServerKey - A PostgreSQL Server key.
func (ServerKey) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type ServerKey.
func (*ServerKey) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type ServerKey.
type ServerKeyListResult ¶
type ServerKeyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; A list of PostgreSQL Server keys. Value []*ServerKey }
ServerKeyListResult - A list of PostgreSQL Server keys.
func (ServerKeyListResult) MarshalJSON ¶
func (s ServerKeyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerKeyListResult.
func (*ServerKeyListResult) UnmarshalJSON ¶
func (s *ServerKeyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerKeyListResult.
type ServerKeyProperties ¶
type ServerKeyProperties struct { // REQUIRED; The key type like 'AzureKeyVault'. ServerKeyType *ServerKeyType // The URI of the key. URI *string // READ-ONLY; The key creation date. CreationDate *time.Time }
ServerKeyProperties - Properties for a key execution.
func (ServerKeyProperties) MarshalJSON ¶
func (s ServerKeyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerKeyProperties.
func (*ServerKeyProperties) UnmarshalJSON ¶
func (s *ServerKeyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerKeyProperties.
type ServerKeyType ¶
type ServerKeyType string
ServerKeyType - The key type like 'AzureKeyVault'.
const (
ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault"
)
func PossibleServerKeyTypeValues ¶
func PossibleServerKeyTypeValues() []ServerKeyType
PossibleServerKeyTypeValues returns the possible values for the ServerKeyType const type.
type ServerKeysClient ¶
type ServerKeysClient struct {
// contains filtered or unexported fields
}
ServerKeysClient contains the methods for the ServerKeys group. Don't use this type directly, use NewServerKeysClient() instead.
func NewServerKeysClient ¶
func NewServerKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerKeysClient, error)
NewServerKeysClient creates a new instance of ServerKeysClient 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 (*ServerKeysClient) BeginCreateOrUpdate ¶
func (client *ServerKeysClient) BeginCreateOrUpdate(ctx context.Context, serverName string, keyName string, resourceGroupName string, parameters ServerKey, options *ServerKeysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerKeysClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a PostgreSQL Server key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- serverName - The name of the server.
- keyName - The name of the PostgreSQL Server key to be operated on (updated or created).
- resourceGroupName - The name of the resource group. The name is case insensitive.
- parameters - The requested PostgreSQL Server key resource state.
- options - ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2020-01-01/examples/ServerKeyCreateOrUpdate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerKeysClient().BeginCreateOrUpdate(ctx, "testserver", "someVault_someKey_01234567890123456789012345678901", "testrg", armpostgresql.ServerKey{ Properties: &armpostgresql.ServerKeyProperties{ ServerKeyType: to.Ptr(armpostgresql.ServerKeyTypeAzureKeyVault), URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), }, }, 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.ServerKey = armpostgresql.ServerKey{ // Name: to.Ptr("omeVault_someKey_01234567890123456789012345678901"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/keys"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/testserver/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armpostgresql.ServerKeyProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-01T00:00:00.000Z"); return t}()), // ServerKeyType: to.Ptr(armpostgresql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // } }
Output:
func (*ServerKeysClient) BeginDelete ¶
func (client *ServerKeysClient) BeginDelete(ctx context.Context, serverName string, keyName string, resourceGroupName string, options *ServerKeysClientBeginDeleteOptions) (*runtime.Poller[ServerKeysClientDeleteResponse], error)
BeginDelete - Deletes the PostgreSQL Server key with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- serverName - The name of the server.
- keyName - The name of the PostgreSQL Server key to be deleted.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2020-01-01/examples/ServerKeyDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerKeysClient().BeginDelete(ctx, "testserver", "someVault_someKey_01234567890123456789012345678901", "testrg", 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) } }
Output:
func (*ServerKeysClient) Get ¶
func (client *ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientGetOptions) (ServerKeysClientGetResponse, error)
Get - Gets a PostgreSQL Server key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- keyName - The name of the PostgreSQL Server key to be retrieved.
- options - ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2020-01-01/examples/ServerKeyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerKeysClient().Get(ctx, "testrg", "testserver", "someVault_someKey_01234567890123456789012345678901", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerKey = armpostgresql.ServerKey{ // Name: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/keys"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/testserver/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armpostgresql.ServerKeyProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-01T00:00:00.000Z"); return t}()), // ServerKeyType: to.Ptr(armpostgresql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // } }
Output:
func (*ServerKeysClient) NewListPager ¶
func (client *ServerKeysClient) NewListPager(resourceGroupName string, serverName string, options *ServerKeysClientListOptions) *runtime.Pager[ServerKeysClientListResponse]
NewListPager - Gets a list of Server keys.
Generated from API version 2020-01-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServerKeysClientListOptions contains the optional parameters for the ServerKeysClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2020-01-01/examples/ServerKeyList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerKeysClient().NewListPager("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.ServerKeyListResult = armpostgresql.ServerKeyListResult{ // Value: []*armpostgresql.ServerKey{ // { // Name: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/keys"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/testserver/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armpostgresql.ServerKeyProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-01T00:00:00.000Z"); return t}()), // ServerKeyType: to.Ptr(armpostgresql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // }}, // } } }
Output:
type ServerKeysClientBeginCreateOrUpdateOptions ¶
type ServerKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
type ServerKeysClientBeginDeleteOptions ¶
type ServerKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
type ServerKeysClientCreateOrUpdateResponse ¶
type ServerKeysClientCreateOrUpdateResponse struct { // A PostgreSQL Server key. ServerKey }
ServerKeysClientCreateOrUpdateResponse contains the response from method ServerKeysClient.BeginCreateOrUpdate.
type ServerKeysClientDeleteResponse ¶
type ServerKeysClientDeleteResponse struct { }
ServerKeysClientDeleteResponse contains the response from method ServerKeysClient.BeginDelete.
type ServerKeysClientGetOptions ¶
type ServerKeysClientGetOptions struct { }
ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
type ServerKeysClientGetResponse ¶
type ServerKeysClientGetResponse struct { // A PostgreSQL Server key. ServerKey }
ServerKeysClientGetResponse contains the response from method ServerKeysClient.Get.
type ServerKeysClientListOptions ¶
type ServerKeysClientListOptions struct { }
ServerKeysClientListOptions contains the optional parameters for the ServerKeysClient.NewListPager method.
type ServerKeysClientListResponse ¶
type ServerKeysClientListResponse struct { // A list of PostgreSQL Server keys. ServerKeyListResult }
ServerKeysClientListResponse contains the response from method ServerKeysClient.NewListPager.
type ServerListResult ¶
type ServerListResult struct { // The list of servers Value []*Server }
ServerListResult - A list of servers.
func (ServerListResult) MarshalJSON ¶
func (s ServerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerListResult.
func (*ServerListResult) UnmarshalJSON ¶
func (s *ServerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerListResult.
type ServerParametersClient ¶
type ServerParametersClient struct {
// contains filtered or unexported fields
}
ServerParametersClient contains the methods for the ServerParameters group. Don't use this type directly, use NewServerParametersClient() instead.
func NewServerParametersClient ¶
func NewServerParametersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerParametersClient, error)
NewServerParametersClient creates a new instance of ServerParametersClient 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 (*ServerParametersClient) BeginListUpdateConfigurations ¶
func (client *ServerParametersClient) BeginListUpdateConfigurations(ctx context.Context, resourceGroupName string, serverName string, value ConfigurationListResult, options *ServerParametersClientBeginListUpdateConfigurationsOptions) (*runtime.Poller[ServerParametersClientListUpdateConfigurationsResponse], error)
BeginListUpdateConfigurations - Update a list of configurations in a given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- value - The parameters for updating a list of server configuration.
- options - ServerParametersClientBeginListUpdateConfigurationsOptions contains the optional parameters for the ServerParametersClient.BeginListUpdateConfigurations method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ConfigurationsUpdateByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerParametersClient().BeginListUpdateConfigurations(ctx, "TestGroup", "testserver", armpostgresql.ConfigurationListResult{}, 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.ConfigurationListResult = armpostgresql.ConfigurationListResult{ // Value: []*armpostgresql.Configuration{ // { // Name: to.Ptr("array_nulls"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Enable input of NULL elements in arrays."), // AllowedValues: to.Ptr("on,off"), // DataType: to.Ptr("Boolean"), // DefaultValue: to.Ptr("on"), // Source: to.Ptr("system-default"), // Value: to.Ptr("on"), // }, // }, // { // Name: to.Ptr("backslash_quote"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/configurations"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/backslash_quote"), // Properties: &armpostgresql.ConfigurationProperties{ // Description: to.Ptr("Sets whether \"\\'\" is allowed in string literals."), // AllowedValues: to.Ptr("safe_encoding,on,off"), // DataType: to.Ptr("Enumeration"), // DefaultValue: to.Ptr("safe_encoding"), // Source: to.Ptr("system-default"), // Value: to.Ptr("safe_encoding"), // }, // }}, // } }
Output:
type ServerParametersClientBeginListUpdateConfigurationsOptions ¶
type ServerParametersClientBeginListUpdateConfigurationsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerParametersClientBeginListUpdateConfigurationsOptions contains the optional parameters for the ServerParametersClient.BeginListUpdateConfigurations method.
type ServerParametersClientListUpdateConfigurationsResponse ¶
type ServerParametersClientListUpdateConfigurationsResponse struct { // A list of server configurations. ConfigurationListResult }
ServerParametersClientListUpdateConfigurationsResponse contains the response from method ServerParametersClient.BeginListUpdateConfigurations.
type ServerPrivateEndpointConnection ¶
type ServerPrivateEndpointConnection struct { // READ-ONLY; Resource ID of the Private Endpoint Connection. ID *string // READ-ONLY; Private endpoint connection properties Properties *ServerPrivateEndpointConnectionProperties }
ServerPrivateEndpointConnection - A private endpoint connection under a server
func (ServerPrivateEndpointConnection) MarshalJSON ¶
func (s ServerPrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPrivateEndpointConnection.
func (*ServerPrivateEndpointConnection) UnmarshalJSON ¶
func (s *ServerPrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPrivateEndpointConnection.
type ServerPrivateEndpointConnectionProperties ¶
type ServerPrivateEndpointConnectionProperties struct { // Private endpoint which the connection belongs to. PrivateEndpoint *PrivateEndpointProperty // Connection state of the private endpoint connection. PrivateLinkServiceConnectionState *ServerPrivateLinkServiceConnectionStateProperty // READ-ONLY; State of the private endpoint connection. ProvisioningState *PrivateEndpointProvisioningState }
ServerPrivateEndpointConnectionProperties - Properties of a private endpoint connection.
func (ServerPrivateEndpointConnectionProperties) MarshalJSON ¶
func (s ServerPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPrivateEndpointConnectionProperties.
func (*ServerPrivateEndpointConnectionProperties) UnmarshalJSON ¶
func (s *ServerPrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPrivateEndpointConnectionProperties.
type ServerPrivateLinkServiceConnectionStateProperty ¶
type ServerPrivateLinkServiceConnectionStateProperty struct { // REQUIRED; The private link service connection description. Description *string // REQUIRED; The private link service connection status. Status *PrivateLinkServiceConnectionStateStatus // READ-ONLY; The actions required for private link service connection. ActionsRequired *PrivateLinkServiceConnectionStateActionsRequire }
func (ServerPrivateLinkServiceConnectionStateProperty) MarshalJSON ¶
func (s ServerPrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPrivateLinkServiceConnectionStateProperty.
func (*ServerPrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶
func (s *ServerPrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPrivateLinkServiceConnectionStateProperty.
type ServerProperties ¶
type ServerProperties struct { // The administrator's login name of a server. Can only be specified when the server is being created (and is required for // creation). AdministratorLogin *string // Earliest restore point creation time (ISO8601 format) EarliestRestoreDate *time.Time // The fully qualified domain name of a server. FullyQualifiedDomainName *string // Status showing whether the server enabled infrastructure encryption. InfrastructureEncryption *InfrastructureEncryption // The master server id of a replica server. MasterServerID *string // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // The maximum number of replicas that a master server can have. ReplicaCapacity *int32 // The replication role of the server. ReplicationRole *string // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // A state of a server that is visible to user. UserVisibleState *ServerState // Server version. Version *ServerVersion // READ-ONLY; Status showing whether the server data encryption is enabled with customer-managed keys. ByokEnforcement *string // READ-ONLY; List of private endpoint connections on a server PrivateEndpointConnections []*ServerPrivateEndpointConnection }
ServerProperties - The properties of a server.
func (ServerProperties) MarshalJSON ¶
func (s ServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerProperties.
func (*ServerProperties) UnmarshalJSON ¶
func (s *ServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerProperties.
type ServerPropertiesForCreate ¶
type ServerPropertiesForCreate struct { // REQUIRED; The mode to create a new server. CreateMode *CreateMode // Status showing whether the server enabled infrastructure encryption. InfrastructureEncryption *InfrastructureEncryption // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // Server version. Version *ServerVersion }
ServerPropertiesForCreate - The properties used to create a new server.
func (*ServerPropertiesForCreate) GetServerPropertiesForCreate ¶
func (s *ServerPropertiesForCreate) GetServerPropertiesForCreate() *ServerPropertiesForCreate
GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForCreate.
func (ServerPropertiesForCreate) MarshalJSON ¶
func (s ServerPropertiesForCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForCreate.
func (*ServerPropertiesForCreate) UnmarshalJSON ¶
func (s *ServerPropertiesForCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPropertiesForCreate.
type ServerPropertiesForCreateClassification ¶
type ServerPropertiesForCreateClassification interface { // GetServerPropertiesForCreate returns the ServerPropertiesForCreate content of the underlying type. GetServerPropertiesForCreate() *ServerPropertiesForCreate }
ServerPropertiesForCreateClassification provides polymorphic access to related types. Call the interface's GetServerPropertiesForCreate() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ServerPropertiesForCreate, *ServerPropertiesForDefaultCreate, *ServerPropertiesForGeoRestore, *ServerPropertiesForReplica, - *ServerPropertiesForRestore
type ServerPropertiesForDefaultCreate ¶
type ServerPropertiesForDefaultCreate struct { // REQUIRED; The administrator's login name of a server. Can only be specified when the server is being created (and is required // for creation). AdministratorLogin *string // REQUIRED; The password of the administrator login. AdministratorLoginPassword *string // REQUIRED; The mode to create a new server. CreateMode *CreateMode // Status showing whether the server enabled infrastructure encryption. InfrastructureEncryption *InfrastructureEncryption // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // Server version. Version *ServerVersion }
ServerPropertiesForDefaultCreate - The properties used to create a new server.
func (*ServerPropertiesForDefaultCreate) GetServerPropertiesForCreate ¶
func (s *ServerPropertiesForDefaultCreate) GetServerPropertiesForCreate() *ServerPropertiesForCreate
GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForDefaultCreate.
func (ServerPropertiesForDefaultCreate) MarshalJSON ¶
func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForDefaultCreate.
func (*ServerPropertiesForDefaultCreate) UnmarshalJSON ¶
func (s *ServerPropertiesForDefaultCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPropertiesForDefaultCreate.
type ServerPropertiesForGeoRestore ¶
type ServerPropertiesForGeoRestore struct { // REQUIRED; The mode to create a new server. CreateMode *CreateMode // REQUIRED; The source server id to restore from. SourceServerID *string // Status showing whether the server enabled infrastructure encryption. InfrastructureEncryption *InfrastructureEncryption // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // Server version. Version *ServerVersion }
ServerPropertiesForGeoRestore - The properties used to create a new server by restoring to a different region from a geo replicated backup.
func (*ServerPropertiesForGeoRestore) GetServerPropertiesForCreate ¶
func (s *ServerPropertiesForGeoRestore) GetServerPropertiesForCreate() *ServerPropertiesForCreate
GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForGeoRestore.
func (ServerPropertiesForGeoRestore) MarshalJSON ¶
func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForGeoRestore.
func (*ServerPropertiesForGeoRestore) UnmarshalJSON ¶
func (s *ServerPropertiesForGeoRestore) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPropertiesForGeoRestore.
type ServerPropertiesForReplica ¶
type ServerPropertiesForReplica struct { // REQUIRED; The mode to create a new server. CreateMode *CreateMode // REQUIRED; The master server id to create replica from. SourceServerID *string // Status showing whether the server enabled infrastructure encryption. InfrastructureEncryption *InfrastructureEncryption // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // Server version. Version *ServerVersion }
ServerPropertiesForReplica - The properties to create a new replica.
func (*ServerPropertiesForReplica) GetServerPropertiesForCreate ¶
func (s *ServerPropertiesForReplica) GetServerPropertiesForCreate() *ServerPropertiesForCreate
GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForReplica.
func (ServerPropertiesForReplica) MarshalJSON ¶
func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForReplica.
func (*ServerPropertiesForReplica) UnmarshalJSON ¶
func (s *ServerPropertiesForReplica) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPropertiesForReplica.
type ServerPropertiesForRestore ¶
type ServerPropertiesForRestore struct { // REQUIRED; The mode to create a new server. CreateMode *CreateMode // REQUIRED; Restore point creation time (ISO8601 format), specifying the time to restore from. RestorePointInTime *time.Time // REQUIRED; The source server id to restore from. SourceServerID *string // Status showing whether the server enabled infrastructure encryption. InfrastructureEncryption *InfrastructureEncryption // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // Server version. Version *ServerVersion }
ServerPropertiesForRestore - The properties used to create a new server by restoring from a backup.
func (*ServerPropertiesForRestore) GetServerPropertiesForCreate ¶
func (s *ServerPropertiesForRestore) GetServerPropertiesForCreate() *ServerPropertiesForCreate
GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForRestore.
func (ServerPropertiesForRestore) MarshalJSON ¶
func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForRestore.
func (*ServerPropertiesForRestore) UnmarshalJSON ¶
func (s *ServerPropertiesForRestore) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPropertiesForRestore.
type ServerSecurityAlertPoliciesClient ¶
type ServerSecurityAlertPoliciesClient struct {
// contains filtered or unexported fields
}
ServerSecurityAlertPoliciesClient contains the methods for the ServerSecurityAlertPolicies group. Don't use this type directly, use NewServerSecurityAlertPoliciesClient() instead.
func NewServerSecurityAlertPoliciesClient ¶
func NewServerSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerSecurityAlertPoliciesClient, error)
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient 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 (*ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate ¶
func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a threat detection policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- securityAlertPolicyName - The name of the threat detection policy.
- parameters - The server security alert policy.
- options - ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
Example (UpdateAServersThreatDetectionPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerSecurityAlertsCreateMax.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerSecurityAlertPoliciesClient().BeginCreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", armpostgresql.SecurityAlertPolicyNameDefault, armpostgresql.ServerSecurityAlertPolicy{ Properties: &armpostgresql.SecurityAlertPolicyProperties{ DisabledAlerts: []*string{ to.Ptr("Access_Anomaly"), to.Ptr("Usage_Anomaly")}, EmailAccountAdmins: to.Ptr(true), EmailAddresses: []*string{ to.Ptr("testSecurityAlert@microsoft.com")}, RetentionDays: to.Ptr[int32](5), State: to.Ptr(armpostgresql.ServerSecurityAlertPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerSecurityAlertPolicy = armpostgresql.ServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default"), // Properties: &armpostgresql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly"), // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("testSecurityAlert@microsoft.com")}, // RetentionDays: to.Ptr[int32](5), // State: to.Ptr(armpostgresql.ServerSecurityAlertPolicyStateEnabled), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (UpdateAServersThreatDetectionPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerSecurityAlertsCreateMin.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerSecurityAlertPoliciesClient().BeginCreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", armpostgresql.SecurityAlertPolicyNameDefault, armpostgresql.ServerSecurityAlertPolicy{ Properties: &armpostgresql.SecurityAlertPolicyProperties{ EmailAccountAdmins: to.Ptr(true), State: to.Ptr(armpostgresql.ServerSecurityAlertPolicyStateDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerSecurityAlertPolicy = armpostgresql.ServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default"), // Properties: &armpostgresql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armpostgresql.ServerSecurityAlertPolicyStateEnabled), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ServerSecurityAlertPoliciesClient) Get ¶
func (client *ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, options *ServerSecurityAlertPoliciesClientGetOptions) (ServerSecurityAlertPoliciesClientGetResponse, error)
Get - Get a server's security alert policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- securityAlertPolicyName - The name of the security alert policy.
- options - ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerSecurityAlertsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerSecurityAlertPoliciesClient().Get(ctx, "securityalert-4799", "securityalert-6440", armpostgresql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerSecurityAlertPolicy = armpostgresql.ServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default"), // Properties: &armpostgresql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@microsoft.com;user@microsoft.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armpostgresql.ServerSecurityAlertPolicyStateDisabled), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
func (*ServerSecurityAlertPoliciesClient) NewListByServerPager ¶
func (client *ServerSecurityAlertPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerSecurityAlertPoliciesClientListByServerOptions) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse]
NewListByServerPager - Get the server's threat detection policies.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerSecurityAlertsListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerSecurityAlertPoliciesClient().NewListByServerPager("securityalert-4799", "securityalert-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerSecurityAlertPolicyListResult = armpostgresql.ServerSecurityAlertPolicyListResult{ // Value: []*armpostgresql.ServerSecurityAlertPolicy{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies"), // Properties: &armpostgresql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@microsoft.com;user@microsoft.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armpostgresql.ServerSecurityAlertPolicyStateDisabled), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // }}, // } } }
Output:
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions ¶
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A server security alert policy. ServerSecurityAlertPolicy }
ServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate.
type ServerSecurityAlertPoliciesClientGetOptions ¶
type ServerSecurityAlertPoliciesClientGetOptions struct { }
ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
type ServerSecurityAlertPoliciesClientGetResponse ¶
type ServerSecurityAlertPoliciesClientGetResponse struct { // A server security alert policy. ServerSecurityAlertPolicy }
ServerSecurityAlertPoliciesClientGetResponse contains the response from method ServerSecurityAlertPoliciesClient.Get.
type ServerSecurityAlertPoliciesClientListByServerOptions ¶
type ServerSecurityAlertPoliciesClientListByServerOptions struct { }
ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager method.
type ServerSecurityAlertPoliciesClientListByServerResponse ¶
type ServerSecurityAlertPoliciesClientListByServerResponse struct { // A list of the server's security alert policies. ServerSecurityAlertPolicyListResult }
ServerSecurityAlertPoliciesClientListByServerResponse contains the response from method ServerSecurityAlertPoliciesClient.NewListByServerPager.
type ServerSecurityAlertPolicy ¶
type ServerSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertPolicyProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ServerSecurityAlertPolicy - A server security alert policy.
func (ServerSecurityAlertPolicy) MarshalJSON ¶
func (s ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicy.
func (*ServerSecurityAlertPolicy) UnmarshalJSON ¶
func (s *ServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicy.
type ServerSecurityAlertPolicyListResult ¶
type ServerSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerSecurityAlertPolicy }
ServerSecurityAlertPolicyListResult - A list of the server's security alert policies.
func (ServerSecurityAlertPolicyListResult) MarshalJSON ¶
func (s ServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicyListResult.
func (*ServerSecurityAlertPolicyListResult) UnmarshalJSON ¶
func (s *ServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicyListResult.
type ServerSecurityAlertPolicyState ¶
type ServerSecurityAlertPolicyState string
ServerSecurityAlertPolicyState - Specifies the state of the policy, whether it is enabled or disabled.
const ( ServerSecurityAlertPolicyStateDisabled ServerSecurityAlertPolicyState = "Disabled" ServerSecurityAlertPolicyStateEnabled ServerSecurityAlertPolicyState = "Enabled" )
func PossibleServerSecurityAlertPolicyStateValues ¶
func PossibleServerSecurityAlertPolicyStateValues() []ServerSecurityAlertPolicyState
PossibleServerSecurityAlertPolicyStateValues returns the possible values for the ServerSecurityAlertPolicyState const type.
type ServerState ¶
type ServerState string
ServerState - A state of a server that is visible to user.
const ( ServerStateDisabled ServerState = "Disabled" ServerStateDropping ServerState = "Dropping" ServerStateInaccessible ServerState = "Inaccessible" ServerStateReady ServerState = "Ready" )
func PossibleServerStateValues ¶
func PossibleServerStateValues() []ServerState
PossibleServerStateValues returns the possible values for the ServerState const type.
type ServerUpdateParameters ¶
type ServerUpdateParameters struct { // The Azure Active Directory identity of the server. Identity *ResourceIdentity // The properties that can be updated for a server. Properties *ServerUpdateParametersProperties // The SKU (pricing tier) of the server. SKU *SKU // Application-specific metadata in the form of key-value pairs. Tags map[string]*string }
ServerUpdateParameters - Parameters allowed to update for a server.
func (ServerUpdateParameters) MarshalJSON ¶
func (s ServerUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerUpdateParameters.
func (*ServerUpdateParameters) UnmarshalJSON ¶
func (s *ServerUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerUpdateParameters.
type ServerUpdateParametersProperties ¶
type ServerUpdateParametersProperties struct { // The password of the administrator login. AdministratorLoginPassword *string // Enforce a minimal Tls version for the server. MinimalTLSVersion *MinimalTLSVersionEnum // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *PublicNetworkAccessEnum // The replication role of the server. ReplicationRole *string // Enable ssl enforcement or not when connect to server. SSLEnforcement *SSLEnforcementEnum // Storage profile of a server. StorageProfile *StorageProfile // The version of a server. Version *ServerVersion }
ServerUpdateParametersProperties - The properties that can be updated for a server.
func (ServerUpdateParametersProperties) MarshalJSON ¶
func (s ServerUpdateParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerUpdateParametersProperties.
func (*ServerUpdateParametersProperties) UnmarshalJSON ¶
func (s *ServerUpdateParametersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerUpdateParametersProperties.
type ServerVersion ¶
type ServerVersion string
ServerVersion - The version of a server.
const ( ServerVersionEleven ServerVersion = "11" ServerVersionNine5 ServerVersion = "9.5" ServerVersionNine6 ServerVersion = "9.6" ServerVersionTen ServerVersion = "10" ServerVersionTen0 ServerVersion = "10.0" ServerVersionTen2 ServerVersion = "10.2" )
func PossibleServerVersionValues ¶
func PossibleServerVersionValues() []ServerVersion
PossibleServerVersionValues returns the possible values for the ServerVersion const type.
type ServersClient ¶
type ServersClient struct {
// contains filtered or unexported fields
}
ServersClient contains the methods for the Servers group. Don't use this type directly, use NewServersClient() instead.
func NewServersClient ¶
func NewServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersClient, error)
NewServersClient creates a new instance of ServersClient 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 (*ServersClient) BeginCreate ¶
func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate, options *ServersClientBeginCreateOptions) (*runtime.Poller[ServersClientCreateResponse], error)
BeginCreate - Creates a new server, or will overwrite an existing server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
- options - ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method.
Example (CreateADatabaseAsAPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerCreatePointInTimeRestore.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armpostgresql.ServerForCreate{ Location: to.Ptr("brazilsouth"), Properties: &armpostgresql.ServerPropertiesForRestore{ CreateMode: to.Ptr(armpostgresql.CreateModePointInTimeRestore), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-14T00:00:37.467Z"); return t }()), SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforPostgreSQL/servers/sourceserver"), }, SKU: &armpostgresql.SKU{ Name: to.Ptr("B_Gen5_2"), Capacity: to.Ptr[int32](2), Family: to.Ptr("Gen5"), Tier: to.Ptr(armpostgresql.SKUTierBasic), }, Tags: map[string]*string{ "ElasticServer": to.Ptr("1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armpostgresql.Server{ // Name: to.Ptr("targetserver"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/targetserver"), // Location: to.Ptr("brazilsouth"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-14T21:08:24.637Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("targetserver.postgres.database.azure.com"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](128000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen5_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // } }
Output:
Example (CreateANewServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerCreate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TestGroup", "pgtestsvc4", armpostgresql.ServerForCreate{ Location: to.Ptr("westus"), Properties: &armpostgresql.ServerPropertiesForDefaultCreate{ CreateMode: to.Ptr(armpostgresql.CreateModeDefault), MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS12), SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), StorageProfile: &armpostgresql.StorageProfile{ BackupRetentionDays: to.Ptr[int32](7), GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), StorageMB: to.Ptr[int32](128000), }, AdministratorLogin: to.Ptr("cloudsa"), AdministratorLoginPassword: to.Ptr("<administratorLoginPassword>"), }, SKU: &armpostgresql.SKU{ Name: to.Ptr("B_Gen5_2"), Capacity: to.Ptr[int32](2), Family: to.Ptr("Gen5"), Tier: to.Ptr(armpostgresql.SKUTierBasic), }, Tags: map[string]*string{ "ElasticServer": to.Ptr("1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armpostgresql.Server{ // Name: to.Ptr("pgtestsvc4"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T21:08:24.637Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc4.postgres.database.azure.com"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](128000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen5_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // } }
Output:
Example (CreateAReplicaServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerCreateReplicaMode.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TestGroup_WestCentralUS", "testserver-replica1", armpostgresql.ServerForCreate{ Location: to.Ptr("westcentralus"), Properties: &armpostgresql.ServerPropertiesForReplica{ CreateMode: to.Ptr(armpostgresql.CreateModeReplica), SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), }, SKU: &armpostgresql.SKU{ Name: to.Ptr("GP_Gen5_2"), Capacity: to.Ptr[int32](2), Family: to.Ptr("Gen5"), Tier: to.Ptr(armpostgresql.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 = armpostgresql.Server{ // Name: to.Ptr("testserver-replica1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica1"), // Location: to.Ptr("westcentralus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("postgres"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-20T00:17:56.677Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("testserver-replica1.postgres.database.azure.com"), // MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master"), // ReplicaCapacity: to.Ptr[int32](0), // ReplicationRole: to.Ptr("Replica"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumDisabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](2048000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen5_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // } }
Output:
Example (CreateAServerAsAGeoRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerCreateGeoRestoreMode.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armpostgresql.ServerForCreate{ Location: to.Ptr("westus"), Properties: &armpostgresql.ServerPropertiesForGeoRestore{ CreateMode: to.Ptr(armpostgresql.CreateModeGeoRestore), SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforPostgreSQL/servers/sourceserver"), }, SKU: &armpostgresql.SKU{ Name: to.Ptr("GP_Gen5_2"), Capacity: to.Ptr[int32](2), Family: to.Ptr("Gen5"), Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), }, Tags: map[string]*string{ "ElasticServer": to.Ptr("1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armpostgresql.Server{ // Name: to.Ptr("targetserver"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/targetserver"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T21:08:24.637Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("targetserver.postgres.database.azure.com"), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](128000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen5_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // } }
Output:
func (*ServersClient) BeginDelete ¶
func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*runtime.Poller[ServersClientDeleteResponse], error)
BeginDelete - Deletes a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginDelete(ctx, "TestGroup", "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) } }
Output:
func (*ServersClient) BeginRestart ¶
func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginRestartOptions) (*runtime.Poller[ServersClientRestartResponse], error)
BeginRestart - Restarts a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerRestart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginRestart(ctx, "TestGroup", "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) } }
Output:
func (*ServersClient) BeginUpdate ¶
func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters, options *ServersClientBeginUpdateOptions) (*runtime.Poller[ServersClientUpdateResponse], error)
BeginUpdate - Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
- options - ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerUpdate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "testrg", "pgtestsvc4", armpostgresql.ServerUpdateParameters{ Properties: &armpostgresql.ServerUpdateParametersProperties{ AdministratorLoginPassword: to.Ptr("<administratorLoginPassword>"), MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS12), SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), }, }, 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 = armpostgresql.Server{ // Name: to.Ptr("pgtestsvc4"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T21:08:24.637Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc4.postgres.database.azure.com"), // MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS12), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](128000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen4_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // } }
Output:
func (*ServersClient) Get ¶
func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientGetOptions) (ServersClientGetResponse, error)
Get - Gets information about a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", 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 = armpostgresql.Server{ // Name: to.Ptr("pgtestsvc1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1"), // Location: to.Ptr("westus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("testuser"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-04T21:00:58.924Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc1.postgres.database.azure.com"), // MasterServerID: to.Ptr(""), // MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS12), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armpostgresql.ServerPrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.ServerPrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armpostgresql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // ReplicationRole: to.Ptr(""), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](10), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](5120), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine5), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen4_1"), // Capacity: to.Ptr[int32](1), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // } }
Output:
func (*ServersClient) NewListByResourceGroupPager ¶
func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List all the servers in a given resource group.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListByResourceGroupPager("TestGroup", 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 = armpostgresql.ServerListResult{ // Value: []*armpostgresql.Server{ // { // Name: to.Ptr("pgtestsvc1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1"), // Location: to.Ptr("westus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("testuser"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-04T21:01:55.149Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc1.postgres.database.azure.com"), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // }, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](10), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](5120), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine5), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen4_1"), // Capacity: to.Ptr[int32](1), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // }, // { // Name: to.Ptr("pgtestsvc2"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc2"), // Location: to.Ptr("westus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("testuser"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-07T21:01:55.149Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc2.postgres.database.azure.com"), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc2/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armpostgresql.ServerPrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.ServerPrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armpostgresql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](5120), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("pgtestsvc4"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T21:08:24.637Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc4.postgres.database.azure.com"), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // }, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](128000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen4_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // }}, // } } }
Output:
func (*ServersClient) NewListPager ¶
func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
NewListPager - List all the servers in a given subscription.
Generated from API version 2017-12-01
- options - ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", 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 = armpostgresql.ServerListResult{ // Value: []*armpostgresql.Server{ // { // Name: to.Ptr("pgtestsvc1"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1"), // Location: to.Ptr("westus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("testuser"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-04T21:01:55.149Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc1.postgres.database.azure.com"), // MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS11), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // }, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](10), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](5120), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine5), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen4_1"), // Capacity: to.Ptr[int32](1), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // }, // { // Name: to.Ptr("pgtestsvc2"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc2"), // Location: to.Ptr("westus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("testuser"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-07T21:01:55.149Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc2.postgres.database.azure.com"), // MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS12), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc2/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armpostgresql.ServerPrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.ServerPrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armpostgresql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](5120), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("pgtestsvc3"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg1/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc3"), // Location: to.Ptr("westus"), // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("testuser"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-01T00:11:08.550Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc3.postgres.database.azure.com"), // MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS10), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc3/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armpostgresql.ServerPrivateEndpointConnectionProperties{ // PrivateEndpoint: &armpostgresql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armpostgresql.ServerPrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armpostgresql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armpostgresql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](35), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupEnabled), // StorageMB: to.Ptr[int32](204800), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("GP_Gen4_4"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("pgtestsvc4"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "ElasticServer": to.Ptr("1"), // }, // Properties: &armpostgresql.ServerProperties{ // AdministratorLogin: to.Ptr("cloudsa"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T21:08:24.637Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("pgtestsvc4.postgres.database.azure.com"), // MinimalTLSVersion: to.Ptr(armpostgresql.MinimalTLSVersionEnumTLS10), // PrivateEndpointConnections: []*armpostgresql.ServerPrivateEndpointConnection{ // }, // PublicNetworkAccess: to.Ptr(armpostgresql.PublicNetworkAccessEnumEnabled), // SSLEnforcement: to.Ptr(armpostgresql.SSLEnforcementEnumEnabled), // StorageProfile: &armpostgresql.StorageProfile{ // BackupRetentionDays: to.Ptr[int32](7), // GeoRedundantBackup: to.Ptr(armpostgresql.GeoRedundantBackupDisabled), // StorageMB: to.Ptr[int32](128000), // }, // UserVisibleState: to.Ptr(armpostgresql.ServerStateReady), // Version: to.Ptr(armpostgresql.ServerVersionNine6), // }, // SKU: &armpostgresql.SKU{ // Name: to.Ptr("B_Gen4_2"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr(armpostgresql.SKUTierBasic), // }, // }}, // } } }
Output:
type ServersClientBeginCreateOptions ¶
type ServersClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method.
type ServersClientBeginDeleteOptions ¶
type ServersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
type ServersClientBeginRestartOptions ¶
type ServersClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method.
type ServersClientBeginUpdateOptions ¶
type ServersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
type ServersClientCreateResponse ¶
type ServersClientCreateResponse struct { // Represents a server. Server }
ServersClientCreateResponse contains the response from method ServersClient.BeginCreate.
type ServersClientDeleteResponse ¶
type ServersClientDeleteResponse struct { }
ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete.
type ServersClientGetOptions ¶
type ServersClientGetOptions struct { }
ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
type ServersClientGetResponse ¶
type ServersClientGetResponse struct { // Represents a server. Server }
ServersClientGetResponse contains the response from method ServersClient.Get.
type ServersClientListByResourceGroupOptions ¶
type ServersClientListByResourceGroupOptions struct { }
ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.
type ServersClientListByResourceGroupResponse ¶
type ServersClientListByResourceGroupResponse struct { // A list of servers. ServerListResult }
ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager.
type ServersClientListOptions ¶
type ServersClientListOptions struct { }
ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
type ServersClientListResponse ¶
type ServersClientListResponse struct { // A list of servers. ServerListResult }
ServersClientListResponse contains the response from method ServersClient.NewListPager.
type ServersClientRestartResponse ¶
type ServersClientRestartResponse struct { }
ServersClientRestartResponse contains the response from method ServersClient.BeginRestart.
type ServersClientUpdateResponse ¶
type ServersClientUpdateResponse struct { // Represents a server. Server }
ServersClientUpdateResponse contains the response from method ServersClient.BeginUpdate.
type StorageAutogrow ¶
type StorageAutogrow string
StorageAutogrow - Enable Storage Auto Grow.
const ( StorageAutogrowDisabled StorageAutogrow = "Disabled" StorageAutogrowEnabled StorageAutogrow = "Enabled" )
func PossibleStorageAutogrowValues ¶
func PossibleStorageAutogrowValues() []StorageAutogrow
PossibleStorageAutogrowValues returns the possible values for the StorageAutogrow const type.
type StorageProfile ¶
type StorageProfile struct { // Backup retention days for the server. BackupRetentionDays *int32 // Enable Geo-redundant or not for server backup. GeoRedundantBackup *GeoRedundantBackup // Enable Storage Auto Grow. StorageAutogrow *StorageAutogrow // Max storage allowed for a server. StorageMB *int32 }
StorageProfile - Storage Profile properties of a server
func (StorageProfile) MarshalJSON ¶
func (s StorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfile.
func (*StorageProfile) UnmarshalJSON ¶
func (s *StorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.
type TagsObject ¶
TagsObject - Tags object for patch operations.
func (TagsObject) MarshalJSON ¶
func (t TagsObject) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TagsObject.
func (*TagsObject) UnmarshalJSON ¶
func (t *TagsObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type VirtualNetworkRule ¶
type VirtualNetworkRule struct { // Resource properties. Properties *VirtualNetworkRuleProperties // 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; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
VirtualNetworkRule - A virtual network rule.
func (VirtualNetworkRule) MarshalJSON ¶
func (v VirtualNetworkRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.
func (*VirtualNetworkRule) UnmarshalJSON ¶
func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.
type VirtualNetworkRuleListResult ¶
type VirtualNetworkRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VirtualNetworkRule }
VirtualNetworkRuleListResult - A list of virtual network rules.
func (VirtualNetworkRuleListResult) MarshalJSON ¶
func (v VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleListResult.
func (*VirtualNetworkRuleListResult) UnmarshalJSON ¶
func (v *VirtualNetworkRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRuleListResult.
type VirtualNetworkRuleProperties ¶
type VirtualNetworkRuleProperties struct { // REQUIRED; The ARM resource id of the virtual network subnet. VirtualNetworkSubnetID *string // Create firewall rule before the virtual network has vnet service endpoint enabled. IgnoreMissingVnetServiceEndpoint *bool // READ-ONLY; Virtual Network Rule State State *VirtualNetworkRuleState }
VirtualNetworkRuleProperties - Properties of a virtual network rule.
func (VirtualNetworkRuleProperties) MarshalJSON ¶
func (v VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleProperties.
func (*VirtualNetworkRuleProperties) UnmarshalJSON ¶
func (v *VirtualNetworkRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRuleProperties.
type VirtualNetworkRuleState ¶
type VirtualNetworkRuleState string
VirtualNetworkRuleState - Virtual Network Rule State
const ( VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" )
func PossibleVirtualNetworkRuleStateValues ¶
func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState
PossibleVirtualNetworkRuleStateValues returns the possible values for the VirtualNetworkRuleState const type.
type VirtualNetworkRulesClient ¶
type VirtualNetworkRulesClient struct {
// contains filtered or unexported fields
}
VirtualNetworkRulesClient contains the methods for the VirtualNetworkRules group. Don't use this type directly, use NewVirtualNetworkRulesClient() instead.
func NewVirtualNetworkRulesClient ¶
func NewVirtualNetworkRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkRulesClient, error)
NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient 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 (*VirtualNetworkRulesClient) BeginCreateOrUpdate ¶
func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an existing virtual network rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- virtualNetworkRuleName - The name of the virtual network rule.
- parameters - The requested virtual Network Rule Resource state.
- options - VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/VirtualNetworkRulesCreateOrUpdate.json
package main 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/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualNetworkRulesClient().BeginCreateOrUpdate(ctx, "TestGroup", "vnet-test-svr", "vnet-firewall-rule", armpostgresql.VirtualNetworkRule{ Properties: &armpostgresql.VirtualNetworkRuleProperties{ IgnoreMissingVnetServiceEndpoint: to.Ptr(false), VirtualNetworkSubnetID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), }, }, 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.VirtualNetworkRule = armpostgresql.VirtualNetworkRule{ // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armpostgresql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // } }
Output:
func (*VirtualNetworkRulesClient) BeginDelete ¶
func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error)
BeginDelete - Deletes the virtual network rule with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- virtualNetworkRuleName - The name of the virtual network rule.
- options - VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/VirtualNetworkRulesDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualNetworkRulesClient().BeginDelete(ctx, "TestGroup", "vnet-test-svr", "vnet-firewall-rule", 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) } }
Output:
func (*VirtualNetworkRulesClient) Get ¶
func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientGetOptions) (VirtualNetworkRulesClientGetResponse, error)
Get - Gets a virtual network rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- virtualNetworkRuleName - The name of the virtual network rule.
- options - VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/VirtualNetworkRulesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualNetworkRulesClient().Get(ctx, "TestGroup", "vnet-test-svr", "vnet-firewall-rule", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualNetworkRule = armpostgresql.VirtualNetworkRule{ // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armpostgresql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // State: to.Ptr(armpostgresql.VirtualNetworkRuleStateReady), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // } }
Output:
func (*VirtualNetworkRulesClient) NewListByServerPager ¶
func (client *VirtualNetworkRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *VirtualNetworkRulesClientListByServerOptions) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse]
NewListByServerPager - Gets a list of virtual network rules in a server.
Generated from API version 2017-12-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- serverName - The name of the server.
- options - VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/VirtualNetworkRulesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armpostgresql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualNetworkRulesClient().NewListByServerPager("TestGroup", "vnet-test-svr", 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.VirtualNetworkRuleListResult = armpostgresql.VirtualNetworkRuleListResult{ // Value: []*armpostgresql.VirtualNetworkRule{ // { // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armpostgresql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // State: to.Ptr(armpostgresql.VirtualNetworkRuleStateReady), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // }, // { // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.DBforPostgreSQL/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armpostgresql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // State: to.Ptr(armpostgresql.VirtualNetworkRuleStateReady), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // }}, // } } }
Output:
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions ¶
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
type VirtualNetworkRulesClientBeginDeleteOptions ¶
type VirtualNetworkRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
type VirtualNetworkRulesClientCreateOrUpdateResponse ¶
type VirtualNetworkRulesClientCreateOrUpdateResponse struct { // A virtual network rule. VirtualNetworkRule }
VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.BeginCreateOrUpdate.
type VirtualNetworkRulesClientDeleteResponse ¶
type VirtualNetworkRulesClientDeleteResponse struct { }
VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.BeginDelete.
type VirtualNetworkRulesClientGetOptions ¶
type VirtualNetworkRulesClientGetOptions struct { }
VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
type VirtualNetworkRulesClientGetResponse ¶
type VirtualNetworkRulesClientGetResponse struct { // A virtual network rule. VirtualNetworkRule }
VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get.
type VirtualNetworkRulesClientListByServerOptions ¶
type VirtualNetworkRulesClientListByServerOptions struct { }
VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager method.
type VirtualNetworkRulesClientListByServerResponse ¶
type VirtualNetworkRulesClientListByServerResponse struct { // A list of virtual network rules. VirtualNetworkRuleListResult }
VirtualNetworkRulesClientListByServerResponse contains the response from method VirtualNetworkRulesClient.NewListByServerPager.
Source Files ¶
- build.go
- checknameavailability_client.go
- client_factory.go
- configurations_client.go
- constants.go
- databases_client.go
- firewallrules_client.go
- interfaces.go
- locationbasedperformancetier_client.go
- logfiles_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- polymorphic_helpers.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- recoverableservers_client.go
- replicas_client.go
- response_types.go
- serveradministrators_client.go
- serverbasedperformancetier_client.go
- serverkeys_client.go
- serverparameters_client.go
- servers_client.go
- serversecurityalertpolicies_client.go
- time_rfc3339.go
- virtualnetworkrules_client.go