README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments
Documentation
The databasevulnerabilityassessments
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/databasevulnerabilityassessments"
Client Initialization
client := databasevulnerabilityassessments.NewDatabaseVulnerabilityAssessmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate
ctx := context.TODO()
id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")
payload := databasevulnerabilityassessments.DatabaseVulnerabilityAssessment{
// ...
}
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: DatabaseVulnerabilityAssessmentsClient.Delete
ctx := context.TODO()
id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")
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: DatabaseVulnerabilityAssessmentsClient.Get
ctx := context.TODO()
id := commonids.NewSqlDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")
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: DatabaseVulnerabilityAssessmentsClient.ListByDatabase
ctx := context.TODO()
id := commonids.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 ¶
- type CreateOrUpdateOperationResponse
- type DatabaseVulnerabilityAssessment
- type DatabaseVulnerabilityAssessmentOperationPredicate
- type DatabaseVulnerabilityAssessmentProperties
- type DatabaseVulnerabilityAssessmentsClient
- func (c DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlDatabaseId, ...) (result CreateOrUpdateOperationResponse, err error)
- func (c DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, id commonids.SqlDatabaseId) (result DeleteOperationResponse, err error)
- func (c DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, id commonids.SqlDatabaseId) (result GetOperationResponse, err error)
- func (c DatabaseVulnerabilityAssessmentsClient) ListByDatabase(ctx context.Context, id commonids.SqlDatabaseId) (result ListByDatabaseOperationResponse, err error)
- func (c DatabaseVulnerabilityAssessmentsClient) ListByDatabaseComplete(ctx context.Context, id commonids.SqlDatabaseId) (ListByDatabaseCompleteResult, error)
- func (c DatabaseVulnerabilityAssessmentsClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlDatabaseId, ...) (result ListByDatabaseCompleteResult, err error)
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByDatabaseCompleteResult
- type ListByDatabaseOperationResponse
- type VulnerabilityAssessmentRecurringScansProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *DatabaseVulnerabilityAssessment }
type DatabaseVulnerabilityAssessment ¶
type DatabaseVulnerabilityAssessment struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *DatabaseVulnerabilityAssessmentProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
type DatabaseVulnerabilityAssessmentOperationPredicate ¶
type DatabaseVulnerabilityAssessmentOperationPredicate struct { Id *string Name *string Type *string }
func (DatabaseVulnerabilityAssessmentOperationPredicate) Matches ¶
func (p DatabaseVulnerabilityAssessmentOperationPredicate) Matches(input DatabaseVulnerabilityAssessment) bool
type DatabaseVulnerabilityAssessmentProperties ¶
type DatabaseVulnerabilityAssessmentProperties struct { RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` StorageContainerPath *string `json:"storageContainerPath,omitempty"` StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` }
type DatabaseVulnerabilityAssessmentsClient ¶
type DatabaseVulnerabilityAssessmentsClient struct {
Client *resourcemanager.Client
}
func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI ¶
func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentsClient, error)
func (DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate ¶
func (c DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, id commonids.SqlDatabaseId, input DatabaseVulnerabilityAssessment) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (DatabaseVulnerabilityAssessmentsClient) Delete ¶
func (c DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, id commonids.SqlDatabaseId) (result DeleteOperationResponse, err error)
Delete ...
func (DatabaseVulnerabilityAssessmentsClient) Get ¶
func (c DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, id commonids.SqlDatabaseId) (result GetOperationResponse, err error)
Get ...
func (DatabaseVulnerabilityAssessmentsClient) ListByDatabase ¶
func (c DatabaseVulnerabilityAssessmentsClient) ListByDatabase(ctx context.Context, id commonids.SqlDatabaseId) (result ListByDatabaseOperationResponse, err error)
ListByDatabase ...
func (DatabaseVulnerabilityAssessmentsClient) ListByDatabaseComplete ¶
func (c DatabaseVulnerabilityAssessmentsClient) ListByDatabaseComplete(ctx context.Context, id commonids.SqlDatabaseId) (ListByDatabaseCompleteResult, error)
ListByDatabaseComplete retrieves all the results into a single object
func (DatabaseVulnerabilityAssessmentsClient) ListByDatabaseCompleteMatchingPredicate ¶
func (c DatabaseVulnerabilityAssessmentsClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlDatabaseId, predicate DatabaseVulnerabilityAssessmentOperationPredicate) (result ListByDatabaseCompleteResult, err error)
ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *DatabaseVulnerabilityAssessment }
type ListByDatabaseCompleteResult ¶
type ListByDatabaseCompleteResult struct { LatestHttpResponse *http.Response Items []DatabaseVulnerabilityAssessment }
type ListByDatabaseOperationResponse ¶
type ListByDatabaseOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]DatabaseVulnerabilityAssessment }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.