devicesecuritygroups

package
v0.20230822.1152634 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MPL-2.0 Imports: 9 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-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 := devicesecuritygroups.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,omitempty"`
	RuleType        *string    `json:"ruleType,omitempty"`
	ValueType       *ValueType `json:"valueType,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type DenylistCustomAlertRule

type DenylistCustomAlertRule struct {
	DenylistValues []string   `json:"denylistValues"`
	Description    *string    `json:"description,omitempty"`
	DisplayName    *string    `json:"displayName,omitempty"`
	IsEnabled      *bool      `json:"isEnabled,omitempty"`
	RuleType       *string    `json:"ruleType,omitempty"`
	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 autorest.Client
	// contains filtered or unexported fields
}

func NewDeviceSecurityGroupsClientWithBaseURI

func NewDeviceSecurityGroupsClientWithBaseURI(endpoint string) DeviceSecurityGroupsClient

func (DeviceSecurityGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (DeviceSecurityGroupsClient) Delete

Delete ...

func (DeviceSecurityGroupsClient) Get

Get ...

func (DeviceSecurityGroupsClient) List

List ...

func (DeviceSecurityGroupsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (DeviceSecurityGroupsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []DeviceSecurityGroup
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DeviceSecurityGroup
	// 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 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) 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,omitempty"`
	MaxThreshold   int64   `json:"maxThreshold"`
	MinThreshold   int64   `json:"minThreshold"`
	RuleType       *string `json:"ruleType,omitempty"`
	TimeWindowSize string  `json:"timeWindowSize"`
}

type ValueType

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

Jump to

Keyboard shortcuts

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