databasevulnerabilityassessmentscans

package
v0.20240112.1095456 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-11-01/databasevulnerabilityassessmentscans Documentation

The databasevulnerabilityassessmentscans SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-11-01).

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/2021-11-01/databasevulnerabilityassessmentscans"

Client Initialization

client := databasevulnerabilityassessmentscans.NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabaseVulnerabilityAssessmentScansClient.Export

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

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

Example Usage: DatabaseVulnerabilityAssessmentScansClient.Get

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

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: DatabaseVulnerabilityAssessmentScansClient.InitiateScan

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

if err := client.InitiateScanThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: DatabaseVulnerabilityAssessmentScansClient.ListByDatabase

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

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

func PossibleValuesForVulnerabilityAssessmentScanState() []string

func PossibleValuesForVulnerabilityAssessmentScanTriggerType

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

type DatabaseVulnerabilityAssessmentScanExportProperties struct {
	ExportedReportLocation *string `json:"exportedReportLocation,omitempty"`
}

type DatabaseVulnerabilityAssessmentScansClient

type DatabaseVulnerabilityAssessmentScansClient struct {
	Client *resourcemanager.Client
}

func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI

func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentScansClient, error)

func (DatabaseVulnerabilityAssessmentScansClient) Export

Export ...

func (DatabaseVulnerabilityAssessmentScansClient) Get

Get ...

func (DatabaseVulnerabilityAssessmentScansClient) InitiateScan

InitiateScan ...

func (DatabaseVulnerabilityAssessmentScansClient) InitiateScanThenPoll

func (c DatabaseVulnerabilityAssessmentScansClient) InitiateScanThenPoll(ctx context.Context, id ScanId) error

InitiateScanThenPoll performs InitiateScan then polls until it's completed

func (DatabaseVulnerabilityAssessmentScansClient) ListByDatabase

ListByDatabase ...

func (DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (DatabaseVulnerabilityAssessmentScansClient) ListByDatabaseCompleteMatchingPredicate

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DatabaseVulnerabilityAssessmentScansExport

type DatabaseVulnerabilityAssessmentScansExport struct {
	Id         *string                                              `json:"id,omitempty"`
	Name       *string                                              `json:"name,omitempty"`
	Properties *DatabaseVulnerabilityAssessmentScanExportProperties `json:"properties,omitempty"`
	Type       *string                                              `json:"type,omitempty"`
}

type ExportOperationResponse

type ExportOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DatabaseVulnerabilityAssessmentScansExport
}

type GetOperationResponse

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

type InitiateScanOperationResponse

type InitiateScanOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type ListByDatabaseCompleteResult

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

type ListByDatabaseOperationResponse

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

type ScanId

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

ScanId is a struct representing the Resource ID for a Scan

func NewScanID

func NewScanID(subscriptionId string, resourceGroupName string, serverName string, databaseName 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 added in v0.20231127.1171502

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 VulnerabilityAssessmentScanError

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

type VulnerabilityAssessmentScanRecord

type VulnerabilityAssessmentScanRecord struct {
	Id         *string                                      `json:"id,omitempty"`
	Name       *string                                      `json:"name,omitempty"`
	Properties *VulnerabilityAssessmentScanRecordProperties `json:"properties,omitempty"`
	Type       *string                                      `json:"type,omitempty"`
}

type VulnerabilityAssessmentScanRecordOperationPredicate

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

func (VulnerabilityAssessmentScanRecordOperationPredicate) Matches

type VulnerabilityAssessmentScanRecordProperties

type VulnerabilityAssessmentScanRecordProperties struct {
	EndTime                      *string                                 `json:"endTime,omitempty"`
	Errors                       *[]VulnerabilityAssessmentScanError     `json:"errors,omitempty"`
	NumberOfFailedSecurityChecks *int64                                  `json:"numberOfFailedSecurityChecks,omitempty"`
	ScanId                       *string                                 `json:"scanId,omitempty"`
	StartTime                    *string                                 `json:"startTime,omitempty"`
	State                        *VulnerabilityAssessmentScanState       `json:"state,omitempty"`
	StorageContainerPath         *string                                 `json:"storageContainerPath,omitempty"`
	TriggerType                  *VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty"`
}

func (*VulnerabilityAssessmentScanRecordProperties) GetEndTimeAsTime

func (o *VulnerabilityAssessmentScanRecordProperties) GetEndTimeAsTime() (*time.Time, error)

func (*VulnerabilityAssessmentScanRecordProperties) GetStartTimeAsTime

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

func (*VulnerabilityAssessmentScanRecordProperties) SetEndTimeAsTime

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

func (*VulnerabilityAssessmentScanRecordProperties) SetStartTimeAsTime

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

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

Jump to

Keyboard shortcuts

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