watchlistitems

package
v0.20230124.1170331 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-08-01/watchlistitems Documentation

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

Client Initialization

client := watchlistitems.NewWatchlistItemsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WatchlistItemsClient.CreateOrUpdate

ctx := context.TODO()
id := watchlistitems.NewWatchlistItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "watchlistAliasValue", "watchlistItemIdValue")

payload := watchlistitems.WatchlistItem{
	// ...
}


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

ctx := context.TODO()
id := watchlistitems.NewWatchlistItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "watchlistAliasValue", "watchlistItemIdValue")

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

ctx := context.TODO()
id := watchlistitems.NewWatchlistItemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "watchlistAliasValue", "watchlistItemIdValue")

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

ctx := context.TODO()
id := watchlistitems.NewWatchlistID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "watchlistAliasValue")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateWatchlistID

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

ValidateWatchlistID checks that 'input' can be parsed as a Watchlist ID

func ValidateWatchlistItemID

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

ValidateWatchlistItemID checks that 'input' can be parsed as a Watchlist Item ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *WatchlistItem
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *WatchlistItem
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []WatchlistItem
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]WatchlistItem
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type UserInfo

type UserInfo struct {
	Email    *string `json:"email,omitempty"`
	Name     *string `json:"name,omitempty"`
	ObjectId *string `json:"objectId,omitempty"`
}

type WatchlistId

type WatchlistId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	WatchlistAlias    string
}

WatchlistId is a struct representing the Resource ID for a Watchlist

func NewWatchlistID

func NewWatchlistID(subscriptionId string, resourceGroupName string, workspaceName string, watchlistAlias string) WatchlistId

NewWatchlistID returns a new WatchlistId struct

func ParseWatchlistID

func ParseWatchlistID(input string) (*WatchlistId, error)

ParseWatchlistID parses 'input' into a WatchlistId

func ParseWatchlistIDInsensitively

func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error)

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

func (WatchlistId) ID

func (id WatchlistId) ID() string

ID returns the formatted Watchlist ID

func (WatchlistId) Segments

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

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

func (WatchlistId) String

func (id WatchlistId) String() string

String returns a human-readable description of this Watchlist ID

type WatchlistItem

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

type WatchlistItemId

type WatchlistItemId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	WatchlistAlias    string
	WatchlistItemId   string
}

WatchlistItemId is a struct representing the Resource ID for a Watchlist Item

func NewWatchlistItemID

func NewWatchlistItemID(subscriptionId string, resourceGroupName string, workspaceName string, watchlistAlias string, watchlistItemId string) WatchlistItemId

NewWatchlistItemID returns a new WatchlistItemId struct

func ParseWatchlistItemID

func ParseWatchlistItemID(input string) (*WatchlistItemId, error)

ParseWatchlistItemID parses 'input' into a WatchlistItemId

func ParseWatchlistItemIDInsensitively

func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error)

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

func (WatchlistItemId) ID

func (id WatchlistItemId) ID() string

ID returns the formatted Watchlist Item ID

func (WatchlistItemId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Watchlist Item ID

func (WatchlistItemId) String

func (id WatchlistItemId) String() string

String returns a human-readable description of this Watchlist Item ID

type WatchlistItemOperationPredicate

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

func (WatchlistItemOperationPredicate) Matches

type WatchlistItemProperties

type WatchlistItemProperties struct {
	Created           *string      `json:"created,omitempty"`
	CreatedBy         *UserInfo    `json:"createdBy,omitempty"`
	EntityMapping     *interface{} `json:"entityMapping,omitempty"`
	IsDeleted         *bool        `json:"isDeleted,omitempty"`
	ItemsKeyValue     interface{}  `json:"itemsKeyValue"`
	TenantId          *string      `json:"tenantId,omitempty"`
	Updated           *string      `json:"updated,omitempty"`
	UpdatedBy         *UserInfo    `json:"updatedBy,omitempty"`
	WatchlistItemId   *string      `json:"watchlistItemId,omitempty"`
	WatchlistItemType *string      `json:"watchlistItemType,omitempty"`
}

func (*WatchlistItemProperties) GetCreatedAsTime

func (o *WatchlistItemProperties) GetCreatedAsTime() (*time.Time, error)

func (*WatchlistItemProperties) GetUpdatedAsTime

func (o *WatchlistItemProperties) GetUpdatedAsTime() (*time.Time, error)

func (*WatchlistItemProperties) SetCreatedAsTime

func (o *WatchlistItemProperties) SetCreatedAsTime(input time.Time)

func (*WatchlistItemProperties) SetUpdatedAsTime

func (o *WatchlistItemProperties) SetUpdatedAsTime(input time.Time)

type WatchlistItemsClient

type WatchlistItemsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewWatchlistItemsClientWithBaseURI

func NewWatchlistItemsClientWithBaseURI(endpoint string) WatchlistItemsClient

func (WatchlistItemsClient) CreateOrUpdate

CreateOrUpdate ...

func (WatchlistItemsClient) Delete

Delete ...

func (WatchlistItemsClient) Get

Get ...

func (WatchlistItemsClient) List

List ...

func (WatchlistItemsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (WatchlistItemsClient) ListCompleteMatchingPredicate

func (c WatchlistItemsClient) ListCompleteMatchingPredicate(ctx context.Context, id WatchlistId, predicate WatchlistItemOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

Jump to

Keyboard shortcuts

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