manageddatabasevulnerabilityassessmentscans

package
v0.20240123.1162016 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := manageddatabasevulnerabilityassessmentscans.NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedDatabaseVulnerabilityAssessmentScansClient.Export

ctx := context.TODO()
id := manageddatabasevulnerabilityassessmentscans.NewVulnerabilityAssessmentScanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "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: ManagedDatabaseVulnerabilityAssessmentScansClient.Get

ctx := context.TODO()
id := manageddatabasevulnerabilityassessmentscans.NewVulnerabilityAssessmentScanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "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: ManagedDatabaseVulnerabilityAssessmentScansClient.InitiateScan

ctx := context.TODO()
id := manageddatabasevulnerabilityassessmentscans.NewVulnerabilityAssessmentScanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "databaseValue", "scanIdValue")

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

Example Usage: ManagedDatabaseVulnerabilityAssessmentScansClient.ListByDatabase

ctx := context.TODO()
id := manageddatabasevulnerabilityassessmentscans.NewSqlManagedInstanceDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "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 ValidateVulnerabilityAssessmentScanID

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

ValidateVulnerabilityAssessmentScanID checks that 'input' can be parsed as a Vulnerability Assessment Scan ID

Types

type DatabaseVulnerabilityAssessmentScanExportProperties

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

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 ManagedDatabaseVulnerabilityAssessmentScansClient

type ManagedDatabaseVulnerabilityAssessmentScansClient struct {
	Client *resourcemanager.Client
}

func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI

func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentScansClient, error)

func (ManagedDatabaseVulnerabilityAssessmentScansClient) Export

Export ...

func (ManagedDatabaseVulnerabilityAssessmentScansClient) Get

Get ...

func (ManagedDatabaseVulnerabilityAssessmentScansClient) InitiateScan

InitiateScan ...

func (ManagedDatabaseVulnerabilityAssessmentScansClient) InitiateScanThenPoll

InitiateScanThenPoll performs InitiateScan then polls until it's completed

func (ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabase

ListByDatabase ...

func (ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabaseCompleteMatchingPredicate

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

type VulnerabilityAssessmentScanError

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

type VulnerabilityAssessmentScanId

type VulnerabilityAssessmentScanId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ManagedInstanceName string
	DatabaseName        string
	ScanId              string
}

VulnerabilityAssessmentScanId is a struct representing the Resource ID for a Vulnerability Assessment Scan

func NewVulnerabilityAssessmentScanID

func NewVulnerabilityAssessmentScanID(subscriptionId string, resourceGroupName string, managedInstanceName string, databaseName string, scanId string) VulnerabilityAssessmentScanId

NewVulnerabilityAssessmentScanID returns a new VulnerabilityAssessmentScanId struct

func ParseVulnerabilityAssessmentScanID

func ParseVulnerabilityAssessmentScanID(input string) (*VulnerabilityAssessmentScanId, error)

ParseVulnerabilityAssessmentScanID parses 'input' into a VulnerabilityAssessmentScanId

func ParseVulnerabilityAssessmentScanIDInsensitively

func ParseVulnerabilityAssessmentScanIDInsensitively(input string) (*VulnerabilityAssessmentScanId, error)

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

func (*VulnerabilityAssessmentScanId) FromParseResult added in v0.20231127.1171502

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

func (VulnerabilityAssessmentScanId) ID

ID returns the formatted Vulnerability Assessment Scan ID

func (VulnerabilityAssessmentScanId) Segments

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

func (VulnerabilityAssessmentScanId) String

String returns a human-readable description of this Vulnerability Assessment Scan ID

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