automations

package
v0.20230710.1102917 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/automations Documentation

The automations SDK allows for interaction with the Azure Resource Manager Service security (API Version 2019-01-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/security/2019-01-01-preview/automations"

Client Initialization

client := automations.NewAutomationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AutomationsClient.CreateOrUpdate

ctx := context.TODO()
id := automations.NewAutomationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationValue")

payload := automations.Automation{
	// ...
}


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

ctx := context.TODO()
id := automations.NewAutomationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationValue")

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

ctx := context.TODO()
id := automations.NewAutomationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationValue")

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

ctx := context.TODO()
id := automations.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AutomationsClient.ListByResourceGroup

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

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

Example Usage: AutomationsClient.Validate

ctx := context.TODO()
id := automations.NewAutomationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationValue")

payload := automations.Automation{
	// ...
}


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

func PossibleValuesForActionType() []string

func PossibleValuesForEventSource

func PossibleValuesForEventSource() []string

func PossibleValuesForOperator

func PossibleValuesForOperator() []string

func PossibleValuesForPropertyType

func PossibleValuesForPropertyType() []string

func ValidateAutomationID

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

ValidateAutomationID checks that 'input' can be parsed as a Automation ID

Types

type ActionType

type ActionType string
const (
	ActionTypeEventHub  ActionType = "EventHub"
	ActionTypeLogicApp  ActionType = "LogicApp"
	ActionTypeWorkspace ActionType = "Workspace"
)

type Automation

type Automation struct {
	Etag       *string               `json:"etag,omitempty"`
	Id         *string               `json:"id,omitempty"`
	Kind       *string               `json:"kind,omitempty"`
	Location   *string               `json:"location,omitempty"`
	Name       *string               `json:"name,omitempty"`
	Properties *AutomationProperties `json:"properties,omitempty"`
	Tags       *map[string]string    `json:"tags,omitempty"`
	Type       *string               `json:"type,omitempty"`
}

type AutomationAction

type AutomationAction interface {
}

type AutomationActionEventHub

type AutomationActionEventHub struct {
	ConnectionString   *string `json:"connectionString,omitempty"`
	EventHubResourceId *string `json:"eventHubResourceId,omitempty"`
	SasPolicyName      *string `json:"sasPolicyName,omitempty"`
}

func (AutomationActionEventHub) MarshalJSON

func (s AutomationActionEventHub) MarshalJSON() ([]byte, error)

type AutomationActionLogicApp

type AutomationActionLogicApp struct {
	LogicAppResourceId *string `json:"logicAppResourceId,omitempty"`
	Uri                *string `json:"uri,omitempty"`
}

func (AutomationActionLogicApp) MarshalJSON

func (s AutomationActionLogicApp) MarshalJSON() ([]byte, error)

type AutomationActionWorkspace

type AutomationActionWorkspace struct {
	WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"`
}

func (AutomationActionWorkspace) MarshalJSON

func (s AutomationActionWorkspace) MarshalJSON() ([]byte, error)

type AutomationId

type AutomationId struct {
	SubscriptionId    string
	ResourceGroupName string
	AutomationName    string
}

AutomationId is a struct representing the Resource ID for a Automation

func NewAutomationID

func NewAutomationID(subscriptionId string, resourceGroupName string, automationName string) AutomationId

NewAutomationID returns a new AutomationId struct

func ParseAutomationID

func ParseAutomationID(input string) (*AutomationId, error)

ParseAutomationID parses 'input' into a AutomationId

func ParseAutomationIDInsensitively

func ParseAutomationIDInsensitively(input string) (*AutomationId, error)

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

func (AutomationId) ID

func (id AutomationId) ID() string

ID returns the formatted Automation ID

func (AutomationId) Segments

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

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

func (AutomationId) String

func (id AutomationId) String() string

String returns a human-readable description of this Automation ID

type AutomationOperationPredicate

type AutomationOperationPredicate struct {
	Etag     *string
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (AutomationOperationPredicate) Matches

func (p AutomationOperationPredicate) Matches(input Automation) bool

type AutomationProperties

type AutomationProperties struct {
	Actions     *[]AutomationAction `json:"actions,omitempty"`
	Description *string             `json:"description,omitempty"`
	IsEnabled   *bool               `json:"isEnabled,omitempty"`
	Scopes      *[]AutomationScope  `json:"scopes,omitempty"`
	Sources     *[]AutomationSource `json:"sources,omitempty"`
}

func (*AutomationProperties) UnmarshalJSON

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

type AutomationRuleSet

type AutomationRuleSet struct {
	Rules *[]AutomationTriggeringRule `json:"rules,omitempty"`
}

type AutomationScope

type AutomationScope struct {
	Description *string `json:"description,omitempty"`
	ScopePath   *string `json:"scopePath,omitempty"`
}

type AutomationSource

type AutomationSource struct {
	EventSource *EventSource         `json:"eventSource,omitempty"`
	RuleSets    *[]AutomationRuleSet `json:"ruleSets,omitempty"`
}

type AutomationTriggeringRule

type AutomationTriggeringRule struct {
	ExpectedValue *string       `json:"expectedValue,omitempty"`
	Operator      *Operator     `json:"operator,omitempty"`
	PropertyJPath *string       `json:"propertyJPath,omitempty"`
	PropertyType  *PropertyType `json:"propertyType,omitempty"`
}

type AutomationValidationStatus

type AutomationValidationStatus struct {
	IsValid *bool   `json:"isValid,omitempty"`
	Message *string `json:"message,omitempty"`
}

type AutomationsClient

type AutomationsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewAutomationsClientWithBaseURI

func NewAutomationsClientWithBaseURI(endpoint string) AutomationsClient

func (AutomationsClient) CreateOrUpdate

func (c AutomationsClient) CreateOrUpdate(ctx context.Context, id AutomationId, input Automation) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (AutomationsClient) Delete

Delete ...

func (AutomationsClient) Get

Get ...

func (AutomationsClient) List

List ...

func (AutomationsClient) ListByResourceGroup

ListByResourceGroup ...

func (AutomationsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (AutomationsClient) ListByResourceGroupCompleteMatchingPredicate

func (c AutomationsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AutomationOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AutomationsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (AutomationsClient) ListCompleteMatchingPredicate

func (c AutomationsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AutomationOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AutomationsClient) Validate

func (c AutomationsClient) Validate(ctx context.Context, id AutomationId, input Automation) (result ValidateOperationResponse, err error)

Validate ...

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Automation
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type EventSource

type EventSource string
const (
	EventSourceAlerts                                 EventSource = "Alerts"
	EventSourceAssessments                            EventSource = "Assessments"
	EventSourceAssessmentsSnapshot                    EventSource = "AssessmentsSnapshot"
	EventSourceRegulatoryComplianceAssessment         EventSource = "RegulatoryComplianceAssessment"
	EventSourceRegulatoryComplianceAssessmentSnapshot EventSource = "RegulatoryComplianceAssessmentSnapshot"
	EventSourceSecureScoreControls                    EventSource = "SecureScoreControls"
	EventSourceSecureScoreControlsSnapshot            EventSource = "SecureScoreControlsSnapshot"
	EventSourceSecureScores                           EventSource = "SecureScores"
	EventSourceSecureScoresSnapshot                   EventSource = "SecureScoresSnapshot"
	EventSourceSubAssessments                         EventSource = "SubAssessments"
	EventSourceSubAssessmentsSnapshot                 EventSource = "SubAssessmentsSnapshot"
)

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Automation
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Automation
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Automation
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Automation
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Automation
	// 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 Operator

type Operator string
const (
	OperatorContains             Operator = "Contains"
	OperatorEndsWith             Operator = "EndsWith"
	OperatorEquals               Operator = "Equals"
	OperatorGreaterThan          Operator = "GreaterThan"
	OperatorGreaterThanOrEqualTo Operator = "GreaterThanOrEqualTo"
	OperatorLesserThan           Operator = "LesserThan"
	OperatorLesserThanOrEqualTo  Operator = "LesserThanOrEqualTo"
	OperatorNotEquals            Operator = "NotEquals"
	OperatorStartsWith           Operator = "StartsWith"
)

type PropertyType

type PropertyType string
const (
	PropertyTypeBoolean PropertyType = "Boolean"
	PropertyTypeInteger PropertyType = "Integer"
	PropertyTypeNumber  PropertyType = "Number"
	PropertyTypeString  PropertyType = "String"
)

type ValidateOperationResponse

type ValidateOperationResponse struct {
	HttpResponse *http.Response
	Model        *AutomationValidationStatus
}

Jump to

Keyboard shortcuts

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