README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2021-09-01-preview/metadata
Documentation
The metadata
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/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 ¶
- func PossibleValuesForKind() []string
- func PossibleValuesForOperator() []string
- func PossibleValuesForSourceKind() []string
- func PossibleValuesForSupportTier() []string
- func ValidateMetadataID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type Kind
- type ListCompleteResult
- type ListOperationOptions
- type ListOperationResponse
- type MetadataAuthor
- type MetadataCategories
- type MetadataClient
- func (c MetadataClient) Create(ctx context.Context, id MetadataId, input MetadataModel) (result CreateOperationResponse, err error)
- func (c MetadataClient) Delete(ctx context.Context, id MetadataId) (result DeleteOperationResponse, err error)
- func (c MetadataClient) Get(ctx context.Context, id MetadataId) (result GetOperationResponse, err error)
- func (c MetadataClient) List(ctx context.Context, id WorkspaceId, options ListOperationOptions) (result ListOperationResponse, err error)
- func (c MetadataClient) ListComplete(ctx context.Context, id WorkspaceId, options ListOperationOptions) (ListCompleteResult, error)
- func (c MetadataClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options ListOperationOptions, ...) (result ListCompleteResult, err error)
- func (c MetadataClient) Update(ctx context.Context, id MetadataId, input MetadataPatch) (result UpdateOperationResponse, err error)
- type MetadataDependencies
- type MetadataId
- type MetadataModel
- type MetadataModelOperationPredicate
- type MetadataPatch
- type MetadataProperties
- type MetadataPropertiesPatch
- type MetadataSource
- type MetadataSupport
- type Operator
- type SourceKind
- type SupportTier
- type UpdateOperationResponse
- type WorkspaceId
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 ¶
ValidateMetadataID checks that 'input' can be parsed as a Metadata ID
func ValidateWorkspaceID ¶
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 GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *MetadataModel }
type Kind ¶
type Kind string
const ( KindAnalyticsRule Kind = "AnalyticsRule" KindAnalyticsRuleTemplate Kind = "AnalyticsRuleTemplate" KindDataConnector Kind = "DataConnector" KindDataType Kind = "DataType" KindHuntingQuery Kind = "HuntingQuery" KindInvestigationQuery Kind = "InvestigationQuery" 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
type ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response Items []MetadataModel }
type ListOperationOptions ¶
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
func (o ListOperationOptions) ToQuery() *client.QueryParams
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]MetadataModel }
type MetadataAuthor ¶
type MetadataCategories ¶
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 ¶
func (c MetadataClient) List(ctx context.Context, id WorkspaceId, options ListOperationOptions) (result ListOperationResponse, err error)
List ...
func (MetadataClient) ListComplete ¶
func (c MetadataClient) ListComplete(ctx context.Context, id WorkspaceId, options ListOperationOptions) (ListCompleteResult, error)
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) 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 ¶
func (MetadataModelOperationPredicate) Matches ¶
func (p MetadataModelOperationPredicate) Matches(input MetadataModel) bool
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"` Dependencies *MetadataDependencies `json:"dependencies,omitempty"` FirstPublishDate *string `json:"firstPublishDate,omitempty"` Kind Kind `json:"kind"` LastPublishDate *string `json:"lastPublishDate,omitempty"` ParentId string `json:"parentId"` Providers *[]string `json:"providers,omitempty"` Source *MetadataSource `json:"source,omitempty"` Support *MetadataSupport `json:"support,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"` Dependencies *MetadataDependencies `json:"dependencies,omitempty"` FirstPublishDate *string `json:"firstPublishDate,omitempty"` Kind *Kind `json:"kind,omitempty"` LastPublishDate *string `json:"lastPublishDate,omitempty"` ParentId *string `json:"parentId,omitempty"` Providers *[]string `json:"providers,omitempty"` Source *MetadataSource `json:"source,omitempty"` Support *MetadataSupport `json:"support,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 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 ¶
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) 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
Source Files ¶
- client.go
- constants.go
- id_metadata.go
- id_workspace.go
- method_create.go
- method_delete.go
- method_get.go
- method_list.go
- method_update.go
- model_metadataauthor.go
- model_metadatacategories.go
- model_metadatadependencies.go
- model_metadatamodel.go
- model_metadatapatch.go
- model_metadataproperties.go
- model_metadatapropertiespatch.go
- model_metadatasource.go
- model_metadatasupport.go
- predicates.go
- version.go