collectorpolicies

package
v0.20230815.1145621 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies Documentation

The collectorpolicies SDK allows for interaction with the Azure Resource Manager Service networkfunction (API Version 2022-11-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/networkfunction/2022-11-01/collectorpolicies"

Client Initialization

client := collectorpolicies.NewCollectorPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CollectorPoliciesClient.CreateOrUpdate

ctx := context.TODO()
id := collectorpolicies.NewCollectorPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureTrafficCollectorValue", "collectorPolicyValue")

payload := collectorpolicies.CollectorPolicy{
	// ...
}


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

Example Usage: CollectorPoliciesClient.Delete

ctx := context.TODO()
id := collectorpolicies.NewCollectorPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureTrafficCollectorValue", "collectorPolicyValue")

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

Example Usage: CollectorPoliciesClient.Get

ctx := context.TODO()
id := collectorpolicies.NewCollectorPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureTrafficCollectorValue", "collectorPolicyValue")

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

ctx := context.TODO()
id := collectorpolicies.NewAzureTrafficCollectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureTrafficCollectorValue")

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

ctx := context.TODO()
id := collectorpolicies.NewCollectorPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureTrafficCollectorValue", "collectorPolicyValue")

payload := collectorpolicies.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 PossibleValuesForCreatedByType

func PossibleValuesForCreatedByType() []string

func PossibleValuesForDestinationType

func PossibleValuesForDestinationType() []string

func PossibleValuesForEmissionType

func PossibleValuesForEmissionType() []string

func PossibleValuesForIngestionType

func PossibleValuesForIngestionType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSourceType

func PossibleValuesForSourceType() []string

func ValidateAzureTrafficCollectorID

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

ValidateAzureTrafficCollectorID checks that 'input' can be parsed as a Azure Traffic Collector ID

func ValidateCollectorPolicyID

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

ValidateCollectorPolicyID checks that 'input' can be parsed as a Collector Policy ID

Types

type AzureTrafficCollectorId

type AzureTrafficCollectorId struct {
	SubscriptionId            string
	ResourceGroupName         string
	AzureTrafficCollectorName string
}

AzureTrafficCollectorId is a struct representing the Resource ID for a Azure Traffic Collector

func NewAzureTrafficCollectorID

func NewAzureTrafficCollectorID(subscriptionId string, resourceGroupName string, azureTrafficCollectorName string) AzureTrafficCollectorId

NewAzureTrafficCollectorID returns a new AzureTrafficCollectorId struct

func ParseAzureTrafficCollectorID

func ParseAzureTrafficCollectorID(input string) (*AzureTrafficCollectorId, error)

ParseAzureTrafficCollectorID parses 'input' into a AzureTrafficCollectorId

func ParseAzureTrafficCollectorIDInsensitively

func ParseAzureTrafficCollectorIDInsensitively(input string) (*AzureTrafficCollectorId, error)

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

func (AzureTrafficCollectorId) ID

ID returns the formatted Azure Traffic Collector ID

func (AzureTrafficCollectorId) Segments

Segments returns a slice of Resource ID Segments which comprise this Azure Traffic Collector ID

func (AzureTrafficCollectorId) String

func (id AzureTrafficCollectorId) String() string

String returns a human-readable description of this Azure Traffic Collector ID

type CollectorPoliciesClient

type CollectorPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewCollectorPoliciesClientWithBaseURI

func NewCollectorPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectorPoliciesClient, error)

func (CollectorPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (CollectorPoliciesClient) CreateOrUpdateThenPoll

func (c CollectorPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id CollectorPolicyId, input CollectorPolicy) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CollectorPoliciesClient) Delete

Delete ...

func (CollectorPoliciesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (CollectorPoliciesClient) Get

Get ...

func (CollectorPoliciesClient) List

List ...

func (CollectorPoliciesClient) ListComplete

ListComplete retrieves all the results into a single object

func (CollectorPoliciesClient) ListCompleteMatchingPredicate

func (c CollectorPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id AzureTrafficCollectorId, predicate CollectorPolicyOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CollectorPoliciesClient) UpdateTags

UpdateTags ...

type CollectorPolicy

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

type CollectorPolicyId

type CollectorPolicyId struct {
	SubscriptionId            string
	ResourceGroupName         string
	AzureTrafficCollectorName string
	CollectorPolicyName       string
}

CollectorPolicyId is a struct representing the Resource ID for a Collector Policy

func NewCollectorPolicyID

func NewCollectorPolicyID(subscriptionId string, resourceGroupName string, azureTrafficCollectorName string, collectorPolicyName string) CollectorPolicyId

NewCollectorPolicyID returns a new CollectorPolicyId struct

func ParseCollectorPolicyID

func ParseCollectorPolicyID(input string) (*CollectorPolicyId, error)

ParseCollectorPolicyID parses 'input' into a CollectorPolicyId

func ParseCollectorPolicyIDInsensitively

func ParseCollectorPolicyIDInsensitively(input string) (*CollectorPolicyId, error)

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

func (CollectorPolicyId) ID

func (id CollectorPolicyId) ID() string

ID returns the formatted Collector Policy ID

func (CollectorPolicyId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Collector Policy ID

func (CollectorPolicyId) String

func (id CollectorPolicyId) String() string

String returns a human-readable description of this Collector Policy ID

type CollectorPolicyOperationPredicate

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

func (CollectorPolicyOperationPredicate) Matches

type CollectorPolicyPropertiesFormat

type CollectorPolicyPropertiesFormat struct {
	EmissionPolicies  *[]EmissionPoliciesPropertiesFormat `json:"emissionPolicies,omitempty"`
	IngestionPolicy   *IngestionPolicyPropertiesFormat    `json:"ingestionPolicy,omitempty"`
	ProvisioningState *ProvisioningState                  `json:"provisioningState,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type CreatedByType

type CreatedByType string
const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func (*CreatedByType) UnmarshalJSON added in v0.20230516.1215417

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

type DeleteOperationResponse

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

type DestinationType

type DestinationType string
const (
	DestinationTypeAzureMonitor DestinationType = "AzureMonitor"
)

func (*DestinationType) UnmarshalJSON added in v0.20230516.1215417

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

type EmissionPoliciesPropertiesFormat

type EmissionPoliciesPropertiesFormat struct {
	EmissionDestinations *[]EmissionPolicyDestination `json:"emissionDestinations,omitempty"`
	EmissionType         *EmissionType                `json:"emissionType,omitempty"`
}

type EmissionPolicyDestination

type EmissionPolicyDestination struct {
	DestinationType *DestinationType `json:"destinationType,omitempty"`
}

type EmissionType

type EmissionType string
const (
	EmissionTypeIPFIX EmissionType = "IPFIX"
)

func (*EmissionType) UnmarshalJSON added in v0.20230516.1215417

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

type GetOperationResponse

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

type IngestionPolicyPropertiesFormat

type IngestionPolicyPropertiesFormat struct {
	IngestionSources *[]IngestionSourcesPropertiesFormat `json:"ingestionSources,omitempty"`
	IngestionType    *IngestionType                      `json:"ingestionType,omitempty"`
}

type IngestionSourcesPropertiesFormat

type IngestionSourcesPropertiesFormat struct {
	ResourceId *string     `json:"resourceId,omitempty"`
	SourceType *SourceType `json:"sourceType,omitempty"`
}

type IngestionType

type IngestionType string
const (
	IngestionTypeIPFIX IngestionType = "IPFIX"
)

func (*IngestionType) UnmarshalJSON added in v0.20230516.1215417

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []CollectorPolicy
}

type ListOperationResponse

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

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON added in v0.20230516.1215417

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

type SourceType

type SourceType string
const (
	SourceTypeResource SourceType = "Resource"
)

func (*SourceType) UnmarshalJSON added in v0.20230516.1215417

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

type SystemData

type SystemData struct {
	CreatedAt          *string        `json:"createdAt,omitempty"`
	CreatedBy          *string        `json:"createdBy,omitempty"`
	CreatedByType      *CreatedByType `json:"createdByType,omitempty"`
	LastModifiedBy     *string        `json:"lastModifiedBy,omitempty"`
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

func (*SystemData) GetCreatedAtAsTime

func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error)

func (*SystemData) SetCreatedAtAsTime

func (o *SystemData) SetCreatedAtAsTime(input time.Time)

type TagsObject

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

type UpdateTagsOperationResponse

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

Jump to

Keyboard shortcuts

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