packetcaptures

package
v0.20240524.1074426 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcaptures Documentation

The packetcaptures SDK allows for interaction with the Azure Resource Manager Service mobilenetwork (API Version 2024-04-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/mobilenetwork/2024-04-01/packetcaptures"

Client Initialization

client := packetcaptures.NewPacketCapturesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PacketCapturesClient.CreateOrUpdate

ctx := context.TODO()
id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "packetCoreControlPlaneValue", "packetCaptureValue")

payload := packetcaptures.PacketCapture{
	// ...
}


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

Example Usage: PacketCapturesClient.Delete

ctx := context.TODO()
id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "packetCoreControlPlaneValue", "packetCaptureValue")

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

Example Usage: PacketCapturesClient.Get

ctx := context.TODO()
id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "packetCoreControlPlaneValue", "packetCaptureValue")

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: PacketCapturesClient.ListByPacketCoreControlPlane

ctx := context.TODO()
id := packetcaptures.NewPacketCoreControlPlaneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "packetCoreControlPlaneValue")

// alternatively `client.ListByPacketCoreControlPlane(ctx, id)` can be used to do batched pagination
items, err := client.ListByPacketCoreControlPlaneComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: PacketCapturesClient.Stop

ctx := context.TODO()
id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "packetCoreControlPlaneValue", "packetCaptureValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForPacketCaptureStatus

func PossibleValuesForPacketCaptureStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidatePacketCaptureID

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

ValidatePacketCaptureID checks that 'input' can be parsed as a Packet Capture ID

func ValidatePacketCoreControlPlaneID

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

ValidatePacketCoreControlPlaneID checks that 'input' can be parsed as a Packet Core Control Plane ID

Types

type AsyncOperationStatus

type AsyncOperationStatus struct {
	EndTime         *string      `json:"endTime,omitempty"`
	Error           *ErrorDetail `json:"error,omitempty"`
	Id              *string      `json:"id,omitempty"`
	Name            *string      `json:"name,omitempty"`
	PercentComplete *float64     `json:"percentComplete,omitempty"`
	Properties      *interface{} `json:"properties,omitempty"`
	ResourceId      *string      `json:"resourceId,omitempty"`
	StartTime       *string      `json:"startTime,omitempty"`
	Status          string       `json:"status"`
}

func (*AsyncOperationStatus) GetEndTimeAsTime

func (o *AsyncOperationStatus) GetEndTimeAsTime() (*time.Time, error)

func (*AsyncOperationStatus) GetStartTimeAsTime

func (o *AsyncOperationStatus) GetStartTimeAsTime() (*time.Time, error)

func (*AsyncOperationStatus) SetEndTimeAsTime

func (o *AsyncOperationStatus) SetEndTimeAsTime(input time.Time)

func (*AsyncOperationStatus) SetStartTimeAsTime

func (o *AsyncOperationStatus) SetStartTimeAsTime(input time.Time)

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorDetail

type ErrorDetail struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorDetail         `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type GetOperationResponse

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

type ListByPacketCoreControlPlaneCompleteResult

type ListByPacketCoreControlPlaneCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []PacketCapture
}

type ListByPacketCoreControlPlaneOperationResponse

type ListByPacketCoreControlPlaneOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PacketCapture
}

type PacketCapture

type PacketCapture struct {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties PacketCapturePropertiesFormat `json:"properties"`
	SystemData *systemdata.SystemData        `json:"systemData,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type PacketCaptureId

type PacketCaptureId struct {
	SubscriptionId             string
	ResourceGroupName          string
	PacketCoreControlPlaneName string
	PacketCaptureName          string
}

PacketCaptureId is a struct representing the Resource ID for a Packet Capture

func NewPacketCaptureID

func NewPacketCaptureID(subscriptionId string, resourceGroupName string, packetCoreControlPlaneName string, packetCaptureName string) PacketCaptureId

NewPacketCaptureID returns a new PacketCaptureId struct

func ParsePacketCaptureID

func ParsePacketCaptureID(input string) (*PacketCaptureId, error)

ParsePacketCaptureID parses 'input' into a PacketCaptureId

func ParsePacketCaptureIDInsensitively

func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error)

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

func (*PacketCaptureId) FromParseResult

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

func (PacketCaptureId) ID

func (id PacketCaptureId) ID() string

ID returns the formatted Packet Capture ID

func (PacketCaptureId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Packet Capture ID

func (PacketCaptureId) String

func (id PacketCaptureId) String() string

String returns a human-readable description of this Packet Capture ID

type PacketCaptureOperationPredicate

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

func (PacketCaptureOperationPredicate) Matches

type PacketCapturePropertiesFormat

type PacketCapturePropertiesFormat struct {
	BytesToCapturePerPacket *int64               `json:"bytesToCapturePerPacket,omitempty"`
	CaptureStartTime        *string              `json:"captureStartTime,omitempty"`
	NetworkInterfaces       *[]string            `json:"networkInterfaces,omitempty"`
	OutputFiles             *[]string            `json:"outputFiles,omitempty"`
	ProvisioningState       *ProvisioningState   `json:"provisioningState,omitempty"`
	Reason                  *string              `json:"reason,omitempty"`
	Status                  *PacketCaptureStatus `json:"status,omitempty"`
	TimeLimitInSeconds      *int64               `json:"timeLimitInSeconds,omitempty"`
	TotalBytesPerSession    *int64               `json:"totalBytesPerSession,omitempty"`
}

func (*PacketCapturePropertiesFormat) GetCaptureStartTimeAsTime

func (o *PacketCapturePropertiesFormat) GetCaptureStartTimeAsTime() (*time.Time, error)

func (*PacketCapturePropertiesFormat) SetCaptureStartTimeAsTime

func (o *PacketCapturePropertiesFormat) SetCaptureStartTimeAsTime(input time.Time)

type PacketCaptureStatus

type PacketCaptureStatus string
const (
	PacketCaptureStatusError      PacketCaptureStatus = "Error"
	PacketCaptureStatusNotStarted PacketCaptureStatus = "NotStarted"
	PacketCaptureStatusRunning    PacketCaptureStatus = "Running"
	PacketCaptureStatusStopped    PacketCaptureStatus = "Stopped"
)

func (*PacketCaptureStatus) UnmarshalJSON

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

type PacketCapturesClient

type PacketCapturesClient struct {
	Client *resourcemanager.Client
}

func NewPacketCapturesClientWithBaseURI

func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error)

func (PacketCapturesClient) CreateOrUpdate

CreateOrUpdate ...

func (PacketCapturesClient) CreateOrUpdateThenPoll

func (c PacketCapturesClient) CreateOrUpdateThenPoll(ctx context.Context, id PacketCaptureId, input PacketCapture) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PacketCapturesClient) Delete

Delete ...

func (PacketCapturesClient) DeleteThenPoll

func (c PacketCapturesClient) DeleteThenPoll(ctx context.Context, id PacketCaptureId) error

DeleteThenPoll performs Delete then polls until it's completed

func (PacketCapturesClient) Get

Get ...

func (PacketCapturesClient) ListByPacketCoreControlPlane

ListByPacketCoreControlPlane ...

func (PacketCapturesClient) ListByPacketCoreControlPlaneComplete

ListByPacketCoreControlPlaneComplete retrieves all the results into a single object

func (PacketCapturesClient) ListByPacketCoreControlPlaneCompleteMatchingPredicate

func (c PacketCapturesClient) ListByPacketCoreControlPlaneCompleteMatchingPredicate(ctx context.Context, id PacketCoreControlPlaneId, predicate PacketCaptureOperationPredicate) (result ListByPacketCoreControlPlaneCompleteResult, err error)

ListByPacketCoreControlPlaneCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PacketCapturesClient) Stop

Stop ...

func (PacketCapturesClient) StopThenPoll

func (c PacketCapturesClient) StopThenPoll(ctx context.Context, id PacketCaptureId) error

StopThenPoll performs Stop then polls until it's completed

type PacketCoreControlPlaneId

type PacketCoreControlPlaneId struct {
	SubscriptionId             string
	ResourceGroupName          string
	PacketCoreControlPlaneName string
}

PacketCoreControlPlaneId is a struct representing the Resource ID for a Packet Core Control Plane

func NewPacketCoreControlPlaneID

func NewPacketCoreControlPlaneID(subscriptionId string, resourceGroupName string, packetCoreControlPlaneName string) PacketCoreControlPlaneId

NewPacketCoreControlPlaneID returns a new PacketCoreControlPlaneId struct

func ParsePacketCoreControlPlaneID

func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, error)

ParsePacketCoreControlPlaneID parses 'input' into a PacketCoreControlPlaneId

func ParsePacketCoreControlPlaneIDInsensitively

func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreControlPlaneId, error)

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

func (*PacketCoreControlPlaneId) FromParseResult

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

func (PacketCoreControlPlaneId) ID

ID returns the formatted Packet Core Control Plane ID

func (PacketCoreControlPlaneId) Segments

Segments returns a slice of Resource ID Segments which comprise this Packet Core Control Plane ID

func (PacketCoreControlPlaneId) String

func (id PacketCoreControlPlaneId) String() string

String returns a human-readable description of this Packet Core Control Plane ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateDeleted   ProvisioningState = "Deleted"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUnknown   ProvisioningState = "Unknown"
)

func (*ProvisioningState) UnmarshalJSON

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

type StopOperationResponse

type StopOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AsyncOperationStatus
}

Jump to

Keyboard shortcuts

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