assessments

package
v0.20230504.1091605 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MPL-2.0 Imports: 9 Imported by: 1

README

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

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

Client Initialization

client := assessments.NewAssessmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AssessmentsClient.CreateOrUpdate

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

payload := assessments.SecurityAssessment{
	// ...
}


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: AssessmentsClient.Delete

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

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: AssessmentsClient.Get

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

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

Example Usage: AssessmentsClient.List

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

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAssessmentStatusCode

func PossibleValuesForAssessmentStatusCode() []string

func PossibleValuesForExpandEnum

func PossibleValuesForExpandEnum() []string

func PossibleValuesForSource

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

Types

type AssessmentLinks struct {
	AzurePortalUri *string `json:"azurePortalUri,omitempty"`
}

type AssessmentStatus

type AssessmentStatus struct {
	Cause       *string              `json:"cause,omitempty"`
	Code        AssessmentStatusCode `json:"code"`
	Description *string              `json:"description,omitempty"`
}

type AssessmentStatusCode

type AssessmentStatusCode string
const (
	AssessmentStatusCodeHealthy       AssessmentStatusCode = "Healthy"
	AssessmentStatusCodeNotApplicable AssessmentStatusCode = "NotApplicable"
	AssessmentStatusCodeUnhealthy     AssessmentStatusCode = "Unhealthy"
)

type AssessmentsClient

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

func NewAssessmentsClientWithBaseURI

func NewAssessmentsClientWithBaseURI(endpoint string) AssessmentsClient

func (AssessmentsClient) CreateOrUpdate

CreateOrUpdate ...

func (AssessmentsClient) Delete

Delete ...

func (AssessmentsClient) Get

Get ...

func (AssessmentsClient) List

List ...

func (AssessmentsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (AssessmentsClient) ListCompleteMatchingPredicate

func (c AssessmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate SecurityAssessmentOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *SecurityAssessment
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type ExpandEnum

type ExpandEnum string
const (
	ExpandEnumLinks    ExpandEnum = "links"
	ExpandEnumMetadata ExpandEnum = "metadata"
)

type GetOperationOptions

type GetOperationOptions struct {
	Expand *ExpandEnum
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []SecurityAssessment
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]SecurityAssessment
	// 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 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 SecurityAssessment

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

type SecurityAssessmentOperationPredicate

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

func (SecurityAssessmentOperationPredicate) Matches

type SecurityAssessmentProperties

type SecurityAssessmentProperties struct {
	AdditionalData  *map[string]string `json:"additionalData,omitempty"`
	DisplayName     *string            `json:"displayName,omitempty"`
	Links           *AssessmentLinks   `json:"links,omitempty"`
	ResourceDetails ResourceDetails    `json:"resourceDetails"`
	Status          AssessmentStatus   `json:"status"`
}

type Source

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

Jump to

Keyboard shortcuts

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