securescore

package
v0.20230524.1231843 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/securescore Documentation

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

Client Initialization

client := securescore.NewSecureScoreClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecureScoreClient.SecureScoreControlsListBySecureScore

ctx := context.TODO()
id := securescore.NewSecureScoreID("12345678-1234-9876-4563-123456789012", "secureScoreValue")

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

Example Usage: SecureScoreClient.SecureScoresGet

ctx := context.TODO()
id := securescore.NewSecureScoreID("12345678-1234-9876-4563-123456789012", "secureScoreValue")

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

Example Usage: SecureScoreClient.SecureScoresList

ctx := context.TODO()
id := securescore.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

func PossibleValuesForControlType() []string

func PossibleValuesForExpandControlsEnum

func PossibleValuesForExpandControlsEnum() []string

func ValidateSecureScoreID

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

ValidateSecureScoreID checks that 'input' can be parsed as a Secure Score ID

Types

type AzureResourceLink struct {
	Id *string `json:"id,omitempty"`
}

type ControlType

type ControlType string
const (
	ControlTypeBuiltIn ControlType = "BuiltIn"
	ControlTypeCustom  ControlType = "Custom"
)

type ExpandControlsEnum

type ExpandControlsEnum string
const (
	ExpandControlsEnumDefinition ExpandControlsEnum = "definition"
)

type ScoreDetails

type ScoreDetails struct {
	Current    *float64 `json:"current,omitempty"`
	Max        *int64   `json:"max,omitempty"`
	Percentage *float64 `json:"percentage,omitempty"`
}

type SecureScoreClient

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

func NewSecureScoreClientWithBaseURI

func NewSecureScoreClientWithBaseURI(endpoint string) SecureScoreClient

func (SecureScoreClient) SecureScoreControlsListBySecureScore

SecureScoreControlsListBySecureScore ...

func (SecureScoreClient) SecureScoreControlsListBySecureScoreComplete

SecureScoreControlsListBySecureScoreComplete retrieves all of the results into a single object

func (SecureScoreClient) SecureScoreControlsListBySecureScoreCompleteMatchingPredicate

SecureScoreControlsListBySecureScoreCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SecureScoreClient) SecureScoresGet

func (c SecureScoreClient) SecureScoresGet(ctx context.Context, id SecureScoreId) (result SecureScoresGetOperationResponse, err error)

SecureScoresGet ...

func (SecureScoreClient) SecureScoresList

SecureScoresList ...

func (SecureScoreClient) SecureScoresListComplete

SecureScoresListComplete retrieves all of the results into a single object

func (SecureScoreClient) SecureScoresListCompleteMatchingPredicate

func (c SecureScoreClient) SecureScoresListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SecureScoreItemOperationPredicate) (resp SecureScoresListCompleteResult, err error)

SecureScoresListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type SecureScoreControlDefinitionItem

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

type SecureScoreControlDefinitionItemProperties

type SecureScoreControlDefinitionItemProperties struct {
	AssessmentDefinitions *[]AzureResourceLink                `json:"assessmentDefinitions,omitempty"`
	Description           *string                             `json:"description,omitempty"`
	DisplayName           *string                             `json:"displayName,omitempty"`
	MaxScore              *int64                              `json:"maxScore,omitempty"`
	Source                *SecureScoreControlDefinitionSource `json:"source,omitempty"`
}

type SecureScoreControlDefinitionSource

type SecureScoreControlDefinitionSource struct {
	SourceType *ControlType `json:"sourceType,omitempty"`
}

type SecureScoreControlDetails

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

type SecureScoreControlDetailsOperationPredicate

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

func (SecureScoreControlDetailsOperationPredicate) Matches

type SecureScoreControlScoreDetails

type SecureScoreControlScoreDetails struct {
	Definition                 *SecureScoreControlDefinitionItem `json:"definition,omitempty"`
	DisplayName                *string                           `json:"displayName,omitempty"`
	HealthyResourceCount       *int64                            `json:"healthyResourceCount,omitempty"`
	NotApplicableResourceCount *int64                            `json:"notApplicableResourceCount,omitempty"`
	Score                      *ScoreDetails                     `json:"score,omitempty"`
	UnhealthyResourceCount     *int64                            `json:"unhealthyResourceCount,omitempty"`
	Weight                     *int64                            `json:"weight,omitempty"`
}

type SecureScoreControlsListBySecureScoreCompleteResult

type SecureScoreControlsListBySecureScoreCompleteResult struct {
	Items []SecureScoreControlDetails
}

type SecureScoreControlsListBySecureScoreOperationOptions

type SecureScoreControlsListBySecureScoreOperationOptions struct {
	Expand *ExpandControlsEnum
}

func DefaultSecureScoreControlsListBySecureScoreOperationOptions

func DefaultSecureScoreControlsListBySecureScoreOperationOptions() SecureScoreControlsListBySecureScoreOperationOptions

type SecureScoreControlsListBySecureScoreOperationResponse

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

func (SecureScoreControlsListBySecureScoreOperationResponse) HasMore

func (SecureScoreControlsListBySecureScoreOperationResponse) LoadMore

type SecureScoreId

type SecureScoreId struct {
	SubscriptionId  string
	SecureScoreName string
}

SecureScoreId is a struct representing the Resource ID for a Secure Score

func NewSecureScoreID

func NewSecureScoreID(subscriptionId string, secureScoreName string) SecureScoreId

NewSecureScoreID returns a new SecureScoreId struct

func ParseSecureScoreID

func ParseSecureScoreID(input string) (*SecureScoreId, error)

ParseSecureScoreID parses 'input' into a SecureScoreId

func ParseSecureScoreIDInsensitively

func ParseSecureScoreIDInsensitively(input string) (*SecureScoreId, error)

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

func (SecureScoreId) ID

func (id SecureScoreId) ID() string

ID returns the formatted Secure Score ID

func (SecureScoreId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Secure Score ID

func (SecureScoreId) String

func (id SecureScoreId) String() string

String returns a human-readable description of this Secure Score ID

type SecureScoreItem

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

type SecureScoreItemOperationPredicate

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

func (SecureScoreItemOperationPredicate) Matches

type SecureScoreItemProperties

type SecureScoreItemProperties struct {
	DisplayName *string       `json:"displayName,omitempty"`
	Score       *ScoreDetails `json:"score,omitempty"`
	Weight      *int64        `json:"weight,omitempty"`
}

type SecureScoresGetOperationResponse

type SecureScoresGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *SecureScoreItem
}

type SecureScoresListCompleteResult

type SecureScoresListCompleteResult struct {
	Items []SecureScoreItem
}

type SecureScoresListOperationResponse

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

func (SecureScoresListOperationResponse) HasMore

func (SecureScoresListOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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