metadata

package
v0.20240903.1111904 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata Documentation

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

Client Initialization

client := metadata.NewMetadataClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MetadataClient.Create

ctx := context.TODO()
id := metadata.NewMetadataID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "metadataValue")

payload := metadata.MetadataModel{
	// ...
}


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

Example Usage: MetadataClient.Delete

ctx := context.TODO()
id := metadata.NewMetadataID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "metadataValue")

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

ctx := context.TODO()
id := metadata.NewMetadataID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "metadataValue")

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

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

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

Example Usage: MetadataClient.Update

ctx := context.TODO()
id := metadata.NewMetadataID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "metadataValue")

payload := metadata.MetadataPatch{
	// ...
}


read, err := client.Update(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 PossibleValuesForKind

func PossibleValuesForKind() []string

func PossibleValuesForOperator

func PossibleValuesForOperator() []string

func PossibleValuesForSourceKind

func PossibleValuesForSourceKind() []string

func PossibleValuesForSupportTier

func PossibleValuesForSupportTier() []string

func ValidateMetadataID

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

ValidateMetadataID checks that 'input' can be parsed as a Metadata ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetadataModel
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type Kind

type Kind string
const (
	KindAnalyticsRule            Kind = "AnalyticsRule"
	KindAnalyticsRuleTemplate    Kind = "AnalyticsRuleTemplate"
	KindAutomationRule           Kind = "AutomationRule"
	KindAzureFunction            Kind = "AzureFunction"
	KindDataConnector            Kind = "DataConnector"
	KindDataType                 Kind = "DataType"
	KindHuntingQuery             Kind = "HuntingQuery"
	KindInvestigationQuery       Kind = "InvestigationQuery"
	KindLogicAppsCustomConnector Kind = "LogicAppsCustomConnector"
	KindParser                   Kind = "Parser"
	KindPlaybook                 Kind = "Playbook"
	KindPlaybookTemplate         Kind = "PlaybookTemplate"
	KindSolution                 Kind = "Solution"
	KindWatchlist                Kind = "Watchlist"
	KindWatchlistTemplate        Kind = "WatchlistTemplate"
	KindWorkbook                 Kind = "Workbook"
	KindWorkbookTemplate         Kind = "WorkbookTemplate"
)

func (*Kind) UnmarshalJSON added in v0.20240221.1115631

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

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20240221.1115631

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

func (ListOperationOptions) ToOData added in v0.20240221.1115631

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

func (ListOperationOptions) ToQuery added in v0.20240221.1115631

type ListOperationResponse

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

type MetadataAuthor

type MetadataAuthor struct {
	Email *string `json:"email,omitempty"`
	Link  *string `json:"link,omitempty"`
	Name  *string `json:"name,omitempty"`
}

type MetadataCategories

type MetadataCategories struct {
	Domains   *[]string `json:"domains,omitempty"`
	Verticals *[]string `json:"verticals,omitempty"`
}

type MetadataClient

type MetadataClient struct {
	Client *resourcemanager.Client
}

func NewMetadataClientWithBaseURI

func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error)

func (MetadataClient) Create

func (c MetadataClient) Create(ctx context.Context, id MetadataId, input MetadataModel) (result CreateOperationResponse, err error)

Create ...

func (MetadataClient) Delete

func (c MetadataClient) Delete(ctx context.Context, id MetadataId) (result DeleteOperationResponse, err error)

Delete ...

func (MetadataClient) Get

func (c MetadataClient) Get(ctx context.Context, id MetadataId) (result GetOperationResponse, err error)

Get ...

func (MetadataClient) List

List ...

func (MetadataClient) ListComplete

ListComplete retrieves all the results into a single object

func (MetadataClient) ListCompleteMatchingPredicate

func (c MetadataClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options ListOperationOptions, predicate MetadataModelOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MetadataClient) Update

func (c MetadataClient) Update(ctx context.Context, id MetadataId, input MetadataPatch) (result UpdateOperationResponse, err error)

Update ...

type MetadataDependencies

type MetadataDependencies struct {
	ContentId *string                 `json:"contentId,omitempty"`
	Criteria  *[]MetadataDependencies `json:"criteria,omitempty"`
	Kind      *Kind                   `json:"kind,omitempty"`
	Name      *string                 `json:"name,omitempty"`
	Operator  *Operator               `json:"operator,omitempty"`
	Version   *string                 `json:"version,omitempty"`
}

type MetadataId

type MetadataId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	MetadataName      string
}

MetadataId is a struct representing the Resource ID for a Metadata

func NewMetadataID

func NewMetadataID(subscriptionId string, resourceGroupName string, workspaceName string, metadataName string) MetadataId

NewMetadataID returns a new MetadataId struct

func ParseMetadataID

func ParseMetadataID(input string) (*MetadataId, error)

ParseMetadataID parses 'input' into a MetadataId

func ParseMetadataIDInsensitively

func ParseMetadataIDInsensitively(input string) (*MetadataId, error)

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

func (*MetadataId) FromParseResult

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

func (MetadataId) ID

func (id MetadataId) ID() string

ID returns the formatted Metadata ID

func (MetadataId) Segments

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

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

func (MetadataId) String

func (id MetadataId) String() string

String returns a human-readable description of this Metadata ID

type MetadataModel

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

type MetadataModelOperationPredicate

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

func (MetadataModelOperationPredicate) Matches

type MetadataPatch

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

type MetadataProperties

type MetadataProperties struct {
	Author                   *MetadataAuthor       `json:"author,omitempty"`
	Categories               *MetadataCategories   `json:"categories,omitempty"`
	ContentId                *string               `json:"contentId,omitempty"`
	ContentSchemaVersion     *string               `json:"contentSchemaVersion,omitempty"`
	CustomVersion            *string               `json:"customVersion,omitempty"`
	Dependencies             *MetadataDependencies `json:"dependencies,omitempty"`
	FirstPublishDate         *string               `json:"firstPublishDate,omitempty"`
	Icon                     *string               `json:"icon,omitempty"`
	Kind                     Kind                  `json:"kind"`
	LastPublishDate          *string               `json:"lastPublishDate,omitempty"`
	ParentId                 string                `json:"parentId"`
	PreviewImages            *[]string             `json:"previewImages,omitempty"`
	PreviewImagesDark        *[]string             `json:"previewImagesDark,omitempty"`
	Providers                *[]string             `json:"providers,omitempty"`
	Source                   *MetadataSource       `json:"source,omitempty"`
	Support                  *MetadataSupport      `json:"support,omitempty"`
	ThreatAnalysisTactics    *[]string             `json:"threatAnalysisTactics,omitempty"`
	ThreatAnalysisTechniques *[]string             `json:"threatAnalysisTechniques,omitempty"`
	Version                  *string               `json:"version,omitempty"`
}

type MetadataPropertiesPatch

type MetadataPropertiesPatch struct {
	Author                   *MetadataAuthor       `json:"author,omitempty"`
	Categories               *MetadataCategories   `json:"categories,omitempty"`
	ContentId                *string               `json:"contentId,omitempty"`
	ContentSchemaVersion     *string               `json:"contentSchemaVersion,omitempty"`
	CustomVersion            *string               `json:"customVersion,omitempty"`
	Dependencies             *MetadataDependencies `json:"dependencies,omitempty"`
	FirstPublishDate         *string               `json:"firstPublishDate,omitempty"`
	Icon                     *string               `json:"icon,omitempty"`
	Kind                     *Kind                 `json:"kind,omitempty"`
	LastPublishDate          *string               `json:"lastPublishDate,omitempty"`
	ParentId                 *string               `json:"parentId,omitempty"`
	PreviewImages            *[]string             `json:"previewImages,omitempty"`
	PreviewImagesDark        *[]string             `json:"previewImagesDark,omitempty"`
	Providers                *[]string             `json:"providers,omitempty"`
	Source                   *MetadataSource       `json:"source,omitempty"`
	Support                  *MetadataSupport      `json:"support,omitempty"`
	ThreatAnalysisTactics    *[]string             `json:"threatAnalysisTactics,omitempty"`
	ThreatAnalysisTechniques *[]string             `json:"threatAnalysisTechniques,omitempty"`
	Version                  *string               `json:"version,omitempty"`
}

type MetadataSource

type MetadataSource struct {
	Kind     SourceKind `json:"kind"`
	Name     *string    `json:"name,omitempty"`
	SourceId *string    `json:"sourceId,omitempty"`
}

type MetadataSupport

type MetadataSupport struct {
	Email *string     `json:"email,omitempty"`
	Link  *string     `json:"link,omitempty"`
	Name  *string     `json:"name,omitempty"`
	Tier  SupportTier `json:"tier"`
}

type Operator

type Operator string
const (
	OperatorAND Operator = "AND"
	OperatorOR  Operator = "OR"
)

func (*Operator) UnmarshalJSON added in v0.20240221.1115631

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

type SourceKind

type SourceKind string
const (
	SourceKindCommunity        SourceKind = "Community"
	SourceKindLocalWorkspace   SourceKind = "LocalWorkspace"
	SourceKindSolution         SourceKind = "Solution"
	SourceKindSourceRepository SourceKind = "SourceRepository"
)

func (*SourceKind) UnmarshalJSON added in v0.20240221.1115631

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

type SupportTier

type SupportTier string
const (
	SupportTierCommunity SupportTier = "Community"
	SupportTierMicrosoft SupportTier = "Microsoft"
	SupportTierPartner   SupportTier = "Partner"
)

func (*SupportTier) UnmarshalJSON added in v0.20240221.1115631

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetadataModel
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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