azuresqlfirewallrule

package
v0.0.0-...-9214462 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureSqlFirewallRuleManager

type AzureSqlFirewallRuleManager struct {
	// contains filtered or unexported fields
}

func NewAzureSqlFirewallRuleManager

func NewAzureSqlFirewallRuleManager(creds config.Credentials) *AzureSqlFirewallRuleManager

func (*AzureSqlFirewallRuleManager) CreateOrUpdateSQLFirewallRule

func (m *AzureSqlFirewallRuleManager) CreateOrUpdateSQLFirewallRule(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	ruleName string,
	startIP string,
	endIP string,
) (result bool, err error)

CreateOrUpdateSQLFirewallRule creates or updates a firewall rule based on code from: https://github.com/Azure-Samples/azure-m-for-go-samples/blob/master/sql/sql.go#L111 to allow allow Azure services to connect example: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure#manage-firewall-rules-using-azure-cli

func (*AzureSqlFirewallRuleManager) Delete

Delete drops a sqlfirewallrule

func (*AzureSqlFirewallRuleManager) DeleteSQLFirewallRule

func (m *AzureSqlFirewallRuleManager) DeleteSQLFirewallRule(ctx context.Context, subscriptionID string, resourceGroupName string, serverName string, ruleName string) (err error)

DeleteSQLFirewallRule deletes a firewall rule

func (*AzureSqlFirewallRuleManager) Ensure

Ensure creates a sqlfirewallrule

func (*AzureSqlFirewallRuleManager) GetParents

GetParents returns the parents of sqlfirewallrule

func (*AzureSqlFirewallRuleManager) GetSQLFirewallRule

func (m *AzureSqlFirewallRuleManager) GetSQLFirewallRule(ctx context.Context, subscriptionID string, resourceGroupName string, serverName string, ruleName string) (result sql.FirewallRule, err error)

GetSQLFirewallRule returns a firewall rule

func (*AzureSqlFirewallRuleManager) GetServer

func (m *AzureSqlFirewallRuleManager) GetServer(ctx context.Context, subscriptionID string, resourceGroupName string, serverName string) (result sql.Server, err error)

GetServer returns a SQL server

func (*AzureSqlFirewallRuleManager) GetStatus

type SqlFirewallRuleManager

type SqlFirewallRuleManager interface {
	CreateOrUpdateSQLFirewallRule(ctx context.Context, resourceGroupName string, serverName string, ruleName string, startIP string, endIP string) (result bool, err error)
	DeleteSQLFirewallRule(ctx context.Context, resourceGroupName string, serverName string, ruleName string) (err error)
	GetSQLFirewallRule(ctx context.Context, resourceGroupName string, serverName string, ruleName string) (result sql.FirewallRule, err error)
	GetServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.Server, err error)
	resourcemanager.ARMClient
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL