settings

package
v0.20240521.1173452 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2022-05-01/settings Documentation

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

Client Initialization

client := settings.NewSettingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SettingsClient.Get

ctx := context.TODO()
id := settings.NewSettingID("12345678-1234-9876-4563-123456789012", "MCAS")

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

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

// 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: SettingsClient.Update

ctx := context.TODO()
id := settings.NewSettingID("12345678-1234-9876-4563-123456789012", "MCAS")

payload := settings.Setting{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForSettingKind

func PossibleValuesForSettingKind() []string

func PossibleValuesForSettingName

func PossibleValuesForSettingName() []string

func ValidateSettingID

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

ValidateSettingID checks that 'input' can be parsed as a Setting ID

Types

type AlertSyncSettingProperties

type AlertSyncSettingProperties struct {
	Enabled bool `json:"enabled"`
}

type AlertSyncSettings

type AlertSyncSettings struct {
	Properties *AlertSyncSettingProperties `json:"properties,omitempty"`

	// Fields inherited from Setting
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (AlertSyncSettings) MarshalJSON

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

type DataExportSettingProperties

type DataExportSettingProperties struct {
	Enabled bool `json:"enabled"`
}

type DataExportSettings

type DataExportSettings struct {
	Properties *DataExportSettingProperties `json:"properties,omitempty"`

	// Fields inherited from Setting
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (DataExportSettings) MarshalJSON

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

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type RawSettingImpl

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

RawSettingImpl 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 Setting

type Setting interface {
}

type SettingId

type SettingId struct {
	SubscriptionId string
	SettingName    SettingName
}

SettingId is a struct representing the Resource ID for a Setting

func NewSettingID

func NewSettingID(subscriptionId string, settingName SettingName) SettingId

NewSettingID returns a new SettingId struct

func ParseSettingID

func ParseSettingID(input string) (*SettingId, error)

ParseSettingID parses 'input' into a SettingId

func ParseSettingIDInsensitively

func ParseSettingIDInsensitively(input string) (*SettingId, error)

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

func (*SettingId) FromParseResult

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

func (SettingId) ID

func (id SettingId) ID() string

ID returns the formatted Setting ID

func (SettingId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Setting ID

func (SettingId) String

func (id SettingId) String() string

String returns a human-readable description of this Setting ID

type SettingKind

type SettingKind string
const (
	SettingKindAlertSuppressionSetting SettingKind = "AlertSuppressionSetting"
	SettingKindAlertSyncSettings       SettingKind = "AlertSyncSettings"
	SettingKindDataExportSettings      SettingKind = "DataExportSettings"
)

func (*SettingKind) UnmarshalJSON added in v0.20240228.1142829

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

type SettingName

type SettingName string
const (
	SettingNameMCAS                           SettingName = "MCAS"
	SettingNameSentinel                       SettingName = "Sentinel"
	SettingNameWDATP                          SettingName = "WDATP"
	SettingNameWDATPEXCLUDELINUXPUBLICPREVIEW SettingName = "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW"
	SettingNameWDATPUNIFIEDSOLUTION           SettingName = "WDATP_UNIFIED_SOLUTION"
)

func (*SettingName) UnmarshalJSON added in v0.20240228.1142829

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

type SettingOperationPredicate

type SettingOperationPredicate struct {
}

func (SettingOperationPredicate) Matches

func (p SettingOperationPredicate) Matches(input Setting) bool

type SettingsClient

type SettingsClient struct {
	Client *resourcemanager.Client
}

func NewSettingsClientWithBaseURI

func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error)

func (SettingsClient) Get

func (c SettingsClient) Get(ctx context.Context, id SettingId) (result GetOperationResponse, err error)

Get ...

func (SettingsClient) List

List ...

func (SettingsClient) ListComplete

ListComplete retrieves all the results into a single object

func (SettingsClient) ListCompleteMatchingPredicate

func (c SettingsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SettingOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SettingsClient) Update

func (c SettingsClient) Update(ctx context.Context, id SettingId, input Setting) (result UpdateOperationResponse, err error)

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Setting
}

Jump to

Keyboard shortcuts

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