sensitivitylabels

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/sensitivitylabels Documentation

The sensitivitylabels SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-02-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/2021-02-01-preview/sensitivitylabels"

Client Initialization

client := sensitivitylabels.NewSensitivityLabelsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SensitivityLabelsClient.CreateOrUpdate

ctx := context.TODO()
id := sensitivitylabels.NewColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue", "columnValue")

payload := sensitivitylabels.SensitivityLabel{
	// ...
}


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: SensitivityLabelsClient.Delete

ctx := context.TODO()
id := sensitivitylabels.NewColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue", "columnValue")

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

Example Usage: SensitivityLabelsClient.DisableRecommendation

ctx := context.TODO()
id := sensitivitylabels.NewColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue", "columnValue")

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

Example Usage: SensitivityLabelsClient.EnableRecommendation

ctx := context.TODO()
id := sensitivitylabels.NewColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue", "columnValue")

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

Example Usage: SensitivityLabelsClient.Get

ctx := context.TODO()
id := sensitivitylabels.NewColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "schemaValue", "tableValue", "columnValue")

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

Example Usage: SensitivityLabelsClient.ListCurrentByDatabase

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

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

Example Usage: SensitivityLabelsClient.ListRecommendedByDatabase

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

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

Example Usage: SensitivityLabelsClient.RecommendedSensitivityLabelsUpdate

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

payload := sensitivitylabels.RecommendedSensitivityLabelUpdateList{
	// ...
}


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

Example Usage: SensitivityLabelsClient.Update

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

payload := sensitivitylabels.SensitivityLabelUpdateList{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForRecommendedSensitivityLabelUpdateKind

func PossibleValuesForRecommendedSensitivityLabelUpdateKind() []string

func PossibleValuesForSensitivityLabelRank

func PossibleValuesForSensitivityLabelRank() []string

func PossibleValuesForSensitivityLabelUpdateKind

func PossibleValuesForSensitivityLabelUpdateKind() []string

func ValidateColumnID

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

ValidateColumnID checks that 'input' can be parsed as a Column 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 ColumnId

type ColumnId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	SchemaName        string
	TableName         string
	ColumnName        string
}

ColumnId is a struct representing the Resource ID for a Column

func NewColumnID

func NewColumnID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) ColumnId

NewColumnID returns a new ColumnId struct

func ParseColumnID

func ParseColumnID(input string) (*ColumnId, error)

ParseColumnID parses 'input' into a ColumnId

func ParseColumnIDInsensitively

func ParseColumnIDInsensitively(input string) (*ColumnId, error)

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

func (ColumnId) ID

func (id ColumnId) ID() string

ID returns the formatted Column ID

func (ColumnId) Segments

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

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

func (ColumnId) String

func (id ColumnId) String() string

String returns a human-readable description of this Column ID

type CreateOrUpdateOperationResponse

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

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 DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DisableRecommendationOperationResponse

type DisableRecommendationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type EnableRecommendationOperationResponse

type EnableRecommendationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SensitivityLabel
}

type ListCurrentByDatabaseCompleteResult

type ListCurrentByDatabaseCompleteResult struct {
	Items []SensitivityLabel
}

type ListCurrentByDatabaseOperationOptions

type ListCurrentByDatabaseOperationOptions struct {
	Count  *bool
	Filter *string
}

func DefaultListCurrentByDatabaseOperationOptions

func DefaultListCurrentByDatabaseOperationOptions() ListCurrentByDatabaseOperationOptions

func (ListCurrentByDatabaseOperationOptions) ToHeaders

func (ListCurrentByDatabaseOperationOptions) ToOData

func (ListCurrentByDatabaseOperationOptions) ToQuery

type ListCurrentByDatabaseOperationResponse

type ListCurrentByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SensitivityLabel
}

type ListRecommendedByDatabaseCompleteResult

type ListRecommendedByDatabaseCompleteResult struct {
	Items []SensitivityLabel
}

type ListRecommendedByDatabaseOperationOptions

type ListRecommendedByDatabaseOperationOptions struct {
	Filter                         *string
	IncludeDisabledRecommendations *bool
}

func DefaultListRecommendedByDatabaseOperationOptions

func DefaultListRecommendedByDatabaseOperationOptions() ListRecommendedByDatabaseOperationOptions

func (ListRecommendedByDatabaseOperationOptions) ToHeaders

func (ListRecommendedByDatabaseOperationOptions) ToOData

func (ListRecommendedByDatabaseOperationOptions) ToQuery

type ListRecommendedByDatabaseOperationResponse

type ListRecommendedByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SensitivityLabel
}

type RecommendedSensitivityLabelUpdate

type RecommendedSensitivityLabelUpdate struct {
	Id         *string                                      `json:"id,omitempty"`
	Name       *string                                      `json:"name,omitempty"`
	Properties *RecommendedSensitivityLabelUpdateProperties `json:"properties,omitempty"`
	Type       *string                                      `json:"type,omitempty"`
}

type RecommendedSensitivityLabelUpdateKind

type RecommendedSensitivityLabelUpdateKind string
const (
	RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = "disable"
	RecommendedSensitivityLabelUpdateKindEnable  RecommendedSensitivityLabelUpdateKind = "enable"
)

func (*RecommendedSensitivityLabelUpdateKind) UnmarshalJSON

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

type RecommendedSensitivityLabelUpdateList

type RecommendedSensitivityLabelUpdateList struct {
	Operations *[]RecommendedSensitivityLabelUpdate `json:"operations,omitempty"`
}

type RecommendedSensitivityLabelUpdateProperties

type RecommendedSensitivityLabelUpdateProperties struct {
	Column string                                `json:"column"`
	Op     RecommendedSensitivityLabelUpdateKind `json:"op"`
	Schema string                                `json:"schema"`
	Table  string                                `json:"table"`
}

type RecommendedSensitivityLabelsUpdateOperationResponse

type RecommendedSensitivityLabelsUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type SensitivityLabel

type SensitivityLabel struct {
	Id         *string                     `json:"id,omitempty"`
	ManagedBy  *string                     `json:"managedBy,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *SensitivityLabelProperties `json:"properties,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type SensitivityLabelOperationPredicate

type SensitivityLabelOperationPredicate struct {
	Id        *string
	ManagedBy *string
	Name      *string
	Type      *string
}

func (SensitivityLabelOperationPredicate) Matches

type SensitivityLabelProperties

type SensitivityLabelProperties struct {
	ColumnName        *string               `json:"columnName,omitempty"`
	InformationType   *string               `json:"informationType,omitempty"`
	InformationTypeId *string               `json:"informationTypeId,omitempty"`
	IsDisabled        *bool                 `json:"isDisabled,omitempty"`
	LabelId           *string               `json:"labelId,omitempty"`
	LabelName         *string               `json:"labelName,omitempty"`
	Rank              *SensitivityLabelRank `json:"rank,omitempty"`
	SchemaName        *string               `json:"schemaName,omitempty"`
	TableName         *string               `json:"tableName,omitempty"`
}

type SensitivityLabelRank

type SensitivityLabelRank string
const (
	SensitivityLabelRankCritical SensitivityLabelRank = "Critical"
	SensitivityLabelRankHigh     SensitivityLabelRank = "High"
	SensitivityLabelRankLow      SensitivityLabelRank = "Low"
	SensitivityLabelRankMedium   SensitivityLabelRank = "Medium"
	SensitivityLabelRankNone     SensitivityLabelRank = "None"
)

func (*SensitivityLabelRank) UnmarshalJSON

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

type SensitivityLabelUpdate

type SensitivityLabelUpdate struct {
	Id         *string                           `json:"id,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *SensitivityLabelUpdateProperties `json:"properties,omitempty"`
	Type       *string                           `json:"type,omitempty"`
}

type SensitivityLabelUpdateKind

type SensitivityLabelUpdateKind string
const (
	SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = "remove"
	SensitivityLabelUpdateKindSet    SensitivityLabelUpdateKind = "set"
)

func (*SensitivityLabelUpdateKind) UnmarshalJSON

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

type SensitivityLabelUpdateList

type SensitivityLabelUpdateList struct {
	Operations *[]SensitivityLabelUpdate `json:"operations,omitempty"`
}

type SensitivityLabelUpdateProperties

type SensitivityLabelUpdateProperties struct {
	Column           string                     `json:"column"`
	Op               SensitivityLabelUpdateKind `json:"op"`
	Schema           string                     `json:"schema"`
	SensitivityLabel *SensitivityLabel          `json:"sensitivityLabel,omitempty"`
	Table            string                     `json:"table"`
}

type SensitivityLabelsClient

type SensitivityLabelsClient struct {
	Client *resourcemanager.Client
}

func NewSensitivityLabelsClientWithBaseURI

func NewSensitivityLabelsClientWithBaseURI(api environments.Api) (*SensitivityLabelsClient, error)

func (SensitivityLabelsClient) CreateOrUpdate

CreateOrUpdate ...

func (SensitivityLabelsClient) Delete

Delete ...

func (SensitivityLabelsClient) DisableRecommendation

func (c SensitivityLabelsClient) DisableRecommendation(ctx context.Context, id ColumnId) (result DisableRecommendationOperationResponse, err error)

DisableRecommendation ...

func (SensitivityLabelsClient) EnableRecommendation

func (c SensitivityLabelsClient) EnableRecommendation(ctx context.Context, id ColumnId) (result EnableRecommendationOperationResponse, err error)

EnableRecommendation ...

func (SensitivityLabelsClient) Get

Get ...

func (SensitivityLabelsClient) ListCurrentByDatabase

ListCurrentByDatabase ...

func (SensitivityLabelsClient) ListCurrentByDatabaseComplete

ListCurrentByDatabaseComplete retrieves all the results into a single object

func (SensitivityLabelsClient) ListCurrentByDatabaseCompleteMatchingPredicate

func (c SensitivityLabelsClient) ListCurrentByDatabaseCompleteMatchingPredicate(ctx context.Context, id DatabaseId, options ListCurrentByDatabaseOperationOptions, predicate SensitivityLabelOperationPredicate) (result ListCurrentByDatabaseCompleteResult, err error)

ListCurrentByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SensitivityLabelsClient) ListRecommendedByDatabase

ListRecommendedByDatabase ...

func (SensitivityLabelsClient) ListRecommendedByDatabaseComplete

ListRecommendedByDatabaseComplete retrieves all the results into a single object

func (SensitivityLabelsClient) ListRecommendedByDatabaseCompleteMatchingPredicate

func (c SensitivityLabelsClient) ListRecommendedByDatabaseCompleteMatchingPredicate(ctx context.Context, id DatabaseId, options ListRecommendedByDatabaseOperationOptions, predicate SensitivityLabelOperationPredicate) (result ListRecommendedByDatabaseCompleteResult, err error)

ListRecommendedByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SensitivityLabelsClient) RecommendedSensitivityLabelsUpdate

RecommendedSensitivityLabelsUpdate ...

func (SensitivityLabelsClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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