devicesecuritygroups

package
v0.20240416.1114103 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2017-08-01-preview/devicesecuritygroups Documentation

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

Client Initialization

client := devicesecuritygroups.NewDeviceSecurityGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DeviceSecurityGroupsClient.CreateOrUpdate

ctx := context.TODO()
id := devicesecuritygroups.NewScopedDeviceSecurityGroupID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "deviceSecurityGroupValue")

payload := devicesecuritygroups.DeviceSecurityGroup{
	// ...
}


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

ctx := context.TODO()
id := devicesecuritygroups.NewScopedDeviceSecurityGroupID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "deviceSecurityGroupValue")

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

ctx := context.TODO()
id := devicesecuritygroups.NewScopedDeviceSecurityGroupID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "deviceSecurityGroupValue")

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: DeviceSecurityGroupsClient.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 PossibleValuesForValueType

func PossibleValuesForValueType() []string

func ValidateScopedDeviceSecurityGroupID

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

ValidateScopedDeviceSecurityGroupID checks that 'input' can be parsed as a Scoped Device Security Group ID

Types

type AllowlistCustomAlertRule

type AllowlistCustomAlertRule struct {
	AllowlistValues []string   `json:"allowlistValues"`
	Description     *string    `json:"description,omitempty"`
	DisplayName     *string    `json:"displayName,omitempty"`
	IsEnabled       bool       `json:"isEnabled"`
	RuleType        string     `json:"ruleType"`
	ValueType       *ValueType `json:"valueType,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DenylistCustomAlertRule

type DenylistCustomAlertRule struct {
	DenylistValues []string   `json:"denylistValues"`
	Description    *string    `json:"description,omitempty"`
	DisplayName    *string    `json:"displayName,omitempty"`
	IsEnabled      bool       `json:"isEnabled"`
	RuleType       string     `json:"ruleType"`
	ValueType      *ValueType `json:"valueType,omitempty"`
}

type DeviceSecurityGroup

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

type DeviceSecurityGroupOperationPredicate

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

func (DeviceSecurityGroupOperationPredicate) Matches

type DeviceSecurityGroupProperties

type DeviceSecurityGroupProperties struct {
	AllowlistRules  *[]AllowlistCustomAlertRule  `json:"allowlistRules,omitempty"`
	DenylistRules   *[]DenylistCustomAlertRule   `json:"denylistRules,omitempty"`
	ThresholdRules  *[]ThresholdCustomAlertRule  `json:"thresholdRules,omitempty"`
	TimeWindowRules *[]TimeWindowCustomAlertRule `json:"timeWindowRules,omitempty"`
}

type DeviceSecurityGroupsClient

type DeviceSecurityGroupsClient struct {
	Client *resourcemanager.Client
}

func NewDeviceSecurityGroupsClientWithBaseURI

func NewDeviceSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceSecurityGroupsClient, error)

func (DeviceSecurityGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (DeviceSecurityGroupsClient) Delete

Delete ...

func (DeviceSecurityGroupsClient) Get

Get ...

func (DeviceSecurityGroupsClient) List

List ...

func (DeviceSecurityGroupsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DeviceSecurityGroupsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type ScopedDeviceSecurityGroupId

type ScopedDeviceSecurityGroupId struct {
	ResourceId              string
	DeviceSecurityGroupName string
}

ScopedDeviceSecurityGroupId is a struct representing the Resource ID for a Scoped Device Security Group

func NewScopedDeviceSecurityGroupID

func NewScopedDeviceSecurityGroupID(resourceId string, deviceSecurityGroupName string) ScopedDeviceSecurityGroupId

NewScopedDeviceSecurityGroupID returns a new ScopedDeviceSecurityGroupId struct

func ParseScopedDeviceSecurityGroupID

func ParseScopedDeviceSecurityGroupID(input string) (*ScopedDeviceSecurityGroupId, error)

ParseScopedDeviceSecurityGroupID parses 'input' into a ScopedDeviceSecurityGroupId

func ParseScopedDeviceSecurityGroupIDInsensitively

func ParseScopedDeviceSecurityGroupIDInsensitively(input string) (*ScopedDeviceSecurityGroupId, error)

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

func (*ScopedDeviceSecurityGroupId) FromParseResult

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

func (ScopedDeviceSecurityGroupId) ID

ID returns the formatted Scoped Device Security Group ID

func (ScopedDeviceSecurityGroupId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Device Security Group ID

func (ScopedDeviceSecurityGroupId) String

func (id ScopedDeviceSecurityGroupId) String() string

String returns a human-readable description of this Scoped Device Security Group ID

type ThresholdCustomAlertRule

type ThresholdCustomAlertRule struct {
	Description  *string `json:"description,omitempty"`
	DisplayName  *string `json:"displayName,omitempty"`
	IsEnabled    bool    `json:"isEnabled"`
	MaxThreshold int64   `json:"maxThreshold"`
	MinThreshold int64   `json:"minThreshold"`
	RuleType     string  `json:"ruleType"`
}

type TimeWindowCustomAlertRule

type TimeWindowCustomAlertRule struct {
	Description    *string `json:"description,omitempty"`
	DisplayName    *string `json:"displayName,omitempty"`
	IsEnabled      bool    `json:"isEnabled"`
	MaxThreshold   int64   `json:"maxThreshold"`
	MinThreshold   int64   `json:"minThreshold"`
	RuleType       string  `json:"ruleType"`
	TimeWindowSize string  `json:"timeWindowSize"`
}

type ValueType

type ValueType string
const (
	ValueTypeIPCidr ValueType = "IpCidr"
	ValueTypeString ValueType = "String"
)

func (*ValueType) UnmarshalJSON added in v0.20240228.1142829

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

Jump to

Keyboard shortcuts

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