Categorygithub.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql
modulepackage
1.2.0
Repository: https://github.com/azure/azure-sdk-for-go.git
Documentation: pkg.go.dev

# README

Azure Database for PostgreSQL Module for Go

PkgGoDev

The armpostgresql module provides operations for working with Azure Database for PostgreSQL.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Database for PostgreSQL module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Database for PostgreSQL. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Database for PostgreSQL module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armpostgresql.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armpostgresql.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewServersClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Database for PostgreSQL label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

# Packages

No description provided by the author

# Functions

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient with the specified values.
NewClientFactory creates a new instance of ClientFactory with the specified values.
NewConfigurationsClient creates a new instance of ConfigurationsClient with the specified values.
NewDatabasesClient creates a new instance of DatabasesClient with the specified values.
NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values.
NewLocationBasedPerformanceTierClient creates a new instance of LocationBasedPerformanceTierClient with the specified values.
NewLogFilesClient creates a new instance of LogFilesClient with the specified values.
NewOperationsClient creates a new instance of OperationsClient with the specified values.
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.
NewRecoverableServersClient creates a new instance of RecoverableServersClient with the specified values.
NewReplicasClient creates a new instance of ReplicasClient with the specified values.
NewServerAdministratorsClient creates a new instance of ServerAdministratorsClient with the specified values.
NewServerBasedPerformanceTierClient creates a new instance of ServerBasedPerformanceTierClient with the specified values.
NewServerKeysClient creates a new instance of ServerKeysClient with the specified values.
NewServerParametersClient creates a new instance of ServerParametersClient with the specified values.
NewServersClient creates a new instance of ServersClient with the specified values.
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient with the specified values.
NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient with the specified values.
PossibleCreateModeValues returns the possible values for the CreateMode const type.
PossibleGeoRedundantBackupValues returns the possible values for the GeoRedundantBackup const type.
PossibleIdentityTypeValues returns the possible values for the IdentityType const type.
PossibleInfrastructureEncryptionValues returns the possible values for the InfrastructureEncryption const type.
PossibleMinimalTLSVersionEnumValues returns the possible values for the MinimalTLSVersionEnum const type.
PossibleOperationOriginValues returns the possible values for the OperationOrigin const type.
PossiblePrivateEndpointProvisioningStateValues returns the possible values for the PrivateEndpointProvisioningState const type.
PossiblePrivateLinkServiceConnectionStateActionsRequireValues returns the possible values for the PrivateLinkServiceConnectionStateActionsRequire const type.
PossiblePrivateLinkServiceConnectionStateStatusValues returns the possible values for the PrivateLinkServiceConnectionStateStatus const type.
PossiblePublicNetworkAccessEnumValues returns the possible values for the PublicNetworkAccessEnum const type.
PossibleSecurityAlertPolicyNameValues returns the possible values for the SecurityAlertPolicyName const type.
PossibleServerKeyTypeValues returns the possible values for the ServerKeyType const type.
PossibleServerSecurityAlertPolicyStateValues returns the possible values for the ServerSecurityAlertPolicyState const type.
PossibleServerStateValues returns the possible values for the ServerState const type.
PossibleServerVersionValues returns the possible values for the ServerVersion const type.
PossibleSKUTierValues returns the possible values for the SKUTier const type.
PossibleSSLEnforcementEnumValues returns the possible values for the SSLEnforcementEnum const type.
PossibleStorageAutogrowValues returns the possible values for the StorageAutogrow const type.
PossibleVirtualNetworkRuleStateValues returns the possible values for the VirtualNetworkRuleState const type.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InfrastructureEncryptionDisabled - Additional (2nd) layer of encryption for data at rest.
InfrastructureEncryptionEnabled - Default value for single layer of encryption for data at rest.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

CheckNameAvailabilityClient contains the methods for the CheckNameAvailability group.
CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.
CheckNameAvailabilityClientExecuteResponse contains the response from method CheckNameAvailabilityClient.Execute.
ClientFactory is a client factory used to create any client in this module.
Configuration - Represents a Configuration.
ConfigurationListResult - A list of server configurations.
ConfigurationProperties - The properties of a configuration.
ConfigurationsClient contains the methods for the Configurations group.
ConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginCreateOrUpdate method.
ConfigurationsClientCreateOrUpdateResponse contains the response from method ConfigurationsClient.BeginCreateOrUpdate.
ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
ConfigurationsClientGetResponse contains the response from method ConfigurationsClient.Get.
ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.NewListByServerPager method.
ConfigurationsClientListByServerResponse contains the response from method ConfigurationsClient.NewListByServerPager.
Database - Represents a Database.
DatabaseListResult - A List of databases.
DatabaseProperties - The properties of a database.
DatabasesClient contains the methods for the Databases group.
DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate.
DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete.
DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
DatabasesClientGetResponse contains the response from method DatabasesClient.Get.
DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
DatabasesClientListByServerResponse contains the response from method DatabasesClient.NewListByServerPager.
ErrorAdditionalInfo - The resource management error additional info.
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations.
FirewallRule - Represents a server firewall rule.
FirewallRuleListResult - A list of firewall rules.
FirewallRuleProperties - The properties of a server firewall rule.
FirewallRulesClient contains the methods for the FirewallRules group.
FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.BeginCreateOrUpdate.
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.BeginDelete.
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager.
LocationBasedPerformanceTierClient contains the methods for the LocationBasedPerformanceTier group.
LocationBasedPerformanceTierClientListOptions contains the optional parameters for the LocationBasedPerformanceTierClient.NewListPager method.
LocationBasedPerformanceTierClientListResponse contains the response from method LocationBasedPerformanceTierClient.NewListPager.
LogFile - Represents a log file.
LogFileListResult - A list of log files.
LogFileProperties - The properties of a log file.
LogFilesClient contains the methods for the LogFiles group.
LogFilesClientListByServerOptions contains the optional parameters for the LogFilesClient.NewListByServerPager method.
LogFilesClientListByServerResponse contains the response from method LogFilesClient.NewListByServerPager.
NameAvailability - Represents a resource name availability.
NameAvailabilityRequest - Request from client to check resource name availability.
Operation - REST API operation definition.
OperationDisplay - Display metadata associated with the operation.
OperationListResult - A list of resource provider operations.
OperationsClient contains the methods for the Operations group.
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
OperationsClientListResponse contains the response from method OperationsClient.List.
PerformanceTierListResult - A list of performance tiers.
PerformanceTierProperties - Performance tier properties.
PerformanceTierServiceLevelObjectives - Service level objectives for performance tier.
PrivateEndpointConnection - A private endpoint connection.
PrivateEndpointConnectionListResult - A list of private endpoint connections.
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group.
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
PrivateEndpointConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdateTags method.
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
PrivateEndpointConnectionsClientListByServerResponse contains the response from method PrivateEndpointConnectionsClient.NewListByServerPager.
PrivateEndpointConnectionsClientUpdateTagsResponse contains the response from method PrivateEndpointConnectionsClient.BeginUpdateTags.
No description provided by the author
PrivateLinkResource - A private link resource.
PrivateLinkResourceListResult - A list of private link resources.
PrivateLinkResourceProperties - Properties of a private link resource.
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group.
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager method.
PrivateLinkResourcesClientListByServerResponse contains the response from method PrivateLinkResourcesClient.NewListByServerPager.
No description provided by the author
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource.
RecoverableServerProperties - The recoverable server's properties.
RecoverableServerResource - A recoverable server resource.
RecoverableServersClient contains the methods for the RecoverableServers group.
RecoverableServersClientGetOptions contains the optional parameters for the RecoverableServersClient.Get method.
RecoverableServersClientGetResponse contains the response from method RecoverableServersClient.Get.
ReplicasClient contains the methods for the Replicas group.
ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.NewListByServerPager method.
ReplicasClientListByServerResponse contains the response from method ReplicasClient.NewListByServerPager.
Resource - Common fields that are returned in the response for all Azure Resource Manager resources.
ResourceIdentity - Azure Active Directory identity configuration for a resource.
SecurityAlertPolicyProperties - Properties of a security alert policy.
Server - Represents a server.
ServerAdministratorProperties - The properties of an server Administrator.
ServerAdministratorResource - Represents a and external administrator to be created.
ServerAdministratorResourceListResult - The response to a list Active Directory Administrators request.
ServerAdministratorsClient contains the methods for the ServerAdministrators group.
ServerAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdministratorsClient.BeginCreateOrUpdate method.
ServerAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAdministratorsClient.BeginDelete method.
ServerAdministratorsClientCreateOrUpdateResponse contains the response from method ServerAdministratorsClient.BeginCreateOrUpdate.
ServerAdministratorsClientDeleteResponse contains the response from method ServerAdministratorsClient.BeginDelete.
ServerAdministratorsClientGetOptions contains the optional parameters for the ServerAdministratorsClient.Get method.
ServerAdministratorsClientGetResponse contains the response from method ServerAdministratorsClient.Get.
ServerAdministratorsClientListOptions contains the optional parameters for the ServerAdministratorsClient.NewListPager method.
ServerAdministratorsClientListResponse contains the response from method ServerAdministratorsClient.NewListPager.
ServerBasedPerformanceTierClient contains the methods for the ServerBasedPerformanceTier group.
ServerBasedPerformanceTierClientListOptions contains the optional parameters for the ServerBasedPerformanceTierClient.NewListPager method.
ServerBasedPerformanceTierClientListResponse contains the response from method ServerBasedPerformanceTierClient.NewListPager.
ServerForCreate - Represents a server to be created.
ServerKey - A PostgreSQL Server key.
ServerKeyListResult - A list of PostgreSQL Server keys.
ServerKeyProperties - Properties for a key execution.
ServerKeysClient contains the methods for the ServerKeys group.
ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
ServerKeysClientCreateOrUpdateResponse contains the response from method ServerKeysClient.BeginCreateOrUpdate.
ServerKeysClientDeleteResponse contains the response from method ServerKeysClient.BeginDelete.
ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
ServerKeysClientGetResponse contains the response from method ServerKeysClient.Get.
ServerKeysClientListOptions contains the optional parameters for the ServerKeysClient.NewListPager method.
ServerKeysClientListResponse contains the response from method ServerKeysClient.NewListPager.
ServerListResult - A list of servers.
ServerParametersClient contains the methods for the ServerParameters group.
ServerParametersClientBeginListUpdateConfigurationsOptions contains the optional parameters for the ServerParametersClient.BeginListUpdateConfigurations method.
ServerParametersClientListUpdateConfigurationsResponse contains the response from method ServerParametersClient.BeginListUpdateConfigurations.
ServerPrivateEndpointConnection - A private endpoint connection under a server.
ServerPrivateEndpointConnectionProperties - Properties of a private endpoint connection.
No description provided by the author
ServerProperties - The properties of a server.
ServerPropertiesForCreate - The properties used to create a new server.
ServerPropertiesForDefaultCreate - The properties used to create a new server.
ServerPropertiesForGeoRestore - The properties used to create a new server by restoring to a different region from a geo replicated backup.
ServerPropertiesForReplica - The properties to create a new replica.
ServerPropertiesForRestore - The properties used to create a new server by restoring from a backup.
ServersClient contains the methods for the Servers group.
ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method.
ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method.
ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
ServersClientCreateResponse contains the response from method ServersClient.BeginCreate.
ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete.
ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
ServersClientGetResponse contains the response from method ServersClient.Get.
ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.
ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager.
ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
ServersClientListResponse contains the response from method ServersClient.NewListPager.
ServersClientRestartResponse contains the response from method ServersClient.BeginRestart.
ServersClientUpdateResponse contains the response from method ServersClient.BeginUpdate.
ServerSecurityAlertPoliciesClient contains the methods for the ServerSecurityAlertPolicies group.
ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
ServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate.
ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
ServerSecurityAlertPoliciesClientGetResponse contains the response from method ServerSecurityAlertPoliciesClient.Get.
ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager method.
ServerSecurityAlertPoliciesClientListByServerResponse contains the response from method ServerSecurityAlertPoliciesClient.NewListByServerPager.
ServerSecurityAlertPolicy - A server security alert policy.
ServerSecurityAlertPolicyListResult - A list of the server's security alert policies.
ServerUpdateParameters - Parameters allowed to update for a server.
ServerUpdateParametersProperties - The properties that can be updated for a server.
SKU - Billing information related properties of a server.
StorageProfile - Storage Profile properties of a server.
TagsObject - Tags object for patch operations.
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
VirtualNetworkRule - A virtual network rule.
VirtualNetworkRuleListResult - A list of virtual network rules.
VirtualNetworkRuleProperties - Properties of a virtual network rule.
VirtualNetworkRulesClient contains the methods for the VirtualNetworkRules group.
VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.BeginCreateOrUpdate.
VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.BeginDelete.
VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get.
VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager method.
VirtualNetworkRulesClientListByServerResponse contains the response from method VirtualNetworkRulesClient.NewListByServerPager.

# Interfaces

ServerPropertiesForCreateClassification provides polymorphic access to related types.

# Type aliases

CreateMode - The mode to create a new server.
GeoRedundantBackup - Enable Geo-redundant or not for server backup.
IdentityType - The identity type.
InfrastructureEncryption - Add a second layer of encryption for your data using new encryption algorithm which gives additional data protection.
MinimalTLSVersionEnum - Enforce a minimal Tls version for the server.
OperationOrigin - The intended executor of the operation.
PrivateEndpointProvisioningState - State of the private endpoint connection.
PrivateLinkServiceConnectionStateActionsRequire - The actions required for private link service connection.
PrivateLinkServiceConnectionStateStatus - The private link service connection status.
PublicNetworkAccessEnum - Whether or not public network access is allowed for this server.
No description provided by the author
ServerKeyType - The key type like 'AzureKeyVault'.
ServerSecurityAlertPolicyState - Specifies the state of the policy, whether it is enabled or disabled.
ServerState - A state of a server that is visible to user.
ServerVersion - The version of a server.
SKUTier - The tier of the particular SKU, e.g.
SSLEnforcementEnum - Enable ssl enforcement or not when connect to server.
StorageAutogrow - Enable Storage Auto Grow.
VirtualNetworkRuleState - Virtual Network Rule State.