sqlvulnerabilityassessmentscans

package
v0.20240712.1173055 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := sqlvulnerabilityassessmentscans.NewSqlVulnerabilityAssessmentScansClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SqlVulnerabilityAssessmentScansClient.Get

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

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

Example Usage: SqlVulnerabilityAssessmentScansClient.ListBySqlVulnerabilityAssessments

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

// alternatively `client.ListBySqlVulnerabilityAssessments(ctx, id, sqlvulnerabilityassessmentscans.DefaultListBySqlVulnerabilityAssessmentsOperationOptions())` can be used to do batched pagination
items, err := client.ListBySqlVulnerabilityAssessmentsComplete(ctx, id, sqlvulnerabilityassessmentscans.DefaultListBySqlVulnerabilityAssessmentsOperationOptions())
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 PossibleValuesForVulnerabilityAssessmentScanState

func PossibleValuesForVulnerabilityAssessmentScanState() []string

func PossibleValuesForVulnerabilityAssessmentScanTriggerType

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

Types

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

type ListBySqlVulnerabilityAssessmentsCompleteResult

type ListBySqlVulnerabilityAssessmentsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SqlVulnerabilityAssessmentScanRecord
}

type ListBySqlVulnerabilityAssessmentsCustomPager added in v0.20240628.1153531

type ListBySqlVulnerabilityAssessmentsCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type ListBySqlVulnerabilityAssessmentsOperationOptions

type ListBySqlVulnerabilityAssessmentsOperationOptions struct {
	SystemDatabaseName *VulnerabilityAssessmentSystemDatabaseName
}

func DefaultListBySqlVulnerabilityAssessmentsOperationOptions

func DefaultListBySqlVulnerabilityAssessmentsOperationOptions() ListBySqlVulnerabilityAssessmentsOperationOptions

func (ListBySqlVulnerabilityAssessmentsOperationOptions) ToHeaders

func (ListBySqlVulnerabilityAssessmentsOperationOptions) ToOData

func (ListBySqlVulnerabilityAssessmentsOperationOptions) ToQuery

type ListBySqlVulnerabilityAssessmentsOperationResponse

type ListBySqlVulnerabilityAssessmentsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SqlVulnerabilityAssessmentScanRecord
}

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) FromParseResult

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

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 SqlVulnerabilityAssessmentScanError

type SqlVulnerabilityAssessmentScanError struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type SqlVulnerabilityAssessmentScanRecord

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

type SqlVulnerabilityAssessmentScanRecordOperationPredicate

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

func (SqlVulnerabilityAssessmentScanRecordOperationPredicate) Matches

type SqlVulnerabilityAssessmentScanRecordProperties

type SqlVulnerabilityAssessmentScanRecordProperties struct {
	Database                       *string                                 `json:"database,omitempty"`
	EndTime                        *string                                 `json:"endTime,omitempty"`
	Errors                         *[]SqlVulnerabilityAssessmentScanError  `json:"errors,omitempty"`
	HighSeverityFailedRulesCount   *int64                                  `json:"highSeverityFailedRulesCount,omitempty"`
	IsBaselineApplied              *bool                                   `json:"isBaselineApplied,omitempty"`
	LastScanTime                   *string                                 `json:"lastScanTime,omitempty"`
	LowSeverityFailedRulesCount    *int64                                  `json:"lowSeverityFailedRulesCount,omitempty"`
	MediumSeverityFailedRulesCount *int64                                  `json:"mediumSeverityFailedRulesCount,omitempty"`
	ScanId                         *string                                 `json:"scanId,omitempty"`
	Server                         *string                                 `json:"server,omitempty"`
	SqlVersion                     *string                                 `json:"sqlVersion,omitempty"`
	StartTime                      *string                                 `json:"startTime,omitempty"`
	State                          *VulnerabilityAssessmentScanState       `json:"state,omitempty"`
	TotalFailedRulesCount          *int64                                  `json:"totalFailedRulesCount,omitempty"`
	TotalPassedRulesCount          *int64                                  `json:"totalPassedRulesCount,omitempty"`
	TotalRulesCount                *int64                                  `json:"totalRulesCount,omitempty"`
	TriggerType                    *VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty"`
}

func (*SqlVulnerabilityAssessmentScanRecordProperties) GetEndTimeAsTime

func (*SqlVulnerabilityAssessmentScanRecordProperties) GetLastScanTimeAsTime

func (o *SqlVulnerabilityAssessmentScanRecordProperties) GetLastScanTimeAsTime() (*time.Time, error)

func (*SqlVulnerabilityAssessmentScanRecordProperties) GetStartTimeAsTime

func (o *SqlVulnerabilityAssessmentScanRecordProperties) GetStartTimeAsTime() (*time.Time, error)

func (*SqlVulnerabilityAssessmentScanRecordProperties) SetEndTimeAsTime

func (o *SqlVulnerabilityAssessmentScanRecordProperties) SetEndTimeAsTime(input time.Time)

func (*SqlVulnerabilityAssessmentScanRecordProperties) SetLastScanTimeAsTime

func (o *SqlVulnerabilityAssessmentScanRecordProperties) SetLastScanTimeAsTime(input time.Time)

func (*SqlVulnerabilityAssessmentScanRecordProperties) SetStartTimeAsTime

func (o *SqlVulnerabilityAssessmentScanRecordProperties) SetStartTimeAsTime(input time.Time)

type SqlVulnerabilityAssessmentScansClient

type SqlVulnerabilityAssessmentScansClient struct {
	Client *resourcemanager.Client
}

func NewSqlVulnerabilityAssessmentScansClientWithBaseURI

func NewSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScansClient, error)

func (SqlVulnerabilityAssessmentScansClient) Get

Get ...

func (SqlVulnerabilityAssessmentScansClient) ListBySqlVulnerabilityAssessments

ListBySqlVulnerabilityAssessments ...

func (SqlVulnerabilityAssessmentScansClient) ListBySqlVulnerabilityAssessmentsComplete

ListBySqlVulnerabilityAssessmentsComplete retrieves all the results into a single object

func (SqlVulnerabilityAssessmentScansClient) ListBySqlVulnerabilityAssessmentsCompleteMatchingPredicate

ListBySqlVulnerabilityAssessmentsCompleteMatchingPredicate retrieves all the results and then applies the predicate

type VulnerabilityAssessmentScanState

type VulnerabilityAssessmentScanState string
const (
	VulnerabilityAssessmentScanStateFailed      VulnerabilityAssessmentScanState = "Failed"
	VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = "FailedToRun"
	VulnerabilityAssessmentScanStateInProgress  VulnerabilityAssessmentScanState = "InProgress"
	VulnerabilityAssessmentScanStatePassed      VulnerabilityAssessmentScanState = "Passed"
)

func (*VulnerabilityAssessmentScanState) UnmarshalJSON

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

type VulnerabilityAssessmentScanTriggerType

type VulnerabilityAssessmentScanTriggerType string
const (
	VulnerabilityAssessmentScanTriggerTypeOnDemand  VulnerabilityAssessmentScanTriggerType = "OnDemand"
	VulnerabilityAssessmentScanTriggerTypeRecurring VulnerabilityAssessmentScanTriggerType = "Recurring"
)

func (*VulnerabilityAssessmentScanTriggerType) UnmarshalJSON

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

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