sqlvulnerabilityassessmentscanresult

package
v0.20231023.1073319 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/sqlvulnerabilityassessmentscanresult Documentation

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

Client Initialization

client := sqlvulnerabilityassessmentscanresult.NewSqlVulnerabilityAssessmentScanResultClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SqlVulnerabilityAssessmentScanResultClient.Get

ctx := context.TODO()
id := sqlvulnerabilityassessmentscanresult.NewScanResultID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "scanIdValue", "scanResultIdValue")

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

Example Usage: SqlVulnerabilityAssessmentScanResultClient.ListByScan

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

// alternatively `client.ListByScan(ctx, id, sqlvulnerabilityassessmentscanresult.DefaultListByScanOperationOptions())` can be used to do batched pagination
items, err := client.ListByScanComplete(ctx, id, sqlvulnerabilityassessmentscanresult.DefaultListByScanOperationOptions())
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 PossibleValuesForRuleSeverity

func PossibleValuesForRuleSeverity() []string

func PossibleValuesForRuleStatus

func PossibleValuesForRuleStatus() []string

func PossibleValuesForRuleType

func PossibleValuesForRuleType() []string

func PossibleValuesForVulnerabilityAssessmentSystemDatabaseName

func PossibleValuesForVulnerabilityAssessmentSystemDatabaseName() []string

func ValidateScanID

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

ValidateScanID checks that 'input' can be parsed as a Scan ID

func ValidateScanResultID

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

ValidateScanResultID checks that 'input' can be parsed as a Scan Result ID

Types

type Baseline

type Baseline struct {
	ExpectedResults *[][]string `json:"expectedResults,omitempty"`
	UpdatedTime     *string     `json:"updatedTime,omitempty"`
}

func (*Baseline) GetUpdatedTimeAsTime

func (o *Baseline) GetUpdatedTimeAsTime() (*time.Time, error)

func (*Baseline) SetUpdatedTimeAsTime

func (o *Baseline) SetUpdatedTimeAsTime(input time.Time)

type BaselineAdjustedResult

type BaselineAdjustedResult struct {
	Baseline              *Baseline   `json:"baseline,omitempty"`
	ResultsNotInBaseline  *[][]string `json:"resultsNotInBaseline,omitempty"`
	ResultsOnlyInBaseline *[][]string `json:"resultsOnlyInBaseline,omitempty"`
	Status                *RuleStatus `json:"status,omitempty"`
}

type BenchmarkReference

type BenchmarkReference struct {
	Benchmark *string `json:"benchmark,omitempty"`
	Reference *string `json:"reference,omitempty"`
}

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        *SqlVulnerabilityAssessmentScanResults
}

type ListByScanCompleteResult

type ListByScanCompleteResult struct {
	Items []SqlVulnerabilityAssessmentScanResults
}

type ListByScanOperationOptions

type ListByScanOperationOptions struct {
	SystemDatabaseName *VulnerabilityAssessmentSystemDatabaseName
}

func DefaultListByScanOperationOptions

func DefaultListByScanOperationOptions() ListByScanOperationOptions

func (ListByScanOperationOptions) ToHeaders

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

func (ListByScanOperationOptions) ToOData

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

func (ListByScanOperationOptions) ToQuery

type ListByScanOperationResponse

type ListByScanOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SqlVulnerabilityAssessmentScanResults
}

type QueryCheck

type QueryCheck struct {
	ColumnNames    *[]string   `json:"columnNames,omitempty"`
	ExpectedResult *[][]string `json:"expectedResult,omitempty"`
	Query          *string     `json:"query,omitempty"`
}

type Remediation

type Remediation struct {
	Automated   *bool     `json:"automated,omitempty"`
	Description *string   `json:"description,omitempty"`
	PortalLink  *string   `json:"portalLink,omitempty"`
	Scripts     *[]string `json:"scripts,omitempty"`
}

type RuleSeverity

type RuleSeverity string
const (
	RuleSeverityHigh          RuleSeverity = "High"
	RuleSeverityInformational RuleSeverity = "Informational"
	RuleSeverityLow           RuleSeverity = "Low"
	RuleSeverityMedium        RuleSeverity = "Medium"
	RuleSeverityObsolete      RuleSeverity = "Obsolete"
)

func (*RuleSeverity) UnmarshalJSON

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

type RuleStatus

type RuleStatus string
const (
	RuleStatusFinding       RuleStatus = "Finding"
	RuleStatusInternalError RuleStatus = "InternalError"
	RuleStatusNonFinding    RuleStatus = "NonFinding"
)

func (*RuleStatus) UnmarshalJSON

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

type RuleType

type RuleType string
const (
	RuleTypeBaselineExpected RuleType = "BaselineExpected"
	RuleTypeBinary           RuleType = "Binary"
	RuleTypeNegativeList     RuleType = "NegativeList"
	RuleTypePositiveList     RuleType = "PositiveList"
)

func (*RuleType) UnmarshalJSON

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

type ScanId

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

ScanId is a struct representing the Resource ID for a Scan

func NewScanID

func NewScanID(subscriptionId string, resourceGroupName string, serverName string, scanId string) ScanId

NewScanID returns a new ScanId struct

func ParseScanID

func ParseScanID(input string) (*ScanId, error)

ParseScanID parses 'input' into a ScanId

func ParseScanIDInsensitively

func ParseScanIDInsensitively(input string) (*ScanId, error)

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

func (ScanId) ID

func (id ScanId) ID() string

ID returns the formatted Scan ID

func (ScanId) Segments

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

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

func (ScanId) String

func (id ScanId) String() string

String returns a human-readable description of this Scan ID

type ScanResultId

type ScanResultId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	ScanId            string
	ScanResultId      string
}

ScanResultId is a struct representing the Resource ID for a Scan Result

func NewScanResultID

func NewScanResultID(subscriptionId string, resourceGroupName string, serverName string, scanId string, scanResultId string) ScanResultId

NewScanResultID returns a new ScanResultId struct

func ParseScanResultID

func ParseScanResultID(input string) (*ScanResultId, error)

ParseScanResultID parses 'input' into a ScanResultId

func ParseScanResultIDInsensitively

func ParseScanResultIDInsensitively(input string) (*ScanResultId, error)

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

func (ScanResultId) ID

func (id ScanResultId) ID() string

ID returns the formatted Scan Result ID

func (ScanResultId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scan Result ID

func (ScanResultId) String

func (id ScanResultId) String() string

String returns a human-readable description of this Scan Result ID

type SqlVulnerabilityAssessmentScanResultClient

type SqlVulnerabilityAssessmentScanResultClient struct {
	Client *resourcemanager.Client
}

func NewSqlVulnerabilityAssessmentScanResultClientWithBaseURI

func NewSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScanResultClient, error)

func (SqlVulnerabilityAssessmentScanResultClient) Get

Get ...

func (SqlVulnerabilityAssessmentScanResultClient) ListByScan

ListByScan ...

func (SqlVulnerabilityAssessmentScanResultClient) ListByScanComplete

ListByScanComplete retrieves all the results into a single object

func (SqlVulnerabilityAssessmentScanResultClient) ListByScanCompleteMatchingPredicate

ListByScanCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SqlVulnerabilityAssessmentScanResultProperties

type SqlVulnerabilityAssessmentScanResultProperties struct {
	BaselineAdjustedResult *BaselineAdjustedResult `json:"baselineAdjustedResult,omitempty"`
	ErrorMessage           *string                 `json:"errorMessage,omitempty"`
	IsTrimmed              *bool                   `json:"isTrimmed,omitempty"`
	QueryResults           *[][]string             `json:"queryResults,omitempty"`
	Remediation            *Remediation            `json:"remediation,omitempty"`
	RuleId                 *string                 `json:"ruleId,omitempty"`
	RuleMetadata           *VaRule                 `json:"ruleMetadata,omitempty"`
	Status                 *RuleStatus             `json:"status,omitempty"`
}

type SqlVulnerabilityAssessmentScanResults

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

type SqlVulnerabilityAssessmentScanResultsOperationPredicate

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

func (SqlVulnerabilityAssessmentScanResultsOperationPredicate) Matches

type VaRule

type VaRule struct {
	BenchmarkReferences *[]BenchmarkReference `json:"benchmarkReferences,omitempty"`
	Category            *string               `json:"category,omitempty"`
	Description         *string               `json:"description,omitempty"`
	QueryCheck          *QueryCheck           `json:"queryCheck,omitempty"`
	Rationale           *string               `json:"rationale,omitempty"`
	RuleId              *string               `json:"ruleId,omitempty"`
	RuleType            *RuleType             `json:"ruleType,omitempty"`
	Severity            *RuleSeverity         `json:"severity,omitempty"`
	Title               *string               `json:"title,omitempty"`
}

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