flowlogs

package
v0.20240312.1134121 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/flowlogs Documentation

The flowlogs SDK allows for interaction with the Azure Resource Manager Service network (API Version 2023-09-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/network/2023-09-01/flowlogs"

Client Initialization

client := flowlogs.NewFlowLogsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FlowLogsClient.CreateOrUpdate

ctx := context.TODO()
id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue")

payload := flowlogs.FlowLog{
	// ...
}


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

Example Usage: FlowLogsClient.Delete

ctx := context.TODO()
id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue")

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

Example Usage: FlowLogsClient.Get

ctx := context.TODO()
id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue")

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

ctx := context.TODO()
id := flowlogs.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue")

// 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: FlowLogsClient.UpdateTags

ctx := context.TODO()
id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue")

payload := flowlogs.TagsObject{
	// ...
}


read, err := client.UpdateTags(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 PossibleValuesForFlowLogFormatType

func PossibleValuesForFlowLogFormatType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateFlowLogID

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

ValidateFlowLogID checks that 'input' can be parsed as a Flow Log ID

func ValidateNetworkWatcherID

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

ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FlowLog
}

type DeleteOperationResponse

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

type FlowLog

type FlowLog struct {
	Etag       *string                  `json:"etag,omitempty"`
	Id         *string                  `json:"id,omitempty"`
	Location   *string                  `json:"location,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *FlowLogPropertiesFormat `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type FlowLogFormatParameters

type FlowLogFormatParameters struct {
	Type    *FlowLogFormatType `json:"type,omitempty"`
	Version *int64             `json:"version,omitempty"`
}

type FlowLogFormatType

type FlowLogFormatType string
const (
	FlowLogFormatTypeJSON FlowLogFormatType = "JSON"
)

func (*FlowLogFormatType) UnmarshalJSON

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

type FlowLogId

type FlowLogId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkWatcherName string
	FlowLogName        string
}

FlowLogId is a struct representing the Resource ID for a Flow Log

func NewFlowLogID

func NewFlowLogID(subscriptionId string, resourceGroupName string, networkWatcherName string, flowLogName string) FlowLogId

NewFlowLogID returns a new FlowLogId struct

func ParseFlowLogID

func ParseFlowLogID(input string) (*FlowLogId, error)

ParseFlowLogID parses 'input' into a FlowLogId

func ParseFlowLogIDInsensitively

func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error)

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

func (*FlowLogId) FromParseResult

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

func (FlowLogId) ID

func (id FlowLogId) ID() string

ID returns the formatted Flow Log ID

func (FlowLogId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Flow Log ID

func (FlowLogId) String

func (id FlowLogId) String() string

String returns a human-readable description of this Flow Log ID

type FlowLogOperationPredicate

type FlowLogOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (FlowLogOperationPredicate) Matches

func (p FlowLogOperationPredicate) Matches(input FlowLog) bool

type FlowLogPropertiesFormat

type FlowLogPropertiesFormat struct {
	Enabled                    *bool                       `json:"enabled,omitempty"`
	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
	Format                     *FlowLogFormatParameters    `json:"format,omitempty"`
	ProvisioningState          *ProvisioningState          `json:"provisioningState,omitempty"`
	RetentionPolicy            *RetentionPolicyParameters  `json:"retentionPolicy,omitempty"`
	StorageId                  string                      `json:"storageId"`
	TargetResourceGuid         *string                     `json:"targetResourceGuid,omitempty"`
	TargetResourceId           string                      `json:"targetResourceId"`
}

type FlowLogsClient

type FlowLogsClient struct {
	Client *resourcemanager.Client
}

func NewFlowLogsClientWithBaseURI

func NewFlowLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*FlowLogsClient, error)

func (FlowLogsClient) CreateOrUpdate

func (c FlowLogsClient) CreateOrUpdate(ctx context.Context, id FlowLogId, input FlowLog) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (FlowLogsClient) CreateOrUpdateThenPoll

func (c FlowLogsClient) CreateOrUpdateThenPoll(ctx context.Context, id FlowLogId, input FlowLog) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (FlowLogsClient) Delete

func (c FlowLogsClient) Delete(ctx context.Context, id FlowLogId) (result DeleteOperationResponse, err error)

Delete ...

func (FlowLogsClient) DeleteThenPoll

func (c FlowLogsClient) DeleteThenPoll(ctx context.Context, id FlowLogId) error

DeleteThenPoll performs Delete then polls until it's completed

func (FlowLogsClient) Get

func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperationResponse, err error)

Get ...

func (FlowLogsClient) List

List ...

func (FlowLogsClient) ListComplete

ListComplete retrieves all the results into a single object

func (FlowLogsClient) ListCompleteMatchingPredicate

func (c FlowLogsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkWatcherId, predicate FlowLogOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FlowLogsClient) UpdateTags

func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input TagsObject) (result UpdateTagsOperationResponse, err error)

UpdateTags ...

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type NetworkWatcherId

type NetworkWatcherId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkWatcherName string
}

NetworkWatcherId is a struct representing the Resource ID for a Network Watcher

func NewNetworkWatcherID

func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId

NewNetworkWatcherID returns a new NetworkWatcherId struct

func ParseNetworkWatcherID

func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error)

ParseNetworkWatcherID parses 'input' into a NetworkWatcherId

func ParseNetworkWatcherIDInsensitively

func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error)

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

func (*NetworkWatcherId) FromParseResult

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

func (NetworkWatcherId) ID

func (id NetworkWatcherId) ID() string

ID returns the formatted Network Watcher ID

func (NetworkWatcherId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID

func (NetworkWatcherId) String

func (id NetworkWatcherId) String() string

String returns a human-readable description of this Network Watcher ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RetentionPolicyParameters

type RetentionPolicyParameters struct {
	Days    *int64 `json:"days,omitempty"`
	Enabled *bool  `json:"enabled,omitempty"`
}

type TagsObject

type TagsObject struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type TrafficAnalyticsConfigurationProperties

type TrafficAnalyticsConfigurationProperties struct {
	Enabled                  *bool   `json:"enabled,omitempty"`
	TrafficAnalyticsInterval *int64  `json:"trafficAnalyticsInterval,omitempty"`
	WorkspaceId              *string `json:"workspaceId,omitempty"`
	WorkspaceRegion          *string `json:"workspaceRegion,omitempty"`
	WorkspaceResourceId      *string `json:"workspaceResourceId,omitempty"`
}

type TrafficAnalyticsProperties

type TrafficAnalyticsProperties struct {
	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
}

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FlowLog
}

Jump to

Keyboard shortcuts

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