datamaskingrules

package
v0.20231129.1103252 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

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

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/2021-11-01/datamaskingrules"

Client Initialization

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

Example Usage: DataMaskingRulesClient.CreateOrUpdate

ctx := context.TODO()
id := datamaskingrules.NewRuleID("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.NewSqlDatabaseID("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 ValidateRuleID

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

ValidateRuleID checks that 'input' can be parsed as a Rule 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 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

func (c DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input DataMaskingRule) (result CreateOrUpdateOperationResponse, err error)

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 commonids.SqlDatabaseId, predicate DataMaskingRuleOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	Items []DataMaskingRule
}

type ListByDatabaseOperationResponse

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

type RuleId

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

RuleId is a struct representing the Resource ID for a Rule

func NewRuleID

func NewRuleID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, ruleName string) RuleId

NewRuleID returns a new RuleId struct

func ParseRuleID

func ParseRuleID(input string) (*RuleId, error)

ParseRuleID parses 'input' into a RuleId

func ParseRuleIDInsensitively

func ParseRuleIDInsensitively(input string) (*RuleId, error)

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

func (*RuleId) FromParseResult added in v0.20231127.1171502

func (id *RuleId) FromParseResult(input resourceids.ParseResult) error

func (RuleId) ID

func (id RuleId) ID() string

ID returns the formatted Rule ID

func (RuleId) Segments

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

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

func (RuleId) String

func (id RuleId) String() string

String returns a human-readable description of this Rule ID

Jump to

Keyboard shortcuts

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