databasesqlvulnerabilityassessmentrulebaselines

package
v0.20240325.1135512 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

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

Client Initialization

client := databasesqlvulnerabilityassessmentrulebaselines.NewDatabaseSqlVulnerabilityAssessmentRuleBaselinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate

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

payload := databasesqlvulnerabilityassessmentrulebaselines.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput{
	// ...
}


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

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

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: DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.Get

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

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: DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.ListByBaseline

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

// alternatively `client.ListByBaseline(ctx, id)` can be used to do batched pagination
items, err := client.ListByBaselineComplete(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 ValidateBaselineRuleID

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

ValidateBaselineRuleID checks that 'input' can be parsed as a Baseline Rule ID

Types

type BaselineRuleId

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

BaselineRuleId is a struct representing the Resource ID for a Baseline Rule

func NewBaselineRuleID

func NewBaselineRuleID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, ruleId string) BaselineRuleId

NewBaselineRuleID returns a new BaselineRuleId struct

func ParseBaselineRuleID

func ParseBaselineRuleID(input string) (*BaselineRuleId, error)

ParseBaselineRuleID parses 'input' into a BaselineRuleId

func ParseBaselineRuleIDInsensitively

func ParseBaselineRuleIDInsensitively(input string) (*BaselineRuleId, error)

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

func (*BaselineRuleId) FromParseResult

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

func (BaselineRuleId) ID

func (id BaselineRuleId) ID() string

ID returns the formatted Baseline Rule ID

func (BaselineRuleId) Segments

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

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

func (BaselineRuleId) String

func (id BaselineRuleId) String() string

String returns a human-readable description of this Baseline Rule ID

type CreateOrUpdateOperationResponse

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

type DatabaseSqlVulnerabilityAssessmentRuleBaseline

type DatabaseSqlVulnerabilityAssessmentRuleBaseline struct {
	Id         *string                                                   `json:"id,omitempty"`
	Name       *string                                                   `json:"name,omitempty"`
	Properties *DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                                    `json:"systemData,omitempty"`
	Type       *string                                                   `json:"type,omitempty"`
}

type DatabaseSqlVulnerabilityAssessmentRuleBaselineInput

type DatabaseSqlVulnerabilityAssessmentRuleBaselineInput struct {
	Id         *string                                                        `json:"id,omitempty"`
	Name       *string                                                        `json:"name,omitempty"`
	Properties *DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                                         `json:"systemData,omitempty"`
	Type       *string                                                        `json:"type,omitempty"`
}

type DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties

type DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties struct {
	LatestScan bool       `json:"latestScan"`
	Results    [][]string `json:"results"`
}

type DatabaseSqlVulnerabilityAssessmentRuleBaselineOperationPredicate

type DatabaseSqlVulnerabilityAssessmentRuleBaselineOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (DatabaseSqlVulnerabilityAssessmentRuleBaselineOperationPredicate) Matches

type DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties

type DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties struct {
	Results [][]string `json:"results"`
}

type DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient

type DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient struct {
	Client *resourcemanager.Client
}

func NewDatabaseSqlVulnerabilityAssessmentRuleBaselinesClientWithBaseURI

func NewDatabaseSqlVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient, error)

func (DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate

CreateOrUpdate ...

func (DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) Delete

Delete ...

func (DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) Get

Get ...

func (DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) ListByBaseline

ListByBaseline ...

func (DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) ListByBaselineComplete

ListByBaselineComplete retrieves all the results into a single object

func (DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) ListByBaselineCompleteMatchingPredicate

ListByBaselineCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByBaselineCompleteResult

type ListByBaselineCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DatabaseSqlVulnerabilityAssessmentRuleBaseline
}

type ListByBaselineOperationResponse

type ListByBaselineOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DatabaseSqlVulnerabilityAssessmentRuleBaseline
}

Jump to

Keyboard shortcuts

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