subassessments

package
v0.20230823.1052657 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/subassessments Documentation

The subassessments SDK allows for interaction with the Azure Resource Manager Service security (API Version 2019-01-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/security/2019-01-01-preview/subassessments"

Client Initialization

client := subassessments.NewSubAssessmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SubAssessmentsClient.Get

ctx := context.TODO()
id := subassessments.NewScopedSubAssessmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "assessmentValue", "subAssessmentValue")

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: SubAssessmentsClient.List

ctx := context.TODO()
id := subassessments.NewScopedAssessmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "assessmentValue")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: SubAssessmentsClient.ListAll

ctx := context.TODO()
id := subassessments.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

func PossibleValuesForAssessedResourceType() []string

func PossibleValuesForSeverity

func PossibleValuesForSeverity() []string

func PossibleValuesForSource

func PossibleValuesForSource() []string

func PossibleValuesForSubAssessmentStatusCode

func PossibleValuesForSubAssessmentStatusCode() []string

func ValidateScopedAssessmentID

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

ValidateScopedAssessmentID checks that 'input' can be parsed as a Scoped Assessment ID

func ValidateScopedSubAssessmentID

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

ValidateScopedSubAssessmentID checks that 'input' can be parsed as a Scoped Sub Assessment ID

Types

type AdditionalData

type AdditionalData interface {
}

type AssessedResourceType

type AssessedResourceType string
const (
	AssessedResourceTypeContainerRegistryVulnerability AssessedResourceType = "ContainerRegistryVulnerability"
	AssessedResourceTypeServerVulnerability            AssessedResourceType = "ServerVulnerability"
	AssessedResourceTypeSqlServerVulnerability         AssessedResourceType = "SqlServerVulnerability"
)

type CVE

type CVE struct {
	Link  *string `json:"link,omitempty"`
	Title *string `json:"title,omitempty"`
}

type CVSS

type CVSS struct {
	Base *float64 `json:"base,omitempty"`
}

type ContainerRegistryVulnerabilityProperties

type ContainerRegistryVulnerabilityProperties struct {
	Cve              *[]CVE             `json:"cve,omitempty"`
	Cvss             *map[string]CVSS   `json:"cvss,omitempty"`
	ImageDigest      *string            `json:"imageDigest,omitempty"`
	Patchable        *bool              `json:"patchable,omitempty"`
	PublishedTime    *string            `json:"publishedTime,omitempty"`
	RepositoryName   *string            `json:"repositoryName,omitempty"`
	Type             *string            `json:"type,omitempty"`
	VendorReferences *[]VendorReference `json:"vendorReferences,omitempty"`
}

func (ContainerRegistryVulnerabilityProperties) MarshalJSON

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *SecuritySubAssessment
}

type ListAllCompleteResult

type ListAllCompleteResult struct {
	Items []SecuritySubAssessment
}

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]SecuritySubAssessment
	// contains filtered or unexported fields
}

func (ListAllOperationResponse) HasMore

func (r ListAllOperationResponse) HasMore() bool

func (ListAllOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []SecuritySubAssessment
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]SecuritySubAssessment
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type RawAdditionalDataImpl added in v0.20230807.1063129

type RawAdditionalDataImpl struct {
	Type   string
	Values map[string]interface{}
}

RawModeOfTransitImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type ResourceDetails

type ResourceDetails struct {
	Source Source `json:"source"`
}

type ScopedAssessmentId

type ScopedAssessmentId struct {
	ResourceId     string
	AssessmentName string
}

ScopedAssessmentId is a struct representing the Resource ID for a Scoped Assessment

func NewScopedAssessmentID

func NewScopedAssessmentID(resourceId string, assessmentName string) ScopedAssessmentId

NewScopedAssessmentID returns a new ScopedAssessmentId struct

func ParseScopedAssessmentID

func ParseScopedAssessmentID(input string) (*ScopedAssessmentId, error)

ParseScopedAssessmentID parses 'input' into a ScopedAssessmentId

func ParseScopedAssessmentIDInsensitively

func ParseScopedAssessmentIDInsensitively(input string) (*ScopedAssessmentId, error)

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

func (ScopedAssessmentId) ID

func (id ScopedAssessmentId) ID() string

ID returns the formatted Scoped Assessment ID

func (ScopedAssessmentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Assessment ID

func (ScopedAssessmentId) String

func (id ScopedAssessmentId) String() string

String returns a human-readable description of this Scoped Assessment ID

type ScopedSubAssessmentId

type ScopedSubAssessmentId struct {
	Scope             string
	AssessmentName    string
	SubAssessmentName string
}

ScopedSubAssessmentId is a struct representing the Resource ID for a Scoped Sub Assessment

func NewScopedSubAssessmentID

func NewScopedSubAssessmentID(scope string, assessmentName string, subAssessmentName string) ScopedSubAssessmentId

NewScopedSubAssessmentID returns a new ScopedSubAssessmentId struct

func ParseScopedSubAssessmentID

func ParseScopedSubAssessmentID(input string) (*ScopedSubAssessmentId, error)

ParseScopedSubAssessmentID parses 'input' into a ScopedSubAssessmentId

func ParseScopedSubAssessmentIDInsensitively

func ParseScopedSubAssessmentIDInsensitively(input string) (*ScopedSubAssessmentId, error)

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

func (ScopedSubAssessmentId) ID

func (id ScopedSubAssessmentId) ID() string

ID returns the formatted Scoped Sub Assessment ID

func (ScopedSubAssessmentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Sub Assessment ID

func (ScopedSubAssessmentId) String

func (id ScopedSubAssessmentId) String() string

String returns a human-readable description of this Scoped Sub Assessment ID

type SecuritySubAssessment

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

type SecuritySubAssessmentOperationPredicate

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

func (SecuritySubAssessmentOperationPredicate) Matches

type SecuritySubAssessmentProperties

type SecuritySubAssessmentProperties struct {
	AdditionalData  AdditionalData       `json:"additionalData"`
	Category        *string              `json:"category,omitempty"`
	Description     *string              `json:"description,omitempty"`
	DisplayName     *string              `json:"displayName,omitempty"`
	Id              *string              `json:"id,omitempty"`
	Impact          *string              `json:"impact,omitempty"`
	Remediation     *string              `json:"remediation,omitempty"`
	ResourceDetails *ResourceDetails     `json:"resourceDetails,omitempty"`
	Status          *SubAssessmentStatus `json:"status,omitempty"`
	TimeGenerated   *string              `json:"timeGenerated,omitempty"`
}

func (*SecuritySubAssessmentProperties) GetTimeGeneratedAsTime

func (o *SecuritySubAssessmentProperties) GetTimeGeneratedAsTime() (*time.Time, error)

func (*SecuritySubAssessmentProperties) SetTimeGeneratedAsTime

func (o *SecuritySubAssessmentProperties) SetTimeGeneratedAsTime(input time.Time)

func (*SecuritySubAssessmentProperties) UnmarshalJSON

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

type ServerVulnerabilityProperties

type ServerVulnerabilityProperties struct {
	Cve              *[]CVE             `json:"cve,omitempty"`
	Cvss             *map[string]CVSS   `json:"cvss,omitempty"`
	Patchable        *bool              `json:"patchable,omitempty"`
	PublishedTime    *string            `json:"publishedTime,omitempty"`
	Threat           *string            `json:"threat,omitempty"`
	Type             *string            `json:"type,omitempty"`
	VendorReferences *[]VendorReference `json:"vendorReferences,omitempty"`
}

func (ServerVulnerabilityProperties) MarshalJSON

func (s ServerVulnerabilityProperties) MarshalJSON() ([]byte, error)

type Severity

type Severity string
const (
	SeverityHigh   Severity = "High"
	SeverityLow    Severity = "Low"
	SeverityMedium Severity = "Medium"
)

type Source

type Source string
const (
	SourceAzure        Source = "Azure"
	SourceOnPremise    Source = "OnPremise"
	SourceOnPremiseSql Source = "OnPremiseSql"
)

type SqlServerVulnerabilityProperties

type SqlServerVulnerabilityProperties struct {
	Query *string `json:"query,omitempty"`
	Type  *string `json:"type,omitempty"`
}

func (SqlServerVulnerabilityProperties) MarshalJSON

func (s SqlServerVulnerabilityProperties) MarshalJSON() ([]byte, error)

type SubAssessmentStatus

type SubAssessmentStatus struct {
	Cause       *string                  `json:"cause,omitempty"`
	Code        *SubAssessmentStatusCode `json:"code,omitempty"`
	Description *string                  `json:"description,omitempty"`
	Severity    *Severity                `json:"severity,omitempty"`
}

type SubAssessmentStatusCode

type SubAssessmentStatusCode string
const (
	SubAssessmentStatusCodeHealthy       SubAssessmentStatusCode = "Healthy"
	SubAssessmentStatusCodeNotApplicable SubAssessmentStatusCode = "NotApplicable"
	SubAssessmentStatusCodeUnhealthy     SubAssessmentStatusCode = "Unhealthy"
)

type SubAssessmentsClient

type SubAssessmentsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewSubAssessmentsClientWithBaseURI

func NewSubAssessmentsClientWithBaseURI(endpoint string) SubAssessmentsClient

func (SubAssessmentsClient) Get

Get ...

func (SubAssessmentsClient) List

List ...

func (SubAssessmentsClient) ListAll

ListAll ...

func (SubAssessmentsClient) ListAllComplete

ListAllComplete retrieves all of the results into a single object

func (SubAssessmentsClient) ListAllCompleteMatchingPredicate

func (c SubAssessmentsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate SecuritySubAssessmentOperationPredicate) (resp ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SubAssessmentsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (SubAssessmentsClient) ListCompleteMatchingPredicate

func (c SubAssessmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id ScopedAssessmentId, predicate SecuritySubAssessmentOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type VendorReference

type VendorReference struct {
	Link  *string `json:"link,omitempty"`
	Title *string `json:"title,omitempty"`
}

Jump to

Keyboard shortcuts

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