manageddatabasesensitivitylabels

package
v0.20240610.1112704 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels Documentation

The manageddatabasesensitivitylabels SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-05-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels"

Client Initialization

client := manageddatabasesensitivitylabels.NewManagedDatabaseSensitivityLabelsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate

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

payload := manageddatabasesensitivitylabels.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: ManagedDatabaseSensitivityLabelsClient.Delete

ctx := context.TODO()
id := manageddatabasesensitivitylabels.NewTableColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "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: ManagedDatabaseSensitivityLabelsClient.DisableRecommendation

ctx := context.TODO()
id := manageddatabasesensitivitylabels.NewTableColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "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: ManagedDatabaseSensitivityLabelsClient.EnableRecommendation

ctx := context.TODO()
id := manageddatabasesensitivitylabels.NewTableColumnID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "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: ManagedDatabaseSensitivityLabelsClient.Get

ctx := context.TODO()
id := manageddatabasesensitivitylabels.NewSensitivityLabelSensitivityLabelSourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue", "schemaValue", "tableValue", "columnValue", "current")

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: ManagedDatabaseSensitivityLabelsClient.ListByDatabase

ctx := context.TODO()
id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

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

Example Usage: ManagedDatabaseSensitivityLabelsClient.ListCurrentByDatabase

ctx := context.TODO()
id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

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

Example Usage: ManagedDatabaseSensitivityLabelsClient.ListRecommendedByDatabase

ctx := context.TODO()
id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

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

Example Usage: ManagedDatabaseSensitivityLabelsClient.ManagedDatabaseRecommendedSensitivityLabelsUpdate

ctx := context.TODO()
id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

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


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

Example Usage: ManagedDatabaseSensitivityLabelsClient.Update

ctx := context.TODO()
id := commonids.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue")

payload := manageddatabasesensitivitylabels.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 PossibleValuesForClientClassificationSource

func PossibleValuesForClientClassificationSource() []string

func PossibleValuesForRecommendedSensitivityLabelUpdateKind

func PossibleValuesForRecommendedSensitivityLabelUpdateKind() []string

func PossibleValuesForSensitivityLabelRank

func PossibleValuesForSensitivityLabelRank() []string

func PossibleValuesForSensitivityLabelSource

func PossibleValuesForSensitivityLabelSource() []string

func PossibleValuesForSensitivityLabelUpdateKind

func PossibleValuesForSensitivityLabelUpdateKind() []string

func ValidateSensitivityLabelSensitivityLabelSourceID

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

ValidateSensitivityLabelSensitivityLabelSourceID checks that 'input' can be parsed as a Sensitivity Label Sensitivity Label Source ID

func ValidateTableColumnID

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

ValidateTableColumnID checks that 'input' can be parsed as a Table Column ID

Types

type ClientClassificationSource

type ClientClassificationSource string
const (
	ClientClassificationSourceMIP         ClientClassificationSource = "MIP"
	ClientClassificationSourceNative      ClientClassificationSource = "Native"
	ClientClassificationSourceNone        ClientClassificationSource = "None"
	ClientClassificationSourceRecommended ClientClassificationSource = "Recommended"
)

func (*ClientClassificationSource) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

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 ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SensitivityLabel
}

type ListByDatabaseOperationOptions

type ListByDatabaseOperationOptions struct {
	Filter *string
}

func DefaultListByDatabaseOperationOptions

func DefaultListByDatabaseOperationOptions() ListByDatabaseOperationOptions

func (ListByDatabaseOperationOptions) ToHeaders

func (ListByDatabaseOperationOptions) ToOData

func (ListByDatabaseOperationOptions) ToQuery

type ListByDatabaseOperationResponse

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

type ListCurrentByDatabaseCompleteResult

type ListCurrentByDatabaseCompleteResult struct {
	LatestHttpResponse *http.Response
	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 {
	LatestHttpResponse *http.Response
	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 ManagedDatabaseRecommendedSensitivityLabelsUpdateOperationResponse

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

type ManagedDatabaseSensitivityLabelsClient

type ManagedDatabaseSensitivityLabelsClient struct {
	Client *resourcemanager.Client
}

func NewManagedDatabaseSensitivityLabelsClientWithBaseURI

func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSensitivityLabelsClient, error)

func (ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate

CreateOrUpdate ...

func (ManagedDatabaseSensitivityLabelsClient) Delete

Delete ...

func (ManagedDatabaseSensitivityLabelsClient) DisableRecommendation

DisableRecommendation ...

func (ManagedDatabaseSensitivityLabelsClient) EnableRecommendation

EnableRecommendation ...

func (ManagedDatabaseSensitivityLabelsClient) Get

Get ...

func (ManagedDatabaseSensitivityLabelsClient) ListByDatabase

ListByDatabase ...

func (ManagedDatabaseSensitivityLabelsClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (ManagedDatabaseSensitivityLabelsClient) ListByDatabaseCompleteMatchingPredicate

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabase

ListCurrentByDatabase ...

func (ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseComplete

ListCurrentByDatabaseComplete retrieves all the results into a single object

func (ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabaseCompleteMatchingPredicate

ListCurrentByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabase

ListRecommendedByDatabase ...

func (ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseComplete

ListRecommendedByDatabaseComplete retrieves all the results into a single object

func (ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabaseCompleteMatchingPredicate

ListRecommendedByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedDatabaseSensitivityLabelsClient) ManagedDatabaseRecommendedSensitivityLabelsUpdate

ManagedDatabaseRecommendedSensitivityLabelsUpdate ...

func (ManagedDatabaseSensitivityLabelsClient) Update

Update ...

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 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 {
	ClientClassificationSource *ClientClassificationSource `json:"clientClassificationSource,omitempty"`
	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 SensitivityLabelSensitivityLabelSourceId

type SensitivityLabelSensitivityLabelSourceId struct {
	SubscriptionId         string
	ResourceGroupName      string
	ManagedInstanceName    string
	DatabaseName           string
	SchemaName             string
	TableName              string
	ColumnName             string
	SensitivityLabelSource SensitivityLabelSource
}

SensitivityLabelSensitivityLabelSourceId is a struct representing the Resource ID for a Sensitivity Label Sensitivity Label Source

func NewSensitivityLabelSensitivityLabelSourceID

func NewSensitivityLabelSensitivityLabelSourceID(subscriptionId string, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource) SensitivityLabelSensitivityLabelSourceId

NewSensitivityLabelSensitivityLabelSourceID returns a new SensitivityLabelSensitivityLabelSourceId struct

func ParseSensitivityLabelSensitivityLabelSourceID

func ParseSensitivityLabelSensitivityLabelSourceID(input string) (*SensitivityLabelSensitivityLabelSourceId, error)

ParseSensitivityLabelSensitivityLabelSourceID parses 'input' into a SensitivityLabelSensitivityLabelSourceId

func ParseSensitivityLabelSensitivityLabelSourceIDInsensitively

func ParseSensitivityLabelSensitivityLabelSourceIDInsensitively(input string) (*SensitivityLabelSensitivityLabelSourceId, error)

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

func (*SensitivityLabelSensitivityLabelSourceId) FromParseResult

func (SensitivityLabelSensitivityLabelSourceId) ID

ID returns the formatted Sensitivity Label Sensitivity Label Source ID

func (SensitivityLabelSensitivityLabelSourceId) Segments

Segments returns a slice of Resource ID Segments which comprise this Sensitivity Label Sensitivity Label Source ID

func (SensitivityLabelSensitivityLabelSourceId) String

String returns a human-readable description of this Sensitivity Label Sensitivity Label Source ID

type SensitivityLabelSource

type SensitivityLabelSource string
const (
	SensitivityLabelSourceCurrent     SensitivityLabelSource = "current"
	SensitivityLabelSourceRecommended SensitivityLabelSource = "recommended"
)

func (*SensitivityLabelSource) UnmarshalJSON

func (s *SensitivityLabelSource) 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 TableColumnId

type TableColumnId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ManagedInstanceName string
	DatabaseName        string
	SchemaName          string
	TableName           string
	ColumnName          string
}

TableColumnId is a struct representing the Resource ID for a Table Column

func NewTableColumnID

func NewTableColumnID(subscriptionId string, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) TableColumnId

NewTableColumnID returns a new TableColumnId struct

func ParseTableColumnID

func ParseTableColumnID(input string) (*TableColumnId, error)

ParseTableColumnID parses 'input' into a TableColumnId

func ParseTableColumnIDInsensitively

func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error)

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

func (*TableColumnId) FromParseResult

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

func (TableColumnId) ID

func (id TableColumnId) ID() string

ID returns the formatted Table Column ID

func (TableColumnId) Segments

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

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

func (TableColumnId) String

func (id TableColumnId) String() string

String returns a human-readable description of this Table Column ID

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