huntcomments

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/huntcomments Documentation

The huntcomments SDK allows for interaction with Azure Resource Manager securityinsights (API Version 2023-12-01-preview).

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/securityinsights/2023-12-01-preview/huntcomments"

Client Initialization

client := huntcomments.NewHuntCommentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HuntCommentsClient.CreateOrUpdate

ctx := context.TODO()
id := huntcomments.NewCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "huntId", "huntCommentId")

payload := huntcomments.HuntComment{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HuntCommentsClient.Delete

ctx := context.TODO()
id := huntcomments.NewCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "huntId", "huntCommentId")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HuntCommentsClient.Get

ctx := context.TODO()
id := huntcomments.NewCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "huntId", "huntCommentId")

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

ctx := context.TODO()
id := huntcomments.NewHuntID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "huntId")

// alternatively `client.List(ctx, id, huntcomments.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, huntcomments.DefaultListOperationOptions())
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 ValidateCommentID

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

ValidateCommentID checks that 'input' can be parsed as a Comment ID

func ValidateHuntID

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

ValidateHuntID checks that 'input' can be parsed as a Hunt ID

Types

type CommentId

type CommentId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	HuntId            string
	HuntCommentId     string
}

CommentId is a struct representing the Resource ID for a Comment

func NewCommentID

func NewCommentID(subscriptionId string, resourceGroupName string, workspaceName string, huntId string, huntCommentId string) CommentId

NewCommentID returns a new CommentId struct

func ParseCommentID

func ParseCommentID(input string) (*CommentId, error)

ParseCommentID parses 'input' into a CommentId

func ParseCommentIDInsensitively

func ParseCommentIDInsensitively(input string) (*CommentId, error)

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

func (*CommentId) FromParseResult

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

func (CommentId) ID

func (id CommentId) ID() string

ID returns the formatted Comment ID

func (CommentId) Segments

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

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

func (CommentId) String

func (id CommentId) String() string

String returns a human-readable description of this Comment ID

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HuntComment
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type HuntComment

type HuntComment struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *HuntCommentProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type HuntCommentOperationPredicate

type HuntCommentOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (HuntCommentOperationPredicate) Matches

type HuntCommentProperties

type HuntCommentProperties struct {
	Message string `json:"message"`
}

type HuntCommentsClient

type HuntCommentsClient struct {
	Client *resourcemanager.Client
}

func NewHuntCommentsClientWithBaseURI

func NewHuntCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*HuntCommentsClient, error)

func (HuntCommentsClient) CreateOrUpdate

func (c HuntCommentsClient) CreateOrUpdate(ctx context.Context, id CommentId, input HuntComment) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (HuntCommentsClient) Delete

func (c HuntCommentsClient) Delete(ctx context.Context, id CommentId) (result DeleteOperationResponse, err error)

Delete ...

func (HuntCommentsClient) Get

Get ...

func (HuntCommentsClient) List

List ...

func (HuntCommentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (HuntCommentsClient) ListCompleteMatchingPredicate

func (c HuntCommentsClient) ListCompleteMatchingPredicate(ctx context.Context, id HuntId, options ListOperationOptions, predicate HuntCommentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type HuntId

type HuntId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	HuntId            string
}

HuntId is a struct representing the Resource ID for a Hunt

func NewHuntID

func NewHuntID(subscriptionId string, resourceGroupName string, workspaceName string, huntId string) HuntId

NewHuntID returns a new HuntId struct

func ParseHuntID

func ParseHuntID(input string) (*HuntId, error)

ParseHuntID parses 'input' into a HuntId

func ParseHuntIDInsensitively

func ParseHuntIDInsensitively(input string) (*HuntId, error)

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

func (*HuntId) FromParseResult

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

func (HuntId) ID

func (id HuntId) ID() string

ID returns the formatted Hunt ID

func (HuntId) Segments

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

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

func (HuntId) String

func (id HuntId) String() string

String returns a human-readable description of this Hunt ID

type ListCompleteResult

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

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

Jump to

Keyboard shortcuts

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