datamaskingrules

package
v0.20231023.1123109 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/datamaskingrules Documentation

The datamaskingrules SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2022-11-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/datamaskingrules"

Client Initialization

client := datamaskingrules.NewDataMaskingRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DataMaskingRulesClient.CreateOrUpdate

ctx := context.TODO()
id := datamaskingrules.NewDataMaskingPolicyRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleValue")

payload := datamaskingrules.DataMaskingRule{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DataMaskingRulesClient.ListByDatabase

ctx := context.TODO()
id := datamaskingrules.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")

// alternatively `client.ListByDatabase(ctx, id)` can be used to do batched pagination
items, err := client.ListByDatabaseComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDataMaskingFunction

func PossibleValuesForDataMaskingFunction() []string

func PossibleValuesForDataMaskingRuleState

func PossibleValuesForDataMaskingRuleState() []string

func ValidateDataMaskingPolicyRuleID

func ValidateDataMaskingPolicyRuleID(input interface{}, key string) (warnings []string, errors []error)

ValidateDataMaskingPolicyRuleID checks that 'input' can be parsed as a Data Masking Policy Rule ID

func ValidateDatabaseID

func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error)

ValidateDatabaseID checks that 'input' can be parsed as a Database ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DataMaskingRule
}

type DataMaskingFunction

type DataMaskingFunction string
const (
	DataMaskingFunctionCCN     DataMaskingFunction = "CCN"
	DataMaskingFunctionDefault DataMaskingFunction = "Default"
	DataMaskingFunctionEmail   DataMaskingFunction = "Email"
	DataMaskingFunctionNumber  DataMaskingFunction = "Number"
	DataMaskingFunctionSSN     DataMaskingFunction = "SSN"
	DataMaskingFunctionText    DataMaskingFunction = "Text"
)

func (*DataMaskingFunction) UnmarshalJSON

func (s *DataMaskingFunction) UnmarshalJSON(bytes []byte) error

type DataMaskingPolicyRuleId

type DataMaskingPolicyRuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	RuleName          string
}

DataMaskingPolicyRuleId is a struct representing the Resource ID for a Data Masking Policy Rule

func NewDataMaskingPolicyRuleID

func NewDataMaskingPolicyRuleID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, ruleName string) DataMaskingPolicyRuleId

NewDataMaskingPolicyRuleID returns a new DataMaskingPolicyRuleId struct

func ParseDataMaskingPolicyRuleID

func ParseDataMaskingPolicyRuleID(input string) (*DataMaskingPolicyRuleId, error)

ParseDataMaskingPolicyRuleID parses 'input' into a DataMaskingPolicyRuleId

func ParseDataMaskingPolicyRuleIDInsensitively

func ParseDataMaskingPolicyRuleIDInsensitively(input string) (*DataMaskingPolicyRuleId, error)

ParseDataMaskingPolicyRuleIDInsensitively parses 'input' case-insensitively into a DataMaskingPolicyRuleId note: this method should only be used for API response data and not user input

func (DataMaskingPolicyRuleId) ID

ID returns the formatted Data Masking Policy Rule ID

func (DataMaskingPolicyRuleId) Segments

Segments returns a slice of Resource ID Segments which comprise this Data Masking Policy Rule ID

func (DataMaskingPolicyRuleId) String

func (id DataMaskingPolicyRuleId) String() string

String returns a human-readable description of this Data Masking Policy Rule ID

type DataMaskingRule

type DataMaskingRule struct {
	Id         *string                    `json:"id,omitempty"`
	Kind       *string                    `json:"kind,omitempty"`
	Location   *string                    `json:"location,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *DataMaskingRuleProperties `json:"properties,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type DataMaskingRuleOperationPredicate

type DataMaskingRuleOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (DataMaskingRuleOperationPredicate) Matches

type DataMaskingRuleProperties

type DataMaskingRuleProperties struct {
	AliasName         *string               `json:"aliasName,omitempty"`
	ColumnName        string                `json:"columnName"`
	Id                *string               `json:"id,omitempty"`
	MaskingFunction   DataMaskingFunction   `json:"maskingFunction"`
	NumberFrom        *string               `json:"numberFrom,omitempty"`
	NumberTo          *string               `json:"numberTo,omitempty"`
	PrefixSize        *string               `json:"prefixSize,omitempty"`
	ReplacementString *string               `json:"replacementString,omitempty"`
	RuleState         *DataMaskingRuleState `json:"ruleState,omitempty"`
	SchemaName        string                `json:"schemaName"`
	SuffixSize        *string               `json:"suffixSize,omitempty"`
	TableName         string                `json:"tableName"`
}

type DataMaskingRuleState

type DataMaskingRuleState string
const (
	DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled"
	DataMaskingRuleStateEnabled  DataMaskingRuleState = "Enabled"
)

func (*DataMaskingRuleState) UnmarshalJSON

func (s *DataMaskingRuleState) UnmarshalJSON(bytes []byte) error

type DataMaskingRulesClient

type DataMaskingRulesClient struct {
	Client *resourcemanager.Client
}

func NewDataMaskingRulesClientWithBaseURI

func NewDataMaskingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingRulesClient, error)

func (DataMaskingRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (DataMaskingRulesClient) ListByDatabase

ListByDatabase ...

func (DataMaskingRulesClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (DataMaskingRulesClient) ListByDatabaseCompleteMatchingPredicate

func (c DataMaskingRulesClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id DatabaseId, predicate DataMaskingRuleOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DatabaseId

type DatabaseId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
}

DatabaseId is a struct representing the Resource ID for a Database

func NewDatabaseID

func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId

NewDatabaseID returns a new DatabaseId struct

func ParseDatabaseID

func ParseDatabaseID(input string) (*DatabaseId, error)

ParseDatabaseID parses 'input' into a DatabaseId

func ParseDatabaseIDInsensitively

func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error)

ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId note: this method should only be used for API response data and not user input

func (DatabaseId) ID

func (id DatabaseId) ID() string

ID returns the formatted Database ID

func (DatabaseId) Segments

func (id DatabaseId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Database ID

func (DatabaseId) String

func (id DatabaseId) String() string

String returns a human-readable description of this Database ID

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	Items []DataMaskingRule
}

type ListByDatabaseOperationResponse

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DataMaskingRule
}

Jump to

Keyboard shortcuts

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