README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2021-09-01-preview/bookmarkrelations
Documentation
The bookmarkrelations
SDK allows for interaction with the Azure Resource Manager Service securityinsights
(API Version 2021-09-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/2021-09-01-preview/bookmarkrelations"
Client Initialization
client := bookmarkrelations.NewBookmarkRelationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: BookmarkRelationsClient.CreateOrUpdate
ctx := context.TODO()
id := bookmarkrelations.NewRelationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "entityIdValue", "relationValue")
payload := bookmarkrelations.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: BookmarkRelationsClient.Delete
ctx := context.TODO()
id := bookmarkrelations.NewRelationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "entityIdValue", "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: BookmarkRelationsClient.Get
ctx := context.TODO()
id := bookmarkrelations.NewRelationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "entityIdValue", "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: BookmarkRelationsClient.List
ctx := context.TODO()
id := bookmarkrelations.NewBookmarkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "bookmarkIdValue")
// alternatively `client.List(ctx, id, bookmarkrelations.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, bookmarkrelations.DefaultListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- func ValidateBookmarkID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateRelationID(input interface{}, key string) (warnings []string, errors []error)
- type BookmarkId
- type BookmarkRelationsClient
- func (c BookmarkRelationsClient) CreateOrUpdate(ctx context.Context, id RelationId, input Relation) (result CreateOrUpdateOperationResponse, err error)
- func (c BookmarkRelationsClient) Delete(ctx context.Context, id RelationId) (result DeleteOperationResponse, err error)
- func (c BookmarkRelationsClient) Get(ctx context.Context, id RelationId) (result GetOperationResponse, err error)
- func (c BookmarkRelationsClient) List(ctx context.Context, id BookmarkId, options ListOperationOptions) (resp ListOperationResponse, err error)
- func (c BookmarkRelationsClient) ListComplete(ctx context.Context, id BookmarkId, options ListOperationOptions) (ListCompleteResult, error)
- func (c BookmarkRelationsClient) ListCompleteMatchingPredicate(ctx context.Context, id BookmarkId, options ListOperationOptions, ...) (resp ListCompleteResult, err error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListCompleteResult
- type ListOperationOptions
- type ListOperationResponse
- type Relation
- type RelationId
- type RelationOperationPredicate
- type RelationProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBookmarkID ¶
ValidateBookmarkID checks that 'input' can be parsed as a Bookmark ID
func ValidateRelationID ¶
ValidateRelationID checks that 'input' can be parsed as a Relation ID
Types ¶
type BookmarkId ¶
type BookmarkId struct { SubscriptionId string ResourceGroupName string WorkspaceName string BookmarkId string }
BookmarkId is a struct representing the Resource ID for a Bookmark
func NewBookmarkID ¶
func NewBookmarkID(subscriptionId string, resourceGroupName string, workspaceName string, bookmarkId string) BookmarkId
NewBookmarkID returns a new BookmarkId struct
func ParseBookmarkID ¶
func ParseBookmarkID(input string) (*BookmarkId, error)
ParseBookmarkID parses 'input' into a BookmarkId
func ParseBookmarkIDInsensitively ¶
func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error)
ParseBookmarkIDInsensitively parses 'input' case-insensitively into a BookmarkId note: this method should only be used for API response data and not user input
func (BookmarkId) Segments ¶
func (id BookmarkId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Bookmark ID
func (BookmarkId) String ¶
func (id BookmarkId) String() string
String returns a human-readable description of this Bookmark ID
type BookmarkRelationsClient ¶
type BookmarkRelationsClient struct { Client autorest.Client // contains filtered or unexported fields }
func NewBookmarkRelationsClientWithBaseURI ¶
func NewBookmarkRelationsClientWithBaseURI(endpoint string) BookmarkRelationsClient
func (BookmarkRelationsClient) CreateOrUpdate ¶
func (c BookmarkRelationsClient) CreateOrUpdate(ctx context.Context, id RelationId, input Relation) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (BookmarkRelationsClient) Delete ¶
func (c BookmarkRelationsClient) Delete(ctx context.Context, id RelationId) (result DeleteOperationResponse, err error)
Delete ...
func (BookmarkRelationsClient) Get ¶
func (c BookmarkRelationsClient) Get(ctx context.Context, id RelationId) (result GetOperationResponse, err error)
Get ...
func (BookmarkRelationsClient) List ¶
func (c BookmarkRelationsClient) List(ctx context.Context, id BookmarkId, options ListOperationOptions) (resp ListOperationResponse, err error)
List ...
func (BookmarkRelationsClient) ListComplete ¶
func (c BookmarkRelationsClient) ListComplete(ctx context.Context, id BookmarkId, options ListOperationOptions) (ListCompleteResult, error)
ListComplete retrieves all of the results into a single object
func (BookmarkRelationsClient) ListCompleteMatchingPredicate ¶
func (c BookmarkRelationsClient) ListCompleteMatchingPredicate(ctx context.Context, id BookmarkId, options ListOperationOptions, predicate RelationOperationPredicate) (resp ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []Relation
}
type ListOperationOptions ¶
func DefaultListOperationOptions ¶
func DefaultListOperationOptions() ListOperationOptions
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response Model *[]Relation // 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 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 RelationId ¶
type RelationId struct { SubscriptionId string ResourceGroupName string WorkspaceName string EntityId string RelationName string }
RelationId is a struct representing the Resource ID for a Relation
func NewRelationID ¶
func NewRelationID(subscriptionId string, resourceGroupName string, workspaceName string, entityId string, relationName 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) 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
type RelationOperationPredicate ¶
func (RelationOperationPredicate) Matches ¶
func (p RelationOperationPredicate) Matches(input Relation) bool