adaptivenetworkhardenings

package
v0.20230530.1105843 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

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.NewAdaptiveNetworkHardeningID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "resourceTypeValue", "resourceValue", "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.NewAdaptiveNetworkHardeningID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "resourceTypeValue", "resourceValue", "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.NewProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "resourceTypeValue", "resourceValue")

// 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 ValidateAdaptiveNetworkHardeningID

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

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

func ValidateProviderID

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

ValidateProviderID checks that 'input' can be parsed as a Provider 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 AdaptiveNetworkHardeningId

type AdaptiveNetworkHardeningId struct {
	SubscriptionId               string
	ResourceGroupName            string
	ProviderName                 string
	ResourceType                 string
	ResourceName                 string
	AdaptiveNetworkHardeningName string
}

AdaptiveNetworkHardeningId is a struct representing the Resource ID for a Adaptive Network Hardening

func NewAdaptiveNetworkHardeningID

func NewAdaptiveNetworkHardeningID(subscriptionId string, resourceGroupName string, providerName string, resourceType string, resourceName string, adaptiveNetworkHardeningName string) AdaptiveNetworkHardeningId

NewAdaptiveNetworkHardeningID returns a new AdaptiveNetworkHardeningId struct

func ParseAdaptiveNetworkHardeningID

func ParseAdaptiveNetworkHardeningID(input string) (*AdaptiveNetworkHardeningId, error)

ParseAdaptiveNetworkHardeningID parses 'input' into a AdaptiveNetworkHardeningId

func ParseAdaptiveNetworkHardeningIDInsensitively

func ParseAdaptiveNetworkHardeningIDInsensitively(input string) (*AdaptiveNetworkHardeningId, error)

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

func (AdaptiveNetworkHardeningId) ID

ID returns the formatted Adaptive Network Hardening ID

func (AdaptiveNetworkHardeningId) Segments

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

func (AdaptiveNetworkHardeningId) String

func (id AdaptiveNetworkHardeningId) String() string

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

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 ProviderId, 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 ProviderId

type ProviderId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProviderName      string
	ResourceType      string
	ResourceName      string
}

ProviderId is a struct representing the Resource ID for a Provider

func NewProviderID

func NewProviderID(subscriptionId string, resourceGroupName string, providerName string, resourceType string, resourceName string) ProviderId

NewProviderID returns a new ProviderId struct

func ParseProviderID

func ParseProviderID(input string) (*ProviderId, error)

ParseProviderID parses 'input' into a ProviderId

func ParseProviderIDInsensitively

func ParseProviderIDInsensitively(input string) (*ProviderId, error)

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

func (ProviderId) ID

func (id ProviderId) ID() string

ID returns the formatted Provider ID

func (ProviderId) Segments

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

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

func (ProviderId) String

func (id ProviderId) String() string

String returns a human-readable description of this Provider ID

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