incidentrelations

package
v0.20240320.1000025 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

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

Client Initialization

client := incidentrelations.NewIncidentRelationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: IncidentRelationsClient.CreateOrUpdate

ctx := context.TODO()
id := incidentrelations.NewIncidentRelationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "relationValue")

payload := incidentrelations.Relation{
	// ...
}


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

ctx := context.TODO()
id := incidentrelations.NewIncidentRelationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "relationValue")

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

ctx := context.TODO()
id := incidentrelations.NewIncidentRelationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "relationValue")

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

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

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

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

ValidateIncidentID checks that 'input' can be parsed as a Incident ID

func ValidateIncidentRelationID

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

ValidateIncidentRelationID checks that 'input' can be parsed as a Incident Relation ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type IncidentId

type IncidentId struct {
	SubscriptionId     string
	ResourceGroupName  string
	WorkspaceName      string
	IncidentIdentifier string
}

IncidentId is a struct representing the Resource ID for a Incident

func NewIncidentID

func NewIncidentID(subscriptionId string, resourceGroupName string, workspaceName string, incidentIdentifier string) IncidentId

NewIncidentID returns a new IncidentId struct

func ParseIncidentID

func ParseIncidentID(input string) (*IncidentId, error)

ParseIncidentID parses 'input' into a IncidentId

func ParseIncidentIDInsensitively

func ParseIncidentIDInsensitively(input string) (*IncidentId, error)

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

func (*IncidentId) FromParseResult

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

func (IncidentId) ID

func (id IncidentId) ID() string

ID returns the formatted Incident ID

func (IncidentId) Segments

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

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

func (IncidentId) String

func (id IncidentId) String() string

String returns a human-readable description of this Incident ID

type IncidentRelationId

type IncidentRelationId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	IncidentId        string
	RelationName      string
}

IncidentRelationId is a struct representing the Resource ID for a Incident Relation

func NewIncidentRelationID

func NewIncidentRelationID(subscriptionId string, resourceGroupName string, workspaceName string, incidentId string, relationName string) IncidentRelationId

NewIncidentRelationID returns a new IncidentRelationId struct

func ParseIncidentRelationID

func ParseIncidentRelationID(input string) (*IncidentRelationId, error)

ParseIncidentRelationID parses 'input' into a IncidentRelationId

func ParseIncidentRelationIDInsensitively

func ParseIncidentRelationIDInsensitively(input string) (*IncidentRelationId, error)

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

func (*IncidentRelationId) FromParseResult

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

func (IncidentRelationId) ID

func (id IncidentRelationId) ID() string

ID returns the formatted Incident Relation ID

func (IncidentRelationId) Segments

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

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

func (IncidentRelationId) String

func (id IncidentRelationId) String() string

String returns a human-readable description of this Incident Relation ID

type IncidentRelationsClient

type IncidentRelationsClient struct {
	Client *resourcemanager.Client
}

func NewIncidentRelationsClientWithBaseURI

func NewIncidentRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentRelationsClient, error)

func (IncidentRelationsClient) CreateOrUpdate

CreateOrUpdate ...

func (IncidentRelationsClient) Delete

Delete ...

func (IncidentRelationsClient) Get

Get ...

func (IncidentRelationsClient) List

List ...

func (IncidentRelationsClient) ListComplete

ListComplete retrieves all the results into a single object

func (IncidentRelationsClient) ListCompleteMatchingPredicate

func (c IncidentRelationsClient) ListCompleteMatchingPredicate(ctx context.Context, id IncidentId, options ListOperationOptions, predicate RelationOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListCompleteResult

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter  *string
	Orderby *string
	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        *[]Relation
}

type Relation

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

type RelationOperationPredicate

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

func (RelationOperationPredicate) Matches

func (p RelationOperationPredicate) Matches(input Relation) bool

type RelationProperties

type RelationProperties struct {
	RelatedResourceId   string  `json:"relatedResourceId"`
	RelatedResourceKind *string `json:"relatedResourceKind,omitempty"`
	RelatedResourceName *string `json:"relatedResourceName,omitempty"`
	RelatedResourceType *string `json:"relatedResourceType,omitempty"`
}

Jump to

Keyboard shortcuts

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