incidenttasks

package
v0.20240903.1131440 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: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidenttasks Documentation

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

Client Initialization

client := incidenttasks.NewIncidentTasksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: IncidentTasksClient.CreateOrUpdate

ctx := context.TODO()
id := incidenttasks.NewTaskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "incidentTaskIdValue")

payload := incidenttasks.IncidentTask{
	// ...
}


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

ctx := context.TODO()
id := incidenttasks.NewTaskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "incidentTaskIdValue")

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

ctx := context.TODO()
id := incidenttasks.NewTaskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "incidentTaskIdValue")

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

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

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

func PossibleValuesForIncidentTaskStatus() []string

func ValidateIncidentID

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

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

func ValidateTaskID

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

ValidateTaskID checks that 'input' can be parsed as a Task ID

Types

type ClientInfo

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

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 IncidentTask

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

type IncidentTaskOperationPredicate

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

func (IncidentTaskOperationPredicate) Matches

type IncidentTaskProperties

type IncidentTaskProperties struct {
	CreatedBy           *ClientInfo        `json:"createdBy,omitempty"`
	CreatedTimeUtc      *string            `json:"createdTimeUtc,omitempty"`
	Description         *string            `json:"description,omitempty"`
	LastModifiedBy      *ClientInfo        `json:"lastModifiedBy,omitempty"`
	LastModifiedTimeUtc *string            `json:"lastModifiedTimeUtc,omitempty"`
	Status              IncidentTaskStatus `json:"status"`
	Title               string             `json:"title"`
}

func (*IncidentTaskProperties) GetCreatedTimeUtcAsTime

func (o *IncidentTaskProperties) GetCreatedTimeUtcAsTime() (*time.Time, error)

func (*IncidentTaskProperties) GetLastModifiedTimeUtcAsTime

func (o *IncidentTaskProperties) GetLastModifiedTimeUtcAsTime() (*time.Time, error)

func (*IncidentTaskProperties) SetCreatedTimeUtcAsTime

func (o *IncidentTaskProperties) SetCreatedTimeUtcAsTime(input time.Time)

func (*IncidentTaskProperties) SetLastModifiedTimeUtcAsTime

func (o *IncidentTaskProperties) SetLastModifiedTimeUtcAsTime(input time.Time)

type IncidentTaskStatus

type IncidentTaskStatus string
const (
	IncidentTaskStatusCompleted IncidentTaskStatus = "Completed"
	IncidentTaskStatusNew       IncidentTaskStatus = "New"
)

func (*IncidentTaskStatus) UnmarshalJSON

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

type IncidentTasksClient

type IncidentTasksClient struct {
	Client *resourcemanager.Client
}

func NewIncidentTasksClientWithBaseURI

func NewIncidentTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentTasksClient, error)

func (IncidentTasksClient) CreateOrUpdate

func (c IncidentTasksClient) CreateOrUpdate(ctx context.Context, id TaskId, input IncidentTask) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (IncidentTasksClient) Delete

func (c IncidentTasksClient) Delete(ctx context.Context, id TaskId) (result DeleteOperationResponse, err error)

Delete ...

func (IncidentTasksClient) Get

func (c IncidentTasksClient) Get(ctx context.Context, id TaskId) (result GetOperationResponse, err error)

Get ...

func (IncidentTasksClient) List

List ...

func (IncidentTasksClient) ListComplete

ListComplete retrieves all the results into a single object

func (IncidentTasksClient) ListCompleteMatchingPredicate

func (c IncidentTasksClient) ListCompleteMatchingPredicate(ctx context.Context, id IncidentId, predicate IncidentTaskOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

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

type TaskId

type TaskId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	IncidentId        string
	IncidentTaskId    string
}

TaskId is a struct representing the Resource ID for a Task

func NewTaskID

func NewTaskID(subscriptionId string, resourceGroupName string, workspaceName string, incidentId string, incidentTaskId string) TaskId

NewTaskID returns a new TaskId struct

func ParseTaskID

func ParseTaskID(input string) (*TaskId, error)

ParseTaskID parses 'input' into a TaskId

func ParseTaskIDInsensitively

func ParseTaskIDInsensitively(input string) (*TaskId, error)

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

func (*TaskId) FromParseResult

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

func (TaskId) ID

func (id TaskId) ID() string

ID returns the formatted Task ID

func (TaskId) Segments

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

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

func (TaskId) String

func (id TaskId) String() string

String returns a human-readable description of this Task ID

Jump to

Keyboard shortcuts

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