huntrelations

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/huntrelations Documentation

The huntrelations 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/huntrelations"

Client Initialization

client := huntrelations.NewHuntRelationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HuntRelationsClient.CreateOrUpdate

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

payload := huntrelations.HuntRelation{
	// ...
}


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: HuntRelationsClient.Delete

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

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: HuntRelationsClient.Get

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

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

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

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

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

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

func ValidateRelationID

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

ValidateRelationID checks that 'input' can be parsed as a Relation ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

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 HuntRelation

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

type HuntRelationOperationPredicate

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

func (HuntRelationOperationPredicate) Matches

type HuntRelationProperties

type HuntRelationProperties struct {
	Labels              *[]string `json:"labels,omitempty"`
	RelatedResourceId   string    `json:"relatedResourceId"`
	RelatedResourceKind *string   `json:"relatedResourceKind,omitempty"`
	RelatedResourceName *string   `json:"relatedResourceName,omitempty"`
	RelationType        *string   `json:"relationType,omitempty"`
}

type HuntRelationsClient

type HuntRelationsClient struct {
	Client *resourcemanager.Client
}

func NewHuntRelationsClientWithBaseURI

func NewHuntRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*HuntRelationsClient, error)

func (HuntRelationsClient) CreateOrUpdate

func (c HuntRelationsClient) CreateOrUpdate(ctx context.Context, id RelationId, input HuntRelation) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (HuntRelationsClient) Delete

Delete ...

func (HuntRelationsClient) Get

Get ...

func (HuntRelationsClient) List

List ...

func (HuntRelationsClient) ListComplete

ListComplete retrieves all the results into a single object

func (HuntRelationsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListCompleteResult

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

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        *[]HuntRelation
}

type RelationId

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

RelationId is a struct representing the Resource ID for a Relation

func NewRelationID

func NewRelationID(subscriptionId string, resourceGroupName string, workspaceName string, huntId string, huntRelationId string) RelationId

NewRelationID returns a new RelationId struct

func ParseRelationID

func ParseRelationID(input string) (*RelationId, error)

ParseRelationID parses 'input' into a RelationId

func ParseRelationIDInsensitively

func ParseRelationIDInsensitively(input string) (*RelationId, error)

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

func (*RelationId) FromParseResult

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

func (RelationId) ID

func (id RelationId) ID() string

ID returns the formatted Relation ID

func (RelationId) Segments

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

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

func (RelationId) String

func (id RelationId) String() string

String returns a human-readable description of this Relation ID

Jump to

Keyboard shortcuts

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