sqlvulnerabilityassessmentrulebaseline

package
v0.20240320.1144505 Latest Latest
Warning

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

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

README

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

The sqlvulnerabilityassessmentrulebaseline 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/sqlvulnerabilityassessmentrulebaseline"

Client Initialization

client := sqlvulnerabilityassessmentrulebaseline.NewSqlVulnerabilityAssessmentRuleBaselineClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SqlVulnerabilityAssessmentRuleBaselineClient.CreateOrUpdate

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

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


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

Example Usage: SqlVulnerabilityAssessmentRuleBaselineClient.Delete

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

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

Example Usage: SqlVulnerabilityAssessmentRuleBaselineClient.Get

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

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

Example Usage: SqlVulnerabilityAssessmentRuleBaselineClient.ListByBaseline

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

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

func PossibleValuesForVulnerabilityAssessmentSystemDatabaseName() []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 CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	SystemDatabaseName *VulnerabilityAssessmentSystemDatabaseName
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

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 DeleteOperationOptions

type DeleteOperationOptions struct {
	SystemDatabaseName *VulnerabilityAssessmentSystemDatabaseName
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetOperationOptions

type GetOperationOptions struct {
	SystemDatabaseName *VulnerabilityAssessmentSystemDatabaseName
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListByBaselineCompleteResult

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

type ListByBaselineOperationOptions

type ListByBaselineOperationOptions struct {
	SystemDatabaseName *VulnerabilityAssessmentSystemDatabaseName
}

func DefaultListByBaselineOperationOptions

func DefaultListByBaselineOperationOptions() ListByBaselineOperationOptions

func (ListByBaselineOperationOptions) ToHeaders

func (ListByBaselineOperationOptions) ToOData

func (ListByBaselineOperationOptions) ToQuery

type ListByBaselineOperationResponse

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

type RuleId

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

RuleId is a struct representing the Resource ID for a Rule

func NewRuleID

func NewRuleID(subscriptionId string, resourceGroupName string, serverName string, ruleId 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

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

type SqlVulnerabilityAssessmentRuleBaselineClient

type SqlVulnerabilityAssessmentRuleBaselineClient struct {
	Client *resourcemanager.Client
}

func NewSqlVulnerabilityAssessmentRuleBaselineClientWithBaseURI

func NewSqlVulnerabilityAssessmentRuleBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentRuleBaselineClient, error)

func (SqlVulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate

CreateOrUpdate ...

func (SqlVulnerabilityAssessmentRuleBaselineClient) Delete

Delete ...

func (SqlVulnerabilityAssessmentRuleBaselineClient) Get

Get ...

func (SqlVulnerabilityAssessmentRuleBaselineClient) ListByBaseline

ListByBaseline ...

func (SqlVulnerabilityAssessmentRuleBaselineClient) ListByBaselineComplete

ListByBaselineComplete retrieves all the results into a single object

func (SqlVulnerabilityAssessmentRuleBaselineClient) ListByBaselineCompleteMatchingPredicate

ListByBaselineCompleteMatchingPredicate retrieves all the results and then applies the predicate

type VulnerabilityAssessmentSystemDatabaseName

type VulnerabilityAssessmentSystemDatabaseName string
const (
	VulnerabilityAssessmentSystemDatabaseNameMaster VulnerabilityAssessmentSystemDatabaseName = "master"
)

func (*VulnerabilityAssessmentSystemDatabaseName) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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