databasevulnerabilityassessmentrulebaselines

package
v0.20240320.1143605 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: 10 Imported by: 0

README

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

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

Client Initialization

client := databasevulnerabilityassessmentrulebaselines.NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate

ctx := context.TODO()
id := databasevulnerabilityassessmentrulebaselines.NewBaselineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleIdValue", "default")

payload := databasevulnerabilityassessmentrulebaselines.DatabaseVulnerabilityAssessmentRuleBaseline{
	// ...
}


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

Example Usage: DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete

ctx := context.TODO()
id := databasevulnerabilityassessmentrulebaselines.NewBaselineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleIdValue", "default")

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

Example Usage: DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get

ctx := context.TODO()
id := databasevulnerabilityassessmentrulebaselines.NewBaselineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "ruleIdValue", "default")

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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForVulnerabilityAssessmentPolicyBaselineName

func PossibleValuesForVulnerabilityAssessmentPolicyBaselineName() []string

func ValidateBaselineID

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

ValidateBaselineID checks that 'input' can be parsed as a Baseline ID

Types

type BaselineId

type BaselineId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	RuleId            string
	BaselineName      VulnerabilityAssessmentPolicyBaselineName
}

BaselineId is a struct representing the Resource ID for a Baseline

func NewBaselineID

func NewBaselineID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, ruleId string, baselineName VulnerabilityAssessmentPolicyBaselineName) BaselineId

NewBaselineID returns a new BaselineId struct

func ParseBaselineID

func ParseBaselineID(input string) (*BaselineId, error)

ParseBaselineID parses 'input' into a BaselineId

func ParseBaselineIDInsensitively

func ParseBaselineIDInsensitively(input string) (*BaselineId, error)

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

func (*BaselineId) FromParseResult

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

func (BaselineId) ID

func (id BaselineId) ID() string

ID returns the formatted Baseline ID

func (BaselineId) Segments

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

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

func (BaselineId) String

func (id BaselineId) String() string

String returns a human-readable description of this Baseline ID

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DatabaseVulnerabilityAssessmentRuleBaseline
}

type DatabaseVulnerabilityAssessmentRuleBaseline

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

type DatabaseVulnerabilityAssessmentRuleBaselineItem

type DatabaseVulnerabilityAssessmentRuleBaselineItem struct {
	Result []string `json:"result"`
}

type DatabaseVulnerabilityAssessmentRuleBaselineProperties

type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct {
	BaselineResults []DatabaseVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults"`
}

type DatabaseVulnerabilityAssessmentRuleBaselinesClient

type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct {
	Client *resourcemanager.Client
}

func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI

func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error)

func (DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate

CreateOrUpdate ...

func (DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete

Delete ...

func (DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get

Get ...

type DeleteOperationResponse

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

type GetOperationResponse

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

type VulnerabilityAssessmentPolicyBaselineName

type VulnerabilityAssessmentPolicyBaselineName string
const (
	VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default"
	VulnerabilityAssessmentPolicyBaselineNameMaster  VulnerabilityAssessmentPolicyBaselineName = "master"
)

func (*VulnerabilityAssessmentPolicyBaselineName) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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