customrecommendations

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2024-08-01/customrecommendations Documentation

The customrecommendations SDK allows for interaction with Azure Resource Manager security (API Version 2024-08-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/security/2024-08-01/customrecommendations"

Client Initialization

client := customrecommendations.NewCustomRecommendationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CustomRecommendationsClient.CreateOrUpdate

ctx := context.TODO()
id := customrecommendations.NewScopedCustomRecommendationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "customRecommendationName")

payload := customrecommendations.CustomRecommendation{
	// ...
}


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

ctx := context.TODO()
id := customrecommendations.NewScopedCustomRecommendationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "customRecommendationName")

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

ctx := context.TODO()
id := customrecommendations.NewScopedCustomRecommendationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "customRecommendationName")

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

ctx := context.TODO()
id := commonids.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 PossibleValuesForRecommendationSupportedClouds

func PossibleValuesForRecommendationSupportedClouds() []string

func PossibleValuesForSecurityIssue

func PossibleValuesForSecurityIssue() []string

func PossibleValuesForSeverityEnum

func PossibleValuesForSeverityEnum() []string

func ValidateScopedCustomRecommendationID

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

ValidateScopedCustomRecommendationID checks that 'input' can be parsed as a Scoped Custom Recommendation ID

Types

type CreateOrUpdateOperationResponse

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

type CustomRecommendation

type CustomRecommendation struct {
	Id         *string                         `json:"id,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties *CustomRecommendationProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData          `json:"systemData,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type CustomRecommendationOperationPredicate

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

func (CustomRecommendationOperationPredicate) Matches

type CustomRecommendationProperties

type CustomRecommendationProperties struct {
	AssessmentKey          *string                          `json:"assessmentKey,omitempty"`
	CloudProviders         *[]RecommendationSupportedClouds `json:"cloudProviders,omitempty"`
	Description            *string                          `json:"description,omitempty"`
	DisplayName            *string                          `json:"displayName,omitempty"`
	Query                  *string                          `json:"query,omitempty"`
	RemediationDescription *string                          `json:"remediationDescription,omitempty"`
	SecurityIssue          *SecurityIssue                   `json:"securityIssue,omitempty"`
	Severity               *SeverityEnum                    `json:"severity,omitempty"`
}

type CustomRecommendationsClient

type CustomRecommendationsClient struct {
	Client *resourcemanager.Client
}

func NewCustomRecommendationsClientWithBaseURI

func NewCustomRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomRecommendationsClient, error)

func (CustomRecommendationsClient) CreateOrUpdate

CreateOrUpdate ...

func (CustomRecommendationsClient) Delete

Delete ...

func (CustomRecommendationsClient) Get

Get ...

func (CustomRecommendationsClient) List

List ...

func (CustomRecommendationsClient) ListComplete

ListComplete retrieves all the results into a single object

func (CustomRecommendationsClient) ListCompleteMatchingPredicate

func (c CustomRecommendationsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate CustomRecommendationOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CustomRecommendation
}

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CustomRecommendation
}

type RecommendationSupportedClouds

type RecommendationSupportedClouds string
const (
	RecommendationSupportedCloudsAWS   RecommendationSupportedClouds = "AWS"
	RecommendationSupportedCloudsAzure RecommendationSupportedClouds = "Azure"
	RecommendationSupportedCloudsGCP   RecommendationSupportedClouds = "GCP"
)

func (*RecommendationSupportedClouds) UnmarshalJSON

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

type ScopedCustomRecommendationId

type ScopedCustomRecommendationId struct {
	Scope                    string
	CustomRecommendationName string
}

ScopedCustomRecommendationId is a struct representing the Resource ID for a Scoped Custom Recommendation

func NewScopedCustomRecommendationID

func NewScopedCustomRecommendationID(scope string, customRecommendationName string) ScopedCustomRecommendationId

NewScopedCustomRecommendationID returns a new ScopedCustomRecommendationId struct

func ParseScopedCustomRecommendationID

func ParseScopedCustomRecommendationID(input string) (*ScopedCustomRecommendationId, error)

ParseScopedCustomRecommendationID parses 'input' into a ScopedCustomRecommendationId

func ParseScopedCustomRecommendationIDInsensitively

func ParseScopedCustomRecommendationIDInsensitively(input string) (*ScopedCustomRecommendationId, error)

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

func (*ScopedCustomRecommendationId) FromParseResult

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

func (ScopedCustomRecommendationId) ID

ID returns the formatted Scoped Custom Recommendation ID

func (ScopedCustomRecommendationId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Custom Recommendation ID

func (ScopedCustomRecommendationId) String

String returns a human-readable description of this Scoped Custom Recommendation ID

type SecurityIssue

type SecurityIssue string
const (
	SecurityIssueAnonymousAccess      SecurityIssue = "AnonymousAccess"
	SecurityIssueBestPractices        SecurityIssue = "BestPractices"
	SecurityIssueExcessivePermissions SecurityIssue = "ExcessivePermissions"
	SecurityIssueNetworkExposure      SecurityIssue = "NetworkExposure"
	SecurityIssueTrafficEncryption    SecurityIssue = "TrafficEncryption"
	SecurityIssueVulnerability        SecurityIssue = "Vulnerability"
)

func (*SecurityIssue) UnmarshalJSON

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

type SeverityEnum

type SeverityEnum string
const (
	SeverityEnumHigh   SeverityEnum = "High"
	SeverityEnumLow    SeverityEnum = "Low"
	SeverityEnumMedium SeverityEnum = "Medium"
)

func (*SeverityEnum) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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