adaptivenetworkhardenings

package
v0.20240125.1172517 Latest Latest
Warning

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

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

README

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

The adaptivenetworkhardenings 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/adaptivenetworkhardenings"

Client Initialization

client := adaptivenetworkhardenings.NewAdaptiveNetworkHardeningsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AdaptiveNetworkHardeningsClient.Enforce

ctx := context.TODO()
id := adaptivenetworkhardenings.NewScopedAdaptiveNetworkHardeningID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "adaptiveNetworkHardeningValue")

payload := adaptivenetworkhardenings.AdaptiveNetworkHardeningEnforceRequest{
	// ...
}


if err := client.EnforceThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: AdaptiveNetworkHardeningsClient.Get

ctx := context.TODO()
id := adaptivenetworkhardenings.NewScopedAdaptiveNetworkHardeningID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "adaptiveNetworkHardeningValue")

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: AdaptiveNetworkHardeningsClient.ListByExtendedResource

ctx := context.TODO()
id := adaptivenetworkhardenings.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

func PossibleValuesForDirection() []string

func PossibleValuesForTransportProtocol

func PossibleValuesForTransportProtocol() []string

func ValidateScopedAdaptiveNetworkHardeningID

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

ValidateScopedAdaptiveNetworkHardeningID checks that 'input' can be parsed as a Scoped Adaptive Network Hardening ID

Types

type AdaptiveNetworkHardening

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

type AdaptiveNetworkHardeningEnforceRequest

type AdaptiveNetworkHardeningEnforceRequest struct {
	NetworkSecurityGroups []string `json:"networkSecurityGroups"`
	Rules                 []Rule   `json:"rules"`
}

type AdaptiveNetworkHardeningOperationPredicate

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

func (AdaptiveNetworkHardeningOperationPredicate) Matches

type AdaptiveNetworkHardeningProperties

type AdaptiveNetworkHardeningProperties struct {
	EffectiveNetworkSecurityGroups *[]EffectiveNetworkSecurityGroups `json:"effectiveNetworkSecurityGroups,omitempty"`
	Rules                          *[]Rule                           `json:"rules,omitempty"`
	RulesCalculationTime           *string                           `json:"rulesCalculationTime,omitempty"`
}

func (*AdaptiveNetworkHardeningProperties) GetRulesCalculationTimeAsTime

func (o *AdaptiveNetworkHardeningProperties) GetRulesCalculationTimeAsTime() (*time.Time, error)

func (*AdaptiveNetworkHardeningProperties) SetRulesCalculationTimeAsTime

func (o *AdaptiveNetworkHardeningProperties) SetRulesCalculationTimeAsTime(input time.Time)

type AdaptiveNetworkHardeningsClient

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

func NewAdaptiveNetworkHardeningsClientWithBaseURI

func NewAdaptiveNetworkHardeningsClientWithBaseURI(endpoint string) AdaptiveNetworkHardeningsClient

func (AdaptiveNetworkHardeningsClient) Enforce

Enforce ...

func (AdaptiveNetworkHardeningsClient) EnforceThenPoll

EnforceThenPoll performs Enforce then polls until it's completed

func (AdaptiveNetworkHardeningsClient) Get

Get ...

func (AdaptiveNetworkHardeningsClient) ListByExtendedResource

ListByExtendedResource ...

func (AdaptiveNetworkHardeningsClient) ListByExtendedResourceComplete

ListByExtendedResourceComplete retrieves all of the results into a single object

func (AdaptiveNetworkHardeningsClient) ListByExtendedResourceCompleteMatchingPredicate

func (c AdaptiveNetworkHardeningsClient) ListByExtendedResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate AdaptiveNetworkHardeningOperationPredicate) (resp ListByExtendedResourceCompleteResult, err error)

ListByExtendedResourceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type Direction

type Direction string
const (
	DirectionInbound  Direction = "Inbound"
	DirectionOutbound Direction = "Outbound"
)

type EffectiveNetworkSecurityGroups

type EffectiveNetworkSecurityGroups struct {
	NetworkInterface      *string   `json:"networkInterface,omitempty"`
	NetworkSecurityGroups *[]string `json:"networkSecurityGroups,omitempty"`
}

type EnforceOperationResponse

type EnforceOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListByExtendedResourceCompleteResult

type ListByExtendedResourceCompleteResult struct {
	Items []AdaptiveNetworkHardening
}

type ListByExtendedResourceOperationResponse

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

func (ListByExtendedResourceOperationResponse) HasMore

func (ListByExtendedResourceOperationResponse) LoadMore

type Rule

type Rule struct {
	DestinationPort *int64               `json:"destinationPort,omitempty"`
	Direction       *Direction           `json:"direction,omitempty"`
	IPAddresses     *[]string            `json:"ipAddresses,omitempty"`
	Name            *string              `json:"name,omitempty"`
	Protocols       *[]TransportProtocol `json:"protocols,omitempty"`
}

type ScopedAdaptiveNetworkHardeningId

type ScopedAdaptiveNetworkHardeningId struct {
	Scope                        string
	AdaptiveNetworkHardeningName string
}

ScopedAdaptiveNetworkHardeningId is a struct representing the Resource ID for a Scoped Adaptive Network Hardening

func NewScopedAdaptiveNetworkHardeningID

func NewScopedAdaptiveNetworkHardeningID(scope string, adaptiveNetworkHardeningName string) ScopedAdaptiveNetworkHardeningId

NewScopedAdaptiveNetworkHardeningID returns a new ScopedAdaptiveNetworkHardeningId struct

func ParseScopedAdaptiveNetworkHardeningID

func ParseScopedAdaptiveNetworkHardeningID(input string) (*ScopedAdaptiveNetworkHardeningId, error)

ParseScopedAdaptiveNetworkHardeningID parses 'input' into a ScopedAdaptiveNetworkHardeningId

func ParseScopedAdaptiveNetworkHardeningIDInsensitively

func ParseScopedAdaptiveNetworkHardeningIDInsensitively(input string) (*ScopedAdaptiveNetworkHardeningId, error)

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

func (*ScopedAdaptiveNetworkHardeningId) FromParseResult

func (ScopedAdaptiveNetworkHardeningId) ID

ID returns the formatted Scoped Adaptive Network Hardening ID

func (ScopedAdaptiveNetworkHardeningId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Adaptive Network Hardening ID

func (ScopedAdaptiveNetworkHardeningId) String

String returns a human-readable description of this Scoped Adaptive Network Hardening ID

type TransportProtocol

type TransportProtocol string
const (
	TransportProtocolTCP TransportProtocol = "TCP"
	TransportProtocolUDP TransportProtocol = "UDP"
)

Jump to

Keyboard shortcuts

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