armsecurity

package module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 18 Imported by: 67

README

Azure Security Module for Go

PkgGoDev

The armsecurity module provides operations for working with Azure Security.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Security module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Security. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Security modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armsecurity.NewConnectorsClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armsecurity.NewConnectorsClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Security label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AADConnectivityState

type AADConnectivityState string

AADConnectivityState - The connectivity state of the external AAD solution

const (
	AADConnectivityStateConnected   AADConnectivityState = "Connected"
	AADConnectivityStateDiscovered  AADConnectivityState = "Discovered"
	AADConnectivityStateNotLicensed AADConnectivityState = "NotLicensed"
)

func PossibleAADConnectivityStateValues

func PossibleAADConnectivityStateValues() []AADConnectivityState

PossibleAADConnectivityStateValues returns the possible values for the AADConnectivityState const type.

type AADConnectivityStateAutoGenerated

type AADConnectivityStateAutoGenerated struct {
	// The connectivity state of the external AAD solution
	ConnectivityState *AADConnectivityState `json:"connectivityState,omitempty"`
}

AADConnectivityStateAutoGenerated - Describes an Azure resource with kind

func (AADConnectivityStateAutoGenerated) MarshalJSON

func (a AADConnectivityStateAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AADConnectivityStateAutoGenerated.

func (*AADConnectivityStateAutoGenerated) UnmarshalJSON

func (a *AADConnectivityStateAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AADConnectivityStateAutoGenerated.

type AADExternalSecuritySolution

type AADExternalSecuritySolution struct {
	// The kind of the external solution
	Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"`

	// The external security solution properties for AAD solutions
	Properties *AADSolutionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AADExternalSecuritySolution - Represents an AAD identity protection solution which sends logs to an OMS workspace.

func (AADExternalSecuritySolution) MarshalJSON

func (a AADExternalSecuritySolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AADExternalSecuritySolution.

func (*AADExternalSecuritySolution) UnmarshalJSON

func (a *AADExternalSecuritySolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AADExternalSecuritySolution.

type AADSolutionProperties

type AADSolutionProperties struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// The connectivity state of the external AAD solution
	ConnectivityState *AADConnectivityState `json:"connectivityState,omitempty"`
	DeviceType        *string               `json:"deviceType,omitempty"`
	DeviceVendor      *string               `json:"deviceVendor,omitempty"`

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace `json:"workspace,omitempty"`
}

AADSolutionProperties - The external security solution properties for AAD solutions

func (AADSolutionProperties) MarshalJSON added in v0.3.0

func (a AADSolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AADSolutionProperties.

func (*AADSolutionProperties) UnmarshalJSON added in v0.3.0

func (a *AADSolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AADSolutionProperties.

type AccountConnectorsClient added in v0.3.0

type AccountConnectorsClient struct {
	// contains filtered or unexported fields
}

AccountConnectorsClient contains the methods for the AccountConnectors group. Don't use this type directly, use NewAccountConnectorsClient() instead.

func NewAccountConnectorsClient added in v0.3.0

func NewAccountConnectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountConnectorsClient, error)

NewAccountConnectorsClient creates a new instance of AccountConnectorsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AccountConnectorsClient) CreateOrUpdate added in v0.3.0

CreateOrUpdate - Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either account credentials or role-based authentication. For GCP, use account organization credentials. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01-preview connectorName - Name of the cloud account connector connectorSetting - Settings for the cloud account connector options - AccountConnectorsClientCreateOrUpdateOptions contains the optional parameters for the AccountConnectorsClient.CreateOrUpdate method.

Example (AwsAssumeRoleCreateACloudAccountConnectorForASubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/CreateUpdateAwsAssumeRoleConnectorSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAccountConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "aws_dev2", armsecurity.ConnectorSetting{
		Properties: &armsecurity.ConnectorSettingProperties{
			AuthenticationDetails: &armsecurity.AwAssumeRoleAuthenticationDetailsProperties{
				AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsAssumeRole),
				AwsAssumeRoleArn:   to.Ptr("arn:aws:iam::81231569658:role/AscConnector"),
				AwsExternalID:      to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
			},
			HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
				AutoProvision: to.Ptr(armsecurity.AutoProvisionOn),
				ProxyServer: &armsecurity.ProxyServerProperties{
					IP:   to.Ptr("167.220.197.140"),
					Port: to.Ptr("34"),
				},
				Region:            to.Ptr("West US 2"),
				ResourceGroupName: to.Ptr("AwsConnectorRG"),
				ServicePrincipal: &armsecurity.ServicePrincipalProperties{
					ApplicationID: to.Ptr("ad9bcd79-be9c-45ab-abd8-80ca1654a7d1"),
					Secret:        to.Ptr("<secret>"),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (AwsCredCreateACloudAccountConnectorForASubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/CreateUpdateAwsCredConnectorSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAccountConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "aws_dev1", armsecurity.ConnectorSetting{
		Properties: &armsecurity.ConnectorSettingProperties{
			AuthenticationDetails: &armsecurity.AwsCredsAuthenticationDetailsProperties{
				AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsCreds),
				AwsAccessKeyID:     to.Ptr("AKIARPZCNODDNAEQFSOE"),
				AwsSecretAccessKey: to.Ptr("<awsSecretAccessKey>"),
			},
			HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
				AutoProvision: to.Ptr(armsecurity.AutoProvisionOn),
				ProxyServer: &armsecurity.ProxyServerProperties{
					IP:   to.Ptr("167.220.197.140"),
					Port: to.Ptr("34"),
				},
				Region:            to.Ptr("West US 2"),
				ResourceGroupName: to.Ptr("AwsConnectorRG"),
				ServicePrincipal: &armsecurity.ServicePrincipalProperties{
					ApplicationID: to.Ptr("ad9bcd79-be9c-45ab-abd8-80ca1654a7d1"),
					Secret:        to.Ptr("<secret>"),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (GcpCredentialsCreateACloudAccountConnectorForASubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/CreateUpdateGcpCredentialsConnectorSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAccountConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "gcp_dev", armsecurity.ConnectorSetting{
		Properties: &armsecurity.ConnectorSettingProperties{
			AuthenticationDetails: &armsecurity.GcpCredentialsDetailsProperties{
				AuthenticationType:      to.Ptr(armsecurity.AuthenticationTypeGcpCredentials),
				Type:                    to.Ptr("service_account"),
				AuthProviderX509CertURL: to.Ptr("https://www.googleapis.com/oauth2/v1/certs"),
				AuthURI:                 to.Ptr("https://accounts.google.com/o/oauth2/auth"),
				ClientEmail:             to.Ptr("asc-135@asc-project-1234.iam.gserviceaccount.com"),
				ClientID:                to.Ptr("105889053725632919854"),
				ClientX509CertURL:       to.Ptr("https://www.googleapis.com/robot/v1/metadata/x509/asc-135%40asc-project-1234.iam.gserviceaccount.com"),
				OrganizationID:          to.Ptr("AscDemoOrg"),
				PrivateKey:              to.Ptr("-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCpxYHcLzcDZ6/Q\nAeQZnQXM5GTb3p09Xsbjo2T2F61b6I7FZiQXBrbw3Zf0CUCkkqTTpD5xifl82yQ6\n89V7SAe8hxI7esAcVDhm/aJMqzVjHLISAU2L3li1sn0jjY2oYtndwN6bRivP8O6t\n9F+W6E0zMlbCxtpZEHLbb6WxlJJrwEQ0MPH2yOCwZUQi6NHksAtEzX2nNKJNyUC7\nQyBVHHMm34H2bmZwsuQp3y2otpcJ9tJnVmYfC3k/w4x2L+DIK7JnQP/C1wQqu2du\nc0w6sydF6RhLoHButrVdYRJTdfK4k03SsSTyMqZ+f7LNnKw3xenzw1VmEpk8mvoQ\nt08tCBOrAgMBAAECggEAByzz6iyMtLYjNjV+QJ7kad6VbL2iA8AHxANZ9xTVHPdd\nYXaJu/dqsA+NpqDlfI8+LDva782XH/HbPCqmMUnAGfXTjXQIvqnIoIHD5F2wKfpC\nhIRNlMXXFgbvRxtqi11yO+80+XcjzuwuCmgzyhsTeEB+bkkdXXpWgHPdmv3emnM6\nMQM9Zgrug0UndPmiUwKOcJSU4PlmlTpHEV4vA6JfA4bvphy9m1jxO5qWeah5yym2\n6FP5BRIDF98kFrDnSXJjajwgLCQ+MypFQXyax6XkxDxuKXbng1bv7eZDjqazIChk\nm0y14X0s0jnWc+AX8vfeSf7d+EsGdVinEwR1aAawEQKBgQDqDB0qxcIQ1oI1Kww8\n9vXefTiuWsf47F+fJ/DIOEbiRfE8IdCgmOABvcqJIoxW/DFMBEdLCcx73Km7pOmd\nKg1ddScnaO8cOj2v/Ub+fAqVrA4ki4ViYP0A7/Nogga3Jr/x3ey5bitrIfFImteS\nCgBHBzZvoQpvO4lB2tKVgo2P9wKBgQC5sgTEq4sasRGSAY6lIoJno0I8w28a/16D\nes60XQeY1ger8uTGwlT02v/u/arDUmRLPClpujXq6gK29KvtRCHy7JkpGbqW2bZs\nPFKKWR7Tk3XPKYyjv94AIi5/xoFeDhS4lpAvy3Z5tQhYS6wqWKvT6yZQ3kM+Hfxs\npHgvu3mU7QKBgQC9/E1k3hj1cBtMK4CIsHPPQljTd4+iacYJPPPAo6YuoVX8WPqw\nksgrwbN59Fh1d8xQh5yTtgWOegYx8uFMGcm1lpbM7+pBQKm4hWGuzGQPMRZd5f/F\nZzOZIi61I+9tlv/yxxIVR+/ozCm/pSneO04UWi9/F/uPZYW6tnWAtfRR6wKBgGsZ\n8MQaCK4JaI/klAhMghgSQnbXZXKVzUZaA3Rln6cX8u7KtgapOOTMlwaZie8Dy1LV\nTTFstAJcm9o3/h1nyYjZy3C4JTUyNpPwqs6enjf7edxVI4eidwFutZD+xcigqHTa\naikW2atSrZB3fMIjyF7+5meH+hKOqvNiXOty3qn1AoGAZuVxYQy5FVq3YZxzr3Aa\nAm0ShoXTF6QYIbsaUiUGoa/NlHcw9V/lj4AqBRbxbaYMD+hz2J/od9cb268eJKY8\n3b6MvaUqdNhNnWodJXLhgtmGEHDKmTppz2JSTx/tVzCfhFdcOC79StZvcKLhtoFQ\n+/3lEw6NCIXzm5E4+dtJG4k=\n-----END PRIVATE KEY-----\n"),
				PrivateKeyID:            to.Ptr("6efg587hra2568as34d22326b044cc20dc2af"),
				ProjectID:               to.Ptr("asc-project-1234"),
				TokenURI:                to.Ptr("https://oauth2.googleapis.com/token"),
			},
			HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
				AutoProvision: to.Ptr(armsecurity.AutoProvisionOff),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountConnectorsClient) Delete added in v0.3.0

Delete - Delete a cloud account connector from a subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01-preview connectorName - Name of the cloud account connector options - AccountConnectorsClientDeleteOptions contains the optional parameters for the AccountConnectorsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/DeleteConnectorSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAccountConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "aws_dev1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AccountConnectorsClient) Get added in v0.3.0

Get - Details of a specific cloud account connector If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01-preview connectorName - Name of the cloud account connector options - AccountConnectorsClientGetOptions contains the optional parameters for the AccountConnectorsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/GetConnectorSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAccountConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "aws_dev1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountConnectorsClient) NewListPager added in v0.6.0

NewListPager - Cloud accounts connectors of a subscription Generated from API version 2020-01-01-preview options - AccountConnectorsClientListOptions contains the optional parameters for the AccountConnectorsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/GetListConnectorSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAccountConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AccountConnectorsClientCreateOrUpdateOptions added in v0.3.0

type AccountConnectorsClientCreateOrUpdateOptions struct {
}

AccountConnectorsClientCreateOrUpdateOptions contains the optional parameters for the AccountConnectorsClient.CreateOrUpdate method.

type AccountConnectorsClientCreateOrUpdateResponse added in v0.3.0

type AccountConnectorsClientCreateOrUpdateResponse struct {
	ConnectorSetting
}

AccountConnectorsClientCreateOrUpdateResponse contains the response from method AccountConnectorsClient.CreateOrUpdate.

type AccountConnectorsClientDeleteOptions added in v0.3.0

type AccountConnectorsClientDeleteOptions struct {
}

AccountConnectorsClientDeleteOptions contains the optional parameters for the AccountConnectorsClient.Delete method.

type AccountConnectorsClientDeleteResponse added in v0.3.0

type AccountConnectorsClientDeleteResponse struct {
}

AccountConnectorsClientDeleteResponse contains the response from method AccountConnectorsClient.Delete.

type AccountConnectorsClientGetOptions added in v0.3.0

type AccountConnectorsClientGetOptions struct {
}

AccountConnectorsClientGetOptions contains the optional parameters for the AccountConnectorsClient.Get method.

type AccountConnectorsClientGetResponse added in v0.3.0

type AccountConnectorsClientGetResponse struct {
	ConnectorSetting
}

AccountConnectorsClientGetResponse contains the response from method AccountConnectorsClient.Get.

type AccountConnectorsClientListOptions added in v0.3.0

type AccountConnectorsClientListOptions struct {
}

AccountConnectorsClientListOptions contains the optional parameters for the AccountConnectorsClient.List method.

type AccountConnectorsClientListResponse added in v0.3.0

type AccountConnectorsClientListResponse struct {
	ConnectorSettingList
}

AccountConnectorsClientListResponse contains the response from method AccountConnectorsClient.List.

type ActionType

type ActionType string

ActionType - The type of the action that will be triggered by the Automation

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

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ActiveConnectionsNotInAllowedRange

type ActiveConnectionsNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

ActiveConnectionsNotInAllowedRange - Number of active connections is not in allowed range.

func (*ActiveConnectionsNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (a *ActiveConnectionsNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type ActiveConnectionsNotInAllowedRange.

func (*ActiveConnectionsNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (a *ActiveConnectionsNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type ActiveConnectionsNotInAllowedRange.

func (*ActiveConnectionsNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (a *ActiveConnectionsNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type ActiveConnectionsNotInAllowedRange.

func (ActiveConnectionsNotInAllowedRange) MarshalJSON

func (a ActiveConnectionsNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ActiveConnectionsNotInAllowedRange.

func (*ActiveConnectionsNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (a *ActiveConnectionsNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConnectionsNotInAllowedRange.

type AdaptiveApplicationControlGroup

type AdaptiveApplicationControlGroup struct {
	// REQUIRED; Represents a machines group and set of rules to be allowed running on a machine
	Properties *AdaptiveApplicationControlGroupData `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (AdaptiveApplicationControlGroup) MarshalJSON

func (a AdaptiveApplicationControlGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveApplicationControlGroup.

func (*AdaptiveApplicationControlGroup) UnmarshalJSON

func (a *AdaptiveApplicationControlGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveApplicationControlGroup.

type AdaptiveApplicationControlGroupData

type AdaptiveApplicationControlGroupData struct {
	// The application control policy enforcement/protection mode of the machine group
	EnforcementMode     *EnforcementMode      `json:"enforcementMode,omitempty"`
	PathRecommendations []*PathRecommendation `json:"pathRecommendations,omitempty"`

	// The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux.
	ProtectionMode    *ProtectionMode     `json:"protectionMode,omitempty"`
	VMRecommendations []*VMRecommendation `json:"vmRecommendations,omitempty"`

	// READ-ONLY; The configuration status of the machines group or machine or rule
	ConfigurationStatus *ConfigurationStatus `json:"configurationStatus,omitempty" azure:"ro"`

	// READ-ONLY
	Issues []*AdaptiveApplicationControlIssueSummary `json:"issues,omitempty" azure:"ro"`

	// READ-ONLY; The initial recommendation status of the machine group or machine
	RecommendationStatus *RecommendationStatus `json:"recommendationStatus,omitempty" azure:"ro"`

	// READ-ONLY; The source type of the machine group
	SourceSystem *SourceSystem `json:"sourceSystem,omitempty" azure:"ro"`
}

AdaptiveApplicationControlGroupData - Represents a machines group and set of rules to be allowed running on a machine

func (AdaptiveApplicationControlGroupData) MarshalJSON

func (a AdaptiveApplicationControlGroupData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveApplicationControlGroupData.

func (*AdaptiveApplicationControlGroupData) UnmarshalJSON added in v0.8.0

func (a *AdaptiveApplicationControlGroupData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveApplicationControlGroupData.

type AdaptiveApplicationControlGroups

type AdaptiveApplicationControlGroups struct {
	Value []*AdaptiveApplicationControlGroup `json:"value,omitempty"`
}

AdaptiveApplicationControlGroups - Represents a list of VM/server groups and set of rules that are Recommended by Microsoft Defender for Cloud to be allowed

func (AdaptiveApplicationControlGroups) MarshalJSON

func (a AdaptiveApplicationControlGroups) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveApplicationControlGroups.

func (*AdaptiveApplicationControlGroups) UnmarshalJSON added in v0.8.0

func (a *AdaptiveApplicationControlGroups) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveApplicationControlGroups.

type AdaptiveApplicationControlIssue

type AdaptiveApplicationControlIssue string

AdaptiveApplicationControlIssue - An alert that machines within a group can have

const (
	AdaptiveApplicationControlIssueExecutableViolationsAudited   AdaptiveApplicationControlIssue = "ExecutableViolationsAudited"
	AdaptiveApplicationControlIssueMsiAndScriptViolationsAudited AdaptiveApplicationControlIssue = "MsiAndScriptViolationsAudited"
	AdaptiveApplicationControlIssueMsiAndScriptViolationsBlocked AdaptiveApplicationControlIssue = "MsiAndScriptViolationsBlocked"
	AdaptiveApplicationControlIssueRulesViolatedManually         AdaptiveApplicationControlIssue = "RulesViolatedManually"
	AdaptiveApplicationControlIssueViolationsAudited             AdaptiveApplicationControlIssue = "ViolationsAudited"
	AdaptiveApplicationControlIssueViolationsBlocked             AdaptiveApplicationControlIssue = "ViolationsBlocked"
)

func PossibleAdaptiveApplicationControlIssueValues

func PossibleAdaptiveApplicationControlIssueValues() []AdaptiveApplicationControlIssue

PossibleAdaptiveApplicationControlIssueValues returns the possible values for the AdaptiveApplicationControlIssue const type.

type AdaptiveApplicationControlIssueSummary

type AdaptiveApplicationControlIssueSummary struct {
	// An alert that machines within a group can have
	Issue *AdaptiveApplicationControlIssue `json:"issue,omitempty"`

	// The number of machines in the group that have this alert
	NumberOfVMs *float32 `json:"numberOfVms,omitempty"`
}

AdaptiveApplicationControlIssueSummary - Represents a summary of the alerts of the machine group

func (AdaptiveApplicationControlIssueSummary) MarshalJSON added in v0.8.0

func (a AdaptiveApplicationControlIssueSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveApplicationControlIssueSummary.

func (*AdaptiveApplicationControlIssueSummary) UnmarshalJSON added in v0.8.0

func (a *AdaptiveApplicationControlIssueSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveApplicationControlIssueSummary.

type AdaptiveApplicationControlsClient

type AdaptiveApplicationControlsClient struct {
	// contains filtered or unexported fields
}

AdaptiveApplicationControlsClient contains the methods for the AdaptiveApplicationControls group. Don't use this type directly, use NewAdaptiveApplicationControlsClient() instead.

func NewAdaptiveApplicationControlsClient

func NewAdaptiveApplicationControlsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdaptiveApplicationControlsClient, error)

NewAdaptiveApplicationControlsClient creates a new instance of AdaptiveApplicationControlsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AdaptiveApplicationControlsClient) Delete

Delete - Delete an application control machine group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations groupName - Name of an application control machine group options - AdaptiveApplicationControlsClientDeleteOptions contains the optional parameters for the AdaptiveApplicationControlsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/DeleteAdaptiveApplicationControls_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveApplicationControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "centralus", "GROUP1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AdaptiveApplicationControlsClient) Get

Get - Gets an application control VM/server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations groupName - Name of an application control machine group options - AdaptiveApplicationControlsClientGetOptions contains the optional parameters for the AdaptiveApplicationControlsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveApplicationControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "centralus", "ERELGROUP1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AdaptiveApplicationControlsClient) List

List - Gets a list of application control machine groups for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 options - AdaptiveApplicationControlsClientListOptions contains the optional parameters for the AdaptiveApplicationControlsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveApplicationControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, &armsecurity.AdaptiveApplicationControlsClientListOptions{IncludePathRecommendations: to.Ptr(true),
		Summary: to.Ptr(false),
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AdaptiveApplicationControlsClient) Put

Put - Update an application control machine group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations groupName - Name of an application control machine group options - AdaptiveApplicationControlsClientPutOptions contains the optional parameters for the AdaptiveApplicationControlsClient.Put method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/PutAdaptiveApplicationControls_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveApplicationControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Put(ctx, "centralus", "ERELGROUP1", armsecurity.AdaptiveApplicationControlGroup{
		Properties: &armsecurity.AdaptiveApplicationControlGroupData{
			EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
			PathRecommendations: []*armsecurity.PathRecommendation{
				{
					Type:                to.Ptr(armsecurity.RecommendationType("PublisherSignature")),
					Path:                to.Ptr("[Exe] O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\\*\\*\\0.0.0.0"),
					Action:              to.Ptr(armsecurity.RecommendationActionRecommended),
					Common:              to.Ptr(true),
					ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
					FileType:            to.Ptr(armsecurity.FileTypeExe),
					PublisherInfo: &armsecurity.PublisherInfo{
						BinaryName:    to.Ptr("*"),
						ProductName:   to.Ptr("*"),
						PublisherName: to.Ptr("O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US"),
						Version:       to.Ptr("0.0.0.0"),
					},
					UserSids: []*string{
						to.Ptr("S-1-1-0")},
					Usernames: []*armsecurity.UserRecommendation{
						{
							RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
							Username:             to.Ptr("Everyone"),
						}},
				},
				{
					Type:                to.Ptr(armsecurity.RecommendationType("ProductSignature")),
					Path:                to.Ptr("%OSDRIVE%\\WINDOWSAZURE\\SECAGENT\\WASECAGENTPROV.EXE"),
					Action:              to.Ptr(armsecurity.RecommendationActionRecommended),
					Common:              to.Ptr(true),
					ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
					FileType:            to.Ptr(armsecurity.FileTypeExe),
					PublisherInfo: &armsecurity.PublisherInfo{
						BinaryName:    to.Ptr("*"),
						ProductName:   to.Ptr("MICROSOFT® COREXT"),
						PublisherName: to.Ptr("CN=MICROSOFT AZURE DEPENDENCY CODE SIGN"),
						Version:       to.Ptr("0.0.0.0"),
					},
					UserSids: []*string{
						to.Ptr("S-1-1-0")},
					Usernames: []*armsecurity.UserRecommendation{
						{
							RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
							Username:             to.Ptr("NT AUTHORITY\\SYSTEM"),
						}},
				},
				{
					Type:                to.Ptr(armsecurity.RecommendationType("PublisherSignature")),
					Path:                to.Ptr("%OSDRIVE%\\WINDOWSAZURE\\PACKAGES_201973_7415\\COLLECTGUESTLOGS.EXE"),
					Action:              to.Ptr(armsecurity.RecommendationActionRecommended),
					Common:              to.Ptr(true),
					ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
					FileType:            to.Ptr(armsecurity.FileTypeExe),
					PublisherInfo: &armsecurity.PublisherInfo{
						BinaryName:    to.Ptr("*"),
						ProductName:   to.Ptr("*"),
						PublisherName: to.Ptr("CN=MICROSOFT AZURE DEPENDENCY CODE SIGN"),
						Version:       to.Ptr("0.0.0.0"),
					},
					UserSids: []*string{
						to.Ptr("S-1-1-0")},
					Usernames: []*armsecurity.UserRecommendation{
						{
							RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
							Username:             to.Ptr("NT AUTHORITY\\SYSTEM"),
						}},
				},
				{
					Type:   to.Ptr(armsecurity.RecommendationType("File")),
					Path:   to.Ptr("C:\\directory\\file.exe"),
					Action: to.Ptr(armsecurity.RecommendationActionAdd),
					Common: to.Ptr(true),
				}},
			ProtectionMode: &armsecurity.ProtectionMode{
				Exe:    to.Ptr(armsecurity.EnforcementModeAudit),
				Msi:    to.Ptr(armsecurity.EnforcementModeNone),
				Script: to.Ptr(armsecurity.EnforcementModeNone),
			},
			VMRecommendations: []*armsecurity.VMRecommendation{
				{
					ConfigurationStatus:  to.Ptr(armsecurity.ConfigurationStatusConfigured),
					EnforcementSupport:   to.Ptr(armsecurity.EnforcementSupportSupported),
					RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
					ResourceID:           to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090"),
				},
				{
					ConfigurationStatus:  to.Ptr(armsecurity.ConfigurationStatusConfigured),
					EnforcementSupport:   to.Ptr(armsecurity.EnforcementSupportSupported),
					RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
					ResourceID:           to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/matanvs/providers/microsoft.compute/virtualmachines/matanvs19"),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AdaptiveApplicationControlsClientDeleteOptions added in v0.3.0

type AdaptiveApplicationControlsClientDeleteOptions struct {
}

AdaptiveApplicationControlsClientDeleteOptions contains the optional parameters for the AdaptiveApplicationControlsClient.Delete method.

type AdaptiveApplicationControlsClientDeleteResponse added in v0.3.0

type AdaptiveApplicationControlsClientDeleteResponse struct {
}

AdaptiveApplicationControlsClientDeleteResponse contains the response from method AdaptiveApplicationControlsClient.Delete.

type AdaptiveApplicationControlsClientGetOptions added in v0.3.0

type AdaptiveApplicationControlsClientGetOptions struct {
}

AdaptiveApplicationControlsClientGetOptions contains the optional parameters for the AdaptiveApplicationControlsClient.Get method.

type AdaptiveApplicationControlsClientGetResponse added in v0.3.0

type AdaptiveApplicationControlsClientGetResponse struct {
	AdaptiveApplicationControlGroup
}

AdaptiveApplicationControlsClientGetResponse contains the response from method AdaptiveApplicationControlsClient.Get.

type AdaptiveApplicationControlsClientListOptions added in v0.3.0

type AdaptiveApplicationControlsClientListOptions struct {
	// Include the policy rules
	IncludePathRecommendations *bool
	// Return output in a summarized form
	Summary *bool
}

AdaptiveApplicationControlsClientListOptions contains the optional parameters for the AdaptiveApplicationControlsClient.List method.

type AdaptiveApplicationControlsClientListResponse added in v0.3.0

type AdaptiveApplicationControlsClientListResponse struct {
	AdaptiveApplicationControlGroups
}

AdaptiveApplicationControlsClientListResponse contains the response from method AdaptiveApplicationControlsClient.List.

type AdaptiveApplicationControlsClientPutOptions added in v0.3.0

type AdaptiveApplicationControlsClientPutOptions struct {
}

AdaptiveApplicationControlsClientPutOptions contains the optional parameters for the AdaptiveApplicationControlsClient.Put method.

type AdaptiveApplicationControlsClientPutResponse added in v0.3.0

type AdaptiveApplicationControlsClientPutResponse struct {
	AdaptiveApplicationControlGroup
}

AdaptiveApplicationControlsClientPutResponse contains the response from method AdaptiveApplicationControlsClient.Put.

type AdaptiveNetworkHardening

type AdaptiveNetworkHardening struct {
	// Properties of the Adaptive Network Hardening resource
	Properties *AdaptiveNetworkHardeningProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AdaptiveNetworkHardening - The resource whose properties describes the Adaptive Network Hardening settings for some Azure resource

func (AdaptiveNetworkHardening) MarshalJSON

func (a AdaptiveNetworkHardening) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveNetworkHardening.

func (*AdaptiveNetworkHardening) UnmarshalJSON

func (a *AdaptiveNetworkHardening) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveNetworkHardening.

type AdaptiveNetworkHardeningEnforceRequest

type AdaptiveNetworkHardeningEnforceRequest struct {
	// REQUIRED; The Azure resource IDs of the effective network security groups that will be updated with the created security
	// rules from the Adaptive Network Hardening rules
	NetworkSecurityGroups []*string `json:"networkSecurityGroups,omitempty"`

	// REQUIRED; The rules to enforce
	Rules []*Rule `json:"rules,omitempty"`
}

func (AdaptiveNetworkHardeningEnforceRequest) MarshalJSON

func (a AdaptiveNetworkHardeningEnforceRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveNetworkHardeningEnforceRequest.

func (*AdaptiveNetworkHardeningEnforceRequest) UnmarshalJSON added in v0.8.0

func (a *AdaptiveNetworkHardeningEnforceRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveNetworkHardeningEnforceRequest.

type AdaptiveNetworkHardeningProperties

type AdaptiveNetworkHardeningProperties struct {
	// The Network Security Groups effective on the network interfaces of the protected resource
	EffectiveNetworkSecurityGroups []*EffectiveNetworkSecurityGroups `json:"effectiveNetworkSecurityGroups,omitempty"`

	// The security rules which are recommended to be effective on the VM
	Rules []*Rule `json:"rules,omitempty"`

	// The UTC time on which the rules were calculated
	RulesCalculationTime *time.Time `json:"rulesCalculationTime,omitempty"`
}

AdaptiveNetworkHardeningProperties - Adaptive Network Hardening resource properties

func (AdaptiveNetworkHardeningProperties) MarshalJSON

func (a AdaptiveNetworkHardeningProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveNetworkHardeningProperties.

func (*AdaptiveNetworkHardeningProperties) UnmarshalJSON

func (a *AdaptiveNetworkHardeningProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveNetworkHardeningProperties.

type AdaptiveNetworkHardeningsClient

type AdaptiveNetworkHardeningsClient struct {
	// contains filtered or unexported fields
}

AdaptiveNetworkHardeningsClient contains the methods for the AdaptiveNetworkHardenings group. Don't use this type directly, use NewAdaptiveNetworkHardeningsClient() instead.

func NewAdaptiveNetworkHardeningsClient

func NewAdaptiveNetworkHardeningsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdaptiveNetworkHardeningsClient, error)

NewAdaptiveNetworkHardeningsClient creates a new instance of AdaptiveNetworkHardeningsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AdaptiveNetworkHardeningsClient) BeginEnforce

func (client *AdaptiveNetworkHardeningsClient) BeginEnforce(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, adaptiveNetworkHardeningResourceName string, body AdaptiveNetworkHardeningEnforceRequest, options *AdaptiveNetworkHardeningsClientBeginEnforceOptions) (*runtime.Poller[AdaptiveNetworkHardeningsClientEnforceResponse], error)

BeginEnforce - Enforces the given rules on the NSG(s) listed in the request If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. adaptiveNetworkHardeningResourceName - The name of the Adaptive Network Hardening resource. options - AdaptiveNetworkHardeningsClientBeginEnforceOptions contains the optional parameters for the AdaptiveNetworkHardeningsClient.BeginEnforce method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/EnforceAdaptiveNetworkHardeningRules_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveNetworkHardeningsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginEnforce(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", "default", armsecurity.AdaptiveNetworkHardeningEnforceRequest{
		NetworkSecurityGroups: []*string{
			to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1"),
			to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg2")},
		Rules: []*armsecurity.Rule{
			{
				Name:            to.Ptr("rule1"),
				DestinationPort: to.Ptr[int32](3389),
				Direction:       to.Ptr(armsecurity.DirectionInbound),
				IPAddresses: []*string{
					to.Ptr("100.10.1.1"),
					to.Ptr("200.20.2.2"),
					to.Ptr("81.199.3.0/24")},
				Protocols: []*armsecurity.TransportProtocol{
					to.Ptr(armsecurity.TransportProtocolTCP)},
			},
			{
				Name:            to.Ptr("rule2"),
				DestinationPort: to.Ptr[int32](22),
				Direction:       to.Ptr(armsecurity.DirectionInbound),
				IPAddresses:     []*string{},
				Protocols: []*armsecurity.TransportProtocol{
					to.Ptr(armsecurity.TransportProtocolTCP)},
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*AdaptiveNetworkHardeningsClient) Get

func (client *AdaptiveNetworkHardeningsClient) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, adaptiveNetworkHardeningResourceName string, options *AdaptiveNetworkHardeningsClientGetOptions) (AdaptiveNetworkHardeningsClientGetResponse, error)

Get - Gets a single Adaptive Network Hardening resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. adaptiveNetworkHardeningResourceName - The name of the Adaptive Network Hardening resource. options - AdaptiveNetworkHardeningsClientGetOptions contains the optional parameters for the AdaptiveNetworkHardeningsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/GetAdaptiveNetworkHardening_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveNetworkHardeningsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AdaptiveNetworkHardeningsClient) NewListByExtendedResourcePager added in v0.6.0

func (client *AdaptiveNetworkHardeningsClient) NewListByExtendedResourcePager(resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, options *AdaptiveNetworkHardeningsClientListByExtendedResourceOptions) *runtime.Pager[AdaptiveNetworkHardeningsClientListByExtendedResourceResponse]

NewListByExtendedResourcePager - Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. options - AdaptiveNetworkHardeningsClientListByExtendedResourceOptions contains the optional parameters for the AdaptiveNetworkHardeningsClient.ListByExtendedResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/ListByExtendedResourceAdaptiveNetworkHardenings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdaptiveNetworkHardeningsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByExtendedResourcePager("rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AdaptiveNetworkHardeningsClientBeginEnforceOptions added in v0.3.0

type AdaptiveNetworkHardeningsClientBeginEnforceOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AdaptiveNetworkHardeningsClientBeginEnforceOptions contains the optional parameters for the AdaptiveNetworkHardeningsClient.BeginEnforce method.

type AdaptiveNetworkHardeningsClientEnforceResponse added in v0.3.0

type AdaptiveNetworkHardeningsClientEnforceResponse struct {
}

AdaptiveNetworkHardeningsClientEnforceResponse contains the response from method AdaptiveNetworkHardeningsClient.Enforce.

type AdaptiveNetworkHardeningsClientGetOptions added in v0.3.0

type AdaptiveNetworkHardeningsClientGetOptions struct {
}

AdaptiveNetworkHardeningsClientGetOptions contains the optional parameters for the AdaptiveNetworkHardeningsClient.Get method.

type AdaptiveNetworkHardeningsClientGetResponse added in v0.3.0

type AdaptiveNetworkHardeningsClientGetResponse struct {
	AdaptiveNetworkHardening
}

AdaptiveNetworkHardeningsClientGetResponse contains the response from method AdaptiveNetworkHardeningsClient.Get.

type AdaptiveNetworkHardeningsClientListByExtendedResourceOptions added in v0.3.0

type AdaptiveNetworkHardeningsClientListByExtendedResourceOptions struct {
}

AdaptiveNetworkHardeningsClientListByExtendedResourceOptions contains the optional parameters for the AdaptiveNetworkHardeningsClient.ListByExtendedResource method.

type AdaptiveNetworkHardeningsClientListByExtendedResourceResponse added in v0.3.0

type AdaptiveNetworkHardeningsClientListByExtendedResourceResponse struct {
	AdaptiveNetworkHardeningsList
}

AdaptiveNetworkHardeningsClientListByExtendedResourceResponse contains the response from method AdaptiveNetworkHardeningsClient.ListByExtendedResource.

type AdaptiveNetworkHardeningsList

type AdaptiveNetworkHardeningsList struct {
	// The URL to get the next set of results
	NextLink *string `json:"nextLink,omitempty"`

	// A list of Adaptive Network Hardenings resources
	Value []*AdaptiveNetworkHardening `json:"value,omitempty"`
}

AdaptiveNetworkHardeningsList - Response for ListAdaptiveNetworkHardenings API service call

func (AdaptiveNetworkHardeningsList) MarshalJSON

func (a AdaptiveNetworkHardeningsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdaptiveNetworkHardeningsList.

func (*AdaptiveNetworkHardeningsList) UnmarshalJSON added in v0.8.0

func (a *AdaptiveNetworkHardeningsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdaptiveNetworkHardeningsList.

type AdditionalData

type AdditionalData struct {
	// REQUIRED; Sub-assessment resource type
	AssessedResourceType *AssessedResourceType `json:"assessedResourceType,omitempty"`
}

AdditionalData - Details of the sub-assessment

func (*AdditionalData) GetAdditionalData

func (a *AdditionalData) GetAdditionalData() *AdditionalData

GetAdditionalData implements the AdditionalDataClassification interface for type AdditionalData.

func (AdditionalData) MarshalJSON added in v0.8.0

func (a AdditionalData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdditionalData.

func (*AdditionalData) UnmarshalJSON

func (a *AdditionalData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalData.

type AdditionalDataClassification

type AdditionalDataClassification interface {
	// GetAdditionalData returns the AdditionalData content of the underlying type.
	GetAdditionalData() *AdditionalData
}

AdditionalDataClassification provides polymorphic access to related types. Call the interface's GetAdditionalData() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AdditionalData, *ContainerRegistryVulnerabilityProperties, *SQLServerVulnerabilityProperties, *ServerVulnerabilityProperties

type AdditionalWorkspaceDataType

type AdditionalWorkspaceDataType string

AdditionalWorkspaceDataType - Data types sent to workspace.

const (
	AdditionalWorkspaceDataTypeAlerts    AdditionalWorkspaceDataType = "Alerts"
	AdditionalWorkspaceDataTypeRawEvents AdditionalWorkspaceDataType = "RawEvents"
)

func PossibleAdditionalWorkspaceDataTypeValues

func PossibleAdditionalWorkspaceDataTypeValues() []AdditionalWorkspaceDataType

PossibleAdditionalWorkspaceDataTypeValues returns the possible values for the AdditionalWorkspaceDataType const type.

type AdditionalWorkspaceType

type AdditionalWorkspaceType string

AdditionalWorkspaceType - Workspace type.

const (
	AdditionalWorkspaceTypeSentinel AdditionalWorkspaceType = "Sentinel"
)

func PossibleAdditionalWorkspaceTypeValues

func PossibleAdditionalWorkspaceTypeValues() []AdditionalWorkspaceType

PossibleAdditionalWorkspaceTypeValues returns the possible values for the AdditionalWorkspaceType const type.

type AdditionalWorkspacesProperties

type AdditionalWorkspacesProperties struct {
	// List of data types sent to workspace
	DataTypes []*AdditionalWorkspaceDataType `json:"dataTypes,omitempty"`

	// Workspace type.
	Type *AdditionalWorkspaceType `json:"type,omitempty"`

	// Workspace resource id
	Workspace *string `json:"workspace,omitempty"`
}

AdditionalWorkspacesProperties - Properties of the additional workspaces.

func (AdditionalWorkspacesProperties) MarshalJSON

func (a AdditionalWorkspacesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdditionalWorkspacesProperties.

func (*AdditionalWorkspacesProperties) UnmarshalJSON added in v0.8.0

func (a *AdditionalWorkspacesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalWorkspacesProperties.

type AdvancedThreatProtectionClient

type AdvancedThreatProtectionClient struct {
	// contains filtered or unexported fields
}

AdvancedThreatProtectionClient contains the methods for the AdvancedThreatProtection group. Don't use this type directly, use NewAdvancedThreatProtectionClient() instead.

func NewAdvancedThreatProtectionClient

func NewAdvancedThreatProtectionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AdvancedThreatProtectionClient, error)

NewAdvancedThreatProtectionClient creates a new instance of AdvancedThreatProtectionClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AdvancedThreatProtectionClient) Create

Create - Creates or updates the Advanced Threat Protection settings on a specified resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01 resourceID - The identifier of the resource. advancedThreatProtectionSetting - Advanced Threat Protection Settings options - AdvancedThreatProtectionClientCreateOptions contains the optional parameters for the AdvancedThreatProtectionClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/AdvancedThreatProtection/PutAdvancedThreatProtectionSettings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdvancedThreatProtectionClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", armsecurity.AdvancedThreatProtectionSetting{
		Name: to.Ptr("current"),
		Type: to.Ptr("Microsoft.Security/advancedThreatProtectionSettings"),
		ID:   to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount/providers/Microsoft.Security/advancedThreatProtectionSettings/current"),
		Properties: &armsecurity.AdvancedThreatProtectionProperties{
			IsEnabled: to.Ptr(true),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AdvancedThreatProtectionClient) Get

Get - Gets the Advanced Threat Protection settings for the specified resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01 resourceID - The identifier of the resource. options - AdvancedThreatProtectionClientGetOptions contains the optional parameters for the AdvancedThreatProtectionClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/AdvancedThreatProtection/GetAdvancedThreatProtectionSettings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAdvancedThreatProtectionClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AdvancedThreatProtectionClientCreateOptions added in v0.3.0

type AdvancedThreatProtectionClientCreateOptions struct {
}

AdvancedThreatProtectionClientCreateOptions contains the optional parameters for the AdvancedThreatProtectionClient.Create method.

type AdvancedThreatProtectionClientCreateResponse added in v0.3.0

type AdvancedThreatProtectionClientCreateResponse struct {
	AdvancedThreatProtectionSetting
}

AdvancedThreatProtectionClientCreateResponse contains the response from method AdvancedThreatProtectionClient.Create.

type AdvancedThreatProtectionClientGetOptions added in v0.3.0

type AdvancedThreatProtectionClientGetOptions struct {
}

AdvancedThreatProtectionClientGetOptions contains the optional parameters for the AdvancedThreatProtectionClient.Get method.

type AdvancedThreatProtectionClientGetResponse added in v0.3.0

type AdvancedThreatProtectionClientGetResponse struct {
	AdvancedThreatProtectionSetting
}

AdvancedThreatProtectionClientGetResponse contains the response from method AdvancedThreatProtectionClient.Get.

type AdvancedThreatProtectionProperties

type AdvancedThreatProtectionProperties struct {
	// Indicates whether Advanced Threat Protection is enabled.
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

AdvancedThreatProtectionProperties - The Advanced Threat Protection settings.

func (AdvancedThreatProtectionProperties) MarshalJSON added in v0.8.0

func (a AdvancedThreatProtectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionProperties.

func (*AdvancedThreatProtectionProperties) UnmarshalJSON added in v0.8.0

func (a *AdvancedThreatProtectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionProperties.

type AdvancedThreatProtectionSetting

type AdvancedThreatProtectionSetting struct {
	// The Advanced Threat Protection settings.
	Properties *AdvancedThreatProtectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AdvancedThreatProtectionSetting - The Advanced Threat Protection resource.

func (AdvancedThreatProtectionSetting) MarshalJSON

func (a AdvancedThreatProtectionSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionSetting.

func (*AdvancedThreatProtectionSetting) UnmarshalJSON

func (a *AdvancedThreatProtectionSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionSetting.

type Alert

type Alert struct {
	// describes security alert properties.
	Properties *AlertProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Alert - Security alert

func (Alert) MarshalJSON

func (a Alert) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Alert.

func (*Alert) UnmarshalJSON

func (a *Alert) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Alert.

type AlertEntity

type AlertEntity struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// READ-ONLY; Type of entity
	Type *string `json:"type,omitempty" azure:"ro"`
}

AlertEntity - Changing set of properties depending on the entity type.

func (AlertEntity) MarshalJSON

func (a AlertEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertEntity.

func (*AlertEntity) UnmarshalJSON

func (a *AlertEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertEntity.

type AlertList

type AlertList struct {
	// describes security alert properties.
	Value []*Alert `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

AlertList - List of security alerts

func (AlertList) MarshalJSON

func (a AlertList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertList.

func (*AlertList) UnmarshalJSON added in v0.8.0

func (a *AlertList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertList.

type AlertProperties

type AlertProperties struct {
	// Custom properties for the alert.
	ExtendedProperties map[string]*string `json:"extendedProperties,omitempty"`

	// Changing set of properties depending on the supportingEvidence type.
	SupportingEvidence *AlertPropertiesSupportingEvidence `json:"supportingEvidence,omitempty"`

	// READ-ONLY; The display name of the alert.
	AlertDisplayName *string `json:"alertDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; Unique identifier for the detection logic (all alert instances from the same detection logic will have the same
	// alertType).
	AlertType *string `json:"alertType,omitempty" azure:"ro"`

	// READ-ONLY; A direct link to the alert page in Azure Portal.
	AlertURI *string `json:"alertUri,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the resource most related to this alert.
	CompromisedEntity *string `json:"compromisedEntity,omitempty" azure:"ro"`

	// READ-ONLY; Key for corelating related alerts. Alerts with the same correlation key considered to be related.
	CorrelationKey *string `json:"correlationKey,omitempty" azure:"ro"`

	// READ-ONLY; Description of the suspicious activity that was detected.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The UTC time of the last event or activity included in the alert in ISO8601 format.
	EndTimeUTC *time.Time `json:"endTimeUtc,omitempty" azure:"ro"`

	// READ-ONLY; A list of entities related to the alert.
	Entities []*AlertEntity `json:"entities,omitempty" azure:"ro"`

	// READ-ONLY; Links related to the alert
	ExtendedLinks []map[string]*string `json:"extendedLinks,omitempty" azure:"ro"`

	// READ-ONLY; The kill chain related intent behind the alert. For list of supported values, and explanations of Azure Security
	// Center's supported kill chain intents.
	Intent *Intent `json:"intent,omitempty" azure:"ro"`

	// READ-ONLY; This field determines whether the alert is an incident (a compound grouping of several alerts) or a single alert.
	IsIncident *bool `json:"isIncident,omitempty" azure:"ro"`

	// READ-ONLY; The UTC processing end time of the alert in ISO8601 format.
	ProcessingEndTimeUTC *time.Time `json:"processingEndTimeUtc,omitempty" azure:"ro"`

	// READ-ONLY; The name of Azure Security Center pricing tier which powering this alert. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing
	ProductComponentName *string `json:"productComponentName,omitempty" azure:"ro"`

	// READ-ONLY; The name of the product which published this alert (Azure Security Center, Azure ATP, Microsoft Defender ATP,
	// O365 ATP, MCAS, and so on).
	ProductName *string `json:"productName,omitempty" azure:"ro"`

	// READ-ONLY; Manual action items to take to remediate the alert.
	RemediationSteps []*string `json:"remediationSteps,omitempty" azure:"ro"`

	// READ-ONLY; The resource identifiers that can be used to direct the alert to the right product exposure group (tenant, workspace,
	// subscription etc.). There can be multiple identifiers of different type per alert.
	ResourceIdentifiers []ResourceIdentifierClassification `json:"resourceIdentifiers,omitempty" azure:"ro"`

	// READ-ONLY; The risk level of the threat that was detected. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified.
	Severity *AlertSeverity `json:"severity,omitempty" azure:"ro"`

	// READ-ONLY; The UTC time of the first event or activity included in the alert in ISO8601 format.
	StartTimeUTC *time.Time `json:"startTimeUtc,omitempty" azure:"ro"`

	// READ-ONLY; The life cycle status of the alert.
	Status *AlertStatus `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; Kill chain related sub-techniques behind the alert.
	SubTechniques []*string `json:"subTechniques,omitempty" azure:"ro"`

	// READ-ONLY; Unique identifier for the alert.
	SystemAlertID *string `json:"systemAlertId,omitempty" azure:"ro"`

	// READ-ONLY; kill chain related techniques behind the alert.
	Techniques []*string `json:"techniques,omitempty" azure:"ro"`

	// READ-ONLY; The UTC time the alert was generated in ISO8601 format.
	TimeGeneratedUTC *time.Time `json:"timeGeneratedUtc,omitempty" azure:"ro"`

	// READ-ONLY; The name of the vendor that raises the alert.
	VendorName *string `json:"vendorName,omitempty" azure:"ro"`

	// READ-ONLY; Schema version.
	Version *string `json:"version,omitempty" azure:"ro"`
}

AlertProperties - describes security alert properties.

func (AlertProperties) MarshalJSON

func (a AlertProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertProperties.

func (*AlertProperties) UnmarshalJSON

func (a *AlertProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertProperties.

type AlertPropertiesSupportingEvidence added in v0.8.0

type AlertPropertiesSupportingEvidence struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// READ-ONLY; Type of the supportingEvidence
	Type *string `json:"type,omitempty" azure:"ro"`
}

AlertPropertiesSupportingEvidence - Changing set of properties depending on the supportingEvidence type.

func (AlertPropertiesSupportingEvidence) MarshalJSON added in v0.8.0

func (a AlertPropertiesSupportingEvidence) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertPropertiesSupportingEvidence.

func (*AlertPropertiesSupportingEvidence) UnmarshalJSON added in v0.8.0

func (a *AlertPropertiesSupportingEvidence) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertPropertiesSupportingEvidence.

type AlertSeverity

type AlertSeverity string

AlertSeverity - The risk level of the threat that was detected. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified.

const (
	// AlertSeverityHigh - High
	AlertSeverityHigh AlertSeverity = "High"
	// AlertSeverityInformational - Informational
	AlertSeverityInformational AlertSeverity = "Informational"
	// AlertSeverityLow - Low
	AlertSeverityLow AlertSeverity = "Low"
	// AlertSeverityMedium - Medium
	AlertSeverityMedium AlertSeverity = "Medium"
)

func PossibleAlertSeverityValues

func PossibleAlertSeverityValues() []AlertSeverity

PossibleAlertSeverityValues returns the possible values for the AlertSeverity const type.

type AlertSimulatorBundlesRequestProperties

type AlertSimulatorBundlesRequestProperties struct {
	// REQUIRED; The kind of alert simulation.
	Kind *Kind `json:"kind,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// Bundles list.
	Bundles []*BundleType `json:"bundles,omitempty"`
}

AlertSimulatorBundlesRequestProperties - Simulate alerts according to this bundles.

func (*AlertSimulatorBundlesRequestProperties) GetAlertSimulatorRequestProperties added in v0.3.0

func (a *AlertSimulatorBundlesRequestProperties) GetAlertSimulatorRequestProperties() *AlertSimulatorRequestProperties

GetAlertSimulatorRequestProperties implements the AlertSimulatorRequestPropertiesClassification interface for type AlertSimulatorBundlesRequestProperties.

func (AlertSimulatorBundlesRequestProperties) MarshalJSON

func (a AlertSimulatorBundlesRequestProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertSimulatorBundlesRequestProperties.

func (*AlertSimulatorBundlesRequestProperties) UnmarshalJSON

func (a *AlertSimulatorBundlesRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertSimulatorBundlesRequestProperties.

type AlertSimulatorRequestBody

type AlertSimulatorRequestBody struct {
	// Alert Simulator request body data.
	Properties AlertSimulatorRequestPropertiesClassification `json:"properties,omitempty"`
}

AlertSimulatorRequestBody - Alert Simulator request body.

func (AlertSimulatorRequestBody) MarshalJSON

func (a AlertSimulatorRequestBody) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertSimulatorRequestBody.

func (*AlertSimulatorRequestBody) UnmarshalJSON

func (a *AlertSimulatorRequestBody) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertSimulatorRequestBody.

type AlertSimulatorRequestProperties

type AlertSimulatorRequestProperties struct {
	// REQUIRED; The kind of alert simulation.
	Kind *Kind `json:"kind,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}
}

AlertSimulatorRequestProperties - Describes properties of an alert simulation request

func (*AlertSimulatorRequestProperties) GetAlertSimulatorRequestProperties

func (a *AlertSimulatorRequestProperties) GetAlertSimulatorRequestProperties() *AlertSimulatorRequestProperties

GetAlertSimulatorRequestProperties implements the AlertSimulatorRequestPropertiesClassification interface for type AlertSimulatorRequestProperties.

func (AlertSimulatorRequestProperties) MarshalJSON added in v0.3.0

func (a AlertSimulatorRequestProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertSimulatorRequestProperties.

func (*AlertSimulatorRequestProperties) UnmarshalJSON

func (a *AlertSimulatorRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertSimulatorRequestProperties.

type AlertSimulatorRequestPropertiesClassification

type AlertSimulatorRequestPropertiesClassification interface {
	// GetAlertSimulatorRequestProperties returns the AlertSimulatorRequestProperties content of the underlying type.
	GetAlertSimulatorRequestProperties() *AlertSimulatorRequestProperties
}

AlertSimulatorRequestPropertiesClassification provides polymorphic access to related types. Call the interface's GetAlertSimulatorRequestProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AlertSimulatorBundlesRequestProperties, *AlertSimulatorRequestProperties

type AlertStatus

type AlertStatus string

AlertStatus - The life cycle status of the alert.

const (
	// AlertStatusActive - An alert which doesn't specify a value is assigned the status 'Active'
	AlertStatusActive AlertStatus = "Active"
	// AlertStatusDismissed - Alert dismissed as false positive
	AlertStatusDismissed AlertStatus = "Dismissed"
	// AlertStatusInProgress - An alert which is in handling state
	AlertStatusInProgress AlertStatus = "InProgress"
	// AlertStatusResolved - Alert closed after handling
	AlertStatusResolved AlertStatus = "Resolved"
)

func PossibleAlertStatusValues

func PossibleAlertStatusValues() []AlertStatus

PossibleAlertStatusValues returns the possible values for the AlertStatus const type.

type AlertSyncSettingProperties

type AlertSyncSettingProperties struct {
	// REQUIRED; Is the alert sync setting enabled
	Enabled *bool `json:"enabled,omitempty"`
}

AlertSyncSettingProperties - The alert sync setting properties

func (AlertSyncSettingProperties) MarshalJSON added in v0.8.0

func (a AlertSyncSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertSyncSettingProperties.

func (*AlertSyncSettingProperties) UnmarshalJSON added in v0.8.0

func (a *AlertSyncSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertSyncSettingProperties.

type AlertSyncSettings

type AlertSyncSettings struct {
	// REQUIRED; the kind of the settings string
	Kind *SettingKind `json:"kind,omitempty"`

	// Alert sync setting data
	Properties *AlertSyncSettingProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AlertSyncSettings - Represents an alert sync setting

func (*AlertSyncSettings) GetSetting added in v0.3.0

func (a *AlertSyncSettings) GetSetting() *Setting

GetSetting implements the SettingClassification interface for type AlertSyncSettings.

func (AlertSyncSettings) MarshalJSON

func (a AlertSyncSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertSyncSettings.

func (*AlertSyncSettings) UnmarshalJSON

func (a *AlertSyncSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertSyncSettings.

type AlertsClient

type AlertsClient struct {
	// contains filtered or unexported fields
}

AlertsClient contains the methods for the Alerts group. Don't use this type directly, use NewAlertsClient() instead.

func NewAlertsClient

func NewAlertsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertsClient, error)

NewAlertsClient creates a new instance of AlertsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AlertsClient) BeginSimulate

func (client *AlertsClient) BeginSimulate(ctx context.Context, ascLocation string, alertSimulatorRequestBody AlertSimulatorRequestBody, options *AlertsClientBeginSimulateOptions) (*runtime.Poller[AlertsClientSimulateResponse], error)

BeginSimulate - Simulate security alerts If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertSimulatorRequestBody - Alert Simulator Request Properties options - AlertsClientBeginSimulateOptions contains the optional parameters for the AlertsClient.BeginSimulate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/SimulateAlerts_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginSimulate(ctx, "centralus", armsecurity.AlertSimulatorRequestBody{
		Properties: &armsecurity.AlertSimulatorBundlesRequestProperties{
			Kind: to.Ptr(armsecurity.KindBundles),
			Bundles: []*armsecurity.BundleType{
				to.Ptr(armsecurity.BundleTypeAppServices),
				to.Ptr(armsecurity.BundleTypeDNS),
				to.Ptr(armsecurity.BundleTypeKeyVaults),
				to.Ptr(armsecurity.BundleTypeKubernetesService),
				to.Ptr(armsecurity.BundleTypeResourceManager),
				to.Ptr(armsecurity.BundleTypeSQLServers),
				to.Ptr(armsecurity.BundleTypeStorageAccounts),
				to.Ptr(armsecurity.BundleTypeVirtualMachines),
				to.Ptr(armsecurity.BundleTypeCosmosDbs)},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*AlertsClient) GetResourceGroupLevel

func (client *AlertsClient) GetResourceGroupLevel(ctx context.Context, resourceGroupName string, ascLocation string, alertName string, options *AlertsClientGetResourceGroupLevelOptions) (AlertsClientGetResourceGroupLevelResponse, error)

GetResourceGroupLevel - Get an alert that is associated a resource group or a resource in a resource group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientGetResourceGroupLevelOptions contains the optional parameters for the AlertsClient.GetResourceGroupLevel method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetResourceGroupLevel(ctx, "myRg1", "westeurope", "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AlertsClient) GetSubscriptionLevel

func (client *AlertsClient) GetSubscriptionLevel(ctx context.Context, ascLocation string, alertName string, options *AlertsClientGetSubscriptionLevelOptions) (AlertsClientGetSubscriptionLevelResponse, error)

GetSubscriptionLevel - Get an alert that is associated with a subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientGetSubscriptionLevelOptions contains the optional parameters for the AlertsClient.GetSubscriptionLevel method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetSubscriptionLevel(ctx, "westeurope", "2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AlertsClient) NewListByResourceGroupPager added in v0.6.0

func (client *AlertsClient) NewListByResourceGroupPager(resourceGroupName string, options *AlertsClientListByResourceGroupOptions) *runtime.Pager[AlertsClientListByResourceGroupResponse]

NewListByResourceGroupPager - List all the alerts that are associated with the resource group Generated from API version 2022-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - AlertsClientListByResourceGroupOptions contains the optional parameters for the AlertsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myRg1", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AlertsClient) NewListPager added in v0.6.0

NewListPager - List all the alerts that are associated with the subscription Generated from API version 2022-01-01 options - AlertsClientListOptions contains the optional parameters for the AlertsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AlertsClient) NewListResourceGroupLevelByRegionPager added in v0.6.0

func (client *AlertsClient) NewListResourceGroupLevelByRegionPager(ascLocation string, resourceGroupName string, options *AlertsClientListResourceGroupLevelByRegionOptions) *runtime.Pager[AlertsClientListResourceGroupLevelByRegionResponse]

NewListResourceGroupLevelByRegionPager - List all the alerts that are associated with the resource group that are stored in a specific location Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - AlertsClientListResourceGroupLevelByRegionOptions contains the optional parameters for the AlertsClient.ListResourceGroupLevelByRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListResourceGroupLevelByRegionPager("westeurope", "myRg1", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AlertsClient) NewListSubscriptionLevelByRegionPager added in v0.6.0

func (client *AlertsClient) NewListSubscriptionLevelByRegionPager(ascLocation string, options *AlertsClientListSubscriptionLevelByRegionOptions) *runtime.Pager[AlertsClientListSubscriptionLevelByRegionResponse]

NewListSubscriptionLevelByRegionPager - List all the alerts that are associated with the subscription that are stored in a specific location Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - AlertsClientListSubscriptionLevelByRegionOptions contains the optional parameters for the AlertsClient.ListSubscriptionLevelByRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsSubscriptionsLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListSubscriptionLevelByRegionPager("westeurope", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AlertsClient) UpdateResourceGroupLevelStateToActivate

func (client *AlertsClient) UpdateResourceGroupLevelStateToActivate(ctx context.Context, resourceGroupName string, ascLocation string, alertName string, options *AlertsClientUpdateResourceGroupLevelStateToActivateOptions) (AlertsClientUpdateResourceGroupLevelStateToActivateResponse, error)

UpdateResourceGroupLevelStateToActivate - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateResourceGroupLevelStateToActivateOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToActivate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_activate_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateResourceGroupLevelStateToActivate(ctx, "myRg2", "westeurope", "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateResourceGroupLevelStateToDismiss

func (client *AlertsClient) UpdateResourceGroupLevelStateToDismiss(ctx context.Context, resourceGroupName string, ascLocation string, alertName string, options *AlertsClientUpdateResourceGroupLevelStateToDismissOptions) (AlertsClientUpdateResourceGroupLevelStateToDismissResponse, error)

UpdateResourceGroupLevelStateToDismiss - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateResourceGroupLevelStateToDismissOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToDismiss method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_dismiss_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateResourceGroupLevelStateToDismiss(ctx, "myRg2", "westeurope", "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateResourceGroupLevelStateToInProgress added in v0.8.0

func (client *AlertsClient) UpdateResourceGroupLevelStateToInProgress(ctx context.Context, resourceGroupName string, ascLocation string, alertName string, options *AlertsClientUpdateResourceGroupLevelStateToInProgressOptions) (AlertsClientUpdateResourceGroupLevelStateToInProgressResponse, error)

UpdateResourceGroupLevelStateToInProgress - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateResourceGroupLevelStateToInProgressOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToInProgress method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_inProgress_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateResourceGroupLevelStateToInProgress(ctx, "myRg2", "westeurope", "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateResourceGroupLevelStateToResolve

func (client *AlertsClient) UpdateResourceGroupLevelStateToResolve(ctx context.Context, resourceGroupName string, ascLocation string, alertName string, options *AlertsClientUpdateResourceGroupLevelStateToResolveOptions) (AlertsClientUpdateResourceGroupLevelStateToResolveResponse, error)

UpdateResourceGroupLevelStateToResolve - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateResourceGroupLevelStateToResolveOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToResolve method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_resolve_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateResourceGroupLevelStateToResolve(ctx, "myRg2", "westeurope", "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateSubscriptionLevelStateToActivate

UpdateSubscriptionLevelStateToActivate - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateSubscriptionLevelStateToActivateOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToActivate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_activate_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateSubscriptionLevelStateToActivate(ctx, "westeurope", "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateSubscriptionLevelStateToDismiss

func (client *AlertsClient) UpdateSubscriptionLevelStateToDismiss(ctx context.Context, ascLocation string, alertName string, options *AlertsClientUpdateSubscriptionLevelStateToDismissOptions) (AlertsClientUpdateSubscriptionLevelStateToDismissResponse, error)

UpdateSubscriptionLevelStateToDismiss - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateSubscriptionLevelStateToDismissOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToDismiss method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_dismiss_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateSubscriptionLevelStateToDismiss(ctx, "westeurope", "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateSubscriptionLevelStateToInProgress added in v0.8.0

UpdateSubscriptionLevelStateToInProgress - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateSubscriptionLevelStateToInProgressOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToInProgress method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_inProgress_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateSubscriptionLevelStateToInProgress(ctx, "westeurope", "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsClient) UpdateSubscriptionLevelStateToResolve

func (client *AlertsClient) UpdateSubscriptionLevelStateToResolve(ctx context.Context, ascLocation string, alertName string, options *AlertsClientUpdateSubscriptionLevelStateToResolveOptions) (AlertsClientUpdateSubscriptionLevelStateToResolveResponse, error)

UpdateSubscriptionLevelStateToResolve - Update the alert's state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations alertName - Name of the alert object options - AlertsClientUpdateSubscriptionLevelStateToResolveOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToResolve method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_resolve_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateSubscriptionLevelStateToResolve(ctx, "westeurope", "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type AlertsClientBeginSimulateOptions added in v0.3.0

type AlertsClientBeginSimulateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AlertsClientBeginSimulateOptions contains the optional parameters for the AlertsClient.BeginSimulate method.

type AlertsClientGetResourceGroupLevelOptions added in v0.3.0

type AlertsClientGetResourceGroupLevelOptions struct {
}

AlertsClientGetResourceGroupLevelOptions contains the optional parameters for the AlertsClient.GetResourceGroupLevel method.

type AlertsClientGetResourceGroupLevelResponse added in v0.3.0

type AlertsClientGetResourceGroupLevelResponse struct {
	Alert
}

AlertsClientGetResourceGroupLevelResponse contains the response from method AlertsClient.GetResourceGroupLevel.

type AlertsClientGetSubscriptionLevelOptions added in v0.3.0

type AlertsClientGetSubscriptionLevelOptions struct {
}

AlertsClientGetSubscriptionLevelOptions contains the optional parameters for the AlertsClient.GetSubscriptionLevel method.

type AlertsClientGetSubscriptionLevelResponse added in v0.3.0

type AlertsClientGetSubscriptionLevelResponse struct {
	Alert
}

AlertsClientGetSubscriptionLevelResponse contains the response from method AlertsClient.GetSubscriptionLevel.

type AlertsClientListByResourceGroupOptions added in v0.3.0

type AlertsClientListByResourceGroupOptions struct {
}

AlertsClientListByResourceGroupOptions contains the optional parameters for the AlertsClient.ListByResourceGroup method.

type AlertsClientListByResourceGroupResponse added in v0.3.0

type AlertsClientListByResourceGroupResponse struct {
	AlertList
}

AlertsClientListByResourceGroupResponse contains the response from method AlertsClient.ListByResourceGroup.

type AlertsClientListOptions added in v0.3.0

type AlertsClientListOptions struct {
}

AlertsClientListOptions contains the optional parameters for the AlertsClient.List method.

type AlertsClientListResourceGroupLevelByRegionOptions added in v0.3.0

type AlertsClientListResourceGroupLevelByRegionOptions struct {
}

AlertsClientListResourceGroupLevelByRegionOptions contains the optional parameters for the AlertsClient.ListResourceGroupLevelByRegion method.

type AlertsClientListResourceGroupLevelByRegionResponse added in v0.3.0

type AlertsClientListResourceGroupLevelByRegionResponse struct {
	AlertList
}

AlertsClientListResourceGroupLevelByRegionResponse contains the response from method AlertsClient.ListResourceGroupLevelByRegion.

type AlertsClientListResponse added in v0.3.0

type AlertsClientListResponse struct {
	AlertList
}

AlertsClientListResponse contains the response from method AlertsClient.List.

type AlertsClientListSubscriptionLevelByRegionOptions added in v0.3.0

type AlertsClientListSubscriptionLevelByRegionOptions struct {
}

AlertsClientListSubscriptionLevelByRegionOptions contains the optional parameters for the AlertsClient.ListSubscriptionLevelByRegion method.

type AlertsClientListSubscriptionLevelByRegionResponse added in v0.3.0

type AlertsClientListSubscriptionLevelByRegionResponse struct {
	AlertList
}

AlertsClientListSubscriptionLevelByRegionResponse contains the response from method AlertsClient.ListSubscriptionLevelByRegion.

type AlertsClientSimulateResponse added in v0.3.0

type AlertsClientSimulateResponse struct {
}

AlertsClientSimulateResponse contains the response from method AlertsClient.Simulate.

type AlertsClientUpdateResourceGroupLevelStateToActivateOptions added in v0.3.0

type AlertsClientUpdateResourceGroupLevelStateToActivateOptions struct {
}

AlertsClientUpdateResourceGroupLevelStateToActivateOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToActivate method.

type AlertsClientUpdateResourceGroupLevelStateToActivateResponse added in v0.3.0

type AlertsClientUpdateResourceGroupLevelStateToActivateResponse struct {
}

AlertsClientUpdateResourceGroupLevelStateToActivateResponse contains the response from method AlertsClient.UpdateResourceGroupLevelStateToActivate.

type AlertsClientUpdateResourceGroupLevelStateToDismissOptions added in v0.3.0

type AlertsClientUpdateResourceGroupLevelStateToDismissOptions struct {
}

AlertsClientUpdateResourceGroupLevelStateToDismissOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToDismiss method.

type AlertsClientUpdateResourceGroupLevelStateToDismissResponse added in v0.3.0

type AlertsClientUpdateResourceGroupLevelStateToDismissResponse struct {
}

AlertsClientUpdateResourceGroupLevelStateToDismissResponse contains the response from method AlertsClient.UpdateResourceGroupLevelStateToDismiss.

type AlertsClientUpdateResourceGroupLevelStateToInProgressOptions added in v0.8.0

type AlertsClientUpdateResourceGroupLevelStateToInProgressOptions struct {
}

AlertsClientUpdateResourceGroupLevelStateToInProgressOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToInProgress method.

type AlertsClientUpdateResourceGroupLevelStateToInProgressResponse added in v0.8.0

type AlertsClientUpdateResourceGroupLevelStateToInProgressResponse struct {
}

AlertsClientUpdateResourceGroupLevelStateToInProgressResponse contains the response from method AlertsClient.UpdateResourceGroupLevelStateToInProgress.

type AlertsClientUpdateResourceGroupLevelStateToResolveOptions added in v0.3.0

type AlertsClientUpdateResourceGroupLevelStateToResolveOptions struct {
}

AlertsClientUpdateResourceGroupLevelStateToResolveOptions contains the optional parameters for the AlertsClient.UpdateResourceGroupLevelStateToResolve method.

type AlertsClientUpdateResourceGroupLevelStateToResolveResponse added in v0.3.0

type AlertsClientUpdateResourceGroupLevelStateToResolveResponse struct {
}

AlertsClientUpdateResourceGroupLevelStateToResolveResponse contains the response from method AlertsClient.UpdateResourceGroupLevelStateToResolve.

type AlertsClientUpdateSubscriptionLevelStateToActivateOptions added in v0.3.0

type AlertsClientUpdateSubscriptionLevelStateToActivateOptions struct {
}

AlertsClientUpdateSubscriptionLevelStateToActivateOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToActivate method.

type AlertsClientUpdateSubscriptionLevelStateToActivateResponse added in v0.3.0

type AlertsClientUpdateSubscriptionLevelStateToActivateResponse struct {
}

AlertsClientUpdateSubscriptionLevelStateToActivateResponse contains the response from method AlertsClient.UpdateSubscriptionLevelStateToActivate.

type AlertsClientUpdateSubscriptionLevelStateToDismissOptions added in v0.3.0

type AlertsClientUpdateSubscriptionLevelStateToDismissOptions struct {
}

AlertsClientUpdateSubscriptionLevelStateToDismissOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToDismiss method.

type AlertsClientUpdateSubscriptionLevelStateToDismissResponse added in v0.3.0

type AlertsClientUpdateSubscriptionLevelStateToDismissResponse struct {
}

AlertsClientUpdateSubscriptionLevelStateToDismissResponse contains the response from method AlertsClient.UpdateSubscriptionLevelStateToDismiss.

type AlertsClientUpdateSubscriptionLevelStateToInProgressOptions added in v0.8.0

type AlertsClientUpdateSubscriptionLevelStateToInProgressOptions struct {
}

AlertsClientUpdateSubscriptionLevelStateToInProgressOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToInProgress method.

type AlertsClientUpdateSubscriptionLevelStateToInProgressResponse added in v0.8.0

type AlertsClientUpdateSubscriptionLevelStateToInProgressResponse struct {
}

AlertsClientUpdateSubscriptionLevelStateToInProgressResponse contains the response from method AlertsClient.UpdateSubscriptionLevelStateToInProgress.

type AlertsClientUpdateSubscriptionLevelStateToResolveOptions added in v0.3.0

type AlertsClientUpdateSubscriptionLevelStateToResolveOptions struct {
}

AlertsClientUpdateSubscriptionLevelStateToResolveOptions contains the optional parameters for the AlertsClient.UpdateSubscriptionLevelStateToResolve method.

type AlertsClientUpdateSubscriptionLevelStateToResolveResponse added in v0.3.0

type AlertsClientUpdateSubscriptionLevelStateToResolveResponse struct {
}

AlertsClientUpdateSubscriptionLevelStateToResolveResponse contains the response from method AlertsClient.UpdateSubscriptionLevelStateToResolve.

type AlertsSuppressionRule

type AlertsSuppressionRule struct {
	// describes AlertsSuppressionRule properties
	Properties *AlertsSuppressionRuleProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AlertsSuppressionRule - Describes the suppression rule

func (AlertsSuppressionRule) MarshalJSON

func (a AlertsSuppressionRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertsSuppressionRule.

func (*AlertsSuppressionRule) UnmarshalJSON

func (a *AlertsSuppressionRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertsSuppressionRule.

type AlertsSuppressionRuleProperties

type AlertsSuppressionRuleProperties struct {
	// REQUIRED; Type of the alert to automatically suppress. For all alert types, use '*'
	AlertType *string `json:"alertType,omitempty"`

	// REQUIRED; The reason for dismissing the alert
	Reason *string `json:"reason,omitempty"`

	// REQUIRED; Possible states of the rule
	State *RuleState `json:"state,omitempty"`

	// Any comment regarding the rule
	Comment *string `json:"comment,omitempty"`

	// Expiration date of the rule, if value is not provided or provided as null this field will default to the maximum allowed
	// expiration date.
	ExpirationDateUTC *time.Time `json:"expirationDateUtc,omitempty"`

	// The suppression conditions
	SuppressionAlertsScope *SuppressionAlertsScope `json:"suppressionAlertsScope,omitempty"`

	// READ-ONLY; The last time this rule was modified
	LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"`
}

AlertsSuppressionRuleProperties - describes AlertsSuppressionRule properties

func (AlertsSuppressionRuleProperties) MarshalJSON

func (a AlertsSuppressionRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertsSuppressionRuleProperties.

func (*AlertsSuppressionRuleProperties) UnmarshalJSON

func (a *AlertsSuppressionRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertsSuppressionRuleProperties.

type AlertsSuppressionRulesClient

type AlertsSuppressionRulesClient struct {
	// contains filtered or unexported fields
}

AlertsSuppressionRulesClient contains the methods for the AlertsSuppressionRules group. Don't use this type directly, use NewAlertsSuppressionRulesClient() instead.

func NewAlertsSuppressionRulesClient

func NewAlertsSuppressionRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertsSuppressionRulesClient, error)

NewAlertsSuppressionRulesClient creates a new instance of AlertsSuppressionRulesClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AlertsSuppressionRulesClient) Delete

Delete - Delete dismiss alert rule for this subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview alertsSuppressionRuleName - The unique name of the suppression alert rule options - AlertsSuppressionRulesClientDeleteOptions contains the optional parameters for the AlertsSuppressionRulesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/DeleteAlertsSuppressionRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsSuppressionRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "dismissIpAnomalyAlerts", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AlertsSuppressionRulesClient) Get

Get - Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview alertsSuppressionRuleName - The unique name of the suppression alert rule options - AlertsSuppressionRulesClientGetOptions contains the optional parameters for the AlertsSuppressionRulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/GetAlertsSuppressionRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsSuppressionRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "dismissIpAnomalyAlerts", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AlertsSuppressionRulesClient) NewListPager added in v0.6.0

NewListPager - List of all the dismiss rules for the given subscription Generated from API version 2019-01-01-preview options - AlertsSuppressionRulesClientListOptions contains the optional parameters for the AlertsSuppressionRulesClient.List method.

Example (GetSuppressionAlertRuleForSubscriptionFilteredByAlertType)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/GetAlertsSuppressionRulesWithAlertType_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsSuppressionRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armsecurity.AlertsSuppressionRulesClientListOptions{AlertType: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (GetSuppressionRulesForSubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/GetAlertsSuppressionRules_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsSuppressionRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armsecurity.AlertsSuppressionRulesClientListOptions{AlertType: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AlertsSuppressionRulesClient) Update

Update - Update existing rule or create new rule if it doesn't exist If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview alertsSuppressionRuleName - The unique name of the suppression alert rule alertsSuppressionRule - Suppression rule object options - AlertsSuppressionRulesClientUpdateOptions contains the optional parameters for the AlertsSuppressionRulesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/PutAlertsSuppressionRule_example.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAlertsSuppressionRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx, "dismissIpAnomalyAlerts", armsecurity.AlertsSuppressionRule{
		Properties: &armsecurity.AlertsSuppressionRuleProperties{
			AlertType:         to.Ptr("IpAnomaly"),
			Comment:           to.Ptr("Test VM"),
			ExpirationDateUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-01T19:50:47.083633Z"); return t }()),
			Reason:            to.Ptr("FalsePositive"),
			State:             to.Ptr(armsecurity.RuleStateEnabled),
			SuppressionAlertsScope: &armsecurity.SuppressionAlertsScope{
				AllOf: []*armsecurity.ScopeElement{
					{
						AdditionalProperties: map[string]interface{}{
							"in": []interface{}{
								"104.215.95.187",
								"52.164.206.56",
							},
						},
						Field: to.Ptr("entities.ip.address"),
					},
					{
						AdditionalProperties: map[string]interface{}{
							"contains": "POWERSHELL.EXE",
						},
						Field: to.Ptr("entities.process.commandline"),
					}},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AlertsSuppressionRulesClientDeleteOptions added in v0.3.0

type AlertsSuppressionRulesClientDeleteOptions struct {
}

AlertsSuppressionRulesClientDeleteOptions contains the optional parameters for the AlertsSuppressionRulesClient.Delete method.

type AlertsSuppressionRulesClientDeleteResponse added in v0.3.0

type AlertsSuppressionRulesClientDeleteResponse struct {
}

AlertsSuppressionRulesClientDeleteResponse contains the response from method AlertsSuppressionRulesClient.Delete.

type AlertsSuppressionRulesClientGetOptions added in v0.3.0

type AlertsSuppressionRulesClientGetOptions struct {
}

AlertsSuppressionRulesClientGetOptions contains the optional parameters for the AlertsSuppressionRulesClient.Get method.

type AlertsSuppressionRulesClientGetResponse added in v0.3.0

type AlertsSuppressionRulesClientGetResponse struct {
	AlertsSuppressionRule
}

AlertsSuppressionRulesClientGetResponse contains the response from method AlertsSuppressionRulesClient.Get.

type AlertsSuppressionRulesClientListOptions added in v0.3.0

type AlertsSuppressionRulesClientListOptions struct {
	// Type of the alert to get rules for
	AlertType *string
}

AlertsSuppressionRulesClientListOptions contains the optional parameters for the AlertsSuppressionRulesClient.List method.

type AlertsSuppressionRulesClientListResponse added in v0.3.0

type AlertsSuppressionRulesClientListResponse struct {
	AlertsSuppressionRulesList
}

AlertsSuppressionRulesClientListResponse contains the response from method AlertsSuppressionRulesClient.List.

type AlertsSuppressionRulesClientUpdateOptions added in v0.3.0

type AlertsSuppressionRulesClientUpdateOptions struct {
}

AlertsSuppressionRulesClientUpdateOptions contains the optional parameters for the AlertsSuppressionRulesClient.Update method.

type AlertsSuppressionRulesClientUpdateResponse added in v0.3.0

type AlertsSuppressionRulesClientUpdateResponse struct {
	AlertsSuppressionRule
}

AlertsSuppressionRulesClientUpdateResponse contains the response from method AlertsSuppressionRulesClient.Update.

type AlertsSuppressionRulesList

type AlertsSuppressionRulesList struct {
	// REQUIRED
	Value []*AlertsSuppressionRule `json:"value,omitempty"`

	// READ-ONLY; URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

AlertsSuppressionRulesList - Suppression rules list for subscription.

func (AlertsSuppressionRulesList) MarshalJSON

func (a AlertsSuppressionRulesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AlertsSuppressionRulesList.

func (*AlertsSuppressionRulesList) UnmarshalJSON added in v0.8.0

func (a *AlertsSuppressionRulesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AlertsSuppressionRulesList.

type AllowedConnectionsClient

type AllowedConnectionsClient struct {
	// contains filtered or unexported fields
}

AllowedConnectionsClient contains the methods for the AllowedConnections group. Don't use this type directly, use NewAllowedConnectionsClient() instead.

func NewAllowedConnectionsClient

func NewAllowedConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AllowedConnectionsClient, error)

NewAllowedConnectionsClient creates a new instance of AllowedConnectionsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AllowedConnectionsClient) Get

func (client *AllowedConnectionsClient) Get(ctx context.Context, resourceGroupName string, ascLocation string, connectionType ConnectionType, options *AllowedConnectionsClientGetOptions) (AllowedConnectionsClientGetResponse, error)

Get - Gets the list of all possible traffic between resources for the subscription and location, based on connection type. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations connectionType - The type of allowed connections (Internal, External) options - AllowedConnectionsClientGetOptions contains the optional parameters for the AllowedConnectionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnections_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAllowedConnectionsClient("3eeab341-f466-499c-a8be-85427e154bad", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myResourceGroup", "centralus", armsecurity.ConnectionTypeInternal, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AllowedConnectionsClient) NewListByHomeRegionPager added in v0.6.0

NewListByHomeRegionPager - Gets the list of all possible traffic between resources for the subscription and location. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - AllowedConnectionsClientListByHomeRegionOptions contains the optional parameters for the AllowedConnectionsClient.ListByHomeRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnectionsSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAllowedConnectionsClient("3eeab341-f466-499c-a8be-85427e154bad", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AllowedConnectionsClient) NewListPager added in v0.6.0

NewListPager - Gets the list of all possible traffic between resources for the subscription Generated from API version 2020-01-01 options - AllowedConnectionsClientListOptions contains the optional parameters for the AllowedConnectionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnectionsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAllowedConnectionsClient("3eeab341-f466-499c-a8be-85427e154bad", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AllowedConnectionsClientGetOptions added in v0.3.0

type AllowedConnectionsClientGetOptions struct {
}

AllowedConnectionsClientGetOptions contains the optional parameters for the AllowedConnectionsClient.Get method.

type AllowedConnectionsClientGetResponse added in v0.3.0

type AllowedConnectionsClientGetResponse struct {
	AllowedConnectionsResource
}

AllowedConnectionsClientGetResponse contains the response from method AllowedConnectionsClient.Get.

type AllowedConnectionsClientListByHomeRegionOptions added in v0.3.0

type AllowedConnectionsClientListByHomeRegionOptions struct {
}

AllowedConnectionsClientListByHomeRegionOptions contains the optional parameters for the AllowedConnectionsClient.ListByHomeRegion method.

type AllowedConnectionsClientListByHomeRegionResponse added in v0.3.0

type AllowedConnectionsClientListByHomeRegionResponse struct {
	AllowedConnectionsList
}

AllowedConnectionsClientListByHomeRegionResponse contains the response from method AllowedConnectionsClient.ListByHomeRegion.

type AllowedConnectionsClientListOptions added in v0.3.0

type AllowedConnectionsClientListOptions struct {
}

AllowedConnectionsClientListOptions contains the optional parameters for the AllowedConnectionsClient.List method.

type AllowedConnectionsClientListResponse added in v0.3.0

type AllowedConnectionsClientListResponse struct {
	AllowedConnectionsList
}

AllowedConnectionsClientListResponse contains the response from method AllowedConnectionsClient.List.

type AllowedConnectionsList

type AllowedConnectionsList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY
	Value []*AllowedConnectionsResource `json:"value,omitempty" azure:"ro"`
}

AllowedConnectionsList - List of all possible traffic between Azure resources

func (AllowedConnectionsList) MarshalJSON

func (a AllowedConnectionsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllowedConnectionsList.

func (*AllowedConnectionsList) UnmarshalJSON added in v0.8.0

func (a *AllowedConnectionsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllowedConnectionsList.

type AllowedConnectionsResource

type AllowedConnectionsResource struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Describes the allowed traffic between Azure resources
	Properties *AllowedConnectionsResourceProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AllowedConnectionsResource - The resource whose properties describes the allowed traffic between Azure resources

func (AllowedConnectionsResource) MarshalJSON

func (a AllowedConnectionsResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllowedConnectionsResource.

func (*AllowedConnectionsResource) UnmarshalJSON

func (a *AllowedConnectionsResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllowedConnectionsResource.

type AllowedConnectionsResourceProperties

type AllowedConnectionsResourceProperties struct {
	// READ-ONLY; The UTC time on which the allowed connections resource was calculated
	CalculatedDateTime *time.Time `json:"calculatedDateTime,omitempty" azure:"ro"`

	// READ-ONLY; List of connectable resources
	ConnectableResources []*ConnectableResource `json:"connectableResources,omitempty" azure:"ro"`
}

AllowedConnectionsResourceProperties - Describes the allowed traffic between Azure resources

func (AllowedConnectionsResourceProperties) MarshalJSON

func (a AllowedConnectionsResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllowedConnectionsResourceProperties.

func (*AllowedConnectionsResourceProperties) UnmarshalJSON

func (a *AllowedConnectionsResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllowedConnectionsResourceProperties.

type AllowlistCustomAlertRule

type AllowlistCustomAlertRule struct {
	// REQUIRED; The values to allow. The format of the values depends on the rule type.
	AllowlistValues []*string `json:"allowlistValues,omitempty"`

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

AllowlistCustomAlertRule - A custom alert rule that checks if a value (depends on the custom alert type) is allowed.

func (*AllowlistCustomAlertRule) GetAllowlistCustomAlertRule

func (a *AllowlistCustomAlertRule) GetAllowlistCustomAlertRule() *AllowlistCustomAlertRule

GetAllowlistCustomAlertRule implements the AllowlistCustomAlertRuleClassification interface for type AllowlistCustomAlertRule.

func (*AllowlistCustomAlertRule) GetCustomAlertRule added in v0.3.0

func (a *AllowlistCustomAlertRule) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type AllowlistCustomAlertRule.

func (*AllowlistCustomAlertRule) GetListCustomAlertRule added in v0.3.0

func (a *AllowlistCustomAlertRule) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type AllowlistCustomAlertRule.

func (AllowlistCustomAlertRule) MarshalJSON

func (a AllowlistCustomAlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllowlistCustomAlertRule.

func (*AllowlistCustomAlertRule) UnmarshalJSON

func (a *AllowlistCustomAlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllowlistCustomAlertRule.

type AllowlistCustomAlertRuleClassification

type AllowlistCustomAlertRuleClassification interface {
	ListCustomAlertRuleClassification
	// GetAllowlistCustomAlertRule returns the AllowlistCustomAlertRule content of the underlying type.
	GetAllowlistCustomAlertRule() *AllowlistCustomAlertRule
}

AllowlistCustomAlertRuleClassification provides polymorphic access to related types. Call the interface's GetAllowlistCustomAlertRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AllowlistCustomAlertRule, *ConnectionFromIPNotAllowed, *ConnectionToIPNotAllowed, *LocalUserNotAllowed, *ProcessNotAllowed

type AmqpC2DMessagesNotInAllowedRange

type AmqpC2DMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

AmqpC2DMessagesNotInAllowedRange - Number of cloud to device messages (AMQP protocol) is not in allowed range.

func (*AmqpC2DMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (a *AmqpC2DMessagesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type AmqpC2DMessagesNotInAllowedRange.

func (*AmqpC2DMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (a *AmqpC2DMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type AmqpC2DMessagesNotInAllowedRange.

func (*AmqpC2DMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (a *AmqpC2DMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type AmqpC2DMessagesNotInAllowedRange.

func (AmqpC2DMessagesNotInAllowedRange) MarshalJSON

func (a AmqpC2DMessagesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AmqpC2DMessagesNotInAllowedRange.

func (*AmqpC2DMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (a *AmqpC2DMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AmqpC2DMessagesNotInAllowedRange.

type AmqpC2DRejectedMessagesNotInAllowedRange

type AmqpC2DRejectedMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

AmqpC2DRejectedMessagesNotInAllowedRange - Number of rejected cloud to device messages (AMQP protocol) is not in allowed range.

func (*AmqpC2DRejectedMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type AmqpC2DRejectedMessagesNotInAllowedRange.

func (*AmqpC2DRejectedMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (a *AmqpC2DRejectedMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type AmqpC2DRejectedMessagesNotInAllowedRange.

func (*AmqpC2DRejectedMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (a *AmqpC2DRejectedMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type AmqpC2DRejectedMessagesNotInAllowedRange.

func (AmqpC2DRejectedMessagesNotInAllowedRange) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AmqpC2DRejectedMessagesNotInAllowedRange.

func (*AmqpC2DRejectedMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (a *AmqpC2DRejectedMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AmqpC2DRejectedMessagesNotInAllowedRange.

type AmqpD2CMessagesNotInAllowedRange

type AmqpD2CMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

AmqpD2CMessagesNotInAllowedRange - Number of device to cloud messages (AMQP protocol) is not in allowed range.

func (*AmqpD2CMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (a *AmqpD2CMessagesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type AmqpD2CMessagesNotInAllowedRange.

func (*AmqpD2CMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (a *AmqpD2CMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type AmqpD2CMessagesNotInAllowedRange.

func (*AmqpD2CMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (a *AmqpD2CMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type AmqpD2CMessagesNotInAllowedRange.

func (AmqpD2CMessagesNotInAllowedRange) MarshalJSON

func (a AmqpD2CMessagesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AmqpD2CMessagesNotInAllowedRange.

func (*AmqpD2CMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (a *AmqpD2CMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AmqpD2CMessagesNotInAllowedRange.

type Application added in v0.8.0

type Application struct {
	// Properties of a security application
	Properties *ApplicationProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Application - Security Application over a given scope

func (Application) MarshalJSON added in v0.8.0

func (a Application) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Application.

func (*Application) UnmarshalJSON added in v0.8.0

func (a *Application) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Application.

type ApplicationClient added in v0.8.0

type ApplicationClient struct {
	// contains filtered or unexported fields
}

ApplicationClient contains the methods for the Application group. Don't use this type directly, use NewApplicationClient() instead.

func NewApplicationClient added in v0.8.0

func NewApplicationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationClient, error)

NewApplicationClient creates a new instance of ApplicationClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ApplicationClient) CreateOrUpdate added in v0.8.0

CreateOrUpdate - Creates or update a security application on the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-07-01-preview applicationID - The security Application key - unique key for the standard application application - Application over a subscription scope options - ApplicationClientCreateOrUpdateOptions contains the optional parameters for the ApplicationClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/PutApplication_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewApplicationClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.Application{
		Properties: &armsecurity.ApplicationProperties{
			Description: to.Ptr("An application on critical recommendations"),
			ConditionSets: []interface{}{
				map[string]interface{}{
					"conditions": []interface{}{
						map[string]interface{}{
							"operator": "contains",
							"property": "$.Id",
							"value":    "-bil-",
						},
					},
				}},
			DisplayName:        to.Ptr("Admin's application"),
			SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationClient) Delete added in v0.8.0

Delete - Delete an Application over a given scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-07-01-preview applicationID - The security Application key - unique key for the standard application options - ApplicationClientDeleteOptions contains the optional parameters for the ApplicationClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/DeleteApplication_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewApplicationClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ApplicationClient) Get added in v0.8.0

Get - Get a specific application for the requested scope by applicationId If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-07-01-preview applicationID - The security Application key - unique key for the standard application options - ApplicationClientGetOptions contains the optional parameters for the ApplicationClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/GetApplication_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewApplicationClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ApplicationClientCreateOrUpdateOptions added in v0.8.0

type ApplicationClientCreateOrUpdateOptions struct {
}

ApplicationClientCreateOrUpdateOptions contains the optional parameters for the ApplicationClient.CreateOrUpdate method.

type ApplicationClientCreateOrUpdateResponse added in v0.8.0

type ApplicationClientCreateOrUpdateResponse struct {
	Application
}

ApplicationClientCreateOrUpdateResponse contains the response from method ApplicationClient.CreateOrUpdate.

type ApplicationClientDeleteOptions added in v0.8.0

type ApplicationClientDeleteOptions struct {
}

ApplicationClientDeleteOptions contains the optional parameters for the ApplicationClient.Delete method.

type ApplicationClientDeleteResponse added in v0.8.0

type ApplicationClientDeleteResponse struct {
}

ApplicationClientDeleteResponse contains the response from method ApplicationClient.Delete.

type ApplicationClientGetOptions added in v0.8.0

type ApplicationClientGetOptions struct {
}

ApplicationClientGetOptions contains the optional parameters for the ApplicationClient.Get method.

type ApplicationClientGetResponse added in v0.8.0

type ApplicationClientGetResponse struct {
	Application
}

ApplicationClientGetResponse contains the response from method ApplicationClient.Get.

type ApplicationCondition added in v0.8.0

type ApplicationCondition struct {
	// The application Condition's Operator, for example Contains for id or In for list of possible IDs, see examples
	Operator *ApplicationConditionOperator `json:"operator,omitempty"`

	// The application Condition's Property, e.g. ID, see examples
	Property *string `json:"property,omitempty"`

	// The application Condition's Value like IDs that contain some string, see examples
	Value *string `json:"value,omitempty"`
}

ApplicationCondition - Application's condition

func (ApplicationCondition) MarshalJSON added in v0.8.0

func (a ApplicationCondition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationCondition.

func (*ApplicationCondition) UnmarshalJSON added in v0.8.0

func (a *ApplicationCondition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationCondition.

type ApplicationConditionOperator added in v0.8.0

type ApplicationConditionOperator string

ApplicationConditionOperator - The application Condition's Operator, for example Contains for id or In for list of possible IDs, see examples

const (
	// ApplicationConditionOperatorContains - Checks that the string value of the data defined in Property contains the given
	// value
	ApplicationConditionOperatorContains ApplicationConditionOperator = "Contains"
	// ApplicationConditionOperatorEquals - Checks that the string value of the data defined in Property equals the given value
	ApplicationConditionOperatorEquals ApplicationConditionOperator = "Equals"
	// ApplicationConditionOperatorIn - Checks that the string value of the data defined in Property equals any of the given values
	// (exact fit)
	ApplicationConditionOperatorIn ApplicationConditionOperator = "In"
)

func PossibleApplicationConditionOperatorValues added in v0.8.0

func PossibleApplicationConditionOperatorValues() []ApplicationConditionOperator

PossibleApplicationConditionOperatorValues returns the possible values for the ApplicationConditionOperator const type.

type ApplicationProperties added in v0.8.0

type ApplicationProperties struct {
	// REQUIRED; The application conditionSets - see examples
	ConditionSets []interface{} `json:"conditionSets,omitempty"`

	// REQUIRED; The application source, what it affects, e.g. Assessments
	SourceResourceType *ApplicationSourceResourceType `json:"sourceResourceType,omitempty"`

	// description of the application
	Description *string `json:"description,omitempty"`

	// display name of the application
	DisplayName *string `json:"displayName,omitempty"`
}

ApplicationProperties - Describes properties of an application

func (ApplicationProperties) MarshalJSON added in v0.8.0

func (a ApplicationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.

func (*ApplicationProperties) UnmarshalJSON added in v0.8.0

func (a *ApplicationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties.

type ApplicationSourceResourceType added in v0.8.0

type ApplicationSourceResourceType string

ApplicationSourceResourceType - The application source, what it affects, e.g. Assessments

const (
	// ApplicationSourceResourceTypeAssessments - The source of the application is assessments
	ApplicationSourceResourceTypeAssessments ApplicationSourceResourceType = "Assessments"
)

func PossibleApplicationSourceResourceTypeValues added in v0.8.0

func PossibleApplicationSourceResourceTypeValues() []ApplicationSourceResourceType

PossibleApplicationSourceResourceTypeValues returns the possible values for the ApplicationSourceResourceType const type.

type ApplicationsClient added in v0.8.0

type ApplicationsClient struct {
	// contains filtered or unexported fields
}

ApplicationsClient contains the methods for the Applications group. Don't use this type directly, use NewApplicationsClient() instead.

func NewApplicationsClient added in v0.8.0

func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error)

NewApplicationsClient creates a new instance of ApplicationsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ApplicationsClient) NewListPager added in v0.8.0

NewListPager - Get a list of all relevant applications over a subscription level scope Generated from API version 2022-07-01-preview options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ListBySubscriptionApplications_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewApplicationsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ApplicationsClientListOptions added in v0.8.0

type ApplicationsClientListOptions struct {
}

ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method.

type ApplicationsClientListResponse added in v0.8.0

type ApplicationsClientListResponse struct {
	ApplicationsList
}

ApplicationsClientListResponse contains the response from method ApplicationsClient.List.

type ApplicationsList added in v0.8.0

type ApplicationsList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of applications in this page
	Value []*Application `json:"value,omitempty" azure:"ro"`
}

ApplicationsList - Page of a security applications list

func (ApplicationsList) MarshalJSON added in v0.8.0

func (a ApplicationsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationsList.

func (*ApplicationsList) UnmarshalJSON added in v0.8.0

func (a *ApplicationsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationsList.

type AscLocation

type AscLocation struct {
	// An empty set of properties
	Properties interface{} `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AscLocation - The ASC location of the subscription is in the "name" field

func (AscLocation) MarshalJSON

func (a AscLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AscLocation.

func (*AscLocation) UnmarshalJSON

func (a *AscLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AscLocation.

type AscLocationList

type AscLocationList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY
	Value []*AscLocation `json:"value,omitempty" azure:"ro"`
}

AscLocationList - List of locations where ASC saves your data

func (AscLocationList) MarshalJSON

func (a AscLocationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AscLocationList.

func (*AscLocationList) UnmarshalJSON added in v0.8.0

func (a *AscLocationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AscLocationList.

type AssessedResourceType

type AssessedResourceType string

AssessedResourceType - Sub-assessment resource type

const (
	AssessedResourceTypeContainerRegistryVulnerability AssessedResourceType = "ContainerRegistryVulnerability"
	AssessedResourceTypeSQLServerVulnerability         AssessedResourceType = "SqlServerVulnerability"
	AssessedResourceTypeServerVulnerability            AssessedResourceType = "ServerVulnerability"
)

func PossibleAssessedResourceTypeValues

func PossibleAssessedResourceTypeValues() []AssessedResourceType

PossibleAssessedResourceTypeValues returns the possible values for the AssessedResourceType const type.

type Assessment added in v0.3.0

type Assessment struct {
	// Describes properties of an assessment.
	Properties *AssessmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Assessment - Security assessment on a resource

func (Assessment) MarshalJSON added in v0.8.0

func (a Assessment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Assessment.

func (*Assessment) UnmarshalJSON added in v0.8.0

func (a *Assessment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Assessment.

type AssessmentLinks struct {
	// READ-ONLY; Link to assessment in Azure Portal
	AzurePortalURI *string `json:"azurePortalUri,omitempty" azure:"ro"`
}

AssessmentLinks - Links relevant to the assessment

func (AssessmentLinks) MarshalJSON added in v0.8.0

func (a AssessmentLinks) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentLinks.

func (*AssessmentLinks) UnmarshalJSON added in v0.8.0

func (a *AssessmentLinks) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentLinks.

type AssessmentList added in v0.3.0

type AssessmentList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of security assessments in this page
	Value []*AssessmentResponse `json:"value,omitempty" azure:"ro"`
}

AssessmentList - Page of a security assessments list

func (AssessmentList) MarshalJSON added in v0.3.0

func (a AssessmentList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentList.

func (*AssessmentList) UnmarshalJSON added in v0.8.0

func (a *AssessmentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentList.

type AssessmentMetadata added in v0.3.0

type AssessmentMetadata struct {
	// Describes properties of an assessment metadata.
	Properties *AssessmentMetadataProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssessmentMetadata - Security assessment metadata

func (AssessmentMetadata) MarshalJSON added in v0.8.0

func (a AssessmentMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadata.

func (*AssessmentMetadata) UnmarshalJSON added in v0.8.0

func (a *AssessmentMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadata.

type AssessmentMetadataPartnerData added in v0.3.0

type AssessmentMetadataPartnerData struct {
	// REQUIRED; Name of the company of the partner
	PartnerName *string `json:"partnerName,omitempty"`

	// REQUIRED; Secret to authenticate the partner and verify it created the assessment - write only
	Secret *string `json:"secret,omitempty"`

	// Name of the product of the partner that created the assessment
	ProductName *string `json:"productName,omitempty"`
}

AssessmentMetadataPartnerData - Describes the partner that created the assessment

func (AssessmentMetadataPartnerData) MarshalJSON added in v0.8.0

func (a AssessmentMetadataPartnerData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadataPartnerData.

func (*AssessmentMetadataPartnerData) UnmarshalJSON added in v0.8.0

func (a *AssessmentMetadataPartnerData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadataPartnerData.

type AssessmentMetadataProperties added in v0.3.0

type AssessmentMetadataProperties struct {
	// REQUIRED; BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom
	// Azure Policy definition
	AssessmentType *AssessmentType `json:"assessmentType,omitempty"`

	// REQUIRED; User friendly display name of the assessment
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; The severity level of the assessment
	Severity   *Severity     `json:"severity,omitempty"`
	Categories []*Categories `json:"categories,omitempty"`

	// Human readable description of the assessment
	Description *string `json:"description,omitempty"`

	// The implementation effort required to remediate this assessment
	ImplementationEffort *ImplementationEffort `json:"implementationEffort,omitempty"`

	// Describes the partner that created the assessment
	PartnerData *AssessmentMetadataPartnerData `json:"partnerData,omitempty"`

	// True if this assessment is in preview release status
	Preview *bool `json:"preview,omitempty"`

	// Human readable description of what you should do to mitigate this security issue
	RemediationDescription *string    `json:"remediationDescription,omitempty"`
	Threats                []*Threats `json:"threats,omitempty"`

	// The user impact of the assessment
	UserImpact *UserImpact `json:"userImpact,omitempty"`

	// READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on
	PolicyDefinitionID *string `json:"policyDefinitionId,omitempty" azure:"ro"`
}

AssessmentMetadataProperties - Describes properties of an assessment metadata.

func (AssessmentMetadataProperties) MarshalJSON added in v0.3.0

func (a AssessmentMetadataProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadataProperties.

func (*AssessmentMetadataProperties) UnmarshalJSON added in v0.8.0

func (a *AssessmentMetadataProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadataProperties.

type AssessmentMetadataPropertiesResponse added in v0.3.0

type AssessmentMetadataPropertiesResponse struct {
	// REQUIRED; BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom
	// Azure Policy definition
	AssessmentType *AssessmentType `json:"assessmentType,omitempty"`

	// REQUIRED; User friendly display name of the assessment
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; The severity level of the assessment
	Severity   *Severity     `json:"severity,omitempty"`
	Categories []*Categories `json:"categories,omitempty"`

	// Human readable description of the assessment
	Description *string `json:"description,omitempty"`

	// The implementation effort required to remediate this assessment
	ImplementationEffort *ImplementationEffort `json:"implementationEffort,omitempty"`

	// Describes the partner that created the assessment
	PartnerData            *AssessmentMetadataPartnerData `json:"partnerData,omitempty"`
	PlannedDeprecationDate *string                        `json:"plannedDeprecationDate,omitempty"`

	// True if this assessment is in preview release status
	Preview      *bool                                             `json:"preview,omitempty"`
	PublishDates *AssessmentMetadataPropertiesResponsePublishDates `json:"publishDates,omitempty"`

	// Human readable description of what you should do to mitigate this security issue
	RemediationDescription *string       `json:"remediationDescription,omitempty"`
	Tactics                []*Tactics    `json:"tactics,omitempty"`
	Techniques             []*Techniques `json:"techniques,omitempty"`
	Threats                []*Threats    `json:"threats,omitempty"`

	// The user impact of the assessment
	UserImpact *UserImpact `json:"userImpact,omitempty"`

	// READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on
	PolicyDefinitionID *string `json:"policyDefinitionId,omitempty" azure:"ro"`
}

AssessmentMetadataPropertiesResponse - Describes properties of an assessment metadata response.

func (AssessmentMetadataPropertiesResponse) MarshalJSON added in v0.3.0

func (a AssessmentMetadataPropertiesResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadataPropertiesResponse.

func (*AssessmentMetadataPropertiesResponse) UnmarshalJSON added in v0.8.0

func (a *AssessmentMetadataPropertiesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadataPropertiesResponse.

type AssessmentMetadataPropertiesResponsePublishDates added in v0.3.0

type AssessmentMetadataPropertiesResponsePublishDates struct {
	// REQUIRED
	Public *string `json:"public,omitempty"`
	GA     *string `json:"GA,omitempty"`
}

func (AssessmentMetadataPropertiesResponsePublishDates) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadataPropertiesResponsePublishDates.

func (*AssessmentMetadataPropertiesResponsePublishDates) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadataPropertiesResponsePublishDates.

type AssessmentMetadataResponse added in v0.3.0

type AssessmentMetadataResponse struct {
	// Describes properties of an assessment metadata response.
	Properties *AssessmentMetadataPropertiesResponse `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssessmentMetadataResponse - Security assessment metadata response

func (AssessmentMetadataResponse) MarshalJSON added in v0.8.0

func (a AssessmentMetadataResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadataResponse.

func (*AssessmentMetadataResponse) UnmarshalJSON added in v0.8.0

func (a *AssessmentMetadataResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadataResponse.

type AssessmentMetadataResponseList added in v0.3.0

type AssessmentMetadataResponseList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY
	Value []*AssessmentMetadataResponse `json:"value,omitempty" azure:"ro"`
}

AssessmentMetadataResponseList - List of security assessment metadata

func (AssessmentMetadataResponseList) MarshalJSON added in v0.3.0

func (a AssessmentMetadataResponseList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentMetadataResponseList.

func (*AssessmentMetadataResponseList) UnmarshalJSON added in v0.8.0

func (a *AssessmentMetadataResponseList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentMetadataResponseList.

type AssessmentPartnerData added in v0.3.0

type AssessmentPartnerData struct {
	// REQUIRED; Name of the company of the partner
	PartnerName *string `json:"partnerName,omitempty"`

	// REQUIRED; secret to authenticate the partner - write only
	Secret *string `json:"secret,omitempty"`
}

AssessmentPartnerData - Data regarding 3rd party partner integration

func (AssessmentPartnerData) MarshalJSON added in v0.8.0

func (a AssessmentPartnerData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentPartnerData.

func (*AssessmentPartnerData) UnmarshalJSON added in v0.8.0

func (a *AssessmentPartnerData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentPartnerData.

type AssessmentProperties added in v0.3.0

type AssessmentProperties struct {
	// REQUIRED; Details of the resource that was assessed
	ResourceDetails ResourceDetailsClassification `json:"resourceDetails,omitempty"`

	// REQUIRED; The result of the assessment
	Status *AssessmentStatus `json:"status,omitempty"`

	// Additional data regarding the assessment
	AdditionalData map[string]*string `json:"additionalData,omitempty"`

	// Describes properties of an assessment metadata.
	Metadata *AssessmentMetadataProperties `json:"metadata,omitempty"`

	// Data regarding 3rd party partner integration
	PartnersData *AssessmentPartnerData `json:"partnersData,omitempty"`

	// READ-ONLY; User friendly display name of the assessment
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Links relevant to the assessment
	Links *AssessmentLinks `json:"links,omitempty" azure:"ro"`
}

AssessmentProperties - Describes properties of an assessment.

func (AssessmentProperties) MarshalJSON added in v0.3.0

func (a AssessmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentProperties.

func (*AssessmentProperties) UnmarshalJSON added in v0.3.0

func (a *AssessmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentProperties.

type AssessmentPropertiesBase added in v0.3.0

type AssessmentPropertiesBase struct {
	// REQUIRED; Details of the resource that was assessed
	ResourceDetails ResourceDetailsClassification `json:"resourceDetails,omitempty"`

	// Additional data regarding the assessment
	AdditionalData map[string]*string `json:"additionalData,omitempty"`

	// Describes properties of an assessment metadata.
	Metadata *AssessmentMetadataProperties `json:"metadata,omitempty"`

	// Data regarding 3rd party partner integration
	PartnersData *AssessmentPartnerData `json:"partnersData,omitempty"`

	// READ-ONLY; User friendly display name of the assessment
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Links relevant to the assessment
	Links *AssessmentLinks `json:"links,omitempty" azure:"ro"`
}

AssessmentPropertiesBase - Describes properties of an assessment.

func (AssessmentPropertiesBase) MarshalJSON added in v0.3.0

func (a AssessmentPropertiesBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentPropertiesBase.

func (*AssessmentPropertiesBase) UnmarshalJSON added in v0.3.0

func (a *AssessmentPropertiesBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentPropertiesBase.

type AssessmentPropertiesResponse added in v0.3.0

type AssessmentPropertiesResponse struct {
	// REQUIRED; Details of the resource that was assessed
	ResourceDetails ResourceDetailsClassification `json:"resourceDetails,omitempty"`

	// REQUIRED; The result of the assessment
	Status *AssessmentStatusResponse `json:"status,omitempty"`

	// Additional data regarding the assessment
	AdditionalData map[string]*string `json:"additionalData,omitempty"`

	// Describes properties of an assessment metadata.
	Metadata *AssessmentMetadataProperties `json:"metadata,omitempty"`

	// Data regarding 3rd party partner integration
	PartnersData *AssessmentPartnerData `json:"partnersData,omitempty"`

	// READ-ONLY; User friendly display name of the assessment
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Links relevant to the assessment
	Links *AssessmentLinks `json:"links,omitempty" azure:"ro"`
}

AssessmentPropertiesResponse - Describes properties of an assessment.

func (AssessmentPropertiesResponse) MarshalJSON added in v0.3.0

func (a AssessmentPropertiesResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentPropertiesResponse.

func (*AssessmentPropertiesResponse) UnmarshalJSON added in v0.3.0

func (a *AssessmentPropertiesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentPropertiesResponse.

type AssessmentResponse added in v0.3.0

type AssessmentResponse struct {
	// Describes properties of an assessment.
	Properties *AssessmentPropertiesResponse `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssessmentResponse - Security assessment on a resource - response format

func (AssessmentResponse) MarshalJSON added in v0.8.0

func (a AssessmentResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentResponse.

func (*AssessmentResponse) UnmarshalJSON added in v0.8.0

func (a *AssessmentResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentResponse.

type AssessmentStatus

type AssessmentStatus struct {
	// REQUIRED; Programmatic code for the status of the assessment
	Code *AssessmentStatusCode `json:"code,omitempty"`

	// Programmatic code for the cause of the assessment status
	Cause *string `json:"cause,omitempty"`

	// Human readable description of the assessment status
	Description *string `json:"description,omitempty"`
}

AssessmentStatus - The result of the assessment

func (AssessmentStatus) MarshalJSON

func (a AssessmentStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentStatus.

func (*AssessmentStatus) UnmarshalJSON

func (a *AssessmentStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentStatus.

type AssessmentStatusCode

type AssessmentStatusCode string

AssessmentStatusCode - Programmatic code for the status of the assessment

const (
	// AssessmentStatusCodeHealthy - The resource is healthy
	AssessmentStatusCodeHealthy AssessmentStatusCode = "Healthy"
	// AssessmentStatusCodeNotApplicable - Assessment for this resource did not happen
	AssessmentStatusCodeNotApplicable AssessmentStatusCode = "NotApplicable"
	// AssessmentStatusCodeUnhealthy - The resource has a security issue that needs to be addressed
	AssessmentStatusCodeUnhealthy AssessmentStatusCode = "Unhealthy"
)

func PossibleAssessmentStatusCodeValues

func PossibleAssessmentStatusCodeValues() []AssessmentStatusCode

PossibleAssessmentStatusCodeValues returns the possible values for the AssessmentStatusCode const type.

type AssessmentStatusResponse

type AssessmentStatusResponse struct {
	// REQUIRED; Programmatic code for the status of the assessment
	Code *AssessmentStatusCode `json:"code,omitempty"`

	// Programmatic code for the cause of the assessment status
	Cause *string `json:"cause,omitempty"`

	// Human readable description of the assessment status
	Description *string `json:"description,omitempty"`

	// READ-ONLY; The time that the assessment was created and first evaluated. Returned as UTC time in ISO 8601 format
	FirstEvaluationDate *time.Time `json:"firstEvaluationDate,omitempty" azure:"ro"`

	// READ-ONLY; The time that the status of the assessment last changed. Returned as UTC time in ISO 8601 format
	StatusChangeDate *time.Time `json:"statusChangeDate,omitempty" azure:"ro"`
}

AssessmentStatusResponse - The result of the assessment

func (AssessmentStatusResponse) MarshalJSON

func (a AssessmentStatusResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssessmentStatusResponse.

func (*AssessmentStatusResponse) UnmarshalJSON

func (a *AssessmentStatusResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentStatusResponse.

type AssessmentType

type AssessmentType string

AssessmentType - BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition

const (
	// AssessmentTypeBuiltIn - Microsoft Defender for Cloud managed assessments
	AssessmentTypeBuiltIn AssessmentType = "BuiltIn"
	// AssessmentTypeCustomPolicy - User defined policies that are automatically ingested from Azure Policy to Microsoft Defender
	// for Cloud
	AssessmentTypeCustomPolicy AssessmentType = "CustomPolicy"
	// AssessmentTypeCustomerManaged - User assessments pushed directly by the user or other third party to Microsoft Defender
	// for Cloud
	AssessmentTypeCustomerManaged AssessmentType = "CustomerManaged"
	// AssessmentTypeVerifiedPartner - An assessment that was created by a verified 3rd party if the user connected it to ASC
	AssessmentTypeVerifiedPartner AssessmentType = "VerifiedPartner"
)

func PossibleAssessmentTypeValues

func PossibleAssessmentTypeValues() []AssessmentType

PossibleAssessmentTypeValues returns the possible values for the AssessmentType const type.

type AssessmentsClient

type AssessmentsClient struct {
	// contains filtered or unexported fields
}

AssessmentsClient contains the methods for the Assessments group. Don't use this type directly, use NewAssessmentsClient() instead.

func NewAssessmentsClient

func NewAssessmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AssessmentsClient, error)

NewAssessmentsClient creates a new instance of AssessmentsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AssessmentsClient) CreateOrUpdate

func (client *AssessmentsClient) CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment Assessment, options *AssessmentsClientCreateOrUpdateOptions) (AssessmentsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceID - The identifier of the resource. assessmentName - The Assessment Key - Unique key for the assessment type assessment - Calculated assessment on a pre-defined assessment metadata options - AssessmentsClientCreateOrUpdateOptions contains the optional parameters for the AssessmentsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/PutAssessment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", "8bb8be0a-6010-4789-812f-e4d661c4ed0e", armsecurity.Assessment{
		Properties: &armsecurity.AssessmentProperties{
			ResourceDetails: &armsecurity.AzureResourceDetails{
				Source: to.Ptr(armsecurity.SourceAzure),
			},
			Status: &armsecurity.AssessmentStatus{
				Code: to.Ptr(armsecurity.AssessmentStatusCodeHealthy),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssessmentsClient) Delete

func (client *AssessmentsClient) Delete(ctx context.Context, resourceID string, assessmentName string, options *AssessmentsClientDeleteOptions) (AssessmentsClientDeleteResponse, error)

Delete - Delete a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceID - The identifier of the resource. assessmentName - The Assessment Key - Unique key for the assessment type options - AssessmentsClientDeleteOptions contains the optional parameters for the AssessmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/DeleteAssessment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", "8bb8be0a-6010-4789-812f-e4d661c4ed0e", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssessmentsClient) Get

func (client *AssessmentsClient) Get(ctx context.Context, resourceID string, assessmentName string, options *AssessmentsClientGetOptions) (AssessmentsClientGetResponse, error)

Get - Get a security assessment on your scanned resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceID - The identifier of the resource. assessmentName - The Assessment Key - Unique key for the assessment type options - AssessmentsClientGetOptions contains the optional parameters for the AssessmentsClient.Get method.

Example (GetSecurityRecommendationTaskFromSecurityDataLocation)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/GetAssessment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", "21300918-b2e3-0346-785f-c77ff57d243b", &armsecurity.AssessmentsClientGetOptions{Expand: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (GetSecurityRecommendationTaskFromSecurityDataLocationWithExpandParameter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/GetAssessmentWithExpand_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", "21300918-b2e3-0346-785f-c77ff57d243b", &armsecurity.AssessmentsClientGetOptions{Expand: to.Ptr(armsecurity.ExpandEnumLinks)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssessmentsClient) NewListPager added in v0.6.0

NewListPager - Get security assessments on all your scanned resources inside a scope Generated from API version 2021-06-01 scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). options - AssessmentsClientListOptions contains the optional parameters for the AssessmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ListAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AssessmentsClientCreateOrUpdateOptions added in v0.3.0

type AssessmentsClientCreateOrUpdateOptions struct {
}

AssessmentsClientCreateOrUpdateOptions contains the optional parameters for the AssessmentsClient.CreateOrUpdate method.

type AssessmentsClientCreateOrUpdateResponse added in v0.3.0

type AssessmentsClientCreateOrUpdateResponse struct {
	AssessmentResponse
}

AssessmentsClientCreateOrUpdateResponse contains the response from method AssessmentsClient.CreateOrUpdate.

type AssessmentsClientDeleteOptions added in v0.3.0

type AssessmentsClientDeleteOptions struct {
}

AssessmentsClientDeleteOptions contains the optional parameters for the AssessmentsClient.Delete method.

type AssessmentsClientDeleteResponse added in v0.3.0

type AssessmentsClientDeleteResponse struct {
}

AssessmentsClientDeleteResponse contains the response from method AssessmentsClient.Delete.

type AssessmentsClientGetOptions added in v0.3.0

type AssessmentsClientGetOptions struct {
	// OData expand. Optional.
	Expand *ExpandEnum
}

AssessmentsClientGetOptions contains the optional parameters for the AssessmentsClient.Get method.

type AssessmentsClientGetResponse added in v0.3.0

type AssessmentsClientGetResponse struct {
	AssessmentResponse
}

AssessmentsClientGetResponse contains the response from method AssessmentsClient.Get.

type AssessmentsClientListOptions added in v0.3.0

type AssessmentsClientListOptions struct {
}

AssessmentsClientListOptions contains the optional parameters for the AssessmentsClient.List method.

type AssessmentsClientListResponse added in v0.3.0

type AssessmentsClientListResponse struct {
	AssessmentList
}

AssessmentsClientListResponse contains the response from method AssessmentsClient.List.

type AssessmentsMetadataClient

type AssessmentsMetadataClient struct {
	// contains filtered or unexported fields
}

AssessmentsMetadataClient contains the methods for the AssessmentsMetadata group. Don't use this type directly, use NewAssessmentsMetadataClient() instead.

func NewAssessmentsMetadataClient

func NewAssessmentsMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssessmentsMetadataClient, error)

NewAssessmentsMetadataClient creates a new instance of AssessmentsMetadataClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AssessmentsMetadataClient) CreateInSubscription

CreateInSubscription - Create metadata information on an assessment type in a specific subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 assessmentMetadataName - The Assessment Key - Unique key for the assessment type assessmentMetadata - AssessmentMetadata object options - AssessmentsMetadataClientCreateInSubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.CreateInSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/CreateAssessmentsMetadata_subscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsMetadataClient("0980887d-03d6-408c-9566-532f3456804e", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateInSubscription(ctx, "ca039e75-a276-4175-aebc-bcd41e4b14b7", armsecurity.AssessmentMetadataResponse{
		Properties: &armsecurity.AssessmentMetadataPropertiesResponse{
			Description:    to.Ptr("Install an endpoint protection solution on your virtual machines scale sets, to protect them from threats and vulnerabilities."),
			AssessmentType: to.Ptr(armsecurity.AssessmentTypeCustomerManaged),
			Categories: []*armsecurity.Categories{
				to.Ptr(armsecurity.CategoriesCompute)},
			DisplayName:            to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
			ImplementationEffort:   to.Ptr(armsecurity.ImplementationEffortLow),
			RemediationDescription: to.Ptr("To install an endpoint protection solution: 1.  <a href=\"https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq#how-do-i-turn-on-antimalware-in-my-virtual-machine-scale-set\">Follow the instructions in How do I turn on antimalware in my virtual machine scale set</a>"),
			Severity:               to.Ptr(armsecurity.SeverityMedium),
			Threats: []*armsecurity.Threats{
				to.Ptr(armsecurity.ThreatsDataExfiltration),
				to.Ptr(armsecurity.ThreatsDataSpillage),
				to.Ptr(armsecurity.ThreatsMaliciousInsider)},
			UserImpact: to.Ptr(armsecurity.UserImpactLow),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssessmentsMetadataClient) DeleteInSubscription

DeleteInSubscription - Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the assessments of that type in that subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 assessmentMetadataName - The Assessment Key - Unique key for the assessment type options - AssessmentsMetadataClientDeleteInSubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.DeleteInSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/DeleteAssessmentsMetadata_subscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsMetadataClient("0980887d-03d6-408c-9566-532f3456804e", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.DeleteInSubscription(ctx, "ca039e75-a276-4175-aebc-bcd41e4b14b7", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssessmentsMetadataClient) Get

Get - Get metadata information on an assessment type If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 assessmentMetadataName - The Assessment Key - Unique key for the assessment type options - AssessmentsMetadataClientGetOptions contains the optional parameters for the AssessmentsMetadataClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/GetAssessmentsMetadata_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsMetadataClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "21300918-b2e3-0346-785f-c77ff57d243b", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssessmentsMetadataClient) GetInSubscription

GetInSubscription - Get metadata information on an assessment type in a specific subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 assessmentMetadataName - The Assessment Key - Unique key for the assessment type options - AssessmentsMetadataClientGetInSubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.GetInSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/GetAssessmentsMetadata_subscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsMetadataClient("0980887d-03d6-408c-9566-532f3456804e", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetInSubscription(ctx, "21300918-b2e3-0346-785f-c77ff57d243b", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssessmentsMetadataClient) NewListBySubscriptionPager added in v0.6.0

NewListBySubscriptionPager - Get metadata information on all assessment types in a specific subscription Generated from API version 2021-06-01 options - AssessmentsMetadataClientListBySubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ListAssessmentsMetadata_subscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsMetadataClient("0980887d-03d6-408c-9566-532f3456804e", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AssessmentsMetadataClient) NewListPager added in v0.6.0

NewListPager - Get metadata information on all assessment types Generated from API version 2021-06-01 options - AssessmentsMetadataClientListOptions contains the optional parameters for the AssessmentsMetadataClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ListAssessmentsMetadata_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAssessmentsMetadataClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AssessmentsMetadataClientCreateInSubscriptionOptions added in v0.3.0

type AssessmentsMetadataClientCreateInSubscriptionOptions struct {
}

AssessmentsMetadataClientCreateInSubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.CreateInSubscription method.

type AssessmentsMetadataClientCreateInSubscriptionResponse added in v0.3.0

type AssessmentsMetadataClientCreateInSubscriptionResponse struct {
	AssessmentMetadataResponse
}

AssessmentsMetadataClientCreateInSubscriptionResponse contains the response from method AssessmentsMetadataClient.CreateInSubscription.

type AssessmentsMetadataClientDeleteInSubscriptionOptions added in v0.3.0

type AssessmentsMetadataClientDeleteInSubscriptionOptions struct {
}

AssessmentsMetadataClientDeleteInSubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.DeleteInSubscription method.

type AssessmentsMetadataClientDeleteInSubscriptionResponse added in v0.3.0

type AssessmentsMetadataClientDeleteInSubscriptionResponse struct {
}

AssessmentsMetadataClientDeleteInSubscriptionResponse contains the response from method AssessmentsMetadataClient.DeleteInSubscription.

type AssessmentsMetadataClientGetInSubscriptionOptions added in v0.3.0

type AssessmentsMetadataClientGetInSubscriptionOptions struct {
}

AssessmentsMetadataClientGetInSubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.GetInSubscription method.

type AssessmentsMetadataClientGetInSubscriptionResponse added in v0.3.0

type AssessmentsMetadataClientGetInSubscriptionResponse struct {
	AssessmentMetadataResponse
}

AssessmentsMetadataClientGetInSubscriptionResponse contains the response from method AssessmentsMetadataClient.GetInSubscription.

type AssessmentsMetadataClientGetOptions added in v0.3.0

type AssessmentsMetadataClientGetOptions struct {
}

AssessmentsMetadataClientGetOptions contains the optional parameters for the AssessmentsMetadataClient.Get method.

type AssessmentsMetadataClientGetResponse added in v0.3.0

type AssessmentsMetadataClientGetResponse struct {
	AssessmentMetadataResponse
}

AssessmentsMetadataClientGetResponse contains the response from method AssessmentsMetadataClient.Get.

type AssessmentsMetadataClientListBySubscriptionOptions added in v0.3.0

type AssessmentsMetadataClientListBySubscriptionOptions struct {
}

AssessmentsMetadataClientListBySubscriptionOptions contains the optional parameters for the AssessmentsMetadataClient.ListBySubscription method.

type AssessmentsMetadataClientListBySubscriptionResponse added in v0.3.0

type AssessmentsMetadataClientListBySubscriptionResponse struct {
	AssessmentMetadataResponseList
}

AssessmentsMetadataClientListBySubscriptionResponse contains the response from method AssessmentsMetadataClient.ListBySubscription.

type AssessmentsMetadataClientListOptions added in v0.3.0

type AssessmentsMetadataClientListOptions struct {
}

AssessmentsMetadataClientListOptions contains the optional parameters for the AssessmentsMetadataClient.List method.

type AssessmentsMetadataClientListResponse added in v0.3.0

type AssessmentsMetadataClientListResponse struct {
	AssessmentMetadataResponseList
}

AssessmentsMetadataClientListResponse contains the response from method AssessmentsMetadataClient.List.

type AtaExternalSecuritySolution

type AtaExternalSecuritySolution struct {
	// The kind of the external solution
	Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"`

	// The external security solution properties for ATA solutions
	Properties *AtaSolutionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AtaExternalSecuritySolution - Represents an ATA security solution which sends logs to an OMS workspace

func (AtaExternalSecuritySolution) MarshalJSON

func (a AtaExternalSecuritySolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AtaExternalSecuritySolution.

func (*AtaExternalSecuritySolution) UnmarshalJSON

func (a *AtaExternalSecuritySolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AtaExternalSecuritySolution.

type AtaSolutionProperties

type AtaSolutionProperties struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}
	DeviceType           *string `json:"deviceType,omitempty"`
	DeviceVendor         *string `json:"deviceVendor,omitempty"`
	LastEventReceived    *string `json:"lastEventReceived,omitempty"`

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace `json:"workspace,omitempty"`
}

AtaSolutionProperties - The external security solution properties for ATA solutions

func (AtaSolutionProperties) MarshalJSON

func (a AtaSolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AtaSolutionProperties.

func (*AtaSolutionProperties) UnmarshalJSON

func (a *AtaSolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AtaSolutionProperties.

type AuthenticationDetailsProperties

type AuthenticationDetailsProperties struct {
	// REQUIRED; Connect to your cloud account, for AWS use either account credentials or role-based authentication. For GCP use
	// account organization credentials.
	AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"`

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState `json:"authenticationProvisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty `json:"grantedPermissions,omitempty" azure:"ro"`
}

AuthenticationDetailsProperties - Settings for cloud authentication management

func (*AuthenticationDetailsProperties) GetAuthenticationDetailsProperties

func (a *AuthenticationDetailsProperties) GetAuthenticationDetailsProperties() *AuthenticationDetailsProperties

GetAuthenticationDetailsProperties implements the AuthenticationDetailsPropertiesClassification interface for type AuthenticationDetailsProperties.

func (AuthenticationDetailsProperties) MarshalJSON added in v0.3.0

func (a AuthenticationDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AuthenticationDetailsProperties.

func (*AuthenticationDetailsProperties) UnmarshalJSON

func (a *AuthenticationDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AuthenticationDetailsProperties.

type AuthenticationDetailsPropertiesClassification

type AuthenticationDetailsPropertiesClassification interface {
	// GetAuthenticationDetailsProperties returns the AuthenticationDetailsProperties content of the underlying type.
	GetAuthenticationDetailsProperties() *AuthenticationDetailsProperties
}

AuthenticationDetailsPropertiesClassification provides polymorphic access to related types. Call the interface's GetAuthenticationDetailsProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AuthenticationDetailsProperties, *AwAssumeRoleAuthenticationDetailsProperties, *AwsCredsAuthenticationDetailsProperties, - *GcpCredentialsDetailsProperties

type AuthenticationProvisioningState

type AuthenticationProvisioningState string

AuthenticationProvisioningState - State of the multi-cloud connector

const (
	// AuthenticationProvisioningStateExpired - the connection has expired
	AuthenticationProvisioningStateExpired AuthenticationProvisioningState = "Expired"
	// AuthenticationProvisioningStateIncorrectPolicy - Incorrect policy of the connector
	AuthenticationProvisioningStateIncorrectPolicy AuthenticationProvisioningState = "IncorrectPolicy"
	// AuthenticationProvisioningStateInvalid - Invalid connector
	AuthenticationProvisioningStateInvalid AuthenticationProvisioningState = "Invalid"
	// AuthenticationProvisioningStateValid - Valid connector
	AuthenticationProvisioningStateValid AuthenticationProvisioningState = "Valid"
)

func PossibleAuthenticationProvisioningStateValues

func PossibleAuthenticationProvisioningStateValues() []AuthenticationProvisioningState

PossibleAuthenticationProvisioningStateValues returns the possible values for the AuthenticationProvisioningState const type.

type AuthenticationType

type AuthenticationType string

AuthenticationType - Connect to your cloud account, for AWS use either account credentials or role-based authentication. For GCP use account organization credentials.

const (
	// AuthenticationTypeAwsAssumeRole - AWS account connector assume role authentication
	AuthenticationTypeAwsAssumeRole AuthenticationType = "awsAssumeRole"
	// AuthenticationTypeAwsCreds - AWS cloud account connector user credentials authentication
	AuthenticationTypeAwsCreds AuthenticationType = "awsCreds"
	// AuthenticationTypeGcpCredentials - GCP account connector service to service authentication
	AuthenticationTypeGcpCredentials AuthenticationType = "gcpCredentials"
)

func PossibleAuthenticationTypeValues

func PossibleAuthenticationTypeValues() []AuthenticationType

PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type.

type AutoProvision

type AutoProvision string

AutoProvision - Describes what kind of security agent provisioning action to take

const (
	// AutoProvisionOff - Do not install security agent on the VMs automatically
	AutoProvisionOff AutoProvision = "Off"
	// AutoProvisionOn - Install missing security agent on VMs automatically
	AutoProvisionOn AutoProvision = "On"
)

func PossibleAutoProvisionValues

func PossibleAutoProvisionValues() []AutoProvision

PossibleAutoProvisionValues returns the possible values for the AutoProvision const type.

type AutoProvisioningSetting

type AutoProvisioningSetting struct {
	// Auto provisioning setting data
	Properties *AutoProvisioningSettingProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

AutoProvisioningSetting - Auto provisioning setting

func (AutoProvisioningSetting) MarshalJSON

func (a AutoProvisioningSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoProvisioningSetting.

func (*AutoProvisioningSetting) UnmarshalJSON

func (a *AutoProvisioningSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoProvisioningSetting.

type AutoProvisioningSettingList

type AutoProvisioningSettingList struct {
	// List of all the auto provisioning settings
	Value []*AutoProvisioningSetting `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

AutoProvisioningSettingList - List of all the auto provisioning settings response

func (AutoProvisioningSettingList) MarshalJSON

func (a AutoProvisioningSettingList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoProvisioningSettingList.

func (*AutoProvisioningSettingList) UnmarshalJSON added in v0.8.0

func (a *AutoProvisioningSettingList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoProvisioningSettingList.

type AutoProvisioningSettingProperties

type AutoProvisioningSettingProperties struct {
	// REQUIRED; Describes what kind of security agent provisioning action to take
	AutoProvision *AutoProvision `json:"autoProvision,omitempty"`
}

AutoProvisioningSettingProperties - describes properties of an auto provisioning setting

func (AutoProvisioningSettingProperties) MarshalJSON added in v0.8.0

func (a AutoProvisioningSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoProvisioningSettingProperties.

func (*AutoProvisioningSettingProperties) UnmarshalJSON added in v0.8.0

func (a *AutoProvisioningSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoProvisioningSettingProperties.

type AutoProvisioningSettingsClient

type AutoProvisioningSettingsClient struct {
	// contains filtered or unexported fields
}

AutoProvisioningSettingsClient contains the methods for the AutoProvisioningSettings group. Don't use this type directly, use NewAutoProvisioningSettingsClient() instead.

func NewAutoProvisioningSettingsClient

func NewAutoProvisioningSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AutoProvisioningSettingsClient, error)

NewAutoProvisioningSettingsClient creates a new instance of AutoProvisioningSettingsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AutoProvisioningSettingsClient) Create

Create - Details of a specific setting If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview settingName - Auto provisioning setting key setting - Auto provisioning setting key options - AutoProvisioningSettingsClientCreateOptions contains the optional parameters for the AutoProvisioningSettingsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/AutoProvisioningSettings/CreateAutoProvisioningSettingsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutoProvisioningSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "default", armsecurity.AutoProvisioningSetting{
		Name: to.Ptr("default"),
		Type: to.Ptr("Microsoft.Security/autoProvisioningSettings"),
		ID:   to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/autoProvisioningSettings/default"),
		Properties: &armsecurity.AutoProvisioningSettingProperties{
			AutoProvision: to.Ptr(armsecurity.AutoProvisionOn),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AutoProvisioningSettingsClient) Get

Get - Details of a specific setting If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview settingName - Auto provisioning setting key options - AutoProvisioningSettingsClientGetOptions contains the optional parameters for the AutoProvisioningSettingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/AutoProvisioningSettings/GetAutoProvisioningSettingSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutoProvisioningSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AutoProvisioningSettingsClient) NewListPager added in v0.6.0

NewListPager - Exposes the auto provisioning settings of the subscriptions Generated from API version 2017-08-01-preview options - AutoProvisioningSettingsClientListOptions contains the optional parameters for the AutoProvisioningSettingsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/AutoProvisioningSettings/GetAutoProvisioningSettingsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutoProvisioningSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AutoProvisioningSettingsClientCreateOptions added in v0.3.0

type AutoProvisioningSettingsClientCreateOptions struct {
}

AutoProvisioningSettingsClientCreateOptions contains the optional parameters for the AutoProvisioningSettingsClient.Create method.

type AutoProvisioningSettingsClientCreateResponse added in v0.3.0

type AutoProvisioningSettingsClientCreateResponse struct {
	AutoProvisioningSetting
}

AutoProvisioningSettingsClientCreateResponse contains the response from method AutoProvisioningSettingsClient.Create.

type AutoProvisioningSettingsClientGetOptions added in v0.3.0

type AutoProvisioningSettingsClientGetOptions struct {
}

AutoProvisioningSettingsClientGetOptions contains the optional parameters for the AutoProvisioningSettingsClient.Get method.

type AutoProvisioningSettingsClientGetResponse added in v0.3.0

type AutoProvisioningSettingsClientGetResponse struct {
	AutoProvisioningSetting
}

AutoProvisioningSettingsClientGetResponse contains the response from method AutoProvisioningSettingsClient.Get.

type AutoProvisioningSettingsClientListOptions added in v0.3.0

type AutoProvisioningSettingsClientListOptions struct {
}

AutoProvisioningSettingsClientListOptions contains the optional parameters for the AutoProvisioningSettingsClient.List method.

type AutoProvisioningSettingsClientListResponse added in v0.3.0

type AutoProvisioningSettingsClientListResponse struct {
	AutoProvisioningSettingList
}

AutoProvisioningSettingsClientListResponse contains the response from method AutoProvisioningSettingsClient.List.

type Automation

type Automation struct {
	// Entity tag is used for comparing two or more entities from the same requested resource.
	Etag *string `json:"etag,omitempty"`

	// Kind of the resource
	Kind *string `json:"kind,omitempty"`

	// Location where the resource is stored
	Location *string `json:"location,omitempty"`

	// Security automation data
	Properties *AutomationProperties `json:"properties,omitempty"`

	// A list of key value pairs that describe the resource.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Automation - The security automation resource.

func (Automation) MarshalJSON

func (a Automation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Automation.

func (*Automation) UnmarshalJSON

func (a *Automation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Automation.

type AutomationAction

type AutomationAction struct {
	// REQUIRED; The type of the action that will be triggered by the Automation
	ActionType *ActionType `json:"actionType,omitempty"`
}

AutomationAction - The action that should be triggered.

func (*AutomationAction) GetAutomationAction

func (a *AutomationAction) GetAutomationAction() *AutomationAction

GetAutomationAction implements the AutomationActionClassification interface for type AutomationAction.

func (AutomationAction) MarshalJSON added in v0.8.0

func (a AutomationAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationAction.

func (*AutomationAction) UnmarshalJSON

func (a *AutomationAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationAction.

type AutomationActionClassification

type AutomationActionClassification interface {
	// GetAutomationAction returns the AutomationAction content of the underlying type.
	GetAutomationAction() *AutomationAction
}

AutomationActionClassification provides polymorphic access to related types. Call the interface's GetAutomationAction() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AutomationAction, *AutomationActionEventHub, *AutomationActionLogicApp, *AutomationActionWorkspace

type AutomationActionEventHub

type AutomationActionEventHub struct {
	// REQUIRED; The type of the action that will be triggered by the Automation
	ActionType *ActionType `json:"actionType,omitempty"`

	// The target Event Hub connection string (it will not be included in any response).
	ConnectionString *string `json:"connectionString,omitempty"`

	// The target Event Hub Azure Resource ID.
	EventHubResourceID *string `json:"eventHubResourceId,omitempty"`

	// READ-ONLY; The target Event Hub SAS policy name.
	SasPolicyName *string `json:"sasPolicyName,omitempty" azure:"ro"`
}

AutomationActionEventHub - The target Event Hub to which event data will be exported. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore

func (*AutomationActionEventHub) GetAutomationAction added in v0.3.0

func (a *AutomationActionEventHub) GetAutomationAction() *AutomationAction

GetAutomationAction implements the AutomationActionClassification interface for type AutomationActionEventHub.

func (AutomationActionEventHub) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AutomationActionEventHub.

func (*AutomationActionEventHub) UnmarshalJSON

func (a *AutomationActionEventHub) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationActionEventHub.

type AutomationActionLogicApp

type AutomationActionLogicApp struct {
	// REQUIRED; The type of the action that will be triggered by the Automation
	ActionType *ActionType `json:"actionType,omitempty"`

	// The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given that you have permissions
	// to trigger the Logic App
	LogicAppResourceID *string `json:"logicAppResourceId,omitempty"`

	// The Logic App trigger URI endpoint (it will not be included in any response).
	URI *string `json:"uri,omitempty"`
}

AutomationActionLogicApp - The logic app action that should be triggered. To learn more about Microsoft Defender for Cloud's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore

func (*AutomationActionLogicApp) GetAutomationAction added in v0.3.0

func (a *AutomationActionLogicApp) GetAutomationAction() *AutomationAction

GetAutomationAction implements the AutomationActionClassification interface for type AutomationActionLogicApp.

func (AutomationActionLogicApp) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AutomationActionLogicApp.

func (*AutomationActionLogicApp) UnmarshalJSON

func (a *AutomationActionLogicApp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationActionLogicApp.

type AutomationActionWorkspace

type AutomationActionWorkspace struct {
	// REQUIRED; The type of the action that will be triggered by the Automation
	ActionType *ActionType `json:"actionType,omitempty"`

	// The fully qualified Log Analytics Workspace Azure Resource ID.
	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
}

AutomationActionWorkspace - The Log Analytics Workspace to which event data will be exported. Security alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Microsoft Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore

func (*AutomationActionWorkspace) GetAutomationAction added in v0.3.0

func (a *AutomationActionWorkspace) GetAutomationAction() *AutomationAction

GetAutomationAction implements the AutomationActionClassification interface for type AutomationActionWorkspace.

func (AutomationActionWorkspace) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AutomationActionWorkspace.

func (*AutomationActionWorkspace) UnmarshalJSON

func (a *AutomationActionWorkspace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationActionWorkspace.

type AutomationList

type AutomationList struct {
	// REQUIRED; The list of security automations under the given scope.
	Value []*Automation `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

AutomationList - List of security automations response.

func (AutomationList) MarshalJSON

func (a AutomationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationList.

func (*AutomationList) UnmarshalJSON added in v0.8.0

func (a *AutomationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationList.

type AutomationProperties

type AutomationProperties struct {
	// A collection of the actions which are triggered if all the configured rules evaluations, within at least one rule set,
	// are true.
	Actions []AutomationActionClassification `json:"actions,omitempty"`

	// The security automation description.
	Description *string `json:"description,omitempty"`

	// Indicates whether the security automation is enabled.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// A collection of scopes on which the security automations logic is applied. Supported scopes are the subscription itself
	// or a resource group under that subscription. The automation will only apply on
	// defined scopes.
	Scopes []*AutomationScope `json:"scopes,omitempty"`

	// A collection of the source event types which evaluate the security automation set of rules.
	Sources []*AutomationSource `json:"sources,omitempty"`
}

AutomationProperties - A set of properties that defines the behavior of the automation configuration. To learn more about the supported security events data models schemas - please visit https://aka.ms/ASCAutomationSchemas.

func (AutomationProperties) MarshalJSON

func (a AutomationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationProperties.

func (*AutomationProperties) UnmarshalJSON

func (a *AutomationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationProperties.

type AutomationRuleSet

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

AutomationRuleSet - A rule set which evaluates all its rules upon an event interception. Only when all the included rules in the rule set will be evaluated as 'true', will the event trigger the defined actions.

func (AutomationRuleSet) MarshalJSON

func (a AutomationRuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationRuleSet.

func (*AutomationRuleSet) UnmarshalJSON added in v0.8.0

func (a *AutomationRuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationRuleSet.

type AutomationScope

type AutomationScope struct {
	// The resources scope description.
	Description *string `json:"description,omitempty"`

	// The resources scope path. Can be the subscription on which the automation is defined on or a resource group under that
	// subscription (fully qualified Azure resource IDs).
	ScopePath *string `json:"scopePath,omitempty"`
}

AutomationScope - A single automation scope.

func (AutomationScope) MarshalJSON added in v0.8.0

func (a AutomationScope) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationScope.

func (*AutomationScope) UnmarshalJSON added in v0.8.0

func (a *AutomationScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationScope.

type AutomationSource

type AutomationSource struct {
	// A valid event source type.
	EventSource *EventSource `json:"eventSource,omitempty"`

	// A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical
	// 'or').
	RuleSets []*AutomationRuleSet `json:"ruleSets,omitempty"`
}

AutomationSource - The source event types which evaluate the security automation set of rules. For example - security alerts and security assessments. To learn more about the supported security events data models schemas - please visit https://aka.ms/ASCAutomationSchemas.

func (AutomationSource) MarshalJSON

func (a AutomationSource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationSource.

func (*AutomationSource) UnmarshalJSON added in v0.8.0

func (a *AutomationSource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationSource.

type AutomationTriggeringRule

type AutomationTriggeringRule struct {
	// The expected value.
	ExpectedValue *string `json:"expectedValue,omitempty"`

	// A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType.
	Operator *Operator `json:"operator,omitempty"`

	// The JPath of the entity model property that should be checked.
	PropertyJPath *string `json:"propertyJPath,omitempty"`

	// The data type of the compared operands (string, integer, floating point number or a boolean [true/false]]
	PropertyType *PropertyType `json:"propertyType,omitempty"`
}

AutomationTriggeringRule - A rule which is evaluated upon event interception. The rule is configured by comparing a specific value from the event model to an expected value. This comparison is done by using one of the supported operators set.

func (AutomationTriggeringRule) MarshalJSON added in v0.8.0

func (a AutomationTriggeringRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationTriggeringRule.

func (*AutomationTriggeringRule) UnmarshalJSON added in v0.8.0

func (a *AutomationTriggeringRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationTriggeringRule.

type AutomationValidationStatus

type AutomationValidationStatus struct {
	// Indicates whether the model is valid or not.
	IsValid *bool `json:"isValid,omitempty"`

	// The validation message.
	Message *string `json:"message,omitempty"`
}

AutomationValidationStatus - The security automation model state property bag.

func (AutomationValidationStatus) MarshalJSON added in v0.8.0

func (a AutomationValidationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutomationValidationStatus.

func (*AutomationValidationStatus) UnmarshalJSON added in v0.8.0

func (a *AutomationValidationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationValidationStatus.

type AutomationsClient

type AutomationsClient struct {
	// contains filtered or unexported fields
}

AutomationsClient contains the methods for the Automations group. Don't use this type directly, use NewAutomationsClient() instead.

func NewAutomationsClient

func NewAutomationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AutomationsClient, error)

NewAutomationsClient creates a new instance of AutomationsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AutomationsClient) CreateOrUpdate

func (client *AutomationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationName string, automation Automation, options *AutomationsClientCreateOrUpdateOptions) (AutomationsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a security automation. If a security automation is already created and a subsequent request is issued for the same automation id, then it will be updated. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. automationName - The security automation name. automation - The security automation resource options - AutomationsClientCreateOrUpdateOptions contains the optional parameters for the AutomationsClient.CreateOrUpdate method.

Example (CreateOrUpdateASecurityAutomationForAllAssessmentsIncludingAllSeverities)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/PutAutomationAllAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "exampleResourceGroup", "exampleAutomation", armsecurity.Automation{
		Location: to.Ptr("Central US"),
		Etag:     to.Ptr("etag value (must be supplied for update)"),
		Tags:     map[string]*string{},
		Properties: &armsecurity.AutomationProperties{
			Description: to.Ptr("An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment"),
			Actions: []armsecurity.AutomationActionClassification{
				&armsecurity.AutomationActionLogicApp{
					ActionType:         to.Ptr(armsecurity.ActionTypeLogicApp),
					LogicAppResourceID: to.Ptr("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1"),
					URI:                to.Ptr("https://exampleTriggerUri1.com"),
				}},
			IsEnabled: to.Ptr(true),
			Scopes: []*armsecurity.AutomationScope{
				{
					Description: to.Ptr("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5"),
					ScopePath:   to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"),
				}},
			Sources: []*armsecurity.AutomationSource{
				{
					EventSource: to.Ptr(armsecurity.EventSourceAssessments),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (CreateOrUpdateASecurityAutomationForAllHighSeverityAssessments)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/PutAutomationHighSeverityAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "exampleResourceGroup", "exampleAutomation", armsecurity.Automation{
		Location: to.Ptr("Central US"),
		Etag:     to.Ptr("etag value (must be supplied for update)"),
		Tags:     map[string]*string{},
		Properties: &armsecurity.AutomationProperties{
			Description: to.Ptr("An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity security assessment"),
			Actions: []armsecurity.AutomationActionClassification{
				&armsecurity.AutomationActionLogicApp{
					ActionType:         to.Ptr(armsecurity.ActionTypeLogicApp),
					LogicAppResourceID: to.Ptr("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1"),
					URI:                to.Ptr("https://exampleTriggerUri1.com"),
				}},
			IsEnabled: to.Ptr(true),
			Scopes: []*armsecurity.AutomationScope{
				{
					Description: to.Ptr("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5"),
					ScopePath:   to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"),
				}},
			Sources: []*armsecurity.AutomationSource{
				{
					EventSource: to.Ptr(armsecurity.EventSourceAssessments),
					RuleSets: []*armsecurity.AutomationRuleSet{
						{
							Rules: []*armsecurity.AutomationTriggeringRule{
								{
									ExpectedValue: to.Ptr("High"),
									Operator:      to.Ptr(armsecurity.OperatorEquals),
									PropertyJPath: to.Ptr("properties.metadata.severity"),
									PropertyType:  to.Ptr(armsecurity.PropertyTypeString),
								}},
						}},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (DisableOrEnableASecurityAutomation)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/PutDisableAutomation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "exampleResourceGroup", "exampleAutomation", armsecurity.Automation{
		Location: to.Ptr("Central US"),
		Etag:     to.Ptr("etag value (must be supplied for update)"),
		Tags:     map[string]*string{},
		Properties: &armsecurity.AutomationProperties{
			Description: to.Ptr("An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment"),
			Actions: []armsecurity.AutomationActionClassification{
				&armsecurity.AutomationActionLogicApp{
					ActionType:         to.Ptr(armsecurity.ActionTypeLogicApp),
					LogicAppResourceID: to.Ptr("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1"),
					URI:                to.Ptr("https://exampleTriggerUri1.com"),
				}},
			IsEnabled: to.Ptr(false),
			Scopes: []*armsecurity.AutomationScope{
				{
					Description: to.Ptr("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5"),
					ScopePath:   to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"),
				}},
			Sources: []*armsecurity.AutomationSource{
				{
					EventSource: to.Ptr(armsecurity.EventSourceAssessments),
					RuleSets: []*armsecurity.AutomationRuleSet{
						{
							Rules: []*armsecurity.AutomationTriggeringRule{
								{
									ExpectedValue: to.Ptr("customAssessment"),
									Operator:      to.Ptr(armsecurity.OperatorEquals),
									PropertyJPath: to.Ptr("$.Entity.AssessmentType"),
									PropertyType:  to.Ptr(armsecurity.PropertyTypeString),
								}},
						}},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AutomationsClient) Delete

func (client *AutomationsClient) Delete(ctx context.Context, resourceGroupName string, automationName string, options *AutomationsClientDeleteOptions) (AutomationsClientDeleteResponse, error)

Delete - Deletes a security automation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. automationName - The security automation name. options - AutomationsClientDeleteOptions contains the optional parameters for the AutomationsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/DeleteAutomation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "myRg", "myAutomationName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AutomationsClient) Get

func (client *AutomationsClient) Get(ctx context.Context, resourceGroupName string, automationName string, options *AutomationsClientGetOptions) (AutomationsClientGetResponse, error)

Get - Retrieves information about the model of a security automation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. automationName - The security automation name. options - AutomationsClientGetOptions contains the optional parameters for the AutomationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/GetAutomationResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "exampleResourceGroup", "exampleAutomation", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AutomationsClient) NewListByResourceGroupPager added in v0.6.0

NewListByResourceGroupPager - Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response to get the next page of security automations for the specified resource group. Generated from API version 2019-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - AutomationsClientListByResourceGroupOptions contains the optional parameters for the AutomationsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/GetAutomationsResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("exampleResourceGroup", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AutomationsClient) NewListPager added in v0.6.0

NewListPager - Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to get the next page of security automations for the specified subscription. Generated from API version 2019-01-01-preview options - AutomationsClientListOptions contains the optional parameters for the AutomationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/GetAutomationsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AutomationsClient) Validate

func (client *AutomationsClient) Validate(ctx context.Context, resourceGroupName string, automationName string, automation Automation, options *AutomationsClientValidateOptions) (AutomationsClientValidateResponse, error)

Validate - Validates the security automation model before create or update. Any validation errors are returned to the client. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. automationName - The security automation name. automation - The security automation resource options - AutomationsClientValidateOptions contains the optional parameters for the AutomationsClient.Validate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/ValidateAutomation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewAutomationsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Validate(ctx, "exampleResourceGroup", "exampleAutomation", armsecurity.Automation{
		Location: to.Ptr("Central US"),
		Tags:     map[string]*string{},
		Properties: &armsecurity.AutomationProperties{
			Description: to.Ptr("An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment"),
			Actions: []armsecurity.AutomationActionClassification{
				&armsecurity.AutomationActionLogicApp{
					ActionType:         to.Ptr(armsecurity.ActionTypeLogicApp),
					LogicAppResourceID: to.Ptr("/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1"),
					URI:                to.Ptr("https://exampleTriggerUri1.com"),
				}},
			IsEnabled: to.Ptr(true),
			Scopes: []*armsecurity.AutomationScope{
				{
					Description: to.Ptr("A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5"),
					ScopePath:   to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"),
				}},
			Sources: []*armsecurity.AutomationSource{
				{
					EventSource: to.Ptr(armsecurity.EventSourceAssessments),
					RuleSets: []*armsecurity.AutomationRuleSet{
						{
							Rules: []*armsecurity.AutomationTriggeringRule{
								{
									ExpectedValue: to.Ptr("customAssessment"),
									Operator:      to.Ptr(armsecurity.OperatorEquals),
									PropertyJPath: to.Ptr("$.Entity.AssessmentType"),
									PropertyType:  to.Ptr(armsecurity.PropertyTypeString),
								}},
						}},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AutomationsClientCreateOrUpdateOptions added in v0.3.0

type AutomationsClientCreateOrUpdateOptions struct {
}

AutomationsClientCreateOrUpdateOptions contains the optional parameters for the AutomationsClient.CreateOrUpdate method.

type AutomationsClientCreateOrUpdateResponse added in v0.3.0

type AutomationsClientCreateOrUpdateResponse struct {
	Automation
}

AutomationsClientCreateOrUpdateResponse contains the response from method AutomationsClient.CreateOrUpdate.

type AutomationsClientDeleteOptions added in v0.3.0

type AutomationsClientDeleteOptions struct {
}

AutomationsClientDeleteOptions contains the optional parameters for the AutomationsClient.Delete method.

type AutomationsClientDeleteResponse added in v0.3.0

type AutomationsClientDeleteResponse struct {
}

AutomationsClientDeleteResponse contains the response from method AutomationsClient.Delete.

type AutomationsClientGetOptions added in v0.3.0

type AutomationsClientGetOptions struct {
}

AutomationsClientGetOptions contains the optional parameters for the AutomationsClient.Get method.

type AutomationsClientGetResponse added in v0.3.0

type AutomationsClientGetResponse struct {
	Automation
}

AutomationsClientGetResponse contains the response from method AutomationsClient.Get.

type AutomationsClientListByResourceGroupOptions added in v0.3.0

type AutomationsClientListByResourceGroupOptions struct {
}

AutomationsClientListByResourceGroupOptions contains the optional parameters for the AutomationsClient.ListByResourceGroup method.

type AutomationsClientListByResourceGroupResponse added in v0.3.0

type AutomationsClientListByResourceGroupResponse struct {
	AutomationList
}

AutomationsClientListByResourceGroupResponse contains the response from method AutomationsClient.ListByResourceGroup.

type AutomationsClientListOptions added in v0.3.0

type AutomationsClientListOptions struct {
}

AutomationsClientListOptions contains the optional parameters for the AutomationsClient.List method.

type AutomationsClientListResponse added in v0.3.0

type AutomationsClientListResponse struct {
	AutomationList
}

AutomationsClientListResponse contains the response from method AutomationsClient.List.

type AutomationsClientValidateOptions added in v0.3.0

type AutomationsClientValidateOptions struct {
}

AutomationsClientValidateOptions contains the optional parameters for the AutomationsClient.Validate method.

type AutomationsClientValidateResponse added in v0.3.0

type AutomationsClientValidateResponse struct {
	AutomationValidationStatus
}

AutomationsClientValidateResponse contains the response from method AutomationsClient.Validate.

type AwAssumeRoleAuthenticationDetailsProperties

type AwAssumeRoleAuthenticationDetailsProperties struct {
	// REQUIRED; Connect to your cloud account, for AWS use either account credentials or role-based authentication. For GCP use
	// account organization credentials.
	AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"`

	// REQUIRED; Assumed role ID is an identifier that you can use to create temporary security credentials.
	AwsAssumeRoleArn *string `json:"awsAssumeRoleArn,omitempty"`

	// REQUIRED; A unique identifier that is required when you assume a role in another account.
	AwsExternalID *string `json:"awsExternalId,omitempty"`

	// READ-ONLY; The ID of the cloud account
	AccountID *string `json:"accountId,omitempty" azure:"ro"`

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState `json:"authenticationProvisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty `json:"grantedPermissions,omitempty" azure:"ro"`
}

AwAssumeRoleAuthenticationDetailsProperties - AWS cloud account connector based assume role, the role enables delegating access to your AWS resources. The role is composed of role Amazon Resource Name (ARN) and external ID. For more details, refer to Creating a Role to Delegate Permissions to an IAM User (write only) [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html]

func (*AwAssumeRoleAuthenticationDetailsProperties) GetAuthenticationDetailsProperties added in v0.3.0

func (a *AwAssumeRoleAuthenticationDetailsProperties) GetAuthenticationDetailsProperties() *AuthenticationDetailsProperties

GetAuthenticationDetailsProperties implements the AuthenticationDetailsPropertiesClassification interface for type AwAssumeRoleAuthenticationDetailsProperties.

func (AwAssumeRoleAuthenticationDetailsProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AwAssumeRoleAuthenticationDetailsProperties.

func (*AwAssumeRoleAuthenticationDetailsProperties) UnmarshalJSON

func (a *AwAssumeRoleAuthenticationDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AwAssumeRoleAuthenticationDetailsProperties.

type AwsCredsAuthenticationDetailsProperties

type AwsCredsAuthenticationDetailsProperties struct {
	// REQUIRED; Connect to your cloud account, for AWS use either account credentials or role-based authentication. For GCP use
	// account organization credentials.
	AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"`

	// REQUIRED; Public key element of the AWS credential object (write only)
	AwsAccessKeyID *string `json:"awsAccessKeyId,omitempty"`

	// REQUIRED; Secret key element of the AWS credential object (write only)
	AwsSecretAccessKey *string `json:"awsSecretAccessKey,omitempty"`

	// READ-ONLY; The ID of the cloud account
	AccountID *string `json:"accountId,omitempty" azure:"ro"`

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState `json:"authenticationProvisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty `json:"grantedPermissions,omitempty" azure:"ro"`
}

AwsCredsAuthenticationDetailsProperties - AWS cloud account connector based credentials, the credentials is composed of access key ID and secret key, for more details, refer to Creating an IAM User in Your AWS Account (write only) [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html]

func (*AwsCredsAuthenticationDetailsProperties) GetAuthenticationDetailsProperties added in v0.3.0

func (a *AwsCredsAuthenticationDetailsProperties) GetAuthenticationDetailsProperties() *AuthenticationDetailsProperties

GetAuthenticationDetailsProperties implements the AuthenticationDetailsPropertiesClassification interface for type AwsCredsAuthenticationDetailsProperties.

func (AwsCredsAuthenticationDetailsProperties) MarshalJSON

func (a AwsCredsAuthenticationDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AwsCredsAuthenticationDetailsProperties.

func (*AwsCredsAuthenticationDetailsProperties) UnmarshalJSON

func (a *AwsCredsAuthenticationDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AwsCredsAuthenticationDetailsProperties.

type AwsEnvironmentData added in v0.9.0

type AwsEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType `json:"environmentType,omitempty"`

	// The AWS account's organizational data
	OrganizationalData AwsOrganizationalDataClassification `json:"organizationalData,omitempty"`
}

AwsEnvironmentData - The aws connector environment data

func (*AwsEnvironmentData) GetEnvironmentData added in v0.9.0

func (a *AwsEnvironmentData) GetEnvironmentData() *EnvironmentData

GetEnvironmentData implements the EnvironmentDataClassification interface for type AwsEnvironmentData.

func (AwsEnvironmentData) MarshalJSON added in v0.9.0

func (a AwsEnvironmentData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AwsEnvironmentData.

func (*AwsEnvironmentData) UnmarshalJSON added in v0.9.0

func (a *AwsEnvironmentData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AwsEnvironmentData.

type AwsOrganizationalData added in v0.8.0

type AwsOrganizationalData struct {
	// REQUIRED; The multi cloud account's membership type in the organization
	OrganizationMembershipType *OrganizationMembershipType `json:"organizationMembershipType,omitempty"`
}

AwsOrganizationalData - The awsOrganization data

func (*AwsOrganizationalData) GetAwsOrganizationalData added in v0.8.0

func (a *AwsOrganizationalData) GetAwsOrganizationalData() *AwsOrganizationalData

GetAwsOrganizationalData implements the AwsOrganizationalDataClassification interface for type AwsOrganizationalData.

func (AwsOrganizationalData) MarshalJSON added in v0.8.0

func (a AwsOrganizationalData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AwsOrganizationalData.

func (*AwsOrganizationalData) UnmarshalJSON added in v0.8.0

func (a *AwsOrganizationalData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AwsOrganizationalData.

type AwsOrganizationalDataClassification added in v0.8.0

type AwsOrganizationalDataClassification interface {
	// GetAwsOrganizationalData returns the AwsOrganizationalData content of the underlying type.
	GetAwsOrganizationalData() *AwsOrganizationalData
}

AwsOrganizationalDataClassification provides polymorphic access to related types. Call the interface's GetAwsOrganizationalData() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AwsOrganizationalData, *AwsOrganizationalDataMaster, *AwsOrganizationalDataMember

type AwsOrganizationalDataMaster added in v0.8.0

type AwsOrganizationalDataMaster struct {
	// REQUIRED; The multi cloud account's membership type in the organization
	OrganizationMembershipType *OrganizationMembershipType `json:"organizationMembershipType,omitempty"`

	// If the multi cloud account is of membership type organization, list of accounts excluded from offering
	ExcludedAccountIDs []*string `json:"excludedAccountIds,omitempty"`

	// If the multi cloud account is of membership type organization, this will be the name of the onboarding stackset
	StacksetName *string `json:"stacksetName,omitempty"`
}

AwsOrganizationalDataMaster - The awsOrganization data for the master account

func (*AwsOrganizationalDataMaster) GetAwsOrganizationalData added in v0.8.0

func (a *AwsOrganizationalDataMaster) GetAwsOrganizationalData() *AwsOrganizationalData

GetAwsOrganizationalData implements the AwsOrganizationalDataClassification interface for type AwsOrganizationalDataMaster.

func (AwsOrganizationalDataMaster) MarshalJSON added in v0.8.0

func (a AwsOrganizationalDataMaster) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AwsOrganizationalDataMaster.

func (*AwsOrganizationalDataMaster) UnmarshalJSON added in v0.8.0

func (a *AwsOrganizationalDataMaster) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AwsOrganizationalDataMaster.

type AwsOrganizationalDataMember added in v0.8.0

type AwsOrganizationalDataMember struct {
	// REQUIRED; The multi cloud account's membership type in the organization
	OrganizationMembershipType *OrganizationMembershipType `json:"organizationMembershipType,omitempty"`

	// If the multi cloud account is not of membership type organization, this will be the ID of the account's parent
	ParentHierarchyID *string `json:"parentHierarchyId,omitempty"`
}

AwsOrganizationalDataMember - The awsOrganization data for the member account

func (*AwsOrganizationalDataMember) GetAwsOrganizationalData added in v0.8.0

func (a *AwsOrganizationalDataMember) GetAwsOrganizationalData() *AwsOrganizationalData

GetAwsOrganizationalData implements the AwsOrganizationalDataClassification interface for type AwsOrganizationalDataMember.

func (AwsOrganizationalDataMember) MarshalJSON added in v0.8.0

func (a AwsOrganizationalDataMember) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AwsOrganizationalDataMember.

func (*AwsOrganizationalDataMember) UnmarshalJSON added in v0.8.0

func (a *AwsOrganizationalDataMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AwsOrganizationalDataMember.

type AzureDevOpsScopeEnvironmentData added in v0.8.0

type AzureDevOpsScopeEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType `json:"environmentType,omitempty"`
}

AzureDevOpsScopeEnvironmentData - The AzureDevOps scope connector's environment data

func (*AzureDevOpsScopeEnvironmentData) GetEnvironmentData added in v0.8.0

func (a *AzureDevOpsScopeEnvironmentData) GetEnvironmentData() *EnvironmentData

GetEnvironmentData implements the EnvironmentDataClassification interface for type AzureDevOpsScopeEnvironmentData.

func (AzureDevOpsScopeEnvironmentData) MarshalJSON added in v0.8.0

func (a AzureDevOpsScopeEnvironmentData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsScopeEnvironmentData.

func (*AzureDevOpsScopeEnvironmentData) UnmarshalJSON added in v0.8.0

func (a *AzureDevOpsScopeEnvironmentData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsScopeEnvironmentData.

type AzureResourceDetails added in v0.3.0

type AzureResourceDetails struct {
	// REQUIRED; The platform where the assessed resource resides
	Source *Source `json:"source,omitempty"`

	// READ-ONLY; Azure resource Id of the assessed resource
	ID *string `json:"id,omitempty" azure:"ro"`
}

AzureResourceDetails - Details of the Azure resource that was assessed

func (*AzureResourceDetails) GetResourceDetails added in v0.3.0

func (a *AzureResourceDetails) GetResourceDetails() *ResourceDetails

GetResourceDetails implements the ResourceDetailsClassification interface for type AzureResourceDetails.

func (AzureResourceDetails) MarshalJSON added in v0.3.0

func (a AzureResourceDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureResourceDetails.

func (*AzureResourceDetails) UnmarshalJSON added in v0.3.0

func (a *AzureResourceDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceDetails.

type AzureResourceIdentifier

type AzureResourceIdentifier struct {
	// REQUIRED; There can be multiple identifiers of different type per alert, this field specify the identifier type.
	Type *ResourceIdentifierType `json:"type,omitempty"`

	// READ-ONLY; ARM resource identifier for the cloud resource being alerted on
	AzureResourceID *string `json:"azureResourceId,omitempty" azure:"ro"`
}

AzureResourceIdentifier - Azure resource identifier.

func (*AzureResourceIdentifier) GetResourceIdentifier added in v0.3.0

func (a *AzureResourceIdentifier) GetResourceIdentifier() *ResourceIdentifier

GetResourceIdentifier implements the ResourceIdentifierClassification interface for type AzureResourceIdentifier.

func (AzureResourceIdentifier) MarshalJSON

func (a AzureResourceIdentifier) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureResourceIdentifier.

func (*AzureResourceIdentifier) UnmarshalJSON

func (a *AzureResourceIdentifier) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceIdentifier.

type AzureResourceLink struct {
	// READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty" azure:"ro"`
}

AzureResourceLink - Describes an Azure resource with kind

func (AzureResourceLink) MarshalJSON added in v0.8.0

func (a AzureResourceLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureResourceLink.

func (*AzureResourceLink) UnmarshalJSON added in v0.8.0

func (a *AzureResourceLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceLink.

type AzureTrackedResourceLocation

type AzureTrackedResourceLocation struct {
	// Location where the resource is stored
	Location *string `json:"location,omitempty"`
}

AzureTrackedResourceLocation - Describes an Azure resource with location

func (AzureTrackedResourceLocation) MarshalJSON

func (a AzureTrackedResourceLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureTrackedResourceLocation.

func (*AzureTrackedResourceLocation) UnmarshalJSON

func (a *AzureTrackedResourceLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureTrackedResourceLocation.

type Baseline

type Baseline struct {
	// Expected results.
	ExpectedResults [][]*string `json:"expectedResults,omitempty"`

	// Baseline update time (UTC).
	UpdatedTime *time.Time `json:"updatedTime,omitempty"`
}

Baseline details.

func (Baseline) MarshalJSON

func (b Baseline) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Baseline.

func (*Baseline) UnmarshalJSON

func (b *Baseline) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Baseline.

type BaselineAdjustedResult

type BaselineAdjustedResult struct {
	// Baseline details.
	Baseline *Baseline `json:"baseline,omitempty"`

	// Results the are not in baseline.
	ResultsNotInBaseline [][]*string `json:"resultsNotInBaseline,omitempty"`

	// Results the are in baseline.
	ResultsOnlyInBaseline [][]*string `json:"resultsOnlyInBaseline,omitempty"`

	// The rule result status.
	Status *RuleStatus `json:"status,omitempty"`
}

BaselineAdjustedResult - The rule result adjusted with baseline.

func (BaselineAdjustedResult) MarshalJSON

func (b BaselineAdjustedResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BaselineAdjustedResult.

func (*BaselineAdjustedResult) UnmarshalJSON added in v0.8.0

func (b *BaselineAdjustedResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BaselineAdjustedResult.

type BenchmarkReference

type BenchmarkReference struct {
	// The benchmark name.
	Benchmark *string `json:"benchmark,omitempty"`

	// The benchmark reference.
	Reference *string `json:"reference,omitempty"`
}

BenchmarkReference - The benchmark references.

func (BenchmarkReference) MarshalJSON added in v0.8.0

func (b BenchmarkReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BenchmarkReference.

func (*BenchmarkReference) UnmarshalJSON added in v0.8.0

func (b *BenchmarkReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BenchmarkReference.

type BundleType

type BundleType string

BundleType - Alert Simulator supported bundles.

const (
	BundleTypeAppServices       BundleType = "AppServices"
	BundleTypeCosmosDbs         BundleType = "CosmosDbs"
	BundleTypeDNS               BundleType = "DNS"
	BundleTypeKeyVaults         BundleType = "KeyVaults"
	BundleTypeKubernetesService BundleType = "KubernetesService"
	BundleTypeResourceManager   BundleType = "ResourceManager"
	BundleTypeSQLServers        BundleType = "SqlServers"
	BundleTypeStorageAccounts   BundleType = "StorageAccounts"
	BundleTypeVirtualMachines   BundleType = "VirtualMachines"
)

func PossibleBundleTypeValues

func PossibleBundleTypeValues() []BundleType

PossibleBundleTypeValues returns the possible values for the BundleType const type.

type CVE

type CVE struct {
	// READ-ONLY; Link url
	Link *string `json:"link,omitempty" azure:"ro"`

	// READ-ONLY; CVE title
	Title *string `json:"title,omitempty" azure:"ro"`
}

CVE details

func (CVE) MarshalJSON added in v0.8.0

func (c CVE) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CVE.

func (*CVE) UnmarshalJSON added in v0.8.0

func (c *CVE) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CVE.

type CVSS

type CVSS struct {
	// READ-ONLY; CVSS base
	Base *float32 `json:"base,omitempty" azure:"ro"`
}

CVSS details

func (CVSS) MarshalJSON added in v0.8.0

func (c CVSS) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CVSS.

func (*CVSS) UnmarshalJSON added in v0.8.0

func (c *CVSS) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CVSS.

type Categories

type Categories string

Categories - The categories of resource that is at risk when the assessment is unhealthy

const (
	CategoriesCompute           Categories = "Compute"
	CategoriesData              Categories = "Data"
	CategoriesIdentityAndAccess Categories = "IdentityAndAccess"
	CategoriesIoT               Categories = "IoT"
	CategoriesNetworking        Categories = "Networking"
)

func PossibleCategoriesValues

func PossibleCategoriesValues() []Categories

PossibleCategoriesValues returns the possible values for the Categories const type.

type CefExternalSecuritySolution

type CefExternalSecuritySolution struct {
	// The kind of the external solution
	Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"`

	// The external security solution properties for CEF solutions
	Properties *CefSolutionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CefExternalSecuritySolution - Represents a security solution which sends CEF logs to an OMS workspace

func (CefExternalSecuritySolution) MarshalJSON

func (c CefExternalSecuritySolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CefExternalSecuritySolution.

func (*CefExternalSecuritySolution) UnmarshalJSON

func (c *CefExternalSecuritySolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CefExternalSecuritySolution.

type CefSolutionProperties

type CefSolutionProperties struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}
	Agent                *string `json:"agent,omitempty"`
	DeviceType           *string `json:"deviceType,omitempty"`
	DeviceVendor         *string `json:"deviceVendor,omitempty"`
	Hostname             *string `json:"hostname,omitempty"`
	LastEventReceived    *string `json:"lastEventReceived,omitempty"`

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace `json:"workspace,omitempty"`
}

CefSolutionProperties - The external security solution properties for CEF solutions

func (CefSolutionProperties) MarshalJSON

func (c CefSolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CefSolutionProperties.

func (*CefSolutionProperties) UnmarshalJSON

func (c *CefSolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CefSolutionProperties.

type CloudName added in v0.2.0

type CloudName string

CloudName - The multi cloud resource's cloud name.

const (
	CloudNameAWS         CloudName = "AWS"
	CloudNameAzure       CloudName = "Azure"
	CloudNameAzureDevOps CloudName = "AzureDevOps"
	CloudNameGCP         CloudName = "GCP"
	CloudNameGithub      CloudName = "Github"
)

func PossibleCloudNameValues added in v0.2.0

func PossibleCloudNameValues() []CloudName

PossibleCloudNameValues returns the possible values for the CloudName const type.

type CloudOffering added in v0.2.0

type CloudOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

CloudOffering - The security offering details

func (*CloudOffering) GetCloudOffering added in v0.2.0

func (c *CloudOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type CloudOffering.

func (CloudOffering) MarshalJSON added in v0.8.0

func (c CloudOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudOffering.

func (*CloudOffering) UnmarshalJSON added in v0.2.0

func (c *CloudOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudOffering.

type CloudOfferingClassification added in v0.2.0

type CloudOfferingClassification interface {
	// GetCloudOffering returns the CloudOffering content of the underlying type.
	GetCloudOffering() *CloudOffering
}

CloudOfferingClassification provides polymorphic access to related types. Call the interface's GetCloudOffering() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CloudOffering, *CspmMonitorAwsOffering, *CspmMonitorAzureDevOpsOffering, *CspmMonitorGcpOffering, *CspmMonitorGithubOffering, - *DefenderCspmAwsOffering, *DefenderCspmGcpOffering, *DefenderFoDatabasesAwsOffering, *DefenderForContainersAwsOffering, - *DefenderForContainersGcpOffering, *DefenderForDatabasesGcpOffering, *DefenderForDevOpsAzureDevOpsOffering, *DefenderForDevOpsGithubOffering, - *DefenderForServersAwsOffering, *DefenderForServersGcpOffering, *InformationProtectionAwsOffering

type Compliance

type Compliance struct {
	// Compliance data
	Properties *ComplianceProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Compliance of a scope

func (Compliance) MarshalJSON

func (c Compliance) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Compliance.

func (*Compliance) UnmarshalJSON

func (c *Compliance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Compliance.

type ComplianceList

type ComplianceList struct {
	// List of Compliance objects
	Value []*Compliance `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ComplianceList - List of Compliance objects response

func (ComplianceList) MarshalJSON

func (c ComplianceList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComplianceList.

func (*ComplianceList) UnmarshalJSON added in v0.8.0

func (c *ComplianceList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceList.

type ComplianceProperties

type ComplianceProperties struct {
	// READ-ONLY; An array of segment, which is the actually the compliance assessment.
	AssessmentResult []*ComplianceSegment `json:"assessmentResult,omitempty" azure:"ro"`

	// READ-ONLY; The timestamp when the Compliance calculation was conducted.
	AssessmentTimestampUTCDate *time.Time `json:"assessmentTimestampUtcDate,omitempty" azure:"ro"`

	// READ-ONLY; The resource count of the given subscription for which the Compliance calculation was conducted (needed for
	// Management Group Compliance calculation).
	ResourceCount *int32 `json:"resourceCount,omitempty" azure:"ro"`
}

ComplianceProperties - The Compliance score (percentage) of a Subscription is a sum of all Resources' Compliances under the given Subscription. A Resource Compliance is defined as the compliant ('healthy') Policy Definitions out of all Policy Definitions applicable to a given resource.

func (ComplianceProperties) MarshalJSON

func (c ComplianceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComplianceProperties.

func (*ComplianceProperties) UnmarshalJSON

func (c *ComplianceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceProperties.

type ComplianceResult

type ComplianceResult struct {
	// Compliance result data
	Properties *ComplianceResultProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ComplianceResult - a compliance result

func (ComplianceResult) MarshalJSON

func (c ComplianceResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComplianceResult.

func (*ComplianceResult) UnmarshalJSON

func (c *ComplianceResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceResult.

type ComplianceResultList

type ComplianceResultList struct {
	// REQUIRED; List of compliance results
	Value []*ComplianceResult `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ComplianceResultList - List of compliance results response

func (ComplianceResultList) MarshalJSON

func (c ComplianceResultList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComplianceResultList.

func (*ComplianceResultList) UnmarshalJSON added in v0.8.0

func (c *ComplianceResultList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceResultList.

type ComplianceResultProperties

type ComplianceResultProperties struct {
	// READ-ONLY; The status of the resource regarding a single assessment
	ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty" azure:"ro"`
}

ComplianceResultProperties - Compliance result data

func (ComplianceResultProperties) MarshalJSON added in v0.8.0

func (c ComplianceResultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComplianceResultProperties.

func (*ComplianceResultProperties) UnmarshalJSON added in v0.8.0

func (c *ComplianceResultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceResultProperties.

type ComplianceResultsClient

type ComplianceResultsClient struct {
	// contains filtered or unexported fields
}

ComplianceResultsClient contains the methods for the ComplianceResults group. Don't use this type directly, use NewComplianceResultsClient() instead.

func NewComplianceResultsClient

func NewComplianceResultsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ComplianceResultsClient, error)

NewComplianceResultsClient creates a new instance of ComplianceResultsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ComplianceResultsClient) Get

Get - Security Compliance Result If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01 resourceID - The identifier of the resource. complianceResultName - name of the desired assessment compliance result options - ComplianceResultsClientGetOptions contains the optional parameters for the ComplianceResultsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2017-08-01/examples/ComplianceResults/GetComplianceResults_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewComplianceResultsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "DesignateMoreThanOneOwner", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ComplianceResultsClient) NewListPager added in v0.6.0

NewListPager - Security compliance results in the subscription Generated from API version 2017-08-01 scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). options - ComplianceResultsClientListOptions contains the optional parameters for the ComplianceResultsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2017-08-01/examples/ComplianceResults/ListComplianceResults_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewComplianceResultsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ComplianceResultsClientGetOptions added in v0.3.0

type ComplianceResultsClientGetOptions struct {
}

ComplianceResultsClientGetOptions contains the optional parameters for the ComplianceResultsClient.Get method.

type ComplianceResultsClientGetResponse added in v0.3.0

type ComplianceResultsClientGetResponse struct {
	ComplianceResult
}

ComplianceResultsClientGetResponse contains the response from method ComplianceResultsClient.Get.

type ComplianceResultsClientListOptions added in v0.3.0

type ComplianceResultsClientListOptions struct {
}

ComplianceResultsClientListOptions contains the optional parameters for the ComplianceResultsClient.List method.

type ComplianceResultsClientListResponse added in v0.3.0

type ComplianceResultsClientListResponse struct {
	ComplianceResultList
}

ComplianceResultsClientListResponse contains the response from method ComplianceResultsClient.List.

type ComplianceSegment

type ComplianceSegment struct {
	// READ-ONLY; The size (%) of the segment.
	Percentage *float64 `json:"percentage,omitempty" azure:"ro"`

	// READ-ONLY; The segment type, e.g. compliant, non-compliance, insufficient coverage, N/A, etc.
	SegmentType *string `json:"segmentType,omitempty" azure:"ro"`
}

ComplianceSegment - A segment of a compliance assessment.

func (ComplianceSegment) MarshalJSON added in v0.8.0

func (c ComplianceSegment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComplianceSegment.

func (*ComplianceSegment) UnmarshalJSON added in v0.8.0

func (c *ComplianceSegment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceSegment.

type CompliancesClient

type CompliancesClient struct {
	// contains filtered or unexported fields
}

CompliancesClient contains the methods for the Compliances group. Don't use this type directly, use NewCompliancesClient() instead.

func NewCompliancesClient

func NewCompliancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CompliancesClient, error)

NewCompliancesClient creates a new instance of CompliancesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CompliancesClient) Get

func (client *CompliancesClient) Get(ctx context.Context, scope string, complianceName string, options *CompliancesClientGetOptions) (CompliancesClientGetResponse, error)

Get - Details of a specific Compliance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). complianceName - name of the Compliance options - CompliancesClientGetOptions contains the optional parameters for the CompliancesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Compliances/GetCompliance_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCompliancesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "2018-01-01Z", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CompliancesClient) NewListPager added in v0.6.0

NewListPager - The Compliance scores of the specific management group. Generated from API version 2017-08-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). options - CompliancesClientListOptions contains the optional parameters for the CompliancesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Compliances/GetCompliances_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCompliancesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CompliancesClientGetOptions added in v0.3.0

type CompliancesClientGetOptions struct {
}

CompliancesClientGetOptions contains the optional parameters for the CompliancesClient.Get method.

type CompliancesClientGetResponse added in v0.3.0

type CompliancesClientGetResponse struct {
	Compliance
}

CompliancesClientGetResponse contains the response from method CompliancesClient.Get.

type CompliancesClientListOptions added in v0.3.0

type CompliancesClientListOptions struct {
}

CompliancesClientListOptions contains the optional parameters for the CompliancesClient.List method.

type CompliancesClientListResponse added in v0.3.0

type CompliancesClientListResponse struct {
	ComplianceList
}

CompliancesClientListResponse contains the response from method CompliancesClient.List.

type Condition added in v0.8.0

type Condition struct {
	// The governance rule Condition's Operator, for example Equals for severity or In for list of assessments, see examples
	Operator *GovernanceRuleConditionOperator `json:"operator,omitempty"`

	// The governance rule Condition's Property, e.g. Severity or AssessmentKey, see examples
	Property *string `json:"property,omitempty"`

	// The governance rule Condition's Value like severity Low, High or assessments keys, see examples
	Value *string `json:"value,omitempty"`
}

Condition - Governance rule's condition

func (Condition) MarshalJSON added in v0.8.0

func (c Condition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Condition.

func (*Condition) UnmarshalJSON added in v0.8.0

func (c *Condition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Condition.

type ConfigurationStatus

type ConfigurationStatus string

ConfigurationStatus - The configuration status of the machines group or machine or rule

const (
	ConfigurationStatusConfigured    ConfigurationStatus = "Configured"
	ConfigurationStatusFailed        ConfigurationStatus = "Failed"
	ConfigurationStatusInProgress    ConfigurationStatus = "InProgress"
	ConfigurationStatusNoStatus      ConfigurationStatus = "NoStatus"
	ConfigurationStatusNotConfigured ConfigurationStatus = "NotConfigured"
)

func PossibleConfigurationStatusValues

func PossibleConfigurationStatusValues() []ConfigurationStatus

PossibleConfigurationStatusValues returns the possible values for the ConfigurationStatus const type.

type ConnectableResource

type ConnectableResource struct {
	// READ-ONLY; The Azure resource id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The list of Azure resources that the resource has inbound allowed connection from
	InboundConnectedResources []*ConnectedResource `json:"inboundConnectedResources,omitempty" azure:"ro"`

	// READ-ONLY; The list of Azure resources that the resource has outbound allowed connection to
	OutboundConnectedResources []*ConnectedResource `json:"outboundConnectedResources,omitempty" azure:"ro"`
}

ConnectableResource - Describes the allowed inbound and outbound traffic of an Azure resource

func (ConnectableResource) MarshalJSON

func (c ConnectableResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectableResource.

func (*ConnectableResource) UnmarshalJSON added in v0.8.0

func (c *ConnectableResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectableResource.

type ConnectedResource

type ConnectedResource struct {
	// READ-ONLY; The Azure resource id of the connected resource
	ConnectedResourceID *string `json:"connectedResourceId,omitempty" azure:"ro"`

	// READ-ONLY; The allowed tcp ports
	TCPPorts *string `json:"tcpPorts,omitempty" azure:"ro"`

	// READ-ONLY; The allowed udp ports
	UDPPorts *string `json:"udpPorts,omitempty" azure:"ro"`
}

ConnectedResource - Describes properties of a connected resource

func (ConnectedResource) MarshalJSON added in v0.8.0

func (c ConnectedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectedResource.

func (*ConnectedResource) UnmarshalJSON added in v0.8.0

func (c *ConnectedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedResource.

type ConnectedWorkspace

type ConnectedWorkspace struct {
	// Azure resource ID of the connected OMS workspace
	ID *string `json:"id,omitempty"`
}

ConnectedWorkspace - Represents an OMS workspace to which the solution is connected

func (ConnectedWorkspace) MarshalJSON added in v0.8.0

func (c ConnectedWorkspace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectedWorkspace.

func (*ConnectedWorkspace) UnmarshalJSON added in v0.8.0

func (c *ConnectedWorkspace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedWorkspace.

type ConnectionFromIPNotAllowed

type ConnectionFromIPNotAllowed struct {
	// REQUIRED; The values to allow. The format of the values depends on the rule type.
	AllowlistValues []*string `json:"allowlistValues,omitempty"`

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

ConnectionFromIPNotAllowed - Inbound connection from an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation.

func (*ConnectionFromIPNotAllowed) GetAllowlistCustomAlertRule added in v0.3.0

func (c *ConnectionFromIPNotAllowed) GetAllowlistCustomAlertRule() *AllowlistCustomAlertRule

GetAllowlistCustomAlertRule implements the AllowlistCustomAlertRuleClassification interface for type ConnectionFromIPNotAllowed.

func (*ConnectionFromIPNotAllowed) GetCustomAlertRule added in v0.3.0

func (c *ConnectionFromIPNotAllowed) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type ConnectionFromIPNotAllowed.

func (*ConnectionFromIPNotAllowed) GetListCustomAlertRule added in v0.3.0

func (c *ConnectionFromIPNotAllowed) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type ConnectionFromIPNotAllowed.

func (ConnectionFromIPNotAllowed) MarshalJSON

func (c ConnectionFromIPNotAllowed) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionFromIPNotAllowed.

func (*ConnectionFromIPNotAllowed) UnmarshalJSON added in v0.3.0

func (c *ConnectionFromIPNotAllowed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionFromIPNotAllowed.

type ConnectionStrings

type ConnectionStrings struct {
	// REQUIRED; Connection strings
	Value []*IngestionConnectionString `json:"value,omitempty"`
}

ConnectionStrings - Connection string for ingesting security data and logs

func (ConnectionStrings) MarshalJSON

func (c ConnectionStrings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionStrings.

func (*ConnectionStrings) UnmarshalJSON added in v0.8.0

func (c *ConnectionStrings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStrings.

type ConnectionToIPNotAllowed

type ConnectionToIPNotAllowed struct {
	// REQUIRED; The values to allow. The format of the values depends on the rule type.
	AllowlistValues []*string `json:"allowlistValues,omitempty"`

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

ConnectionToIPNotAllowed - Outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation.

func (*ConnectionToIPNotAllowed) GetAllowlistCustomAlertRule added in v0.3.0

func (c *ConnectionToIPNotAllowed) GetAllowlistCustomAlertRule() *AllowlistCustomAlertRule

GetAllowlistCustomAlertRule implements the AllowlistCustomAlertRuleClassification interface for type ConnectionToIPNotAllowed.

func (*ConnectionToIPNotAllowed) GetCustomAlertRule added in v0.3.0

func (c *ConnectionToIPNotAllowed) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type ConnectionToIPNotAllowed.

func (*ConnectionToIPNotAllowed) GetListCustomAlertRule added in v0.3.0

func (c *ConnectionToIPNotAllowed) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type ConnectionToIPNotAllowed.

func (ConnectionToIPNotAllowed) MarshalJSON

func (c ConnectionToIPNotAllowed) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionToIPNotAllowed.

func (*ConnectionToIPNotAllowed) UnmarshalJSON added in v0.3.0

func (c *ConnectionToIPNotAllowed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionToIPNotAllowed.

type ConnectionType

type ConnectionType string
const (
	ConnectionTypeExternal ConnectionType = "External"
	ConnectionTypeInternal ConnectionType = "Internal"
)

func PossibleConnectionTypeValues

func PossibleConnectionTypeValues() []ConnectionType

PossibleConnectionTypeValues returns the possible values for the ConnectionType const type.

type Connector added in v0.3.0

type Connector struct {
	// Entity tag is used for comparing two or more entities from the same requested resource.
	Etag *string `json:"etag,omitempty"`

	// Kind of the resource
	Kind *string `json:"kind,omitempty"`

	// Location where the resource is stored
	Location *string `json:"location,omitempty"`

	// Security connector data
	Properties *ConnectorProperties `json:"properties,omitempty"`

	// A list of key value pairs that describe the resource.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Connector - The security connector resource.

func (Connector) MarshalJSON added in v0.3.0

func (c Connector) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Connector.

func (*Connector) UnmarshalJSON added in v0.8.0

func (c *Connector) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Connector.

type ConnectorApplicationClient added in v0.8.0

type ConnectorApplicationClient struct {
	// contains filtered or unexported fields
}

ConnectorApplicationClient contains the methods for the SecurityConnectorApplication group. Don't use this type directly, use NewConnectorApplicationClient() instead.

func NewConnectorApplicationClient added in v0.8.0

func NewConnectorApplicationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectorApplicationClient, error)

NewConnectorApplicationClient creates a new instance of ConnectorApplicationClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConnectorApplicationClient) CreateOrUpdate added in v0.8.0

func (client *ConnectorApplicationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, applicationID string, application Application, options *ConnectorApplicationClientCreateOrUpdateOptions) (ConnectorApplicationClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or update a security Application on the given security connector. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. applicationID - The security Application key - unique key for the standard application application - Application over a subscription scope options - ConnectorApplicationClientCreateOrUpdateOptions contains the optional parameters for the ConnectorApplicationClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/PutSecurityConnectorApplication_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorApplicationClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.Application{
		Properties: &armsecurity.ApplicationProperties{
			Description: to.Ptr("An application on critical GCP recommendations"),
			ConditionSets: []interface{}{
				map[string]interface{}{
					"conditions": []interface{}{
						map[string]interface{}{
							"operator": "contains",
							"property": "$.Id",
							"value":    "-prod-",
						},
					},
				}},
			DisplayName:        to.Ptr("GCP Admin's application"),
			SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConnectorApplicationClient) Delete added in v0.8.0

func (client *ConnectorApplicationClient) Delete(ctx context.Context, resourceGroupName string, securityConnectorName string, applicationID string, options *ConnectorApplicationClientDeleteOptions) (ConnectorApplicationClientDeleteResponse, error)

Delete - Delete an Application over a given scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. applicationID - The security Application key - unique key for the standard application options - ConnectorApplicationClientDeleteOptions contains the optional parameters for the ConnectorApplicationClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/DeleteSecurityConnectorApplication_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorApplicationClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConnectorApplicationClient) Get added in v0.8.0

func (client *ConnectorApplicationClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, applicationID string, options *ConnectorApplicationClientGetOptions) (ConnectorApplicationClientGetResponse, error)

Get - Get a specific application for the requested scope by applicationId If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. applicationID - The security Application key - unique key for the standard application options - ConnectorApplicationClientGetOptions contains the optional parameters for the ConnectorApplicationClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/GetSecurityConnectorApplication_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorApplicationClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConnectorApplicationClientCreateOrUpdateOptions added in v0.8.0

type ConnectorApplicationClientCreateOrUpdateOptions struct {
}

ConnectorApplicationClientCreateOrUpdateOptions contains the optional parameters for the ConnectorApplicationClient.CreateOrUpdate method.

type ConnectorApplicationClientCreateOrUpdateResponse added in v0.8.0

type ConnectorApplicationClientCreateOrUpdateResponse struct {
	Application
}

ConnectorApplicationClientCreateOrUpdateResponse contains the response from method ConnectorApplicationClient.CreateOrUpdate.

type ConnectorApplicationClientDeleteOptions added in v0.8.0

type ConnectorApplicationClientDeleteOptions struct {
}

ConnectorApplicationClientDeleteOptions contains the optional parameters for the ConnectorApplicationClient.Delete method.

type ConnectorApplicationClientDeleteResponse added in v0.8.0

type ConnectorApplicationClientDeleteResponse struct {
}

ConnectorApplicationClientDeleteResponse contains the response from method ConnectorApplicationClient.Delete.

type ConnectorApplicationClientGetOptions added in v0.8.0

type ConnectorApplicationClientGetOptions struct {
}

ConnectorApplicationClientGetOptions contains the optional parameters for the ConnectorApplicationClient.Get method.

type ConnectorApplicationClientGetResponse added in v0.8.0

type ConnectorApplicationClientGetResponse struct {
	Application
}

ConnectorApplicationClientGetResponse contains the response from method ConnectorApplicationClient.Get.

type ConnectorApplicationsClient added in v0.8.0

type ConnectorApplicationsClient struct {
	// contains filtered or unexported fields
}

ConnectorApplicationsClient contains the methods for the SecurityConnectorApplications group. Don't use this type directly, use NewConnectorApplicationsClient() instead.

func NewConnectorApplicationsClient added in v0.8.0

func NewConnectorApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectorApplicationsClient, error)

NewConnectorApplicationsClient creates a new instance of ConnectorApplicationsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConnectorApplicationsClient) NewListPager added in v0.8.0

func (client *ConnectorApplicationsClient) NewListPager(resourceGroupName string, securityConnectorName string, options *ConnectorApplicationsClientListOptions) *runtime.Pager[ConnectorApplicationsClientListResponse]

NewListPager - Get a list of all relevant applications over a security connector level scope Generated from API version 2022-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. options - ConnectorApplicationsClientListOptions contains the optional parameters for the ConnectorApplicationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ListBySecurityConnectorApplications_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorApplicationsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("gcpResourceGroup", "gcpconnector", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ConnectorApplicationsClientListOptions added in v0.8.0

type ConnectorApplicationsClientListOptions struct {
}

ConnectorApplicationsClientListOptions contains the optional parameters for the ConnectorApplicationsClient.List method.

type ConnectorApplicationsClientListResponse added in v0.8.0

type ConnectorApplicationsClientListResponse struct {
	ApplicationsList
}

ConnectorApplicationsClientListResponse contains the response from method ConnectorApplicationsClient.List.

type ConnectorGovernanceRuleClient added in v0.8.0

type ConnectorGovernanceRuleClient struct {
	// contains filtered or unexported fields
}

ConnectorGovernanceRuleClient contains the methods for the SecurityConnectorGovernanceRule group. Don't use this type directly, use NewConnectorGovernanceRuleClient() instead.

func NewConnectorGovernanceRuleClient added in v0.8.0

func NewConnectorGovernanceRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectorGovernanceRuleClient, error)

NewConnectorGovernanceRuleClient creates a new instance of ConnectorGovernanceRuleClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConnectorGovernanceRuleClient) NewListPager added in v0.8.0

func (client *ConnectorGovernanceRuleClient) NewListPager(resourceGroupName string, securityConnectorName string, options *ConnectorGovernanceRuleClientListOptions) *runtime.Pager[ConnectorGovernanceRuleClientListResponse]

NewListPager - Get a list of all relevant governanceRules over a security connector level scope Generated from API version 2022-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. options - ConnectorGovernanceRuleClientListOptions contains the optional parameters for the ConnectorGovernanceRuleClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListBySecurityConnectorGovernanceRules_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorGovernanceRuleClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("gcpResourceGroup", "gcpconnector", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ConnectorGovernanceRuleClientListOptions added in v0.8.0

type ConnectorGovernanceRuleClientListOptions struct {
}

ConnectorGovernanceRuleClientListOptions contains the optional parameters for the ConnectorGovernanceRuleClient.List method.

type ConnectorGovernanceRuleClientListResponse added in v0.8.0

type ConnectorGovernanceRuleClientListResponse struct {
	GovernanceRuleList
}

ConnectorGovernanceRuleClientListResponse contains the response from method ConnectorGovernanceRuleClient.List.

type ConnectorGovernanceRulesClient added in v0.8.0

type ConnectorGovernanceRulesClient struct {
	// contains filtered or unexported fields
}

ConnectorGovernanceRulesClient contains the methods for the SecurityConnectorGovernanceRules group. Don't use this type directly, use NewConnectorGovernanceRulesClient() instead.

func NewConnectorGovernanceRulesClient added in v0.8.0

func NewConnectorGovernanceRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectorGovernanceRulesClient, error)

NewConnectorGovernanceRulesClient creates a new instance of ConnectorGovernanceRulesClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConnectorGovernanceRulesClient) CreateOrUpdate added in v0.8.0

func (client *ConnectorGovernanceRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, ruleID string, governanceRule GovernanceRule, options *ConnectorGovernanceRulesClientCreateOrUpdateOptions) (ConnectorGovernanceRulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or update a security GovernanceRule on the given security connector. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule governanceRule - GovernanceRule over a subscription scope options - ConnectorGovernanceRulesClientCreateOrUpdateOptions contains the optional parameters for the ConnectorGovernanceRulesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PutSecurityConnectorGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.GovernanceRule{
		Properties: &armsecurity.GovernanceRuleProperties{
			Description: to.Ptr("A rule on critical GCP recommendations"),
			ConditionSets: []interface{}{
				map[string]interface{}{
					"conditions": []interface{}{
						map[string]interface{}{
							"operator": "In",
							"property": "$.AssessmentKey",
							"value":    "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
						},
					},
				}},
			DisplayName: to.Ptr("GCP Admin's rule"),
			GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
				DisableManagerEmailNotification: to.Ptr(true),
				DisableOwnerEmailNotification:   to.Ptr(false),
			},
			IsDisabled:    to.Ptr(false),
			IsGracePeriod: to.Ptr(true),
			OwnerSource: &armsecurity.GovernanceRuleOwnerSource{
				Type:  to.Ptr(armsecurity.GovernanceRuleOwnerSourceTypeManually),
				Value: to.Ptr("user@contoso.com"),
			},
			RemediationTimeframe: to.Ptr("7.00:00:00"),
			RulePriority:         to.Ptr[int32](200),
			RuleType:             to.Ptr(armsecurity.GovernanceRuleTypeIntegrated),
			SourceResourceType:   to.Ptr(armsecurity.GovernanceRuleSourceResourceTypeAssessments),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConnectorGovernanceRulesClient) Delete added in v0.8.0

Delete - Delete a GovernanceRule over a given scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule options - ConnectorGovernanceRulesClientDeleteOptions contains the optional parameters for the ConnectorGovernanceRulesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/DeleteSecurityConnectorGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConnectorGovernanceRulesClient) Get added in v0.8.0

Get - Get a specific governanceRule for the requested scope by ruleId If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule options - ConnectorGovernanceRulesClientGetOptions contains the optional parameters for the ConnectorGovernanceRulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConnectorGovernanceRulesClientCreateOrUpdateOptions added in v0.8.0

type ConnectorGovernanceRulesClientCreateOrUpdateOptions struct {
}

ConnectorGovernanceRulesClientCreateOrUpdateOptions contains the optional parameters for the ConnectorGovernanceRulesClient.CreateOrUpdate method.

type ConnectorGovernanceRulesClientCreateOrUpdateResponse added in v0.8.0

type ConnectorGovernanceRulesClientCreateOrUpdateResponse struct {
	GovernanceRule
}

ConnectorGovernanceRulesClientCreateOrUpdateResponse contains the response from method ConnectorGovernanceRulesClient.CreateOrUpdate.

type ConnectorGovernanceRulesClientDeleteOptions added in v0.8.0

type ConnectorGovernanceRulesClientDeleteOptions struct {
}

ConnectorGovernanceRulesClientDeleteOptions contains the optional parameters for the ConnectorGovernanceRulesClient.Delete method.

type ConnectorGovernanceRulesClientDeleteResponse added in v0.8.0

type ConnectorGovernanceRulesClientDeleteResponse struct {
}

ConnectorGovernanceRulesClientDeleteResponse contains the response from method ConnectorGovernanceRulesClient.Delete.

type ConnectorGovernanceRulesClientGetOptions added in v0.8.0

type ConnectorGovernanceRulesClientGetOptions struct {
}

ConnectorGovernanceRulesClientGetOptions contains the optional parameters for the ConnectorGovernanceRulesClient.Get method.

type ConnectorGovernanceRulesClientGetResponse added in v0.8.0

type ConnectorGovernanceRulesClientGetResponse struct {
	GovernanceRule
}

ConnectorGovernanceRulesClientGetResponse contains the response from method ConnectorGovernanceRulesClient.Get.

type ConnectorGovernanceRulesExecuteStatusClient added in v0.8.0

type ConnectorGovernanceRulesExecuteStatusClient struct {
	// contains filtered or unexported fields
}

ConnectorGovernanceRulesExecuteStatusClient contains the methods for the SecurityConnectorGovernanceRulesExecuteStatus group. Don't use this type directly, use NewConnectorGovernanceRulesExecuteStatusClient() instead.

func NewConnectorGovernanceRulesExecuteStatusClient added in v0.8.0

func NewConnectorGovernanceRulesExecuteStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectorGovernanceRulesExecuteStatusClient, error)

NewConnectorGovernanceRulesExecuteStatusClient creates a new instance of ConnectorGovernanceRulesExecuteStatusClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConnectorGovernanceRulesExecuteStatusClient) BeginGet added in v0.8.0

BeginGet - Get a specific governanceRule execution status for the requested scope by ruleId and operationId If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule operationID - The security GovernanceRule execution key - unique key for the execution of GovernanceRule options - ConnectorGovernanceRulesExecuteStatusClientBeginGetOptions contains the optional parameters for the ConnectorGovernanceRulesExecuteStatusClient.BeginGet method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorGovernanceRulesExecuteStatusClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGet(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConnectorGovernanceRulesExecuteStatusClientBeginGetOptions added in v0.8.0

type ConnectorGovernanceRulesExecuteStatusClientBeginGetOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConnectorGovernanceRulesExecuteStatusClientBeginGetOptions contains the optional parameters for the ConnectorGovernanceRulesExecuteStatusClient.BeginGet method.

type ConnectorGovernanceRulesExecuteStatusClientGetResponse added in v0.8.0

type ConnectorGovernanceRulesExecuteStatusClientGetResponse struct {
	ExecuteRuleStatus
}

ConnectorGovernanceRulesExecuteStatusClientGetResponse contains the response from method ConnectorGovernanceRulesExecuteStatusClient.Get.

type ConnectorProperties added in v0.3.0

type ConnectorProperties struct {
	// The security connector environment data.
	EnvironmentData EnvironmentDataClassification `json:"environmentData,omitempty"`

	// The multi cloud resource's cloud name.
	EnvironmentName *CloudName `json:"environmentName,omitempty"`

	// The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector).
	HierarchyIdentifier *string `json:"hierarchyIdentifier,omitempty"`

	// A collection of offerings for the security connector.
	Offerings []CloudOfferingClassification `json:"offerings,omitempty"`

	// READ-ONLY; The date on which the trial period will end, if applicable. Trial period exists for 30 days after upgrading
	// to payed offerings.
	HierarchyIdentifierTrialEndDate *time.Time `json:"hierarchyIdentifierTrialEndDate,omitempty" azure:"ro"`
}

ConnectorProperties - A set of properties that defines the security connector configuration.

func (ConnectorProperties) MarshalJSON added in v0.3.0

func (c ConnectorProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectorProperties.

func (*ConnectorProperties) UnmarshalJSON added in v0.3.0

func (c *ConnectorProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectorProperties.

type ConnectorSetting

type ConnectorSetting struct {
	// Connector setting data
	Properties *ConnectorSettingProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ConnectorSetting - The connector setting

func (ConnectorSetting) MarshalJSON

func (c ConnectorSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectorSetting.

func (*ConnectorSetting) UnmarshalJSON

func (c *ConnectorSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectorSetting.

type ConnectorSettingList

type ConnectorSettingList struct {
	// List of all the cloud account connector settings
	Value []*ConnectorSetting `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ConnectorSettingList - For a subscription, list of all cloud account connectors and their settings

func (ConnectorSettingList) MarshalJSON

func (c ConnectorSettingList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectorSettingList.

func (*ConnectorSettingList) UnmarshalJSON added in v0.8.0

func (c *ConnectorSettingList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectorSettingList.

type ConnectorSettingProperties

type ConnectorSettingProperties struct {
	// Settings for authentication management, these settings are relevant only for the cloud connector.
	AuthenticationDetails AuthenticationDetailsPropertiesClassification `json:"authenticationDetails,omitempty"`

	// Settings for hybrid compute management. These settings are relevant only for Arc autoProvision (Hybrid Compute).
	HybridComputeSettings *HybridComputeSettingsProperties `json:"hybridComputeSettings,omitempty"`
}

ConnectorSettingProperties - Describes properties of a connector setting

func (ConnectorSettingProperties) MarshalJSON

func (c ConnectorSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectorSettingProperties.

func (*ConnectorSettingProperties) UnmarshalJSON

func (c *ConnectorSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectorSettingProperties.

type ConnectorsClient

type ConnectorsClient struct {
	// contains filtered or unexported fields
}

ConnectorsClient contains the methods for the SecurityConnectors group. Don't use this type directly, use NewConnectorsClient() instead.

func NewConnectorsClient

func NewConnectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectorsClient, error)

NewConnectorsClient creates a new instance of ConnectorsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConnectorsClient) CreateOrUpdate

func (client *ConnectorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, securityConnector Connector, options *ConnectorsClientCreateOrUpdateOptions) (ConnectorsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a security connector. If a security connector is already created and a subsequent request is issued for the same security connector id, then it will be updated. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-08-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. securityConnector - The security connector resource options - ConnectorsClientCreateOrUpdateOptions contains the optional parameters for the ConnectorsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "exampleResourceGroup", "exampleSecurityConnectorName", armsecurity.Connector{
		Location: to.Ptr("Central US"),
		Etag:     to.Ptr("etag value (must be supplied for update)"),
		Tags:     map[string]*string{},
		Properties: &armsecurity.ConnectorProperties{
			EnvironmentData: &armsecurity.AwsEnvironmentData{
				EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
			},
			EnvironmentName:     to.Ptr(armsecurity.CloudNameAWS),
			HierarchyIdentifier: to.Ptr("exampleHierarchyId"),
			Offerings: []armsecurity.CloudOfferingClassification{
				&armsecurity.CspmMonitorAwsOffering{
					OfferingType: to.Ptr(armsecurity.OfferingTypeCspmMonitorAws),
					NativeCloudConnection: &armsecurity.CspmMonitorAwsOfferingNativeCloudConnection{
						CloudRoleArn: to.Ptr("arn:aws:iam::00000000:role/ASCMonitor"),
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConnectorsClient) Delete

func (client *ConnectorsClient) Delete(ctx context.Context, resourceGroupName string, securityConnectorName string, options *ConnectorsClientDeleteOptions) (ConnectorsClientDeleteResponse, error)

Delete - Deletes a security connector. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-08-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. options - ConnectorsClientDeleteOptions contains the optional parameters for the ConnectorsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "myRg", "mySecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConnectorsClient) Get

func (client *ConnectorsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, options *ConnectorsClientGetOptions) (ConnectorsClientGetResponse, error)

Get - Retrieves details of a specific security connector If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-08-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. options - ConnectorsClientGetOptions contains the optional parameters for the ConnectorsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "exampleResourceGroup", "exampleSecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConnectorsClient) NewListByResourceGroupPager added in v0.6.0

func (client *ConnectorsClient) NewListByResourceGroupPager(resourceGroupName string, options *ConnectorsClientListByResourceGroupOptions) *runtime.Pager[ConnectorsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to get the next page of security connectors for the specified resource group. Generated from API version 2022-08-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - ConnectorsClientListByResourceGroupOptions contains the optional parameters for the ConnectorsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("exampleResourceGroup", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConnectorsClient) NewListPager added in v0.6.0

NewListPager - Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to get the next page of security connectors for the specified subscription. Generated from API version 2022-08-01-preview options - ConnectorsClientListOptions contains the optional parameters for the ConnectorsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConnectorsClient) Update added in v0.3.0

func (client *ConnectorsClient) Update(ctx context.Context, resourceGroupName string, securityConnectorName string, securityConnector Connector, options *ConnectorsClientUpdateOptions) (ConnectorsClientUpdateResponse, error)

Update - Updates a security connector If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-08-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. securityConnector - The security connector resource options - ConnectorsClientUpdateOptions contains the optional parameters for the ConnectorsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewConnectorsClient("a5caac9c-5c04-49af-b3d0-e204f40345d5", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx, "exampleResourceGroup", "exampleSecurityConnectorName", armsecurity.Connector{
		Location: to.Ptr("Central US"),
		Etag:     to.Ptr("etag value (must be supplied for update)"),
		Tags:     map[string]*string{},
		Properties: &armsecurity.ConnectorProperties{
			EnvironmentData: &armsecurity.AwsEnvironmentData{
				EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
			},
			EnvironmentName:     to.Ptr(armsecurity.CloudNameAWS),
			HierarchyIdentifier: to.Ptr("exampleHierarchyId"),
			Offerings: []armsecurity.CloudOfferingClassification{
				&armsecurity.CspmMonitorAwsOffering{
					OfferingType: to.Ptr(armsecurity.OfferingTypeCspmMonitorAws),
					NativeCloudConnection: &armsecurity.CspmMonitorAwsOfferingNativeCloudConnection{
						CloudRoleArn: to.Ptr("arn:aws:iam::00000000:role/ASCMonitor"),
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConnectorsClientCreateOrUpdateOptions added in v0.3.0

type ConnectorsClientCreateOrUpdateOptions struct {
}

ConnectorsClientCreateOrUpdateOptions contains the optional parameters for the ConnectorsClient.CreateOrUpdate method.

type ConnectorsClientCreateOrUpdateResponse added in v0.3.0

type ConnectorsClientCreateOrUpdateResponse struct {
	Connector
}

ConnectorsClientCreateOrUpdateResponse contains the response from method ConnectorsClient.CreateOrUpdate.

type ConnectorsClientDeleteOptions added in v0.3.0

type ConnectorsClientDeleteOptions struct {
}

ConnectorsClientDeleteOptions contains the optional parameters for the ConnectorsClient.Delete method.

type ConnectorsClientDeleteResponse added in v0.3.0

type ConnectorsClientDeleteResponse struct {
}

ConnectorsClientDeleteResponse contains the response from method ConnectorsClient.Delete.

type ConnectorsClientGetOptions added in v0.3.0

type ConnectorsClientGetOptions struct {
}

ConnectorsClientGetOptions contains the optional parameters for the ConnectorsClient.Get method.

type ConnectorsClientGetResponse added in v0.3.0

type ConnectorsClientGetResponse struct {
	Connector
}

ConnectorsClientGetResponse contains the response from method ConnectorsClient.Get.

type ConnectorsClientListByResourceGroupOptions added in v0.3.0

type ConnectorsClientListByResourceGroupOptions struct {
}

ConnectorsClientListByResourceGroupOptions contains the optional parameters for the ConnectorsClient.ListByResourceGroup method.

type ConnectorsClientListByResourceGroupResponse added in v0.3.0

type ConnectorsClientListByResourceGroupResponse struct {
	ConnectorsList
}

ConnectorsClientListByResourceGroupResponse contains the response from method ConnectorsClient.ListByResourceGroup.

type ConnectorsClientListOptions added in v0.3.0

type ConnectorsClientListOptions struct {
}

ConnectorsClientListOptions contains the optional parameters for the ConnectorsClient.List method.

type ConnectorsClientListResponse added in v0.3.0

type ConnectorsClientListResponse struct {
	ConnectorsList
}

ConnectorsClientListResponse contains the response from method ConnectorsClient.List.

type ConnectorsClientUpdateOptions added in v0.3.0

type ConnectorsClientUpdateOptions struct {
}

ConnectorsClientUpdateOptions contains the optional parameters for the ConnectorsClient.Update method.

type ConnectorsClientUpdateResponse added in v0.3.0

type ConnectorsClientUpdateResponse struct {
	Connector
}

ConnectorsClientUpdateResponse contains the response from method ConnectorsClient.Update.

type ConnectorsList added in v0.3.0

type ConnectorsList struct {
	// REQUIRED; The list of security connectors under the given scope.
	Value []*Connector `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ConnectorsList - List of security connectors response.

func (ConnectorsList) MarshalJSON added in v0.3.0

func (c ConnectorsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectorsList.

func (*ConnectorsList) UnmarshalJSON added in v0.8.0

func (c *ConnectorsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectorsList.

type Contact added in v0.3.0

type Contact struct {
	// Security contact data
	Properties *ContactProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Contact details and configurations for notifications coming from Microsoft Defender for Cloud.

func (Contact) MarshalJSON added in v0.3.0

func (c Contact) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Contact.

func (*Contact) UnmarshalJSON added in v0.8.0

func (c *Contact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Contact.

type ContactList added in v0.3.0

type ContactList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of security contacts
	Value []*Contact `json:"value,omitempty" azure:"ro"`
}

ContactList - List of security contacts response

func (ContactList) MarshalJSON added in v0.3.0

func (c ContactList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContactList.

func (*ContactList) UnmarshalJSON added in v0.8.0

func (c *ContactList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContactList.

type ContactProperties added in v0.3.0

type ContactProperties struct {
	// Defines whether to send email notifications about new security alerts
	AlertNotifications *ContactPropertiesAlertNotifications `json:"alertNotifications,omitempty"`

	// List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in
	// this security contact.
	Emails *string `json:"emails,omitempty"`

	// Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the
	// subscription.
	NotificationsByRole *ContactPropertiesNotificationsByRole `json:"notificationsByRole,omitempty"`

	// The security contact's phone number
	Phone *string `json:"phone,omitempty"`
}

ContactProperties - Describes security contact properties

func (ContactProperties) MarshalJSON added in v0.8.0

func (c ContactProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContactProperties.

func (*ContactProperties) UnmarshalJSON added in v0.8.0

func (c *ContactProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContactProperties.

type ContactPropertiesAlertNotifications added in v0.9.0

type ContactPropertiesAlertNotifications struct {
	// Defines the minimal alert severity which will be sent as email notifications
	MinimalSeverity *MinimalSeverity `json:"minimalSeverity,omitempty"`

	// Defines if email notifications will be sent about new security alerts
	State *State `json:"state,omitempty"`
}

ContactPropertiesAlertNotifications - Defines whether to send email notifications about new security alerts

func (ContactPropertiesAlertNotifications) MarshalJSON added in v0.9.0

func (c ContactPropertiesAlertNotifications) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContactPropertiesAlertNotifications.

func (*ContactPropertiesAlertNotifications) UnmarshalJSON added in v0.9.0

func (c *ContactPropertiesAlertNotifications) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContactPropertiesAlertNotifications.

type ContactPropertiesNotificationsByRole added in v0.9.0

type ContactPropertiesNotificationsByRole struct {
	// Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles:
	Roles []*Roles `json:"roles,omitempty"`

	// Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the
	// subscription.
	State *State `json:"state,omitempty"`
}

ContactPropertiesNotificationsByRole - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.

func (ContactPropertiesNotificationsByRole) MarshalJSON added in v0.9.0

func (c ContactPropertiesNotificationsByRole) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContactPropertiesNotificationsByRole.

func (*ContactPropertiesNotificationsByRole) UnmarshalJSON added in v0.9.0

func (c *ContactPropertiesNotificationsByRole) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContactPropertiesNotificationsByRole.

type ContactsClient added in v0.3.0

type ContactsClient struct {
	// contains filtered or unexported fields
}

ContactsClient contains the methods for the SecurityContacts group. Don't use this type directly, use NewContactsClient() instead.

func NewContactsClient added in v0.3.0

func NewContactsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContactsClient, error)

NewContactsClient creates a new instance of ContactsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ContactsClient) Create added in v0.3.0

func (client *ContactsClient) Create(ctx context.Context, securityContactName string, securityContact Contact, options *ContactsClientCreateOptions) (ContactsClientCreateResponse, error)

Create - Create security contact configurations for the subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01-preview securityContactName - Name of the security contact object securityContact - Security contact object options - ContactsClientCreateOptions contains the optional parameters for the ContactsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/CreateSecurityContact_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewContactsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "default", armsecurity.Contact{
		Properties: &armsecurity.ContactProperties{
			AlertNotifications: &armsecurity.ContactPropertiesAlertNotifications{
				MinimalSeverity: to.Ptr(armsecurity.MinimalSeverityLow),
				State:           to.Ptr(armsecurity.State("On")),
			},
			Emails: to.Ptr("john@contoso.com;jane@contoso.com"),
			NotificationsByRole: &armsecurity.ContactPropertiesNotificationsByRole{
				Roles: []*armsecurity.Roles{
					to.Ptr(armsecurity.RolesOwner)},
				State: to.Ptr(armsecurity.State("On")),
			},
			Phone: to.Ptr("(214)275-4038"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ContactsClient) Delete added in v0.3.0

func (client *ContactsClient) Delete(ctx context.Context, securityContactName string, options *ContactsClientDeleteOptions) (ContactsClientDeleteResponse, error)

Delete - Delete security contact configurations for the subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01-preview securityContactName - Name of the security contact object options - ContactsClientDeleteOptions contains the optional parameters for the ContactsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/DeleteSecurityContact_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewContactsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ContactsClient) Get added in v0.3.0

func (client *ContactsClient) Get(ctx context.Context, securityContactName string, options *ContactsClientGetOptions) (ContactsClientGetResponse, error)

Get - Get Default Security contact configurations for the subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01-preview securityContactName - Name of the security contact object options - ContactsClientGetOptions contains the optional parameters for the ContactsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/GetSecurityContact_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewContactsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ContactsClient) NewListPager added in v0.6.0

NewListPager - List all security contact configurations for the subscription Generated from API version 2020-01-01-preview options - ContactsClientListOptions contains the optional parameters for the ContactsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/GetSecurityContactsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewContactsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ContactsClientCreateOptions added in v0.3.0

type ContactsClientCreateOptions struct {
}

ContactsClientCreateOptions contains the optional parameters for the ContactsClient.Create method.

type ContactsClientCreateResponse added in v0.3.0

type ContactsClientCreateResponse struct {
	Contact
}

ContactsClientCreateResponse contains the response from method ContactsClient.Create.

type ContactsClientDeleteOptions added in v0.3.0

type ContactsClientDeleteOptions struct {
}

ContactsClientDeleteOptions contains the optional parameters for the ContactsClient.Delete method.

type ContactsClientDeleteResponse added in v0.3.0

type ContactsClientDeleteResponse struct {
}

ContactsClientDeleteResponse contains the response from method ContactsClient.Delete.

type ContactsClientGetOptions added in v0.3.0

type ContactsClientGetOptions struct {
}

ContactsClientGetOptions contains the optional parameters for the ContactsClient.Get method.

type ContactsClientGetResponse added in v0.3.0

type ContactsClientGetResponse struct {
	Contact
}

ContactsClientGetResponse contains the response from method ContactsClient.Get.

type ContactsClientListOptions added in v0.3.0

type ContactsClientListOptions struct {
}

ContactsClientListOptions contains the optional parameters for the ContactsClient.List method.

type ContactsClientListResponse added in v0.3.0

type ContactsClientListResponse struct {
	ContactList
}

ContactsClientListResponse contains the response from method ContactsClient.List.

type ContainerRegistryVulnerabilityProperties

type ContainerRegistryVulnerabilityProperties struct {
	// REQUIRED; Sub-assessment resource type
	AssessedResourceType *AssessedResourceType `json:"assessedResourceType,omitempty"`

	// READ-ONLY; List of CVEs
	Cve []*CVE `json:"cve,omitempty" azure:"ro"`

	// READ-ONLY; Dictionary from cvss version to cvss details object
	Cvss map[string]*CVSS `json:"cvss,omitempty" azure:"ro"`

	// READ-ONLY; Digest of the vulnerable image
	ImageDigest *string `json:"imageDigest,omitempty" azure:"ro"`

	// READ-ONLY; Indicates whether a patch is available or not
	Patchable *bool `json:"patchable,omitempty" azure:"ro"`

	// READ-ONLY; Published time
	PublishedTime *time.Time `json:"publishedTime,omitempty" azure:"ro"`

	// READ-ONLY; Name of the repository which the vulnerable image belongs to
	RepositoryName *string `json:"repositoryName,omitempty" azure:"ro"`

	// READ-ONLY; Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered, Vulnerability
	Type *string `json:"type,omitempty" azure:"ro"`

	// READ-ONLY
	VendorReferences []*VendorReference `json:"vendorReferences,omitempty" azure:"ro"`
}

ContainerRegistryVulnerabilityProperties - Additional context fields for container registry Vulnerability assessment

func (*ContainerRegistryVulnerabilityProperties) GetAdditionalData added in v0.3.0

GetAdditionalData implements the AdditionalDataClassification interface for type ContainerRegistryVulnerabilityProperties.

func (ContainerRegistryVulnerabilityProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContainerRegistryVulnerabilityProperties.

func (*ContainerRegistryVulnerabilityProperties) UnmarshalJSON

func (c *ContainerRegistryVulnerabilityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryVulnerabilityProperties.

type ControlType

type ControlType string

ControlType - The type of security control (for example, BuiltIn)

const (
	// ControlTypeBuiltIn - Microsoft Defender for Cloud managed assessments
	ControlTypeBuiltIn ControlType = "BuiltIn"
	// ControlTypeCustom - Non Microsoft Defender for Cloud managed assessments
	ControlTypeCustom ControlType = "Custom"
)

func PossibleControlTypeValues

func PossibleControlTypeValues() []ControlType

PossibleControlTypeValues returns the possible values for the ControlType const type.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CspmMonitorAwsOffering added in v0.2.0

type CspmMonitorAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The native cloud connection configuration
	NativeCloudConnection *CspmMonitorAwsOfferingNativeCloudConnection `json:"nativeCloudConnection,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

CspmMonitorAwsOffering - The CSPM monitoring for AWS offering

func (*CspmMonitorAwsOffering) GetCloudOffering added in v0.3.0

func (c *CspmMonitorAwsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type CspmMonitorAwsOffering.

func (CspmMonitorAwsOffering) MarshalJSON added in v0.2.0

func (c CspmMonitorAwsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CspmMonitorAwsOffering.

func (*CspmMonitorAwsOffering) UnmarshalJSON added in v0.2.0

func (c *CspmMonitorAwsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorAwsOffering.

type CspmMonitorAwsOfferingNativeCloudConnection added in v0.2.0

type CspmMonitorAwsOfferingNativeCloudConnection struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

CspmMonitorAwsOfferingNativeCloudConnection - The native cloud connection configuration

func (CspmMonitorAwsOfferingNativeCloudConnection) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type CspmMonitorAwsOfferingNativeCloudConnection.

func (*CspmMonitorAwsOfferingNativeCloudConnection) UnmarshalJSON added in v0.8.0

func (c *CspmMonitorAwsOfferingNativeCloudConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorAwsOfferingNativeCloudConnection.

type CspmMonitorAzureDevOpsOffering added in v0.8.0

type CspmMonitorAzureDevOpsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

CspmMonitorAzureDevOpsOffering - The CSPM monitoring for AzureDevOps offering

func (*CspmMonitorAzureDevOpsOffering) GetCloudOffering added in v0.8.0

func (c *CspmMonitorAzureDevOpsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type CspmMonitorAzureDevOpsOffering.

func (CspmMonitorAzureDevOpsOffering) MarshalJSON added in v0.8.0

func (c CspmMonitorAzureDevOpsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CspmMonitorAzureDevOpsOffering.

func (*CspmMonitorAzureDevOpsOffering) UnmarshalJSON added in v0.8.0

func (c *CspmMonitorAzureDevOpsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorAzureDevOpsOffering.

type CspmMonitorGcpOffering added in v0.8.0

type CspmMonitorGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The native cloud connection configuration
	NativeCloudConnection *CspmMonitorGcpOfferingNativeCloudConnection `json:"nativeCloudConnection,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

CspmMonitorGcpOffering - The CSPM monitoring for GCP offering

func (*CspmMonitorGcpOffering) GetCloudOffering added in v0.8.0

func (c *CspmMonitorGcpOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type CspmMonitorGcpOffering.

func (CspmMonitorGcpOffering) MarshalJSON added in v0.8.0

func (c CspmMonitorGcpOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CspmMonitorGcpOffering.

func (*CspmMonitorGcpOffering) UnmarshalJSON added in v0.8.0

func (c *CspmMonitorGcpOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorGcpOffering.

type CspmMonitorGcpOfferingNativeCloudConnection added in v0.8.0

type CspmMonitorGcpOfferingNativeCloudConnection struct {
	// The service account email address in GCP for this offering
	ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty"`

	// The GCP workload identity provider id for the offering
	WorkloadIdentityProviderID *string `json:"workloadIdentityProviderId,omitempty"`
}

CspmMonitorGcpOfferingNativeCloudConnection - The native cloud connection configuration

func (CspmMonitorGcpOfferingNativeCloudConnection) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type CspmMonitorGcpOfferingNativeCloudConnection.

func (*CspmMonitorGcpOfferingNativeCloudConnection) UnmarshalJSON added in v0.8.0

func (c *CspmMonitorGcpOfferingNativeCloudConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorGcpOfferingNativeCloudConnection.

type CspmMonitorGithubOffering added in v0.8.0

type CspmMonitorGithubOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

CspmMonitorGithubOffering - The CSPM monitoring for github offering

func (*CspmMonitorGithubOffering) GetCloudOffering added in v0.8.0

func (c *CspmMonitorGithubOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type CspmMonitorGithubOffering.

func (CspmMonitorGithubOffering) MarshalJSON added in v0.8.0

func (c CspmMonitorGithubOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CspmMonitorGithubOffering.

func (*CspmMonitorGithubOffering) UnmarshalJSON added in v0.8.0

func (c *CspmMonitorGithubOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorGithubOffering.

type CustomAlertRule

type CustomAlertRule struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

CustomAlertRule - A custom alert rule.

func (*CustomAlertRule) GetCustomAlertRule

func (c *CustomAlertRule) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type CustomAlertRule.

func (CustomAlertRule) MarshalJSON added in v0.8.0

func (c CustomAlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomAlertRule.

func (*CustomAlertRule) UnmarshalJSON

func (c *CustomAlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomAlertRule.

type CustomAlertRuleClassification

type CustomAlertRuleClassification interface {
	// GetCustomAlertRule returns the CustomAlertRule content of the underlying type.
	GetCustomAlertRule() *CustomAlertRule
}

CustomAlertRuleClassification provides polymorphic access to related types. Call the interface's GetCustomAlertRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ActiveConnectionsNotInAllowedRange, *AllowlistCustomAlertRule, *AmqpC2DMessagesNotInAllowedRange, *AmqpC2DRejectedMessagesNotInAllowedRange, - *AmqpD2CMessagesNotInAllowedRange, *ConnectionFromIPNotAllowed, *ConnectionToIPNotAllowed, *CustomAlertRule, *DenylistCustomAlertRule, - *DirectMethodInvokesNotInAllowedRange, *FailedLocalLoginsNotInAllowedRange, *FileUploadsNotInAllowedRange, *HTTPC2DMessagesNotInAllowedRange, - *HTTPC2DRejectedMessagesNotInAllowedRange, *HTTPD2CMessagesNotInAllowedRange, *ListCustomAlertRule, *LocalUserNotAllowed, - *MqttC2DMessagesNotInAllowedRange, *MqttC2DRejectedMessagesNotInAllowedRange, *MqttD2CMessagesNotInAllowedRange, *ProcessNotAllowed, - *QueuePurgesNotInAllowedRange, *ThresholdCustomAlertRule, *TimeWindowCustomAlertRule, *TwinUpdatesNotInAllowedRange, - *UnauthorizedOperationsNotInAllowedRange

type CustomAssessmentAutomation

type CustomAssessmentAutomation struct {
	// describes Custom Assessment Automation properties.
	Properties *CustomAssessmentAutomationProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CustomAssessmentAutomation - Custom Assessment Automation

func (CustomAssessmentAutomation) MarshalJSON

func (c CustomAssessmentAutomation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomAssessmentAutomation.

func (*CustomAssessmentAutomation) UnmarshalJSON

func (c *CustomAssessmentAutomation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomAssessmentAutomation.

type CustomAssessmentAutomationProperties

type CustomAssessmentAutomationProperties struct {
	// The assessment metadata key used when an assessment is generated for this assessment automation.
	AssessmentKey *string `json:"assessmentKey,omitempty"`

	// GZip encoded KQL query representing the assessment automation results required.
	CompressedQuery *string `json:"compressedQuery,omitempty"`

	// The description to relate to the assessments generated by this assessment automation.
	Description *string `json:"description,omitempty"`

	// The display name of the assessments generated by this assessment automation.
	DisplayName *string `json:"displayName,omitempty"`

	// The remediation description to relate to the assessments generated by this assessment automation.
	RemediationDescription *string `json:"remediationDescription,omitempty"`

	// The severity to relate to the assessments generated by this assessment automation.
	Severity *SeverityEnum `json:"severity,omitempty"`

	// Relevant cloud for the custom assessment automation.
	SupportedCloud *SupportedCloudEnum `json:"supportedCloud,omitempty"`
}

CustomAssessmentAutomationProperties - describes the Custom Assessment Automation properties

func (CustomAssessmentAutomationProperties) MarshalJSON added in v0.8.0

func (c CustomAssessmentAutomationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomAssessmentAutomationProperties.

func (*CustomAssessmentAutomationProperties) UnmarshalJSON added in v0.8.0

func (c *CustomAssessmentAutomationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomAssessmentAutomationProperties.

type CustomAssessmentAutomationRequest added in v0.2.0

type CustomAssessmentAutomationRequest struct {
	// describes Custom Assessment Automation request properties.
	Properties *CustomAssessmentAutomationRequestProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CustomAssessmentAutomationRequest - Custom Assessment Automation request

func (CustomAssessmentAutomationRequest) MarshalJSON added in v0.2.0

func (c CustomAssessmentAutomationRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomAssessmentAutomationRequest.

func (*CustomAssessmentAutomationRequest) UnmarshalJSON added in v0.2.0

func (c *CustomAssessmentAutomationRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomAssessmentAutomationRequest.

type CustomAssessmentAutomationRequestProperties added in v0.2.0

type CustomAssessmentAutomationRequestProperties struct {
	// Base 64 encoded KQL query representing the assessment automation results required.
	CompressedQuery *string `json:"compressedQuery,omitempty"`

	// The description to relate to the assessments generated by this assessment automation.
	Description *string `json:"description,omitempty"`

	// The display name of the assessments generated by this assessment automation.
	DisplayName *string `json:"displayName,omitempty"`

	// The remediation description to relate to the assessments generated by this assessment automation.
	RemediationDescription *string `json:"remediationDescription,omitempty"`

	// The severity to relate to the assessments generated by this assessment automation.
	Severity *SeverityEnum `json:"severity,omitempty"`

	// Relevant cloud for the custom assessment automation.
	SupportedCloud *SupportedCloudEnum `json:"supportedCloud,omitempty"`
}

CustomAssessmentAutomationRequestProperties - describes the Custom Assessment Automation properties

func (CustomAssessmentAutomationRequestProperties) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type CustomAssessmentAutomationRequestProperties.

func (*CustomAssessmentAutomationRequestProperties) UnmarshalJSON added in v0.8.0

func (c *CustomAssessmentAutomationRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomAssessmentAutomationRequestProperties.

type CustomAssessmentAutomationsClient

type CustomAssessmentAutomationsClient struct {
	// contains filtered or unexported fields
}

CustomAssessmentAutomationsClient contains the methods for the CustomAssessmentAutomations group. Don't use this type directly, use NewCustomAssessmentAutomationsClient() instead.

func NewCustomAssessmentAutomationsClient

func NewCustomAssessmentAutomationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomAssessmentAutomationsClient, error)

NewCustomAssessmentAutomationsClient creates a new instance of CustomAssessmentAutomationsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CustomAssessmentAutomationsClient) Create

func (client *CustomAssessmentAutomationsClient) Create(ctx context.Context, resourceGroupName string, customAssessmentAutomationName string, customAssessmentAutomationBody CustomAssessmentAutomationRequest, options *CustomAssessmentAutomationsClientCreateOptions) (CustomAssessmentAutomationsClientCreateResponse, error)

Create - Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. customAssessmentAutomationName - Name of the Custom Assessment Automation. customAssessmentAutomationBody - Custom Assessment Automation body options - CustomAssessmentAutomationsClientCreateOptions contains the optional parameters for the CustomAssessmentAutomationsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationCreate_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomAssessmentAutomationsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "TestResourceGroup", "MyCustomAssessmentAutomation", armsecurity.CustomAssessmentAutomationRequest{
		Properties: &armsecurity.CustomAssessmentAutomationRequestProperties{
			Description:            to.Ptr("Data should be encrypted"),
			CompressedQuery:        to.Ptr("DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA="),
			DisplayName:            to.Ptr("Password Policy"),
			RemediationDescription: to.Ptr("Encrypt store by..."),
			Severity:               to.Ptr(armsecurity.SeverityEnumMedium),
			SupportedCloud:         to.Ptr(armsecurity.SupportedCloudEnumAWS),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CustomAssessmentAutomationsClient) Delete

Delete - Deletes a custom assessment automation by name for a provided subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. customAssessmentAutomationName - Name of the Custom Assessment Automation. options - CustomAssessmentAutomationsClientDeleteOptions contains the optional parameters for the CustomAssessmentAutomationsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationDelete_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomAssessmentAutomationsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "TestResourceGroup", "MyCustomAssessmentAutomation", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*CustomAssessmentAutomationsClient) Get

Get - Gets a single custom assessment automation by name for the provided subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. customAssessmentAutomationName - Name of the Custom Assessment Automation. options - CustomAssessmentAutomationsClientGetOptions contains the optional parameters for the CustomAssessmentAutomationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationGet_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomAssessmentAutomationsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "TestResourceGroup", "MyCustomAssessmentAutomation", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CustomAssessmentAutomationsClient) NewListByResourceGroupPager added in v0.6.0

NewListByResourceGroupPager - List custom assessment automations by provided subscription and resource group Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - CustomAssessmentAutomationsClientListByResourceGroupOptions contains the optional parameters for the CustomAssessmentAutomationsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationListByResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomAssessmentAutomationsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("TestResourceGroup", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*CustomAssessmentAutomationsClient) NewListBySubscriptionPager added in v0.6.0

NewListBySubscriptionPager - List custom assessment automations by provided subscription Generated from API version 2021-07-01-preview options - CustomAssessmentAutomationsClientListBySubscriptionOptions contains the optional parameters for the CustomAssessmentAutomationsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationListBySubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomAssessmentAutomationsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CustomAssessmentAutomationsClientCreateOptions added in v0.3.0

type CustomAssessmentAutomationsClientCreateOptions struct {
}

CustomAssessmentAutomationsClientCreateOptions contains the optional parameters for the CustomAssessmentAutomationsClient.Create method.

type CustomAssessmentAutomationsClientCreateResponse added in v0.3.0

type CustomAssessmentAutomationsClientCreateResponse struct {
	CustomAssessmentAutomation
}

CustomAssessmentAutomationsClientCreateResponse contains the response from method CustomAssessmentAutomationsClient.Create.

type CustomAssessmentAutomationsClientDeleteOptions added in v0.3.0

type CustomAssessmentAutomationsClientDeleteOptions struct {
}

CustomAssessmentAutomationsClientDeleteOptions contains the optional parameters for the CustomAssessmentAutomationsClient.Delete method.

type CustomAssessmentAutomationsClientDeleteResponse added in v0.3.0

type CustomAssessmentAutomationsClientDeleteResponse struct {
}

CustomAssessmentAutomationsClientDeleteResponse contains the response from method CustomAssessmentAutomationsClient.Delete.

type CustomAssessmentAutomationsClientGetOptions added in v0.3.0

type CustomAssessmentAutomationsClientGetOptions struct {
}

CustomAssessmentAutomationsClientGetOptions contains the optional parameters for the CustomAssessmentAutomationsClient.Get method.

type CustomAssessmentAutomationsClientGetResponse added in v0.3.0

type CustomAssessmentAutomationsClientGetResponse struct {
	CustomAssessmentAutomation
}

CustomAssessmentAutomationsClientGetResponse contains the response from method CustomAssessmentAutomationsClient.Get.

type CustomAssessmentAutomationsClientListByResourceGroupOptions added in v0.3.0

type CustomAssessmentAutomationsClientListByResourceGroupOptions struct {
}

CustomAssessmentAutomationsClientListByResourceGroupOptions contains the optional parameters for the CustomAssessmentAutomationsClient.ListByResourceGroup method.

type CustomAssessmentAutomationsClientListByResourceGroupResponse added in v0.3.0

type CustomAssessmentAutomationsClientListByResourceGroupResponse struct {
	CustomAssessmentAutomationsListResult
}

CustomAssessmentAutomationsClientListByResourceGroupResponse contains the response from method CustomAssessmentAutomationsClient.ListByResourceGroup.

type CustomAssessmentAutomationsClientListBySubscriptionOptions added in v0.3.0

type CustomAssessmentAutomationsClientListBySubscriptionOptions struct {
}

CustomAssessmentAutomationsClientListBySubscriptionOptions contains the optional parameters for the CustomAssessmentAutomationsClient.ListBySubscription method.

type CustomAssessmentAutomationsClientListBySubscriptionResponse added in v0.3.0

type CustomAssessmentAutomationsClientListBySubscriptionResponse struct {
	CustomAssessmentAutomationsListResult
}

CustomAssessmentAutomationsClientListBySubscriptionResponse contains the response from method CustomAssessmentAutomationsClient.ListBySubscription.

type CustomAssessmentAutomationsListResult

type CustomAssessmentAutomationsListResult struct {
	// The link used to get the next page of operations.
	NextLink *string `json:"nextLink,omitempty"`

	// READ-ONLY; Collection of Custom Assessment Automations
	Value []*CustomAssessmentAutomation `json:"value,omitempty" azure:"ro"`
}

CustomAssessmentAutomationsListResult - A list of Custom Assessment Automations

func (CustomAssessmentAutomationsListResult) MarshalJSON

func (c CustomAssessmentAutomationsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomAssessmentAutomationsListResult.

func (*CustomAssessmentAutomationsListResult) UnmarshalJSON added in v0.8.0

func (c *CustomAssessmentAutomationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomAssessmentAutomationsListResult.

type CustomEntityStoreAssignment

type CustomEntityStoreAssignment struct {
	// describes custom entity store assignment properties.
	Properties *CustomEntityStoreAssignmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

CustomEntityStoreAssignment - Custom entity store assignment

func (CustomEntityStoreAssignment) MarshalJSON

func (c CustomEntityStoreAssignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomEntityStoreAssignment.

func (*CustomEntityStoreAssignment) UnmarshalJSON

func (c *CustomEntityStoreAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomEntityStoreAssignment.

type CustomEntityStoreAssignmentProperties

type CustomEntityStoreAssignmentProperties struct {
	// The link to entity store database.
	EntityStoreDatabaseLink *string `json:"entityStoreDatabaseLink,omitempty"`

	// The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]
	Principal *string `json:"principal,omitempty"`
}

CustomEntityStoreAssignmentProperties - describes the custom entity store assignment properties

func (CustomEntityStoreAssignmentProperties) MarshalJSON added in v0.8.0

func (c CustomEntityStoreAssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomEntityStoreAssignmentProperties.

func (*CustomEntityStoreAssignmentProperties) UnmarshalJSON added in v0.8.0

func (c *CustomEntityStoreAssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomEntityStoreAssignmentProperties.

type CustomEntityStoreAssignmentRequest

type CustomEntityStoreAssignmentRequest struct {
	// describes properties of custom entity store assignment request
	Properties *CustomEntityStoreAssignmentRequestProperties `json:"properties,omitempty"`
}

CustomEntityStoreAssignmentRequest - describes the custom entity store assignment request

func (CustomEntityStoreAssignmentRequest) MarshalJSON added in v0.8.0

func (c CustomEntityStoreAssignmentRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomEntityStoreAssignmentRequest.

func (*CustomEntityStoreAssignmentRequest) UnmarshalJSON added in v0.8.0

func (c *CustomEntityStoreAssignmentRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomEntityStoreAssignmentRequest.

type CustomEntityStoreAssignmentRequestProperties

type CustomEntityStoreAssignmentRequestProperties struct {
	// The principal assigned with entity store. If not provided, will use caller principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]
	Principal *string `json:"principal,omitempty"`
}

CustomEntityStoreAssignmentRequestProperties - describes properties of custom entity store assignment request

func (CustomEntityStoreAssignmentRequestProperties) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type CustomEntityStoreAssignmentRequestProperties.

func (*CustomEntityStoreAssignmentRequestProperties) UnmarshalJSON added in v0.8.0

func (c *CustomEntityStoreAssignmentRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomEntityStoreAssignmentRequestProperties.

type CustomEntityStoreAssignmentsClient

type CustomEntityStoreAssignmentsClient struct {
	// contains filtered or unexported fields
}

CustomEntityStoreAssignmentsClient contains the methods for the CustomEntityStoreAssignments group. Don't use this type directly, use NewCustomEntityStoreAssignmentsClient() instead.

func NewCustomEntityStoreAssignmentsClient

func NewCustomEntityStoreAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomEntityStoreAssignmentsClient, error)

NewCustomEntityStoreAssignmentsClient creates a new instance of CustomEntityStoreAssignmentsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CustomEntityStoreAssignmentsClient) Create

func (client *CustomEntityStoreAssignmentsClient) Create(ctx context.Context, resourceGroupName string, customEntityStoreAssignmentName string, customEntityStoreAssignmentRequestBody CustomEntityStoreAssignmentRequest, options *CustomEntityStoreAssignmentsClientCreateOptions) (CustomEntityStoreAssignmentsClientCreateResponse, error)

Create - Creates a custom entity store assignment for the provided subscription, if not already exists. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. customEntityStoreAssignmentName - Name of the custom entity store assignment. Generated name is GUID. customEntityStoreAssignmentRequestBody - Custom entity store assignment body options - CustomEntityStoreAssignmentsClientCreateOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomEntityStoreAssignmentsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "TestResourceGroup", "33e7cc6e-a139-4723-a0e5-76993aee0771", armsecurity.CustomEntityStoreAssignmentRequest{
		Properties: &armsecurity.CustomEntityStoreAssignmentRequestProperties{
			Principal: to.Ptr("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CustomEntityStoreAssignmentsClient) Delete

Delete - Delete a custom entity store assignment by name for a provided subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. customEntityStoreAssignmentName - Name of the custom entity store assignment. Generated name is GUID. options - CustomEntityStoreAssignmentsClientDeleteOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomEntityStoreAssignmentsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "TestResourceGroup", "33e7cc6e-a139-4723-a0e5-76993aee0771", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*CustomEntityStoreAssignmentsClient) Get

Get - Gets a single custom entity store assignment by name for the provided subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. customEntityStoreAssignmentName - Name of the custom entity store assignment. Generated name is GUID. options - CustomEntityStoreAssignmentsClientGetOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomEntityStoreAssignmentsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "TestResourceGroup", "33e7cc6e-a139-4723-a0e5-76993aee0771", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CustomEntityStoreAssignmentsClient) NewListByResourceGroupPager added in v0.6.0

NewListByResourceGroupPager - List custom entity store assignments by a provided subscription and resource group Generated from API version 2021-07-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - CustomEntityStoreAssignmentsClientListByResourceGroupOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomEntityStoreAssignmentsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("TestResourceGroup", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*CustomEntityStoreAssignmentsClient) NewListBySubscriptionPager added in v0.6.0

NewListBySubscriptionPager - List custom entity store assignments by provided subscription Generated from API version 2021-07-01-preview options - CustomEntityStoreAssignmentsClientListBySubscriptionOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewCustomEntityStoreAssignmentsClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CustomEntityStoreAssignmentsClientCreateOptions added in v0.3.0

type CustomEntityStoreAssignmentsClientCreateOptions struct {
}

CustomEntityStoreAssignmentsClientCreateOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.Create method.

type CustomEntityStoreAssignmentsClientCreateResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientCreateResponse struct {
	CustomEntityStoreAssignment
}

CustomEntityStoreAssignmentsClientCreateResponse contains the response from method CustomEntityStoreAssignmentsClient.Create.

type CustomEntityStoreAssignmentsClientDeleteOptions added in v0.3.0

type CustomEntityStoreAssignmentsClientDeleteOptions struct {
}

CustomEntityStoreAssignmentsClientDeleteOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.Delete method.

type CustomEntityStoreAssignmentsClientDeleteResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientDeleteResponse struct {
}

CustomEntityStoreAssignmentsClientDeleteResponse contains the response from method CustomEntityStoreAssignmentsClient.Delete.

type CustomEntityStoreAssignmentsClientGetOptions added in v0.3.0

type CustomEntityStoreAssignmentsClientGetOptions struct {
}

CustomEntityStoreAssignmentsClientGetOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.Get method.

type CustomEntityStoreAssignmentsClientGetResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientGetResponse struct {
	CustomEntityStoreAssignment
}

CustomEntityStoreAssignmentsClientGetResponse contains the response from method CustomEntityStoreAssignmentsClient.Get.

type CustomEntityStoreAssignmentsClientListByResourceGroupOptions added in v0.3.0

type CustomEntityStoreAssignmentsClientListByResourceGroupOptions struct {
}

CustomEntityStoreAssignmentsClientListByResourceGroupOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.ListByResourceGroup method.

type CustomEntityStoreAssignmentsClientListByResourceGroupResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientListByResourceGroupResponse struct {
	CustomEntityStoreAssignmentsListResult
}

CustomEntityStoreAssignmentsClientListByResourceGroupResponse contains the response from method CustomEntityStoreAssignmentsClient.ListByResourceGroup.

type CustomEntityStoreAssignmentsClientListBySubscriptionOptions added in v0.3.0

type CustomEntityStoreAssignmentsClientListBySubscriptionOptions struct {
}

CustomEntityStoreAssignmentsClientListBySubscriptionOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.ListBySubscription method.

type CustomEntityStoreAssignmentsClientListBySubscriptionResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientListBySubscriptionResponse struct {
	CustomEntityStoreAssignmentsListResult
}

CustomEntityStoreAssignmentsClientListBySubscriptionResponse contains the response from method CustomEntityStoreAssignmentsClient.ListBySubscription.

type CustomEntityStoreAssignmentsListResult

type CustomEntityStoreAssignmentsListResult struct {
	// The link used to get the next page of operations.
	NextLink *string `json:"nextLink,omitempty"`

	// READ-ONLY; Collection of custom entity store assignments
	Value []*CustomEntityStoreAssignment `json:"value,omitempty" azure:"ro"`
}

CustomEntityStoreAssignmentsListResult - A list of custom entity store assignments

func (CustomEntityStoreAssignmentsListResult) MarshalJSON

func (c CustomEntityStoreAssignmentsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomEntityStoreAssignmentsListResult.

func (*CustomEntityStoreAssignmentsListResult) UnmarshalJSON added in v0.8.0

func (c *CustomEntityStoreAssignmentsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomEntityStoreAssignmentsListResult.

type DataExportSettingProperties

type DataExportSettingProperties struct {
	// REQUIRED; Is the data export setting enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DataExportSettingProperties - The data export setting properties

func (DataExportSettingProperties) MarshalJSON added in v0.8.0

func (d DataExportSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataExportSettingProperties.

func (*DataExportSettingProperties) UnmarshalJSON added in v0.8.0

func (d *DataExportSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataExportSettingProperties.

type DataExportSettings

type DataExportSettings struct {
	// REQUIRED; the kind of the settings string
	Kind *SettingKind `json:"kind,omitempty"`

	// Data export setting data
	Properties *DataExportSettingProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DataExportSettings - Represents a data export setting

func (*DataExportSettings) GetSetting added in v0.3.0

func (d *DataExportSettings) GetSetting() *Setting

GetSetting implements the SettingClassification interface for type DataExportSettings.

func (DataExportSettings) MarshalJSON

func (d DataExportSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataExportSettings.

func (*DataExportSettings) UnmarshalJSON

func (d *DataExportSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataExportSettings.

type DataSource

type DataSource string
const (
	// DataSourceTwinData - Devices twin data
	DataSourceTwinData DataSource = "TwinData"
)

func PossibleDataSourceValues

func PossibleDataSourceValues() []DataSource

PossibleDataSourceValues returns the possible values for the DataSource const type.

type DefenderCspmAwsOffering added in v0.9.0

type DefenderCspmAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The Microsoft Defender for Server VM scanning configuration
	VMScanners *DefenderCspmAwsOfferingVMScanners `json:"vmScanners,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderCspmAwsOffering - The CSPM P1 for Aws offering

func (*DefenderCspmAwsOffering) GetCloudOffering added in v0.9.0

func (d *DefenderCspmAwsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderCspmAwsOffering.

func (DefenderCspmAwsOffering) MarshalJSON added in v0.9.0

func (d DefenderCspmAwsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOffering.

func (*DefenderCspmAwsOffering) UnmarshalJSON added in v0.9.0

func (d *DefenderCspmAwsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOffering.

type DefenderCspmAwsOfferingVMScanners added in v0.9.0

type DefenderCspmAwsOfferingVMScanners struct {
	// configuration for Microsoft Defender for Server VM scanning
	Configuration *DefenderCspmAwsOfferingVMScannersConfiguration `json:"configuration,omitempty"`

	// Is Microsoft Defender for Server VM scanning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderCspmAwsOfferingVMScanners - The Microsoft Defender for Server VM scanning configuration

func (DefenderCspmAwsOfferingVMScanners) MarshalJSON added in v0.9.0

func (d DefenderCspmAwsOfferingVMScanners) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingVMScanners.

func (*DefenderCspmAwsOfferingVMScanners) UnmarshalJSON added in v0.9.0

func (d *DefenderCspmAwsOfferingVMScanners) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingVMScanners.

type DefenderCspmAwsOfferingVMScannersConfiguration added in v0.9.0

type DefenderCspmAwsOfferingVMScannersConfiguration struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`

	// VM tags that indicates that VM should not be scanned
	ExclusionTags map[string]*string `json:"exclusionTags,omitempty"`

	// The scanning mode for the vm scan.
	ScanningMode *ScanningMode `json:"scanningMode,omitempty"`
}

DefenderCspmAwsOfferingVMScannersConfiguration - configuration for Microsoft Defender for Server VM scanning

func (DefenderCspmAwsOfferingVMScannersConfiguration) MarshalJSON added in v0.9.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingVMScannersConfiguration.

func (*DefenderCspmAwsOfferingVMScannersConfiguration) UnmarshalJSON added in v0.9.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingVMScannersConfiguration.

type DefenderCspmGcpOffering added in v0.9.0

type DefenderCspmGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderCspmGcpOffering - The CSPM P1 for GCP offering

func (*DefenderCspmGcpOffering) GetCloudOffering added in v0.9.0

func (d *DefenderCspmGcpOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderCspmGcpOffering.

func (DefenderCspmGcpOffering) MarshalJSON added in v0.9.0

func (d DefenderCspmGcpOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmGcpOffering.

func (*DefenderCspmGcpOffering) UnmarshalJSON added in v0.9.0

func (d *DefenderCspmGcpOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmGcpOffering.

type DefenderFoDatabasesAwsOffering added in v0.8.0

type DefenderFoDatabasesAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderFoDatabasesAwsOfferingArcAutoProvisioning `json:"arcAutoProvisioning,omitempty"`

	// The RDS configuration
	Rds *DefenderFoDatabasesAwsOfferingRds `json:"rds,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderFoDatabasesAwsOffering - The Defender for Databases AWS offering

func (*DefenderFoDatabasesAwsOffering) GetCloudOffering added in v0.8.0

func (d *DefenderFoDatabasesAwsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderFoDatabasesAwsOffering.

func (DefenderFoDatabasesAwsOffering) MarshalJSON added in v0.8.0

func (d DefenderFoDatabasesAwsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderFoDatabasesAwsOffering.

func (*DefenderFoDatabasesAwsOffering) UnmarshalJSON added in v0.8.0

func (d *DefenderFoDatabasesAwsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderFoDatabasesAwsOffering.

type DefenderFoDatabasesAwsOfferingArcAutoProvisioning added in v0.8.0

type DefenderFoDatabasesAwsOfferingArcAutoProvisioning struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`

	// Is arc auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderFoDatabasesAwsOfferingArcAutoProvisioning - The ARC autoprovisioning configuration

func (DefenderFoDatabasesAwsOfferingArcAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderFoDatabasesAwsOfferingArcAutoProvisioning.

func (*DefenderFoDatabasesAwsOfferingArcAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderFoDatabasesAwsOfferingArcAutoProvisioning.

type DefenderFoDatabasesAwsOfferingRds added in v0.9.0

type DefenderFoDatabasesAwsOfferingRds struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`

	// Is RDS protection enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderFoDatabasesAwsOfferingRds - The RDS configuration

func (DefenderFoDatabasesAwsOfferingRds) MarshalJSON added in v0.9.0

func (d DefenderFoDatabasesAwsOfferingRds) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderFoDatabasesAwsOfferingRds.

func (*DefenderFoDatabasesAwsOfferingRds) UnmarshalJSON added in v0.9.0

func (d *DefenderFoDatabasesAwsOfferingRds) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderFoDatabasesAwsOfferingRds.

type DefenderForContainersAwsOffering added in v0.2.0

type DefenderForContainersAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// Is audit logs pipeline auto provisioning enabled
	AutoProvisioning *bool `json:"autoProvisioning,omitempty"`

	// The cloudwatch to kinesis connection configuration
	CloudWatchToKinesis *DefenderForContainersAwsOfferingCloudWatchToKinesis `json:"cloudWatchToKinesis,omitempty"`

	// The container vulnerability assessment configuration
	ContainerVulnerabilityAssessment *DefenderForContainersAwsOfferingContainerVulnerabilityAssessment `json:"containerVulnerabilityAssessment,omitempty"`

	// The container vulnerability assessment task configuration
	ContainerVulnerabilityAssessmentTask *DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask `json:"containerVulnerabilityAssessmentTask,omitempty"`

	// Enable container vulnerability assessment feature
	EnableContainerVulnerabilityAssessment *bool `json:"enableContainerVulnerabilityAssessment,omitempty"`

	// The kinesis to s3 connection configuration
	KinesisToS3 *DefenderForContainersAwsOfferingKinesisToS3 `json:"kinesisToS3,omitempty"`

	// The retention time in days of kube audit logs set on the CloudWatch log group
	KubeAuditRetentionTime *int64 `json:"kubeAuditRetentionTime,omitempty"`

	// The kubernetes to scuba connection configuration
	KubernetesScubaReader *DefenderForContainersAwsOfferingKubernetesScubaReader `json:"kubernetesScubaReader,omitempty"`

	// The kubernetes service connection configuration
	KubernetesService *DefenderForContainersAwsOfferingKubernetesService `json:"kubernetesService,omitempty"`

	// The externalId used by the data reader to prevent the confused deputy attack
	ScubaExternalID *string `json:"scubaExternalId,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForContainersAwsOffering - The Defender for Containers AWS offering

func (*DefenderForContainersAwsOffering) GetCloudOffering added in v0.3.0

func (d *DefenderForContainersAwsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForContainersAwsOffering.

func (DefenderForContainersAwsOffering) MarshalJSON added in v0.2.0

func (d DefenderForContainersAwsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOffering.

func (*DefenderForContainersAwsOffering) UnmarshalJSON added in v0.2.0

func (d *DefenderForContainersAwsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOffering.

type DefenderForContainersAwsOfferingCloudWatchToKinesis added in v0.2.0

type DefenderForContainersAwsOfferingCloudWatchToKinesis struct {
	// The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForContainersAwsOfferingCloudWatchToKinesis - The cloudwatch to kinesis connection configuration

func (DefenderForContainersAwsOfferingCloudWatchToKinesis) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingCloudWatchToKinesis.

func (*DefenderForContainersAwsOfferingCloudWatchToKinesis) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingCloudWatchToKinesis.

type DefenderForContainersAwsOfferingContainerVulnerabilityAssessment added in v0.8.0

type DefenderForContainersAwsOfferingContainerVulnerabilityAssessment struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForContainersAwsOfferingContainerVulnerabilityAssessment - The container vulnerability assessment configuration

func (DefenderForContainersAwsOfferingContainerVulnerabilityAssessment) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.

func (*DefenderForContainersAwsOfferingContainerVulnerabilityAssessment) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.

type DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask added in v0.8.0

type DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask - The container vulnerability assessment task configuration

func (DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.

func (*DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.

type DefenderForContainersAwsOfferingKinesisToS3 added in v0.2.0

type DefenderForContainersAwsOfferingKinesisToS3 struct {
	// The cloud role ARN in AWS used by Kinesis to transfer data into S3
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForContainersAwsOfferingKinesisToS3 - The kinesis to s3 connection configuration

func (DefenderForContainersAwsOfferingKinesisToS3) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingKinesisToS3.

func (*DefenderForContainersAwsOfferingKinesisToS3) UnmarshalJSON added in v0.8.0

func (d *DefenderForContainersAwsOfferingKinesisToS3) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingKinesisToS3.

type DefenderForContainersAwsOfferingKubernetesScubaReader added in v0.2.0

type DefenderForContainersAwsOfferingKubernetesScubaReader struct {
	// The cloud role ARN in AWS for this feature used for reading data
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForContainersAwsOfferingKubernetesScubaReader - The kubernetes to scuba connection configuration

func (DefenderForContainersAwsOfferingKubernetesScubaReader) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingKubernetesScubaReader.

func (*DefenderForContainersAwsOfferingKubernetesScubaReader) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingKubernetesScubaReader.

type DefenderForContainersAwsOfferingKubernetesService added in v0.2.0

type DefenderForContainersAwsOfferingKubernetesService struct {
	// The cloud role ARN in AWS for this feature used for provisioning resources
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForContainersAwsOfferingKubernetesService - The kubernetes service connection configuration

func (DefenderForContainersAwsOfferingKubernetesService) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingKubernetesService.

func (*DefenderForContainersAwsOfferingKubernetesService) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingKubernetesService.

type DefenderForContainersGcpOffering added in v0.8.0

type DefenderForContainersGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// Is audit logs data collection enabled
	AuditLogsAutoProvisioningFlag *bool `json:"auditLogsAutoProvisioningFlag,omitempty"`

	// The native cloud connection configuration
	DataPipelineNativeCloudConnection *DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection `json:"dataPipelineNativeCloudConnection,omitempty"`

	// Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled
	DefenderAgentAutoProvisioningFlag *bool `json:"defenderAgentAutoProvisioningFlag,omitempty"`

	// The native cloud connection configuration
	NativeCloudConnection *DefenderForContainersGcpOfferingNativeCloudConnection `json:"nativeCloudConnection,omitempty"`

	// Is Policy Kubernetes agent auto provisioning enabled
	PolicyAgentAutoProvisioningFlag *bool `json:"policyAgentAutoProvisioningFlag,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForContainersGcpOffering - The containers GCP offering

func (*DefenderForContainersGcpOffering) GetCloudOffering added in v0.8.0

func (d *DefenderForContainersGcpOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForContainersGcpOffering.

func (DefenderForContainersGcpOffering) MarshalJSON added in v0.8.0

func (d DefenderForContainersGcpOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersGcpOffering.

func (*DefenderForContainersGcpOffering) UnmarshalJSON added in v0.8.0

func (d *DefenderForContainersGcpOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersGcpOffering.

type DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection added in v0.8.0

type DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection struct {
	// The data collection service account email address in GCP for this offering
	ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty"`

	// The data collection GCP workload identity provider id for this offering
	WorkloadIdentityProviderID *string `json:"workloadIdentityProviderId,omitempty"`
}

DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection - The native cloud connection configuration

func (DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.

func (*DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.

type DefenderForContainersGcpOfferingNativeCloudConnection added in v0.8.0

type DefenderForContainersGcpOfferingNativeCloudConnection struct {
	// The service account email address in GCP for this offering
	ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty"`

	// The GCP workload identity provider id for this offering
	WorkloadIdentityProviderID *string `json:"workloadIdentityProviderId,omitempty"`
}

DefenderForContainersGcpOfferingNativeCloudConnection - The native cloud connection configuration

func (DefenderForContainersGcpOfferingNativeCloudConnection) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersGcpOfferingNativeCloudConnection.

func (*DefenderForContainersGcpOfferingNativeCloudConnection) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersGcpOfferingNativeCloudConnection.

type DefenderForDatabasesGcpOffering added in v0.8.0

type DefenderForDatabasesGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderForDatabasesGcpOfferingArcAutoProvisioning `json:"arcAutoProvisioning,omitempty"`

	// The native cloud connection configuration
	DefenderForDatabasesArcAutoProvisioning *DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning `json:"defenderForDatabasesArcAutoProvisioning,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForDatabasesGcpOffering - The Defender for Databases GCP offering configurations

func (*DefenderForDatabasesGcpOffering) GetCloudOffering added in v0.8.0

func (d *DefenderForDatabasesGcpOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForDatabasesGcpOffering.

func (DefenderForDatabasesGcpOffering) MarshalJSON added in v0.8.0

func (d DefenderForDatabasesGcpOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForDatabasesGcpOffering.

func (*DefenderForDatabasesGcpOffering) UnmarshalJSON added in v0.8.0

func (d *DefenderForDatabasesGcpOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForDatabasesGcpOffering.

type DefenderForDatabasesGcpOfferingArcAutoProvisioning added in v0.8.0

type DefenderForDatabasesGcpOfferingArcAutoProvisioning struct {
	// Is arc auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForDatabasesGcpOfferingArcAutoProvisioning - The ARC autoprovisioning configuration

func (DefenderForDatabasesGcpOfferingArcAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForDatabasesGcpOfferingArcAutoProvisioning.

func (*DefenderForDatabasesGcpOfferingArcAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForDatabasesGcpOfferingArcAutoProvisioning.

type DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning added in v0.8.0

type DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning struct {
	// The service account email address in GCP for this offering
	ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty"`

	// The GCP workload identity provider id for this offering
	WorkloadIdentityProviderID *string `json:"workloadIdentityProviderId,omitempty"`
}

DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning - The native cloud connection configuration

func (DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.

func (*DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.

type DefenderForDevOpsAzureDevOpsOffering added in v0.9.0

type DefenderForDevOpsAzureDevOpsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForDevOpsAzureDevOpsOffering - The Defender for DevOps for Azure DevOps offering

func (*DefenderForDevOpsAzureDevOpsOffering) GetCloudOffering added in v0.9.0

func (d *DefenderForDevOpsAzureDevOpsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForDevOpsAzureDevOpsOffering.

func (DefenderForDevOpsAzureDevOpsOffering) MarshalJSON added in v0.9.0

func (d DefenderForDevOpsAzureDevOpsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForDevOpsAzureDevOpsOffering.

func (*DefenderForDevOpsAzureDevOpsOffering) UnmarshalJSON added in v0.9.0

func (d *DefenderForDevOpsAzureDevOpsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForDevOpsAzureDevOpsOffering.

type DefenderForDevOpsGithubOffering added in v0.9.0

type DefenderForDevOpsGithubOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForDevOpsGithubOffering - The Defender for DevOps for Github offering

func (*DefenderForDevOpsGithubOffering) GetCloudOffering added in v0.9.0

func (d *DefenderForDevOpsGithubOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForDevOpsGithubOffering.

func (DefenderForDevOpsGithubOffering) MarshalJSON added in v0.9.0

func (d DefenderForDevOpsGithubOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForDevOpsGithubOffering.

func (*DefenderForDevOpsGithubOffering) UnmarshalJSON added in v0.9.0

func (d *DefenderForDevOpsGithubOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForDevOpsGithubOffering.

type DefenderForServersAwsOffering added in v0.2.0

type DefenderForServersAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderForServersAwsOfferingArcAutoProvisioning `json:"arcAutoProvisioning,omitempty"`

	// The Defender for servers connection configuration
	DefenderForServers *DefenderForServersAwsOfferingDefenderForServers `json:"defenderForServers,omitempty"`

	// The Microsoft Defender for Endpoint autoprovisioning configuration
	MdeAutoProvisioning *DefenderForServersAwsOfferingMdeAutoProvisioning `json:"mdeAutoProvisioning,omitempty"`

	// configuration for the servers offering subPlan
	SubPlan *DefenderForServersAwsOfferingSubPlan `json:"subPlan,omitempty"`

	// The Microsoft Defender for Server VM scanning configuration
	VMScanners *DefenderForServersAwsOfferingVMScanners `json:"vmScanners,omitempty"`

	// The Vulnerability Assessment autoprovisioning configuration
	VaAutoProvisioning *DefenderForServersAwsOfferingVaAutoProvisioning `json:"vaAutoProvisioning,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForServersAwsOffering - The Defender for Servers AWS offering

func (*DefenderForServersAwsOffering) GetCloudOffering added in v0.3.0

func (d *DefenderForServersAwsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForServersAwsOffering.

func (DefenderForServersAwsOffering) MarshalJSON added in v0.2.0

func (d DefenderForServersAwsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOffering.

func (*DefenderForServersAwsOffering) UnmarshalJSON added in v0.2.0

func (d *DefenderForServersAwsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOffering.

type DefenderForServersAwsOfferingArcAutoProvisioning added in v0.2.0

type DefenderForServersAwsOfferingArcAutoProvisioning struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`

	// Is arc auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersAwsOfferingArcAutoProvisioning - The ARC autoprovisioning configuration

func (DefenderForServersAwsOfferingArcAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingArcAutoProvisioning.

func (*DefenderForServersAwsOfferingArcAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingArcAutoProvisioning.

type DefenderForServersAwsOfferingDefenderForServers added in v0.2.0

type DefenderForServersAwsOfferingDefenderForServers struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

DefenderForServersAwsOfferingDefenderForServers - The Defender for servers connection configuration

func (DefenderForServersAwsOfferingDefenderForServers) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingDefenderForServers.

func (*DefenderForServersAwsOfferingDefenderForServers) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingDefenderForServers.

type DefenderForServersAwsOfferingMdeAutoProvisioning added in v0.8.0

type DefenderForServersAwsOfferingMdeAutoProvisioning struct {
	// configuration for Microsoft Defender for Endpoint autoprovisioning
	Configuration interface{} `json:"configuration,omitempty"`

	// Is Microsoft Defender for Endpoint auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersAwsOfferingMdeAutoProvisioning - The Microsoft Defender for Endpoint autoprovisioning configuration

func (DefenderForServersAwsOfferingMdeAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingMdeAutoProvisioning.

func (*DefenderForServersAwsOfferingMdeAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingMdeAutoProvisioning.

type DefenderForServersAwsOfferingSubPlan added in v0.8.0

type DefenderForServersAwsOfferingSubPlan struct {
	// The available sub plans
	Type *SubPlan `json:"type,omitempty"`
}

DefenderForServersAwsOfferingSubPlan - configuration for the servers offering subPlan

func (DefenderForServersAwsOfferingSubPlan) MarshalJSON added in v0.8.0

func (d DefenderForServersAwsOfferingSubPlan) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingSubPlan.

func (*DefenderForServersAwsOfferingSubPlan) UnmarshalJSON added in v0.8.0

func (d *DefenderForServersAwsOfferingSubPlan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingSubPlan.

type DefenderForServersAwsOfferingVMScanners added in v0.8.0

type DefenderForServersAwsOfferingVMScanners struct {
	// configuration for Microsoft Defender for Server VM scanning
	Configuration *DefenderForServersAwsOfferingVMScannersConfiguration `json:"configuration,omitempty"`

	// Is Microsoft Defender for Server VM scanning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersAwsOfferingVMScanners - The Microsoft Defender for Server VM scanning configuration

func (DefenderForServersAwsOfferingVMScanners) MarshalJSON added in v0.8.0

func (d DefenderForServersAwsOfferingVMScanners) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingVMScanners.

func (*DefenderForServersAwsOfferingVMScanners) UnmarshalJSON added in v0.8.0

func (d *DefenderForServersAwsOfferingVMScanners) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingVMScanners.

type DefenderForServersAwsOfferingVMScannersConfiguration added in v0.8.0

type DefenderForServersAwsOfferingVMScannersConfiguration struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`

	// VM tags that indicates that VM should not be scanned
	ExclusionTags map[string]*string `json:"exclusionTags,omitempty"`

	// The scanning mode for the vm scan.
	ScanningMode *ScanningMode `json:"scanningMode,omitempty"`
}

DefenderForServersAwsOfferingVMScannersConfiguration - configuration for Microsoft Defender for Server VM scanning

func (DefenderForServersAwsOfferingVMScannersConfiguration) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingVMScannersConfiguration.

func (*DefenderForServersAwsOfferingVMScannersConfiguration) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingVMScannersConfiguration.

type DefenderForServersAwsOfferingVaAutoProvisioning added in v0.8.0

type DefenderForServersAwsOfferingVaAutoProvisioning struct {
	// configuration for Vulnerability Assessment autoprovisioning
	Configuration *DefenderForServersAwsOfferingVaAutoProvisioningConfiguration `json:"configuration,omitempty"`

	// Is Vulnerability Assessment auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersAwsOfferingVaAutoProvisioning - The Vulnerability Assessment autoprovisioning configuration

func (DefenderForServersAwsOfferingVaAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingVaAutoProvisioning.

func (*DefenderForServersAwsOfferingVaAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingVaAutoProvisioning.

type DefenderForServersAwsOfferingVaAutoProvisioningConfiguration added in v0.8.0

type DefenderForServersAwsOfferingVaAutoProvisioningConfiguration struct {
	// The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'
	Type *Type `json:"type,omitempty"`
}

DefenderForServersAwsOfferingVaAutoProvisioningConfiguration - configuration for Vulnerability Assessment autoprovisioning

func (DefenderForServersAwsOfferingVaAutoProvisioningConfiguration) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.

func (*DefenderForServersAwsOfferingVaAutoProvisioningConfiguration) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.

type DefenderForServersGcpOffering added in v0.8.0

type DefenderForServersGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderForServersGcpOfferingArcAutoProvisioning `json:"arcAutoProvisioning,omitempty"`

	// The Defender for servers connection configuration
	DefenderForServers *DefenderForServersGcpOfferingDefenderForServers `json:"defenderForServers,omitempty"`

	// The Microsoft Defender for Endpoint autoprovisioning configuration
	MdeAutoProvisioning *DefenderForServersGcpOfferingMdeAutoProvisioning `json:"mdeAutoProvisioning,omitempty"`

	// configuration for the servers offering subPlan
	SubPlan *DefenderForServersGcpOfferingSubPlan `json:"subPlan,omitempty"`

	// The Vulnerability Assessment autoprovisioning configuration
	VaAutoProvisioning *DefenderForServersGcpOfferingVaAutoProvisioning `json:"vaAutoProvisioning,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

DefenderForServersGcpOffering - The Defender for Servers GCP offering configurations

func (*DefenderForServersGcpOffering) GetCloudOffering added in v0.8.0

func (d *DefenderForServersGcpOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type DefenderForServersGcpOffering.

func (DefenderForServersGcpOffering) MarshalJSON added in v0.8.0

func (d DefenderForServersGcpOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOffering.

func (*DefenderForServersGcpOffering) UnmarshalJSON added in v0.8.0

func (d *DefenderForServersGcpOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOffering.

type DefenderForServersGcpOfferingArcAutoProvisioning added in v0.8.0

type DefenderForServersGcpOfferingArcAutoProvisioning struct {
	// Is arc auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersGcpOfferingArcAutoProvisioning - The ARC autoprovisioning configuration

func (DefenderForServersGcpOfferingArcAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingArcAutoProvisioning.

func (*DefenderForServersGcpOfferingArcAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingArcAutoProvisioning.

type DefenderForServersGcpOfferingDefenderForServers added in v0.8.0

type DefenderForServersGcpOfferingDefenderForServers struct {
	// The service account email address in GCP for this feature
	ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty"`

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string `json:"workloadIdentityProviderId,omitempty"`
}

DefenderForServersGcpOfferingDefenderForServers - The Defender for servers connection configuration

func (DefenderForServersGcpOfferingDefenderForServers) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingDefenderForServers.

func (*DefenderForServersGcpOfferingDefenderForServers) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingDefenderForServers.

type DefenderForServersGcpOfferingMdeAutoProvisioning added in v0.8.0

type DefenderForServersGcpOfferingMdeAutoProvisioning struct {
	// configuration for Microsoft Defender for Endpoint autoprovisioning
	Configuration interface{} `json:"configuration,omitempty"`

	// Is Microsoft Defender for Endpoint auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersGcpOfferingMdeAutoProvisioning - The Microsoft Defender for Endpoint autoprovisioning configuration

func (DefenderForServersGcpOfferingMdeAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingMdeAutoProvisioning.

func (*DefenderForServersGcpOfferingMdeAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingMdeAutoProvisioning.

type DefenderForServersGcpOfferingSubPlan added in v0.8.0

type DefenderForServersGcpOfferingSubPlan struct {
	// The available sub plans
	Type *SubPlan `json:"type,omitempty"`
}

DefenderForServersGcpOfferingSubPlan - configuration for the servers offering subPlan

func (DefenderForServersGcpOfferingSubPlan) MarshalJSON added in v0.8.0

func (d DefenderForServersGcpOfferingSubPlan) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingSubPlan.

func (*DefenderForServersGcpOfferingSubPlan) UnmarshalJSON added in v0.8.0

func (d *DefenderForServersGcpOfferingSubPlan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingSubPlan.

type DefenderForServersGcpOfferingVaAutoProvisioning added in v0.8.0

type DefenderForServersGcpOfferingVaAutoProvisioning struct {
	// configuration for Vulnerability Assessment autoprovisioning
	Configuration *DefenderForServersGcpOfferingVaAutoProvisioningConfiguration `json:"configuration,omitempty"`

	// Is Vulnerability Assessment auto provisioning enabled
	Enabled *bool `json:"enabled,omitempty"`
}

DefenderForServersGcpOfferingVaAutoProvisioning - The Vulnerability Assessment autoprovisioning configuration

func (DefenderForServersGcpOfferingVaAutoProvisioning) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingVaAutoProvisioning.

func (*DefenderForServersGcpOfferingVaAutoProvisioning) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingVaAutoProvisioning.

type DefenderForServersGcpOfferingVaAutoProvisioningConfiguration added in v0.8.0

type DefenderForServersGcpOfferingVaAutoProvisioningConfiguration struct {
	// The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'
	Type *Type `json:"type,omitempty"`
}

DefenderForServersGcpOfferingVaAutoProvisioningConfiguration - configuration for Vulnerability Assessment autoprovisioning

func (DefenderForServersGcpOfferingVaAutoProvisioningConfiguration) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.

func (*DefenderForServersGcpOfferingVaAutoProvisioningConfiguration) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.

type DenylistCustomAlertRule

type DenylistCustomAlertRule struct {
	// REQUIRED; The values to deny. The format of the values depends on the rule type.
	DenylistValues []*string `json:"denylistValues,omitempty"`

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

DenylistCustomAlertRule - A custom alert rule that checks if a value (depends on the custom alert type) is denied.

func (*DenylistCustomAlertRule) GetCustomAlertRule added in v0.3.0

func (d *DenylistCustomAlertRule) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type DenylistCustomAlertRule.

func (*DenylistCustomAlertRule) GetListCustomAlertRule added in v0.3.0

func (d *DenylistCustomAlertRule) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type DenylistCustomAlertRule.

func (DenylistCustomAlertRule) MarshalJSON

func (d DenylistCustomAlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenylistCustomAlertRule.

func (*DenylistCustomAlertRule) UnmarshalJSON

func (d *DenylistCustomAlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenylistCustomAlertRule.

type DeviceSecurityGroup

type DeviceSecurityGroup struct {
	// Device Security group data
	Properties *DeviceSecurityGroupProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

DeviceSecurityGroup - The device security group resource

func (DeviceSecurityGroup) MarshalJSON

func (d DeviceSecurityGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeviceSecurityGroup.

func (*DeviceSecurityGroup) UnmarshalJSON

func (d *DeviceSecurityGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeviceSecurityGroup.

type DeviceSecurityGroupList

type DeviceSecurityGroupList struct {
	// List of device security group objects
	Value []*DeviceSecurityGroup `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

DeviceSecurityGroupList - List of device security groups

func (DeviceSecurityGroupList) MarshalJSON

func (d DeviceSecurityGroupList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeviceSecurityGroupList.

func (*DeviceSecurityGroupList) UnmarshalJSON added in v0.8.0

func (d *DeviceSecurityGroupList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeviceSecurityGroupList.

type DeviceSecurityGroupProperties

type DeviceSecurityGroupProperties struct {
	// The allow-list custom alert rules.
	AllowlistRules []AllowlistCustomAlertRuleClassification `json:"allowlistRules,omitempty"`

	// The deny-list custom alert rules.
	DenylistRules []*DenylistCustomAlertRule `json:"denylistRules,omitempty"`

	// The list of custom alert threshold rules.
	ThresholdRules []ThresholdCustomAlertRuleClassification `json:"thresholdRules,omitempty"`

	// The list of custom alert time-window rules.
	TimeWindowRules []TimeWindowCustomAlertRuleClassification `json:"timeWindowRules,omitempty"`
}

DeviceSecurityGroupProperties - describes properties of a security group.

func (DeviceSecurityGroupProperties) MarshalJSON

func (d DeviceSecurityGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeviceSecurityGroupProperties.

func (*DeviceSecurityGroupProperties) UnmarshalJSON

func (d *DeviceSecurityGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeviceSecurityGroupProperties.

type DeviceSecurityGroupsClient

type DeviceSecurityGroupsClient struct {
	// contains filtered or unexported fields
}

DeviceSecurityGroupsClient contains the methods for the DeviceSecurityGroups group. Don't use this type directly, use NewDeviceSecurityGroupsClient() instead.

func NewDeviceSecurityGroupsClient

func NewDeviceSecurityGroupsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DeviceSecurityGroupsClient, error)

NewDeviceSecurityGroupsClient creates a new instance of DeviceSecurityGroupsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DeviceSecurityGroupsClient) CreateOrUpdate

func (client *DeviceSecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceID string, deviceSecurityGroupName string, deviceSecurityGroup DeviceSecurityGroup, options *DeviceSecurityGroupsClientCreateOrUpdateOptions) (DeviceSecurityGroupsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Use this method to creates or updates the device security group on a specified IoT Hub resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceID - The identifier of the resource. deviceSecurityGroupName - The name of the device security group. Note that the name of the device security group is case insensitive. deviceSecurityGroup - Security group object. options - DeviceSecurityGroupsClientCreateOrUpdateOptions contains the optional parameters for the DeviceSecurityGroupsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/PutDeviceSecurityGroups_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDeviceSecurityGroupsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", "samplesecuritygroup", armsecurity.DeviceSecurityGroup{
		Properties: &armsecurity.DeviceSecurityGroupProperties{
			TimeWindowRules: []armsecurity.TimeWindowCustomAlertRuleClassification{
				&armsecurity.ActiveConnectionsNotInAllowedRange{
					IsEnabled:      to.Ptr(true),
					RuleType:       to.Ptr("ActiveConnectionsNotInAllowedRange"),
					MaxThreshold:   to.Ptr[int32](30),
					MinThreshold:   to.Ptr[int32](0),
					TimeWindowSize: to.Ptr("PT05M"),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DeviceSecurityGroupsClient) Delete

Delete - User this method to deletes the device security group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceID - The identifier of the resource. deviceSecurityGroupName - The name of the device security group. Note that the name of the device security group is case insensitive. options - DeviceSecurityGroupsClientDeleteOptions contains the optional parameters for the DeviceSecurityGroupsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/DeleteDeviceSecurityGroups_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDeviceSecurityGroupsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", "samplesecuritygroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DeviceSecurityGroupsClient) Get

Get - Use this method to get the device security group for the specified IoT Hub resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceID - The identifier of the resource. deviceSecurityGroupName - The name of the device security group. Note that the name of the device security group is case insensitive. options - DeviceSecurityGroupsClientGetOptions contains the optional parameters for the DeviceSecurityGroupsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/GetDeviceSecurityGroups_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDeviceSecurityGroupsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", "samplesecuritygroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DeviceSecurityGroupsClient) NewListPager added in v0.6.0

NewListPager - Use this method get the list of device security groups for the specified IoT Hub resource. Generated from API version 2019-08-01 resourceID - The identifier of the resource. options - DeviceSecurityGroupsClientListOptions contains the optional parameters for the DeviceSecurityGroupsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/ListDeviceSecurityGroups_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDeviceSecurityGroupsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DeviceSecurityGroupsClientCreateOrUpdateOptions added in v0.3.0

type DeviceSecurityGroupsClientCreateOrUpdateOptions struct {
}

DeviceSecurityGroupsClientCreateOrUpdateOptions contains the optional parameters for the DeviceSecurityGroupsClient.CreateOrUpdate method.

type DeviceSecurityGroupsClientCreateOrUpdateResponse added in v0.3.0

type DeviceSecurityGroupsClientCreateOrUpdateResponse struct {
	DeviceSecurityGroup
}

DeviceSecurityGroupsClientCreateOrUpdateResponse contains the response from method DeviceSecurityGroupsClient.CreateOrUpdate.

type DeviceSecurityGroupsClientDeleteOptions added in v0.3.0

type DeviceSecurityGroupsClientDeleteOptions struct {
}

DeviceSecurityGroupsClientDeleteOptions contains the optional parameters for the DeviceSecurityGroupsClient.Delete method.

type DeviceSecurityGroupsClientDeleteResponse added in v0.3.0

type DeviceSecurityGroupsClientDeleteResponse struct {
}

DeviceSecurityGroupsClientDeleteResponse contains the response from method DeviceSecurityGroupsClient.Delete.

type DeviceSecurityGroupsClientGetOptions added in v0.3.0

type DeviceSecurityGroupsClientGetOptions struct {
}

DeviceSecurityGroupsClientGetOptions contains the optional parameters for the DeviceSecurityGroupsClient.Get method.

type DeviceSecurityGroupsClientGetResponse added in v0.3.0

type DeviceSecurityGroupsClientGetResponse struct {
	DeviceSecurityGroup
}

DeviceSecurityGroupsClientGetResponse contains the response from method DeviceSecurityGroupsClient.Get.

type DeviceSecurityGroupsClientListOptions added in v0.3.0

type DeviceSecurityGroupsClientListOptions struct {
}

DeviceSecurityGroupsClientListOptions contains the optional parameters for the DeviceSecurityGroupsClient.List method.

type DeviceSecurityGroupsClientListResponse added in v0.3.0

type DeviceSecurityGroupsClientListResponse struct {
	DeviceSecurityGroupList
}

DeviceSecurityGroupsClientListResponse contains the response from method DeviceSecurityGroupsClient.List.

type DirectMethodInvokesNotInAllowedRange

type DirectMethodInvokesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

DirectMethodInvokesNotInAllowedRange - Number of direct method invokes is not in allowed range.

func (*DirectMethodInvokesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (d *DirectMethodInvokesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type DirectMethodInvokesNotInAllowedRange.

func (*DirectMethodInvokesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (d *DirectMethodInvokesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type DirectMethodInvokesNotInAllowedRange.

func (*DirectMethodInvokesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (d *DirectMethodInvokesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type DirectMethodInvokesNotInAllowedRange.

func (DirectMethodInvokesNotInAllowedRange) MarshalJSON

func (d DirectMethodInvokesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DirectMethodInvokesNotInAllowedRange.

func (*DirectMethodInvokesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (d *DirectMethodInvokesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DirectMethodInvokesNotInAllowedRange.

type Direction

type Direction string

Direction - The rule's direction

const (
	DirectionInbound  Direction = "Inbound"
	DirectionOutbound Direction = "Outbound"
)

func PossibleDirectionValues

func PossibleDirectionValues() []Direction

PossibleDirectionValues returns the possible values for the Direction const type.

type DiscoveredSecuritySolution

type DiscoveredSecuritySolution struct {
	// REQUIRED
	Properties *DiscoveredSecuritySolutionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (DiscoveredSecuritySolution) MarshalJSON

func (d DiscoveredSecuritySolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiscoveredSecuritySolution.

func (*DiscoveredSecuritySolution) UnmarshalJSON

func (d *DiscoveredSecuritySolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveredSecuritySolution.

type DiscoveredSecuritySolutionList

type DiscoveredSecuritySolutionList struct {
	Value []*DiscoveredSecuritySolution `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

func (DiscoveredSecuritySolutionList) MarshalJSON

func (d DiscoveredSecuritySolutionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiscoveredSecuritySolutionList.

func (*DiscoveredSecuritySolutionList) UnmarshalJSON added in v0.8.0

func (d *DiscoveredSecuritySolutionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveredSecuritySolutionList.

type DiscoveredSecuritySolutionProperties

type DiscoveredSecuritySolutionProperties struct {
	// REQUIRED; The security solutions' image offer
	Offer *string `json:"offer,omitempty"`

	// REQUIRED; The security solutions' image publisher
	Publisher *string `json:"publisher,omitempty"`

	// REQUIRED; The security solutions' image sku
	SKU *string `json:"sku,omitempty"`

	// REQUIRED; The security family of the discovered solution
	SecurityFamily *SecurityFamily `json:"securityFamily,omitempty"`
}

func (DiscoveredSecuritySolutionProperties) MarshalJSON added in v0.8.0

func (d DiscoveredSecuritySolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiscoveredSecuritySolutionProperties.

func (*DiscoveredSecuritySolutionProperties) UnmarshalJSON added in v0.8.0

func (d *DiscoveredSecuritySolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveredSecuritySolutionProperties.

type DiscoveredSecuritySolutionsClient

type DiscoveredSecuritySolutionsClient struct {
	// contains filtered or unexported fields
}

DiscoveredSecuritySolutionsClient contains the methods for the DiscoveredSecuritySolutions group. Don't use this type directly, use NewDiscoveredSecuritySolutionsClient() instead.

func NewDiscoveredSecuritySolutionsClient

func NewDiscoveredSecuritySolutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiscoveredSecuritySolutionsClient, error)

NewDiscoveredSecuritySolutionsClient creates a new instance of DiscoveredSecuritySolutionsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DiscoveredSecuritySolutionsClient) Get

func (client *DiscoveredSecuritySolutionsClient) Get(ctx context.Context, resourceGroupName string, ascLocation string, discoveredSecuritySolutionName string, options *DiscoveredSecuritySolutionsClientGetOptions) (DiscoveredSecuritySolutionsClientGetResponse, error)

Get - Gets a specific discovered Security Solution. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations discoveredSecuritySolutionName - Name of a discovered security solution. options - DiscoveredSecuritySolutionsClientGetOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions/GetDiscoveredSecuritySolutionResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDiscoveredSecuritySolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myRg2", "centralus", "paloalto7", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DiscoveredSecuritySolutionsClient) NewListByHomeRegionPager added in v0.6.0

NewListByHomeRegionPager - Gets a list of discovered Security Solutions for the subscription and location. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - DiscoveredSecuritySolutionsClientListByHomeRegionOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.ListByHomeRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions/GetDiscoveredSecuritySolutionsSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDiscoveredSecuritySolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DiscoveredSecuritySolutionsClient) NewListPager added in v0.6.0

NewListPager - Gets a list of discovered Security Solutions for the subscription. Generated from API version 2020-01-01 options - DiscoveredSecuritySolutionsClientListOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions/GetDiscoveredSecuritySolutionsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewDiscoveredSecuritySolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DiscoveredSecuritySolutionsClientGetOptions added in v0.3.0

type DiscoveredSecuritySolutionsClientGetOptions struct {
}

DiscoveredSecuritySolutionsClientGetOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.Get method.

type DiscoveredSecuritySolutionsClientGetResponse added in v0.3.0

type DiscoveredSecuritySolutionsClientGetResponse struct {
	DiscoveredSecuritySolution
}

DiscoveredSecuritySolutionsClientGetResponse contains the response from method DiscoveredSecuritySolutionsClient.Get.

type DiscoveredSecuritySolutionsClientListByHomeRegionOptions added in v0.3.0

type DiscoveredSecuritySolutionsClientListByHomeRegionOptions struct {
}

DiscoveredSecuritySolutionsClientListByHomeRegionOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.ListByHomeRegion method.

type DiscoveredSecuritySolutionsClientListByHomeRegionResponse added in v0.3.0

type DiscoveredSecuritySolutionsClientListByHomeRegionResponse struct {
	DiscoveredSecuritySolutionList
}

DiscoveredSecuritySolutionsClientListByHomeRegionResponse contains the response from method DiscoveredSecuritySolutionsClient.ListByHomeRegion.

type DiscoveredSecuritySolutionsClientListOptions added in v0.3.0

type DiscoveredSecuritySolutionsClientListOptions struct {
}

DiscoveredSecuritySolutionsClientListOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.List method.

type DiscoveredSecuritySolutionsClientListResponse added in v0.3.0

type DiscoveredSecuritySolutionsClientListResponse struct {
	DiscoveredSecuritySolutionList
}

DiscoveredSecuritySolutionsClientListResponse contains the response from method DiscoveredSecuritySolutionsClient.List.

type ETag

type ETag struct {
	// Entity tag is used for comparing two or more entities from the same requested resource.
	Etag *string `json:"etag,omitempty"`
}

ETag - Entity tag is used for comparing two or more entities from the same requested resource.

func (ETag) MarshalJSON

func (e ETag) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ETag.

func (*ETag) UnmarshalJSON

func (e *ETag) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ETag.

type EffectiveNetworkSecurityGroups

type EffectiveNetworkSecurityGroups struct {
	// The Azure resource ID of the network interface
	NetworkInterface *string `json:"networkInterface,omitempty"`

	// The Network Security Groups effective on the network interface
	NetworkSecurityGroups []*string `json:"networkSecurityGroups,omitempty"`
}

EffectiveNetworkSecurityGroups - Describes the Network Security Groups effective on a network interface

func (EffectiveNetworkSecurityGroups) MarshalJSON

func (e EffectiveNetworkSecurityGroups) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroups.

func (*EffectiveNetworkSecurityGroups) UnmarshalJSON added in v0.8.0

func (e *EffectiveNetworkSecurityGroups) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroups.

type EndOfSupportStatus

type EndOfSupportStatus string

EndOfSupportStatus - End of support status.

const (
	EndOfSupportStatusNoLongerSupported                EndOfSupportStatus = "noLongerSupported"
	EndOfSupportStatusNone                             EndOfSupportStatus = "None"
	EndOfSupportStatusUpcomingNoLongerSupported        EndOfSupportStatus = "upcomingNoLongerSupported"
	EndOfSupportStatusUpcomingVersionNoLongerSupported EndOfSupportStatus = "upcomingVersionNoLongerSupported"
	EndOfSupportStatusVersionNoLongerSupported         EndOfSupportStatus = "versionNoLongerSupported"
)

func PossibleEndOfSupportStatusValues

func PossibleEndOfSupportStatusValues() []EndOfSupportStatus

PossibleEndOfSupportStatusValues returns the possible values for the EndOfSupportStatus const type.

type EnforcementMode

type EnforcementMode string

EnforcementMode - The application control policy enforcement/protection mode of the machine group

const (
	EnforcementModeAudit   EnforcementMode = "Audit"
	EnforcementModeEnforce EnforcementMode = "Enforce"
	EnforcementModeNone    EnforcementMode = "None"
)

func PossibleEnforcementModeValues

func PossibleEnforcementModeValues() []EnforcementMode

PossibleEnforcementModeValues returns the possible values for the EnforcementMode const type.

type EnforcementSupport

type EnforcementSupport string

EnforcementSupport - The machine supportability of Enforce feature

const (
	EnforcementSupportNotSupported EnforcementSupport = "NotSupported"
	EnforcementSupportSupported    EnforcementSupport = "Supported"
	EnforcementSupportUnknown      EnforcementSupport = "Unknown"
)

func PossibleEnforcementSupportValues

func PossibleEnforcementSupportValues() []EnforcementSupport

PossibleEnforcementSupportValues returns the possible values for the EnforcementSupport const type.

type EnvironmentData added in v0.8.0

type EnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType `json:"environmentType,omitempty"`
}

EnvironmentData - The security connector environment data.

func (*EnvironmentData) GetEnvironmentData added in v0.8.0

func (e *EnvironmentData) GetEnvironmentData() *EnvironmentData

GetEnvironmentData implements the EnvironmentDataClassification interface for type EnvironmentData.

func (EnvironmentData) MarshalJSON added in v0.8.0

func (e EnvironmentData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EnvironmentData.

func (*EnvironmentData) UnmarshalJSON added in v0.8.0

func (e *EnvironmentData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentData.

type EnvironmentDataClassification added in v0.8.0

type EnvironmentDataClassification interface {
	// GetEnvironmentData returns the EnvironmentData content of the underlying type.
	GetEnvironmentData() *EnvironmentData
}

EnvironmentDataClassification provides polymorphic access to related types. Call the interface's GetEnvironmentData() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AwsEnvironmentData, *AzureDevOpsScopeEnvironmentData, *EnvironmentData, *GcpProjectEnvironmentData, *GithubScopeEnvironmentData

type EnvironmentType added in v0.8.0

type EnvironmentType string

EnvironmentType - The type of the environment data.

const (
	EnvironmentTypeAwsAccount       EnvironmentType = "AwsAccount"
	EnvironmentTypeAzureDevOpsScope EnvironmentType = "AzureDevOpsScope"
	EnvironmentTypeGcpProject       EnvironmentType = "GcpProject"
	EnvironmentTypeGithubScope      EnvironmentType = "GithubScope"
)

func PossibleEnvironmentTypeValues added in v0.8.0

func PossibleEnvironmentTypeValues() []EnvironmentType

PossibleEnvironmentTypeValues returns the possible values for the EnvironmentType const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v0.8.0

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v0.8.0

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type EventSource

type EventSource string

EventSource - A valid event source type.

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"
)

func PossibleEventSourceValues

func PossibleEventSourceValues() []EventSource

PossibleEventSourceValues returns the possible values for the EventSource const type.

type ExecuteGovernanceRuleParams added in v0.8.0

type ExecuteGovernanceRuleParams struct {
	// Describe if governance rule should be override
	Override *bool `json:"override,omitempty"`
}

ExecuteGovernanceRuleParams - Governance rule execution parameters

func (ExecuteGovernanceRuleParams) MarshalJSON added in v0.8.0

func (e ExecuteGovernanceRuleParams) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExecuteGovernanceRuleParams.

func (*ExecuteGovernanceRuleParams) UnmarshalJSON added in v0.8.0

func (e *ExecuteGovernanceRuleParams) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExecuteGovernanceRuleParams.

type ExecuteRuleStatus added in v0.8.0

type ExecuteRuleStatus struct {
	// READ-ONLY; Unique key for the execution of GovernanceRule
	OperationID *string `json:"operationId,omitempty" azure:"ro"`
}

ExecuteRuleStatus - Execute status of Security GovernanceRule over a given scope

func (ExecuteRuleStatus) MarshalJSON added in v0.8.0

func (e ExecuteRuleStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExecuteRuleStatus.

func (*ExecuteRuleStatus) UnmarshalJSON added in v0.8.0

func (e *ExecuteRuleStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExecuteRuleStatus.

type ExpandControlsEnum

type ExpandControlsEnum string
const (
	// ExpandControlsEnumDefinition - Add definition object for each control
	ExpandControlsEnumDefinition ExpandControlsEnum = "definition"
)

func PossibleExpandControlsEnumValues

func PossibleExpandControlsEnumValues() []ExpandControlsEnum

PossibleExpandControlsEnumValues returns the possible values for the ExpandControlsEnum const type.

type ExpandEnum

type ExpandEnum string
const (
	// ExpandEnumLinks - All links associated with an assessment
	ExpandEnumLinks ExpandEnum = "links"
	// ExpandEnumMetadata - Assessment metadata
	ExpandEnumMetadata ExpandEnum = "metadata"
)

func PossibleExpandEnumValues

func PossibleExpandEnumValues() []ExpandEnum

PossibleExpandEnumValues returns the possible values for the ExpandEnum const type.

type ExportData

type ExportData string
const (
	// ExportDataRawEvents - Agent raw events
	ExportDataRawEvents ExportData = "RawEvents"
)

func PossibleExportDataValues

func PossibleExportDataValues() []ExportData

PossibleExportDataValues returns the possible values for the ExportData const type.

type ExternalSecuritySolution

type ExternalSecuritySolution struct {
	// The kind of the external solution
	Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ExternalSecuritySolution - Represents a security solution external to Microsoft Defender for Cloud which sends information to an OMS workspace and whose data is displayed by Microsoft Defender for Cloud.

func (ExternalSecuritySolution) MarshalJSON

func (e ExternalSecuritySolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExternalSecuritySolution.

func (*ExternalSecuritySolution) UnmarshalJSON added in v0.8.0

func (e *ExternalSecuritySolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalSecuritySolution.

type ExternalSecuritySolutionKind

type ExternalSecuritySolutionKind string

ExternalSecuritySolutionKind - The kind of the external solution

const (
	ExternalSecuritySolutionKindAAD ExternalSecuritySolutionKind = "AAD"
	ExternalSecuritySolutionKindATA ExternalSecuritySolutionKind = "ATA"
	ExternalSecuritySolutionKindCEF ExternalSecuritySolutionKind = "CEF"
)

func PossibleExternalSecuritySolutionKindValues

func PossibleExternalSecuritySolutionKindValues() []ExternalSecuritySolutionKind

PossibleExternalSecuritySolutionKindValues returns the possible values for the ExternalSecuritySolutionKind const type.

type ExternalSecuritySolutionKindAutoGenerated

type ExternalSecuritySolutionKindAutoGenerated struct {
	// The kind of the external solution
	Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"`
}

ExternalSecuritySolutionKindAutoGenerated - Describes an Azure resource with kind

func (ExternalSecuritySolutionKindAutoGenerated) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ExternalSecuritySolutionKindAutoGenerated.

func (*ExternalSecuritySolutionKindAutoGenerated) UnmarshalJSON

func (e *ExternalSecuritySolutionKindAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalSecuritySolutionKindAutoGenerated.

type ExternalSecuritySolutionList

type ExternalSecuritySolutionList struct {
	Value []*ExternalSecuritySolution `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

func (ExternalSecuritySolutionList) MarshalJSON

func (e ExternalSecuritySolutionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExternalSecuritySolutionList.

func (*ExternalSecuritySolutionList) UnmarshalJSON added in v0.8.0

func (e *ExternalSecuritySolutionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalSecuritySolutionList.

type ExternalSecuritySolutionProperties

type ExternalSecuritySolutionProperties struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}
	DeviceType           *string `json:"deviceType,omitempty"`
	DeviceVendor         *string `json:"deviceVendor,omitempty"`

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace `json:"workspace,omitempty"`
}

ExternalSecuritySolutionProperties - The solution properties (correspond to the solution kind)

func (ExternalSecuritySolutionProperties) MarshalJSON

func (e ExternalSecuritySolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExternalSecuritySolutionProperties.

func (*ExternalSecuritySolutionProperties) UnmarshalJSON

func (e *ExternalSecuritySolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalSecuritySolutionProperties.

type ExternalSecuritySolutionsClient

type ExternalSecuritySolutionsClient struct {
	// contains filtered or unexported fields
}

ExternalSecuritySolutionsClient contains the methods for the ExternalSecuritySolutions group. Don't use this type directly, use NewExternalSecuritySolutionsClient() instead.

func NewExternalSecuritySolutionsClient

func NewExternalSecuritySolutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExternalSecuritySolutionsClient, error)

NewExternalSecuritySolutionsClient creates a new instance of ExternalSecuritySolutionsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ExternalSecuritySolutionsClient) Get

func (client *ExternalSecuritySolutionsClient) Get(ctx context.Context, resourceGroupName string, ascLocation string, externalSecuritySolutionsName string, options *ExternalSecuritySolutionsClientGetOptions) (ExternalSecuritySolutionsClientGetResponse, error)

Get - Gets a specific external Security Solution. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations externalSecuritySolutionsName - Name of an external security solution. options - ExternalSecuritySolutionsClientGetOptions contains the optional parameters for the ExternalSecuritySolutionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/GetExternalSecuritySolution_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewExternalSecuritySolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "defaultresourcegroup-eus", "centralus", "aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ExternalSecuritySolutionsClient) NewListByHomeRegionPager added in v0.6.0

NewListByHomeRegionPager - Gets a list of external Security Solutions for the subscription and location. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - ExternalSecuritySolutionsClientListByHomeRegionOptions contains the optional parameters for the ExternalSecuritySolutionsClient.ListByHomeRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/GetExternalSecuritySolutionsSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewExternalSecuritySolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ExternalSecuritySolutionsClient) NewListPager added in v0.6.0

NewListPager - Gets a list of external security solutions for the subscription. Generated from API version 2020-01-01 options - ExternalSecuritySolutionsClientListOptions contains the optional parameters for the ExternalSecuritySolutionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/GetExternalSecuritySolutionsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewExternalSecuritySolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ExternalSecuritySolutionsClientGetOptions added in v0.3.0

type ExternalSecuritySolutionsClientGetOptions struct {
}

ExternalSecuritySolutionsClientGetOptions contains the optional parameters for the ExternalSecuritySolutionsClient.Get method.

type ExternalSecuritySolutionsClientGetResponse added in v0.3.0

type ExternalSecuritySolutionsClientGetResponse struct {
	ExternalSecuritySolution
}

ExternalSecuritySolutionsClientGetResponse contains the response from method ExternalSecuritySolutionsClient.Get.

type ExternalSecuritySolutionsClientListByHomeRegionOptions added in v0.3.0

type ExternalSecuritySolutionsClientListByHomeRegionOptions struct {
}

ExternalSecuritySolutionsClientListByHomeRegionOptions contains the optional parameters for the ExternalSecuritySolutionsClient.ListByHomeRegion method.

type ExternalSecuritySolutionsClientListByHomeRegionResponse added in v0.3.0

type ExternalSecuritySolutionsClientListByHomeRegionResponse struct {
	ExternalSecuritySolutionList
}

ExternalSecuritySolutionsClientListByHomeRegionResponse contains the response from method ExternalSecuritySolutionsClient.ListByHomeRegion.

type ExternalSecuritySolutionsClientListOptions added in v0.3.0

type ExternalSecuritySolutionsClientListOptions struct {
}

ExternalSecuritySolutionsClientListOptions contains the optional parameters for the ExternalSecuritySolutionsClient.List method.

type ExternalSecuritySolutionsClientListResponse added in v0.3.0

type ExternalSecuritySolutionsClientListResponse struct {
	ExternalSecuritySolutionList
}

ExternalSecuritySolutionsClientListResponse contains the response from method ExternalSecuritySolutionsClient.List.

type FailedLocalLoginsNotInAllowedRange

type FailedLocalLoginsNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

FailedLocalLoginsNotInAllowedRange - Number of failed local logins is not in allowed range.

func (*FailedLocalLoginsNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (f *FailedLocalLoginsNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type FailedLocalLoginsNotInAllowedRange.

func (*FailedLocalLoginsNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (f *FailedLocalLoginsNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type FailedLocalLoginsNotInAllowedRange.

func (*FailedLocalLoginsNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (f *FailedLocalLoginsNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type FailedLocalLoginsNotInAllowedRange.

func (FailedLocalLoginsNotInAllowedRange) MarshalJSON

func (f FailedLocalLoginsNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FailedLocalLoginsNotInAllowedRange.

func (*FailedLocalLoginsNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (f *FailedLocalLoginsNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FailedLocalLoginsNotInAllowedRange.

type FileType

type FileType string

FileType - The type of the file (for Linux files - Executable is used)

const (
	FileTypeDll        FileType = "Dll"
	FileTypeExe        FileType = "Exe"
	FileTypeExecutable FileType = "Executable"
	FileTypeMsi        FileType = "Msi"
	FileTypeScript     FileType = "Script"
	FileTypeUnknown    FileType = "Unknown"
)

func PossibleFileTypeValues

func PossibleFileTypeValues() []FileType

PossibleFileTypeValues returns the possible values for the FileType const type.

type FileUploadsNotInAllowedRange

type FileUploadsNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

FileUploadsNotInAllowedRange - Number of file uploads is not in allowed range.

func (*FileUploadsNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (f *FileUploadsNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type FileUploadsNotInAllowedRange.

func (*FileUploadsNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (f *FileUploadsNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type FileUploadsNotInAllowedRange.

func (*FileUploadsNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (f *FileUploadsNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type FileUploadsNotInAllowedRange.

func (FileUploadsNotInAllowedRange) MarshalJSON

func (f FileUploadsNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FileUploadsNotInAllowedRange.

func (*FileUploadsNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (f *FileUploadsNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FileUploadsNotInAllowedRange.

type GcpCredentialsDetailsProperties

type GcpCredentialsDetailsProperties struct {
	// REQUIRED; Auth provider x509 certificate URL field of the API key (write only)
	AuthProviderX509CertURL *string `json:"authProviderX509CertUrl,omitempty"`

	// REQUIRED; Auth URI field of the API key (write only)
	AuthURI *string `json:"authUri,omitempty"`

	// REQUIRED; Connect to your cloud account, for AWS use either account credentials or role-based authentication. For GCP use
	// account organization credentials.
	AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"`

	// REQUIRED; Client email field of the API key (write only)
	ClientEmail *string `json:"clientEmail,omitempty"`

	// REQUIRED; Client ID field of the API key (write only)
	ClientID *string `json:"clientId,omitempty"`

	// REQUIRED; Client x509 certificate URL field of the API key (write only)
	ClientX509CertURL *string `json:"clientX509CertUrl,omitempty"`

	// REQUIRED; The organization ID of the GCP cloud account
	OrganizationID *string `json:"organizationId,omitempty"`

	// REQUIRED; Private key field of the API key (write only)
	PrivateKey *string `json:"privateKey,omitempty"`

	// REQUIRED; Private key ID field of the API key (write only)
	PrivateKeyID *string `json:"privateKeyId,omitempty"`

	// REQUIRED; Project ID field of the API key (write only)
	ProjectID *string `json:"projectId,omitempty"`

	// REQUIRED; Token URI field of the API key (write only)
	TokenURI *string `json:"tokenUri,omitempty"`

	// REQUIRED; Type field of the API key (write only)
	Type *string `json:"type,omitempty"`

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState `json:"authenticationProvisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty `json:"grantedPermissions,omitempty" azure:"ro"`
}

GcpCredentialsDetailsProperties - GCP cloud account connector based service to service credentials, the credentials are composed of the organization ID and a JSON API key (write only)

func (*GcpCredentialsDetailsProperties) GetAuthenticationDetailsProperties added in v0.3.0

func (g *GcpCredentialsDetailsProperties) GetAuthenticationDetailsProperties() *AuthenticationDetailsProperties

GetAuthenticationDetailsProperties implements the AuthenticationDetailsPropertiesClassification interface for type GcpCredentialsDetailsProperties.

func (GcpCredentialsDetailsProperties) MarshalJSON

func (g GcpCredentialsDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GcpCredentialsDetailsProperties.

func (*GcpCredentialsDetailsProperties) UnmarshalJSON

func (g *GcpCredentialsDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GcpCredentialsDetailsProperties.

type GcpOrganizationalData added in v0.8.0

type GcpOrganizationalData struct {
	// REQUIRED; The multi cloud account's membership type in the organization
	OrganizationMembershipType *OrganizationMembershipType `json:"organizationMembershipType,omitempty"`
}

GcpOrganizationalData - The gcpOrganization data

func (*GcpOrganizationalData) GetGcpOrganizationalData added in v0.8.0

func (g *GcpOrganizationalData) GetGcpOrganizationalData() *GcpOrganizationalData

GetGcpOrganizationalData implements the GcpOrganizationalDataClassification interface for type GcpOrganizationalData.

func (GcpOrganizationalData) MarshalJSON added in v0.8.0

func (g GcpOrganizationalData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GcpOrganizationalData.

func (*GcpOrganizationalData) UnmarshalJSON added in v0.8.0

func (g *GcpOrganizationalData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GcpOrganizationalData.

type GcpOrganizationalDataClassification added in v0.8.0

type GcpOrganizationalDataClassification interface {
	// GetGcpOrganizationalData returns the GcpOrganizationalData content of the underlying type.
	GetGcpOrganizationalData() *GcpOrganizationalData
}

GcpOrganizationalDataClassification provides polymorphic access to related types. Call the interface's GetGcpOrganizationalData() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *GcpOrganizationalData, *GcpOrganizationalDataMember, *GcpOrganizationalDataOrganization

type GcpOrganizationalDataMember added in v0.8.0

type GcpOrganizationalDataMember struct {
	// REQUIRED; The multi cloud account's membership type in the organization
	OrganizationMembershipType *OrganizationMembershipType `json:"organizationMembershipType,omitempty"`

	// The GCP management project number from organizational onboarding
	ManagementProjectNumber *string `json:"managementProjectNumber,omitempty"`

	// If the multi cloud account is not of membership type organization, this will be the ID of the project's parent
	ParentHierarchyID *string `json:"parentHierarchyId,omitempty"`
}

GcpOrganizationalDataMember - The gcpOrganization data for the member account

func (*GcpOrganizationalDataMember) GetGcpOrganizationalData added in v0.8.0

func (g *GcpOrganizationalDataMember) GetGcpOrganizationalData() *GcpOrganizationalData

GetGcpOrganizationalData implements the GcpOrganizationalDataClassification interface for type GcpOrganizationalDataMember.

func (GcpOrganizationalDataMember) MarshalJSON added in v0.8.0

func (g GcpOrganizationalDataMember) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GcpOrganizationalDataMember.

func (*GcpOrganizationalDataMember) UnmarshalJSON added in v0.8.0

func (g *GcpOrganizationalDataMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GcpOrganizationalDataMember.

type GcpOrganizationalDataOrganization added in v0.8.0

type GcpOrganizationalDataOrganization struct {
	// REQUIRED; The multi cloud account's membership type in the organization
	OrganizationMembershipType *OrganizationMembershipType `json:"organizationMembershipType,omitempty"`

	// If the multi cloud account is of membership type organization, list of accounts excluded from offering
	ExcludedProjectNumbers []*string `json:"excludedProjectNumbers,omitempty"`

	// The service account email address which represents the organization level permissions container.
	ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty"`

	// The GCP workload identity provider id which represents the permissions required to auto provision security connectors
	WorkloadIdentityProviderID *string `json:"workloadIdentityProviderId,omitempty"`
}

GcpOrganizationalDataOrganization - The gcpOrganization data for the parent account

func (*GcpOrganizationalDataOrganization) GetGcpOrganizationalData added in v0.8.0

func (g *GcpOrganizationalDataOrganization) GetGcpOrganizationalData() *GcpOrganizationalData

GetGcpOrganizationalData implements the GcpOrganizationalDataClassification interface for type GcpOrganizationalDataOrganization.

func (GcpOrganizationalDataOrganization) MarshalJSON added in v0.8.0

func (g GcpOrganizationalDataOrganization) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GcpOrganizationalDataOrganization.

func (*GcpOrganizationalDataOrganization) UnmarshalJSON added in v0.8.0

func (g *GcpOrganizationalDataOrganization) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GcpOrganizationalDataOrganization.

type GcpProjectDetails added in v0.8.0

type GcpProjectDetails struct {
	// The GCP Project id
	ProjectID *string `json:"projectId,omitempty"`

	// The unique GCP Project number
	ProjectNumber *string `json:"projectNumber,omitempty"`

	// READ-ONLY; The GCP workload identity federation pool id
	WorkloadIdentityPoolID *string `json:"workloadIdentityPoolId,omitempty" azure:"ro"`
}

GcpProjectDetails - The details about the project represented by the security connector

func (GcpProjectDetails) MarshalJSON added in v0.8.0

func (g GcpProjectDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GcpProjectDetails.

func (*GcpProjectDetails) UnmarshalJSON added in v0.8.0

func (g *GcpProjectDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GcpProjectDetails.

type GcpProjectEnvironmentData added in v0.8.0

type GcpProjectEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType `json:"environmentType,omitempty"`

	// The Gcp project's organizational data
	OrganizationalData GcpOrganizationalDataClassification `json:"organizationalData,omitempty"`

	// The Gcp project's details
	ProjectDetails *GcpProjectDetails `json:"projectDetails,omitempty"`
}

GcpProjectEnvironmentData - The GCP project connector environment data

func (*GcpProjectEnvironmentData) GetEnvironmentData added in v0.8.0

func (g *GcpProjectEnvironmentData) GetEnvironmentData() *EnvironmentData

GetEnvironmentData implements the EnvironmentDataClassification interface for type GcpProjectEnvironmentData.

func (GcpProjectEnvironmentData) MarshalJSON added in v0.8.0

func (g GcpProjectEnvironmentData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GcpProjectEnvironmentData.

func (*GcpProjectEnvironmentData) UnmarshalJSON added in v0.8.0

func (g *GcpProjectEnvironmentData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GcpProjectEnvironmentData.

type GithubScopeEnvironmentData added in v0.8.0

type GithubScopeEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType `json:"environmentType,omitempty"`
}

GithubScopeEnvironmentData - The github scope connector's environment data

func (*GithubScopeEnvironmentData) GetEnvironmentData added in v0.8.0

func (g *GithubScopeEnvironmentData) GetEnvironmentData() *EnvironmentData

GetEnvironmentData implements the EnvironmentDataClassification interface for type GithubScopeEnvironmentData.

func (GithubScopeEnvironmentData) MarshalJSON added in v0.8.0

func (g GithubScopeEnvironmentData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GithubScopeEnvironmentData.

func (*GithubScopeEnvironmentData) UnmarshalJSON added in v0.8.0

func (g *GithubScopeEnvironmentData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GithubScopeEnvironmentData.

type GovernanceAssignment added in v0.8.0

type GovernanceAssignment struct {
	// Properties of a security governanceAssignment
	Properties *GovernanceAssignmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GovernanceAssignment - Security GovernanceAssignment over a given scope

func (GovernanceAssignment) MarshalJSON added in v0.8.0

func (g GovernanceAssignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceAssignment.

func (*GovernanceAssignment) UnmarshalJSON added in v0.8.0

func (g *GovernanceAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceAssignment.

type GovernanceAssignmentAdditionalData added in v0.8.0

type GovernanceAssignmentAdditionalData struct {
	// Ticket link associated with this GovernanceAssignment - for example: https://snow.com
	TicketLink *string `json:"ticketLink,omitempty"`

	// Ticket number associated with this GovernanceAssignment
	TicketNumber *int32 `json:"ticketNumber,omitempty"`

	// The ticket status associated with this GovernanceAssignment - for example: Active
	TicketStatus *string `json:"ticketStatus,omitempty"`
}

GovernanceAssignmentAdditionalData - Describe the additional data of GovernanceAssignment - optional

func (GovernanceAssignmentAdditionalData) MarshalJSON added in v0.8.0

func (g GovernanceAssignmentAdditionalData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceAssignmentAdditionalData.

func (*GovernanceAssignmentAdditionalData) UnmarshalJSON added in v0.8.0

func (g *GovernanceAssignmentAdditionalData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceAssignmentAdditionalData.

type GovernanceAssignmentProperties added in v0.8.0

type GovernanceAssignmentProperties struct {
	// REQUIRED; The remediation due-date - after this date Secure Score will be affected (in case of active grace-period)
	RemediationDueDate *time.Time `json:"remediationDueDate,omitempty"`

	// The additional data for the governance assignment - e.g. links to ticket (optional), see example
	AdditionalData *GovernanceAssignmentAdditionalData `json:"additionalData,omitempty"`

	// The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
	GovernanceEmailNotification *GovernanceEmailNotification `json:"governanceEmailNotification,omitempty"`

	// Defines whether there is a grace period on the governance assignment
	IsGracePeriod *bool `json:"isGracePeriod,omitempty"`

	// The Owner for the governance assignment - e.g. user@contoso.com - see example
	Owner *string `json:"owner,omitempty"`

	// The ETA (estimated time of arrival) for remediation (optional), see example
	RemediationEta *RemediationEta `json:"remediationEta,omitempty"`
}

GovernanceAssignmentProperties - Describes properties of an governance assignment

func (GovernanceAssignmentProperties) MarshalJSON added in v0.8.0

func (g GovernanceAssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceAssignmentProperties.

func (*GovernanceAssignmentProperties) UnmarshalJSON added in v0.8.0

func (g *GovernanceAssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceAssignmentProperties.

type GovernanceAssignmentsClient added in v0.8.0

type GovernanceAssignmentsClient struct {
	// contains filtered or unexported fields
}

GovernanceAssignmentsClient contains the methods for the GovernanceAssignments group. Don't use this type directly, use NewGovernanceAssignmentsClient() instead.

func NewGovernanceAssignmentsClient added in v0.8.0

func NewGovernanceAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GovernanceAssignmentsClient, error)

NewGovernanceAssignmentsClient creates a new instance of GovernanceAssignmentsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GovernanceAssignmentsClient) CreateOrUpdate added in v0.8.0

CreateOrUpdate - Creates or update a security GovernanceAssignment on the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). assessmentName - The Assessment Key - Unique key for the assessment type assignmentKey - The security governance assignment key - the assessment key of the required governance assignment governanceAssignment - GovernanceAssignment over a subscription scope options - GovernanceAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the GovernanceAssignmentsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/PutGovernanceAssignment_example.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceAssignmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", "6b9421dd-5555-2251-9b3d-2be58e2f82cd", "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", armsecurity.GovernanceAssignment{
		Properties: &armsecurity.GovernanceAssignmentProperties{
			AdditionalData: &armsecurity.GovernanceAssignmentAdditionalData{
				TicketLink:   to.Ptr("https://snow.com"),
				TicketNumber: to.Ptr[int32](123123),
				TicketStatus: to.Ptr("Active"),
			},
			GovernanceEmailNotification: &armsecurity.GovernanceEmailNotification{
				DisableManagerEmailNotification: to.Ptr(false),
				DisableOwnerEmailNotification:   to.Ptr(false),
			},
			IsGracePeriod:      to.Ptr(true),
			Owner:              to.Ptr("user@contoso.com"),
			RemediationDueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-07T13:00:00.0000000Z"); return t }()),
			RemediationEta: &armsecurity.RemediationEta{
				Eta:           to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T13:00:00.0000000Z"); return t }()),
				Justification: to.Ptr("Justification of ETA"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GovernanceAssignmentsClient) Delete added in v0.8.0

Delete - Delete a GovernanceAssignment over a given scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). assessmentName - The Assessment Key - Unique key for the assessment type assignmentKey - The security governance assignment key - the assessment key of the required governance assignment options - GovernanceAssignmentsClientDeleteOptions contains the optional parameters for the GovernanceAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/DeleteGovernanceAssignment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceAssignmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", "6b9421dd-5555-2251-9b3d-2be58e2f82cd", "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*GovernanceAssignmentsClient) Get added in v0.8.0

Get - Get a specific governanceAssignment for the requested scope by AssignmentKey If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). assessmentName - The Assessment Key - Unique key for the assessment type assignmentKey - The security governance assignment key - the assessment key of the required governance assignment options - GovernanceAssignmentsClientGetOptions contains the optional parameters for the GovernanceAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/GetGovernanceAssignment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceAssignmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", "6b9421dd-5555-2251-9b3d-2be58e2f82cd", "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GovernanceAssignmentsClient) NewListPager added in v0.8.0

NewListPager - Get security governanceAssignments on all your resources inside a scope Generated from API version 2022-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). assessmentName - The Assessment Key - Unique key for the assessment type options - GovernanceAssignmentsClientListOptions contains the optional parameters for the GovernanceAssignmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/ListGovernanceAssignments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceAssignmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd", "6b9421dd-5555-2251-9b3d-2be58e2f82cd", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GovernanceAssignmentsClientCreateOrUpdateOptions added in v0.8.0

type GovernanceAssignmentsClientCreateOrUpdateOptions struct {
}

GovernanceAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the GovernanceAssignmentsClient.CreateOrUpdate method.

type GovernanceAssignmentsClientCreateOrUpdateResponse added in v0.8.0

type GovernanceAssignmentsClientCreateOrUpdateResponse struct {
	GovernanceAssignment
}

GovernanceAssignmentsClientCreateOrUpdateResponse contains the response from method GovernanceAssignmentsClient.CreateOrUpdate.

type GovernanceAssignmentsClientDeleteOptions added in v0.8.0

type GovernanceAssignmentsClientDeleteOptions struct {
}

GovernanceAssignmentsClientDeleteOptions contains the optional parameters for the GovernanceAssignmentsClient.Delete method.

type GovernanceAssignmentsClientDeleteResponse added in v0.8.0

type GovernanceAssignmentsClientDeleteResponse struct {
}

GovernanceAssignmentsClientDeleteResponse contains the response from method GovernanceAssignmentsClient.Delete.

type GovernanceAssignmentsClientGetOptions added in v0.8.0

type GovernanceAssignmentsClientGetOptions struct {
}

GovernanceAssignmentsClientGetOptions contains the optional parameters for the GovernanceAssignmentsClient.Get method.

type GovernanceAssignmentsClientGetResponse added in v0.8.0

type GovernanceAssignmentsClientGetResponse struct {
	GovernanceAssignment
}

GovernanceAssignmentsClientGetResponse contains the response from method GovernanceAssignmentsClient.Get.

type GovernanceAssignmentsClientListOptions added in v0.8.0

type GovernanceAssignmentsClientListOptions struct {
}

GovernanceAssignmentsClientListOptions contains the optional parameters for the GovernanceAssignmentsClient.List method.

type GovernanceAssignmentsClientListResponse added in v0.8.0

type GovernanceAssignmentsClientListResponse struct {
	GovernanceAssignmentsList
}

GovernanceAssignmentsClientListResponse contains the response from method GovernanceAssignmentsClient.List.

type GovernanceAssignmentsList added in v0.8.0

type GovernanceAssignmentsList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of governance assignments in this page
	Value []*GovernanceAssignment `json:"value,omitempty" azure:"ro"`
}

GovernanceAssignmentsList - Page of a security governance assignments list

func (GovernanceAssignmentsList) MarshalJSON added in v0.8.0

func (g GovernanceAssignmentsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceAssignmentsList.

func (*GovernanceAssignmentsList) UnmarshalJSON added in v0.8.0

func (g *GovernanceAssignmentsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceAssignmentsList.

type GovernanceEmailNotification added in v0.8.0

type GovernanceEmailNotification struct {
	// Exclude manager from weekly email notification.
	DisableManagerEmailNotification *bool `json:"disableManagerEmailNotification,omitempty"`

	// Exclude owner from weekly email notification.
	DisableOwnerEmailNotification *bool `json:"disableOwnerEmailNotification,omitempty"`
}

GovernanceEmailNotification - The governance email weekly notification configuration.

func (GovernanceEmailNotification) MarshalJSON added in v0.8.0

func (g GovernanceEmailNotification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceEmailNotification.

func (*GovernanceEmailNotification) UnmarshalJSON added in v0.8.0

func (g *GovernanceEmailNotification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceEmailNotification.

type GovernanceRule added in v0.8.0

type GovernanceRule struct {
	// Properties of a security governanceRule
	Properties *GovernanceRuleProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

GovernanceRule - Security GovernanceRule over a given scope

func (GovernanceRule) MarshalJSON added in v0.8.0

func (g GovernanceRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceRule.

func (*GovernanceRule) UnmarshalJSON added in v0.8.0

func (g *GovernanceRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceRule.

type GovernanceRuleClient added in v0.8.0

type GovernanceRuleClient struct {
	// contains filtered or unexported fields
}

GovernanceRuleClient contains the methods for the GovernanceRule group. Don't use this type directly, use NewGovernanceRuleClient() instead.

func NewGovernanceRuleClient added in v0.8.0

func NewGovernanceRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GovernanceRuleClient, error)

NewGovernanceRuleClient creates a new instance of GovernanceRuleClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GovernanceRuleClient) NewListPager added in v0.8.0

NewListPager - Get a list of all relevant governanceRules over a subscription level scope Generated from API version 2022-01-01-preview options - GovernanceRuleClientListOptions contains the optional parameters for the GovernanceRuleClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListBySubscriptionGovernanceRules_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceRuleClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type GovernanceRuleClientListOptions added in v0.8.0

type GovernanceRuleClientListOptions struct {
}

GovernanceRuleClientListOptions contains the optional parameters for the GovernanceRuleClient.List method.

type GovernanceRuleClientListResponse added in v0.8.0

type GovernanceRuleClientListResponse struct {
	GovernanceRuleList
}

GovernanceRuleClientListResponse contains the response from method GovernanceRuleClient.List.

type GovernanceRuleConditionOperator added in v0.8.0

type GovernanceRuleConditionOperator string

GovernanceRuleConditionOperator - The governance rule Condition's Operator, for example Equals for severity or In for list of assessments, see examples

const (
	// GovernanceRuleConditionOperatorEquals - Checks that the string value of the data defined in Property equals the given value
	// - exact fit
	GovernanceRuleConditionOperatorEquals GovernanceRuleConditionOperator = "Equals"
	// GovernanceRuleConditionOperatorIn - Checks that the string value of the data defined in Property equals any of the given
	// values (exact fit)
	GovernanceRuleConditionOperatorIn GovernanceRuleConditionOperator = "In"
)

func PossibleGovernanceRuleConditionOperatorValues added in v0.8.0

func PossibleGovernanceRuleConditionOperatorValues() []GovernanceRuleConditionOperator

PossibleGovernanceRuleConditionOperatorValues returns the possible values for the GovernanceRuleConditionOperator const type.

type GovernanceRuleEmailNotification added in v0.8.0

type GovernanceRuleEmailNotification struct {
	// Defines whether manager email notifications are disabled.
	DisableManagerEmailNotification *bool `json:"disableManagerEmailNotification,omitempty"`

	// Defines whether owner email notifications are disabled.
	DisableOwnerEmailNotification *bool `json:"disableOwnerEmailNotification,omitempty"`
}

GovernanceRuleEmailNotification - The governance email weekly notification configuration.

func (GovernanceRuleEmailNotification) MarshalJSON added in v0.8.0

func (g GovernanceRuleEmailNotification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceRuleEmailNotification.

func (*GovernanceRuleEmailNotification) UnmarshalJSON added in v0.8.0

func (g *GovernanceRuleEmailNotification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceRuleEmailNotification.

type GovernanceRuleList added in v0.8.0

type GovernanceRuleList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of governanceRules in this page
	Value []*GovernanceRule `json:"value,omitempty" azure:"ro"`
}

GovernanceRuleList - Page of a security governanceRules list

func (GovernanceRuleList) MarshalJSON added in v0.8.0

func (g GovernanceRuleList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceRuleList.

func (*GovernanceRuleList) UnmarshalJSON added in v0.8.0

func (g *GovernanceRuleList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceRuleList.

type GovernanceRuleOwnerSource added in v0.8.0

type GovernanceRuleOwnerSource struct {
	// The owner type for the governance rule owner source
	Type *GovernanceRuleOwnerSourceType `json:"type,omitempty"`

	// The source value e.g. tag key like owner name or email address
	Value *string `json:"value,omitempty"`
}

GovernanceRuleOwnerSource - Describe the owner source of governance rule

func (GovernanceRuleOwnerSource) MarshalJSON added in v0.8.0

func (g GovernanceRuleOwnerSource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceRuleOwnerSource.

func (*GovernanceRuleOwnerSource) UnmarshalJSON added in v0.8.0

func (g *GovernanceRuleOwnerSource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceRuleOwnerSource.

type GovernanceRuleOwnerSourceType added in v0.8.0

type GovernanceRuleOwnerSourceType string

GovernanceRuleOwnerSourceType - The owner type for the governance rule owner source

const (
	// GovernanceRuleOwnerSourceTypeByTag - The rule source type defined using resource tag
	GovernanceRuleOwnerSourceTypeByTag GovernanceRuleOwnerSourceType = "ByTag"
	// GovernanceRuleOwnerSourceTypeManually - The rule source type defined manually
	GovernanceRuleOwnerSourceTypeManually GovernanceRuleOwnerSourceType = "Manually"
)

func PossibleGovernanceRuleOwnerSourceTypeValues added in v0.8.0

func PossibleGovernanceRuleOwnerSourceTypeValues() []GovernanceRuleOwnerSourceType

PossibleGovernanceRuleOwnerSourceTypeValues returns the possible values for the GovernanceRuleOwnerSourceType const type.

type GovernanceRuleProperties added in v0.8.0

type GovernanceRuleProperties struct {
	// REQUIRED; The governance rule conditionSets - see examples
	ConditionSets []interface{} `json:"conditionSets,omitempty"`

	// REQUIRED; display name of the governanceRule
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; The Owner source for the governance rule - e.g. Manually by user@contoso.com - see example
	OwnerSource *GovernanceRuleOwnerSource `json:"ownerSource,omitempty"`

	// REQUIRED; The governance rule priority, priority to the lower number. Rules with the same priority on the same subscription
	// will not be allowed
	RulePriority *int32 `json:"rulePriority,omitempty"`

	// REQUIRED; The rule type of the governance rule, defines the source of the rule e.g. Integrated
	RuleType *GovernanceRuleType `json:"ruleType,omitempty"`

	// REQUIRED; The governance rule source, what the rule affects, e.g. Assessments
	SourceResourceType *GovernanceRuleSourceResourceType `json:"sourceResourceType,omitempty"`

	// description of the governanceRule
	Description *string `json:"description,omitempty"`

	// The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
	GovernanceEmailNotification *GovernanceRuleEmailNotification `json:"governanceEmailNotification,omitempty"`

	// Defines whether the rule is active/inactive
	IsDisabled *bool `json:"isDisabled,omitempty"`

	// Defines whether there is a grace period on the governance rule
	IsGracePeriod *bool `json:"isGracePeriod,omitempty"`

	// Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00
	// - means 7 days
	RemediationTimeframe *string `json:"remediationTimeframe,omitempty"`
}

GovernanceRuleProperties - Describes properties of an governanceRule

func (GovernanceRuleProperties) MarshalJSON added in v0.8.0

func (g GovernanceRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceRuleProperties.

func (*GovernanceRuleProperties) UnmarshalJSON added in v0.8.0

func (g *GovernanceRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceRuleProperties.

type GovernanceRuleSourceResourceType added in v0.8.0

type GovernanceRuleSourceResourceType string

GovernanceRuleSourceResourceType - The governance rule source, what the rule affects, e.g. Assessments

const (
	// GovernanceRuleSourceResourceTypeAssessments - The source of the governance rule is assessments
	GovernanceRuleSourceResourceTypeAssessments GovernanceRuleSourceResourceType = "Assessments"
)

func PossibleGovernanceRuleSourceResourceTypeValues added in v0.8.0

func PossibleGovernanceRuleSourceResourceTypeValues() []GovernanceRuleSourceResourceType

PossibleGovernanceRuleSourceResourceTypeValues returns the possible values for the GovernanceRuleSourceResourceType const type.

type GovernanceRuleType added in v0.8.0

type GovernanceRuleType string

GovernanceRuleType - The rule type of the governance rule, defines the source of the rule e.g. Integrated

const (
	// GovernanceRuleTypeIntegrated - The source of the rule type definition is integrated
	GovernanceRuleTypeIntegrated GovernanceRuleType = "Integrated"
	// GovernanceRuleTypeServiceNow - The source of the rule type definition is ServiceNow
	GovernanceRuleTypeServiceNow GovernanceRuleType = "ServiceNow"
)

func PossibleGovernanceRuleTypeValues added in v0.8.0

func PossibleGovernanceRuleTypeValues() []GovernanceRuleType

PossibleGovernanceRuleTypeValues returns the possible values for the GovernanceRuleType const type.

type GovernanceRulesClient added in v0.8.0

type GovernanceRulesClient struct {
	// contains filtered or unexported fields
}

GovernanceRulesClient contains the methods for the GovernanceRules group. Don't use this type directly, use NewGovernanceRulesClient() instead.

func NewGovernanceRulesClient added in v0.8.0

func NewGovernanceRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GovernanceRulesClient, error)

NewGovernanceRulesClient creates a new instance of GovernanceRulesClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GovernanceRulesClient) BeginRuleIDExecuteSingleSecurityConnector added in v0.8.0

func (client *GovernanceRulesClient) BeginRuleIDExecuteSingleSecurityConnector(ctx context.Context, resourceGroupName string, securityConnectorName string, ruleID string, options *GovernanceRulesClientBeginRuleIDExecuteSingleSecurityConnectorOptions) (*runtime.Poller[GovernanceRulesClientRuleIDExecuteSingleSecurityConnectorResponse], error)

BeginRuleIDExecuteSingleSecurityConnector - Execute a security GovernanceRule on the given security connector. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. securityConnectorName - The security connector name. ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule options - GovernanceRulesClientBeginRuleIDExecuteSingleSecurityConnectorOptions contains the optional parameters for the GovernanceRulesClient.BeginRuleIDExecuteSingleSecurityConnector method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PostSecurityConnectorGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRuleIDExecuteSingleSecurityConnector(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", &armsecurity.GovernanceRulesClientBeginRuleIDExecuteSingleSecurityConnectorOptions{ExecuteGovernanceRuleParams: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*GovernanceRulesClient) BeginRuleIDExecuteSingleSubscription added in v0.8.0

BeginRuleIDExecuteSingleSubscription - Execute a security GovernanceRule on the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule options - GovernanceRulesClientBeginRuleIDExecuteSingleSubscriptionOptions contains the optional parameters for the GovernanceRulesClient.BeginRuleIDExecuteSingleSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PostGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRuleIDExecuteSingleSubscription(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", &armsecurity.GovernanceRulesClientBeginRuleIDExecuteSingleSubscriptionOptions{ExecuteGovernanceRuleParams: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*GovernanceRulesClient) CreateOrUpdate added in v0.8.0

CreateOrUpdate - Creates or update a security GovernanceRule on the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule governanceRule - GovernanceRule over a subscription scope options - GovernanceRulesClientCreateOrUpdateOptions contains the optional parameters for the GovernanceRulesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PutGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.GovernanceRule{
		Properties: &armsecurity.GovernanceRuleProperties{
			Description: to.Ptr("A rule on critical recommendations"),
			ConditionSets: []interface{}{
				map[string]interface{}{
					"conditions": []interface{}{
						map[string]interface{}{
							"operator": "In",
							"property": "$.AssessmentKey",
							"value":    "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
						},
					},
				}},
			DisplayName: to.Ptr("Admin's rule"),
			GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
				DisableManagerEmailNotification: to.Ptr(false),
				DisableOwnerEmailNotification:   to.Ptr(false),
			},
			IsDisabled:    to.Ptr(false),
			IsGracePeriod: to.Ptr(true),
			OwnerSource: &armsecurity.GovernanceRuleOwnerSource{
				Type:  to.Ptr(armsecurity.GovernanceRuleOwnerSourceTypeManually),
				Value: to.Ptr("user@contoso.com"),
			},
			RemediationTimeframe: to.Ptr("7.00:00:00"),
			RulePriority:         to.Ptr[int32](200),
			RuleType:             to.Ptr(armsecurity.GovernanceRuleTypeIntegrated),
			SourceResourceType:   to.Ptr(armsecurity.GovernanceRuleSourceResourceTypeAssessments),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GovernanceRulesClient) Delete added in v0.8.0

Delete - Delete a GovernanceRule over a given scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule options - GovernanceRulesClientDeleteOptions contains the optional parameters for the GovernanceRulesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/DeleteGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*GovernanceRulesClient) Get added in v0.8.0

Get - Get a specific governanceRule for the requested scope by ruleId If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule options - GovernanceRulesClientGetOptions contains the optional parameters for the GovernanceRulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRule_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewGovernanceRulesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type GovernanceRulesClientBeginRuleIDExecuteSingleSecurityConnectorOptions added in v0.8.0

type GovernanceRulesClientBeginRuleIDExecuteSingleSecurityConnectorOptions struct {
	// GovernanceRule over a subscription scope
	ExecuteGovernanceRuleParams *ExecuteGovernanceRuleParams
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GovernanceRulesClientBeginRuleIDExecuteSingleSecurityConnectorOptions contains the optional parameters for the GovernanceRulesClient.BeginRuleIDExecuteSingleSecurityConnector method.

type GovernanceRulesClientBeginRuleIDExecuteSingleSubscriptionOptions added in v0.8.0

type GovernanceRulesClientBeginRuleIDExecuteSingleSubscriptionOptions struct {
	// GovernanceRule over a subscription scope
	ExecuteGovernanceRuleParams *ExecuteGovernanceRuleParams
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GovernanceRulesClientBeginRuleIDExecuteSingleSubscriptionOptions contains the optional parameters for the GovernanceRulesClient.BeginRuleIDExecuteSingleSubscription method.

type GovernanceRulesClientCreateOrUpdateOptions added in v0.8.0

type GovernanceRulesClientCreateOrUpdateOptions struct {
}

GovernanceRulesClientCreateOrUpdateOptions contains the optional parameters for the GovernanceRulesClient.CreateOrUpdate method.

type GovernanceRulesClientCreateOrUpdateResponse added in v0.8.0

type GovernanceRulesClientCreateOrUpdateResponse struct {
	GovernanceRule
}

GovernanceRulesClientCreateOrUpdateResponse contains the response from method GovernanceRulesClient.CreateOrUpdate.

type GovernanceRulesClientDeleteOptions added in v0.8.0

type GovernanceRulesClientDeleteOptions struct {
}

GovernanceRulesClientDeleteOptions contains the optional parameters for the GovernanceRulesClient.Delete method.

type GovernanceRulesClientDeleteResponse added in v0.8.0

type GovernanceRulesClientDeleteResponse struct {
}

GovernanceRulesClientDeleteResponse contains the response from method GovernanceRulesClient.Delete.

type GovernanceRulesClientGetOptions added in v0.8.0

type GovernanceRulesClientGetOptions struct {
}

GovernanceRulesClientGetOptions contains the optional parameters for the GovernanceRulesClient.Get method.

type GovernanceRulesClientGetResponse added in v0.8.0

type GovernanceRulesClientGetResponse struct {
	GovernanceRule
}

GovernanceRulesClientGetResponse contains the response from method GovernanceRulesClient.Get.

type GovernanceRulesClientRuleIDExecuteSingleSecurityConnectorResponse added in v0.8.0

type GovernanceRulesClientRuleIDExecuteSingleSecurityConnectorResponse struct {
}

GovernanceRulesClientRuleIDExecuteSingleSecurityConnectorResponse contains the response from method GovernanceRulesClient.RuleIDExecuteSingleSecurityConnector.

type GovernanceRulesClientRuleIDExecuteSingleSubscriptionResponse added in v0.8.0

type GovernanceRulesClientRuleIDExecuteSingleSubscriptionResponse struct {
}

GovernanceRulesClientRuleIDExecuteSingleSubscriptionResponse contains the response from method GovernanceRulesClient.RuleIDExecuteSingleSubscription.

type HTTPC2DMessagesNotInAllowedRange

type HTTPC2DMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

HTTPC2DMessagesNotInAllowedRange - Number of cloud to device messages (HTTP protocol) is not in allowed range.

func (*HTTPC2DMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (h *HTTPC2DMessagesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type HTTPC2DMessagesNotInAllowedRange.

func (*HTTPC2DMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (h *HTTPC2DMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type HTTPC2DMessagesNotInAllowedRange.

func (*HTTPC2DMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (h *HTTPC2DMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type HTTPC2DMessagesNotInAllowedRange.

func (HTTPC2DMessagesNotInAllowedRange) MarshalJSON

func (h HTTPC2DMessagesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HTTPC2DMessagesNotInAllowedRange.

func (*HTTPC2DMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (h *HTTPC2DMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPC2DMessagesNotInAllowedRange.

type HTTPC2DRejectedMessagesNotInAllowedRange

type HTTPC2DRejectedMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

HTTPC2DRejectedMessagesNotInAllowedRange - Number of rejected cloud to device messages (HTTP protocol) is not in allowed range.

func (*HTTPC2DRejectedMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type HTTPC2DRejectedMessagesNotInAllowedRange.

func (*HTTPC2DRejectedMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (h *HTTPC2DRejectedMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type HTTPC2DRejectedMessagesNotInAllowedRange.

func (*HTTPC2DRejectedMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (h *HTTPC2DRejectedMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type HTTPC2DRejectedMessagesNotInAllowedRange.

func (HTTPC2DRejectedMessagesNotInAllowedRange) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type HTTPC2DRejectedMessagesNotInAllowedRange.

func (*HTTPC2DRejectedMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (h *HTTPC2DRejectedMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPC2DRejectedMessagesNotInAllowedRange.

type HTTPD2CMessagesNotInAllowedRange

type HTTPD2CMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

HTTPD2CMessagesNotInAllowedRange - Number of device to cloud messages (HTTP protocol) is not in allowed range.

func (*HTTPD2CMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (h *HTTPD2CMessagesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type HTTPD2CMessagesNotInAllowedRange.

func (*HTTPD2CMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (h *HTTPD2CMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type HTTPD2CMessagesNotInAllowedRange.

func (*HTTPD2CMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (h *HTTPD2CMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type HTTPD2CMessagesNotInAllowedRange.

func (HTTPD2CMessagesNotInAllowedRange) MarshalJSON

func (h HTTPD2CMessagesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HTTPD2CMessagesNotInAllowedRange.

func (*HTTPD2CMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (h *HTTPD2CMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPD2CMessagesNotInAllowedRange.

type HybridComputeProvisioningState

type HybridComputeProvisioningState string

HybridComputeProvisioningState - State of the service principal and its secret

const (
	// HybridComputeProvisioningStateExpired - the service principal details are expired
	HybridComputeProvisioningStateExpired HybridComputeProvisioningState = "Expired"
	// HybridComputeProvisioningStateInvalid - Invalid service principal details.
	HybridComputeProvisioningStateInvalid HybridComputeProvisioningState = "Invalid"
	// HybridComputeProvisioningStateValid - Valid service principal details.
	HybridComputeProvisioningStateValid HybridComputeProvisioningState = "Valid"
)

func PossibleHybridComputeProvisioningStateValues

func PossibleHybridComputeProvisioningStateValues() []HybridComputeProvisioningState

PossibleHybridComputeProvisioningStateValues returns the possible values for the HybridComputeProvisioningState const type.

type HybridComputeSettingsProperties

type HybridComputeSettingsProperties struct {
	// REQUIRED; Whether or not to automatically install Azure Arc (hybrid compute) agents on machines
	AutoProvision *AutoProvision `json:"autoProvision,omitempty"`

	// For a non-Azure machine that is not connected directly to the internet, specify a proxy server that the non-Azure machine
	// can use.
	ProxyServer *ProxyServerProperties `json:"proxyServer,omitempty"`

	// The location where the metadata of machines will be stored
	Region *string `json:"region,omitempty"`

	// The name of the resource group where Arc (Hybrid Compute) connectors are connected.
	ResourceGroupName *string `json:"resourceGroupName,omitempty"`

	// An object to access resources that are secured by an Azure AD tenant.
	ServicePrincipal *ServicePrincipalProperties `json:"servicePrincipal,omitempty"`

	// READ-ONLY; State of the service principal and its secret
	HybridComputeProvisioningState *HybridComputeProvisioningState `json:"hybridComputeProvisioningState,omitempty" azure:"ro"`
}

HybridComputeSettingsProperties - Settings for hybrid compute management

func (HybridComputeSettingsProperties) MarshalJSON added in v0.8.0

func (h HybridComputeSettingsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HybridComputeSettingsProperties.

func (*HybridComputeSettingsProperties) UnmarshalJSON added in v0.8.0

func (h *HybridComputeSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HybridComputeSettingsProperties.

type ImplementationEffort

type ImplementationEffort string

ImplementationEffort - The implementation effort required to remediate this assessment

const (
	ImplementationEffortHigh     ImplementationEffort = "High"
	ImplementationEffortLow      ImplementationEffort = "Low"
	ImplementationEffortModerate ImplementationEffort = "Moderate"
)

func PossibleImplementationEffortValues

func PossibleImplementationEffortValues() []ImplementationEffort

PossibleImplementationEffortValues returns the possible values for the ImplementationEffort const type.

type InformationProtectionAwsOffering added in v0.4.0

type InformationProtectionAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType `json:"offeringType,omitempty"`

	// The native cloud connection configuration
	InformationProtection *InformationProtectionAwsOfferingInformationProtection `json:"informationProtection,omitempty"`

	// READ-ONLY; The offering description.
	Description *string `json:"description,omitempty" azure:"ro"`
}

InformationProtectionAwsOffering - The information protection for AWS offering

func (*InformationProtectionAwsOffering) GetCloudOffering added in v0.4.0

func (i *InformationProtectionAwsOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type InformationProtectionAwsOffering.

func (InformationProtectionAwsOffering) MarshalJSON added in v0.4.0

func (i InformationProtectionAwsOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InformationProtectionAwsOffering.

func (*InformationProtectionAwsOffering) UnmarshalJSON added in v0.4.0

func (i *InformationProtectionAwsOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InformationProtectionAwsOffering.

type InformationProtectionAwsOfferingInformationProtection added in v0.4.0

type InformationProtectionAwsOfferingInformationProtection struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string `json:"cloudRoleArn,omitempty"`
}

InformationProtectionAwsOfferingInformationProtection - The native cloud connection configuration

func (InformationProtectionAwsOfferingInformationProtection) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type InformationProtectionAwsOfferingInformationProtection.

func (*InformationProtectionAwsOfferingInformationProtection) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type InformationProtectionAwsOfferingInformationProtection.

type InformationProtectionKeyword

type InformationProtectionKeyword struct {
	// Indicates whether the keyword can be applied on numeric types or not.
	CanBeNumeric *bool `json:"canBeNumeric,omitempty"`

	// Indicates whether the keyword is custom or not.
	Custom *bool `json:"custom,omitempty"`

	// Indicates whether the keyword is excluded or not.
	Excluded *bool `json:"excluded,omitempty"`

	// The keyword pattern.
	Pattern *string `json:"pattern,omitempty"`
}

InformationProtectionKeyword - The information type keyword.

func (InformationProtectionKeyword) MarshalJSON added in v0.8.0

func (i InformationProtectionKeyword) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InformationProtectionKeyword.

func (*InformationProtectionKeyword) UnmarshalJSON added in v0.8.0

func (i *InformationProtectionKeyword) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InformationProtectionKeyword.

type InformationProtectionPoliciesClient

type InformationProtectionPoliciesClient struct {
	// contains filtered or unexported fields
}

InformationProtectionPoliciesClient contains the methods for the InformationProtectionPolicies group. Don't use this type directly, use NewInformationProtectionPoliciesClient() instead.

func NewInformationProtectionPoliciesClient

func NewInformationProtectionPoliciesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*InformationProtectionPoliciesClient, error)

NewInformationProtectionPoliciesClient creates a new instance of InformationProtectionPoliciesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*InformationProtectionPoliciesClient) CreateOrUpdate

CreateOrUpdate - Details of the information protection policy. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). informationProtectionPolicyName - Name of the information protection policy. informationProtectionPolicy - Information protection policy. options - InformationProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the InformationProtectionPoliciesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/CreateOrUpdateInformationProtectionPolicy_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewInformationProtectionPoliciesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", armsecurity.InformationProtectionPolicyNameCustom, armsecurity.InformationProtectionPolicy{
		Properties: &armsecurity.InformationProtectionPolicyProperties{
			InformationTypes: map[string]*armsecurity.InformationType{
				"3bf35491-99b8-41f2-86d5-c1200a7df658": {
					Custom:      to.Ptr(true),
					DisplayName: to.Ptr("Custom"),
					Enabled:     to.Ptr(true),
					Keywords: []*armsecurity.InformationProtectionKeyword{
						{
							CanBeNumeric: to.Ptr(true),
							Custom:       to.Ptr(true),
							Pattern:      to.Ptr("%custom%"),
						}},
					Order:              to.Ptr[int32](1400),
					RecommendedLabelID: to.Ptr("7aa516c7-5a53-4857-bc6e-6808c6acd542"),
				},
				"7fb9419d-2473-4ad8-8e11-b25cc8cf6a07": {
					Custom:      to.Ptr(false),
					DisplayName: to.Ptr("Networking"),
					Enabled:     to.Ptr(true),
					Keywords: []*armsecurity.InformationProtectionKeyword{
						{
							CanBeNumeric: to.Ptr(false),
							Custom:       to.Ptr(true),
							Pattern:      to.Ptr("%networking%"),
						}},
					Order:              to.Ptr[int32](100),
					RecommendedLabelID: to.Ptr("575739d2-3d53-4df0-9042-4c7772d5c7b1"),
				},
			},
			Labels: map[string]*armsecurity.SensitivityLabel{
				"1345da73-bc5a-4a8f-b7dd-3820eb713da8": {
					DisplayName: to.Ptr("Public"),
					Enabled:     to.Ptr(true),
					Order:       to.Ptr[int32](100),
				},
				"575739d2-3d53-4df0-9042-4c7772d5c7b1": {
					DisplayName: to.Ptr("Confidential"),
					Enabled:     to.Ptr(true),
					Order:       to.Ptr[int32](300),
				},
				"7aa516c7-5a53-4857-bc6e-6808c6acd542": {
					DisplayName: to.Ptr("General"),
					Enabled:     to.Ptr(true),
					Order:       to.Ptr[int32](200),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*InformationProtectionPoliciesClient) Get

Get - Details of the information protection policy. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). informationProtectionPolicyName - Name of the information protection policy. options - InformationProtectionPoliciesClientGetOptions contains the optional parameters for the InformationProtectionPoliciesClient.Get method.

Example (GetTheCustomizedInformationProtectionPolicyForAManagementGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/GetCustomInformationProtectionPolicy_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewInformationProtectionPoliciesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", armsecurity.InformationProtectionPolicyNameCustom, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (GetTheEffectiveInformationProtectionPolicyForAManagementGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/GetEffectiveInformationProtectionPolicy_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewInformationProtectionPoliciesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", armsecurity.InformationProtectionPolicyNameEffective, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*InformationProtectionPoliciesClient) NewListPager added in v0.6.0

NewListPager - Information protection policies of a specific management group. Generated from API version 2017-08-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). options - InformationProtectionPoliciesClientListOptions contains the optional parameters for the InformationProtectionPoliciesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/ListInformationProtectionPolicies_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewInformationProtectionPoliciesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type InformationProtectionPoliciesClientCreateOrUpdateOptions added in v0.3.0

type InformationProtectionPoliciesClientCreateOrUpdateOptions struct {
}

InformationProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the InformationProtectionPoliciesClient.CreateOrUpdate method.

type InformationProtectionPoliciesClientCreateOrUpdateResponse added in v0.3.0

type InformationProtectionPoliciesClientCreateOrUpdateResponse struct {
	InformationProtectionPolicy
}

InformationProtectionPoliciesClientCreateOrUpdateResponse contains the response from method InformationProtectionPoliciesClient.CreateOrUpdate.

type InformationProtectionPoliciesClientGetOptions added in v0.3.0

type InformationProtectionPoliciesClientGetOptions struct {
}

InformationProtectionPoliciesClientGetOptions contains the optional parameters for the InformationProtectionPoliciesClient.Get method.

type InformationProtectionPoliciesClientGetResponse added in v0.3.0

type InformationProtectionPoliciesClientGetResponse struct {
	InformationProtectionPolicy
}

InformationProtectionPoliciesClientGetResponse contains the response from method InformationProtectionPoliciesClient.Get.

type InformationProtectionPoliciesClientListOptions added in v0.3.0

type InformationProtectionPoliciesClientListOptions struct {
}

InformationProtectionPoliciesClientListOptions contains the optional parameters for the InformationProtectionPoliciesClient.List method.

type InformationProtectionPoliciesClientListResponse added in v0.3.0

type InformationProtectionPoliciesClientListResponse struct {
	InformationProtectionPolicyList
}

InformationProtectionPoliciesClientListResponse contains the response from method InformationProtectionPoliciesClient.List.

type InformationProtectionPolicy

type InformationProtectionPolicy struct {
	// Information protection policy data
	Properties *InformationProtectionPolicyProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

InformationProtectionPolicy - Information protection policy.

func (InformationProtectionPolicy) MarshalJSON

func (i InformationProtectionPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InformationProtectionPolicy.

func (*InformationProtectionPolicy) UnmarshalJSON

func (i *InformationProtectionPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InformationProtectionPolicy.

type InformationProtectionPolicyList

type InformationProtectionPolicyList struct {
	// List of information protection policies.
	Value []*InformationProtectionPolicy `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

InformationProtectionPolicyList - Information protection policies response.

func (InformationProtectionPolicyList) MarshalJSON

func (i InformationProtectionPolicyList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InformationProtectionPolicyList.

func (*InformationProtectionPolicyList) UnmarshalJSON added in v0.8.0

func (i *InformationProtectionPolicyList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InformationProtectionPolicyList.

type InformationProtectionPolicyName added in v0.4.0

type InformationProtectionPolicyName string
const (
	InformationProtectionPolicyNameCustom    InformationProtectionPolicyName = "custom"
	InformationProtectionPolicyNameEffective InformationProtectionPolicyName = "effective"
)

func PossibleInformationProtectionPolicyNameValues added in v0.4.0

func PossibleInformationProtectionPolicyNameValues() []InformationProtectionPolicyName

PossibleInformationProtectionPolicyNameValues returns the possible values for the InformationProtectionPolicyName const type.

type InformationProtectionPolicyProperties

type InformationProtectionPolicyProperties struct {
	// The sensitivity information types.
	InformationTypes map[string]*InformationType `json:"informationTypes,omitempty"`

	// Dictionary of sensitivity labels.
	Labels map[string]*SensitivityLabel `json:"labels,omitempty"`

	// READ-ONLY; Describes the last UTC time the policy was modified.
	LastModifiedUTC *time.Time `json:"lastModifiedUtc,omitempty" azure:"ro"`

	// READ-ONLY; Describes the version of the policy.
	Version *string `json:"version,omitempty" azure:"ro"`
}

InformationProtectionPolicyProperties - describes properties of an information protection policy.

func (InformationProtectionPolicyProperties) MarshalJSON

func (i InformationProtectionPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InformationProtectionPolicyProperties.

func (*InformationProtectionPolicyProperties) UnmarshalJSON

func (i *InformationProtectionPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InformationProtectionPolicyProperties.

type InformationType

type InformationType struct {
	// Indicates whether the information type is custom or not.
	Custom *bool `json:"custom,omitempty"`

	// The description of the information type.
	Description *string `json:"description,omitempty"`

	// The name of the information type.
	DisplayName *string `json:"displayName,omitempty"`

	// Indicates whether the information type is enabled or not.
	Enabled *bool `json:"enabled,omitempty"`

	// The information type keywords.
	Keywords []*InformationProtectionKeyword `json:"keywords,omitempty"`

	// The order of the information type.
	Order *int32 `json:"order,omitempty"`

	// The recommended label id to be associated with this information type.
	RecommendedLabelID *string `json:"recommendedLabelId,omitempty"`
}

InformationType - The information type.

func (InformationType) MarshalJSON

func (i InformationType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InformationType.

func (*InformationType) UnmarshalJSON added in v0.8.0

func (i *InformationType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InformationType.

type IngestionConnectionString

type IngestionConnectionString struct {
	// READ-ONLY; The region where ingested logs and data resides
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Connection string value
	Value *string `json:"value,omitempty" azure:"ro"`
}

IngestionConnectionString - Connection string for ingesting security data and logs

func (IngestionConnectionString) MarshalJSON added in v0.8.0

func (i IngestionConnectionString) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IngestionConnectionString.

func (*IngestionConnectionString) UnmarshalJSON added in v0.8.0

func (i *IngestionConnectionString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IngestionConnectionString.

type IngestionSetting

type IngestionSetting struct {
	// Ingestion setting data
	Properties interface{} `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

IngestionSetting - Configures how to correlate scan data and logs with resources associated with the subscription.

func (IngestionSetting) MarshalJSON

func (i IngestionSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IngestionSetting.

func (*IngestionSetting) UnmarshalJSON

func (i *IngestionSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IngestionSetting.

type IngestionSettingList

type IngestionSettingList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of ingestion settings
	Value []*IngestionSetting `json:"value,omitempty" azure:"ro"`
}

IngestionSettingList - List of ingestion settings

func (IngestionSettingList) MarshalJSON

func (i IngestionSettingList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IngestionSettingList.

func (*IngestionSettingList) UnmarshalJSON added in v0.8.0

func (i *IngestionSettingList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IngestionSettingList.

type IngestionSettingToken

type IngestionSettingToken struct {
	// READ-ONLY; The token is used for correlating security data and logs with the resources in the subscription.
	Token *string `json:"token,omitempty" azure:"ro"`
}

IngestionSettingToken - Configures how to correlate scan data and logs with resources associated with the subscription.

func (IngestionSettingToken) MarshalJSON added in v0.8.0

func (i IngestionSettingToken) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IngestionSettingToken.

func (*IngestionSettingToken) UnmarshalJSON added in v0.8.0

func (i *IngestionSettingToken) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IngestionSettingToken.

type IngestionSettingsClient

type IngestionSettingsClient struct {
	// contains filtered or unexported fields
}

IngestionSettingsClient contains the methods for the IngestionSettings group. Don't use this type directly, use NewIngestionSettingsClient() instead.

func NewIngestionSettingsClient

func NewIngestionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IngestionSettingsClient, error)

NewIngestionSettingsClient creates a new instance of IngestionSettingsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*IngestionSettingsClient) Create

Create - Create setting for ingesting security data and logs to correlate with resources associated with the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-01-15-preview ingestionSettingName - Name of the ingestion setting ingestionSetting - Ingestion setting object options - IngestionSettingsClientCreateOptions contains the optional parameters for the IngestionSettingsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/CreateIngestionSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIngestionSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "default", armsecurity.IngestionSetting{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IngestionSettingsClient) Delete

Delete - Deletes the ingestion settings for this subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-01-15-preview ingestionSettingName - Name of the ingestion setting options - IngestionSettingsClientDeleteOptions contains the optional parameters for the IngestionSettingsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/DeleteIngestionSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIngestionSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*IngestionSettingsClient) Get

Get - Settings for ingesting security data and logs to correlate with resources associated with the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-01-15-preview ingestionSettingName - Name of the ingestion setting options - IngestionSettingsClientGetOptions contains the optional parameters for the IngestionSettingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/GetIngestionSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIngestionSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IngestionSettingsClient) ListConnectionStrings

ListConnectionStrings - Connection strings for ingesting security scan logs and data. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-01-15-preview ingestionSettingName - Name of the ingestion setting options - IngestionSettingsClientListConnectionStringsOptions contains the optional parameters for the IngestionSettingsClient.ListConnectionStrings method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/ListConnectionStrings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIngestionSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListConnectionStrings(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IngestionSettingsClient) ListTokens

ListTokens - Returns the token that is used for correlating ingested telemetry with the resources in the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-01-15-preview ingestionSettingName - Name of the ingestion setting options - IngestionSettingsClientListTokensOptions contains the optional parameters for the IngestionSettingsClient.ListTokens method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/ListTokensIngestionSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIngestionSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListTokens(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IngestionSettingsClient) NewListPager added in v0.6.0

NewListPager - Settings for ingesting security data and logs to correlate with resources associated with the subscription. Generated from API version 2021-01-15-preview options - IngestionSettingsClientListOptions contains the optional parameters for the IngestionSettingsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/GetIngestionSettings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIngestionSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type IngestionSettingsClientCreateOptions added in v0.3.0

type IngestionSettingsClientCreateOptions struct {
}

IngestionSettingsClientCreateOptions contains the optional parameters for the IngestionSettingsClient.Create method.

type IngestionSettingsClientCreateResponse added in v0.3.0

type IngestionSettingsClientCreateResponse struct {
	IngestionSetting
}

IngestionSettingsClientCreateResponse contains the response from method IngestionSettingsClient.Create.

type IngestionSettingsClientDeleteOptions added in v0.3.0

type IngestionSettingsClientDeleteOptions struct {
}

IngestionSettingsClientDeleteOptions contains the optional parameters for the IngestionSettingsClient.Delete method.

type IngestionSettingsClientDeleteResponse added in v0.3.0

type IngestionSettingsClientDeleteResponse struct {
}

IngestionSettingsClientDeleteResponse contains the response from method IngestionSettingsClient.Delete.

type IngestionSettingsClientGetOptions added in v0.3.0

type IngestionSettingsClientGetOptions struct {
}

IngestionSettingsClientGetOptions contains the optional parameters for the IngestionSettingsClient.Get method.

type IngestionSettingsClientGetResponse added in v0.3.0

type IngestionSettingsClientGetResponse struct {
	IngestionSetting
}

IngestionSettingsClientGetResponse contains the response from method IngestionSettingsClient.Get.

type IngestionSettingsClientListConnectionStringsOptions added in v0.3.0

type IngestionSettingsClientListConnectionStringsOptions struct {
}

IngestionSettingsClientListConnectionStringsOptions contains the optional parameters for the IngestionSettingsClient.ListConnectionStrings method.

type IngestionSettingsClientListConnectionStringsResponse added in v0.3.0

type IngestionSettingsClientListConnectionStringsResponse struct {
	ConnectionStrings
}

IngestionSettingsClientListConnectionStringsResponse contains the response from method IngestionSettingsClient.ListConnectionStrings.

type IngestionSettingsClientListOptions added in v0.3.0

type IngestionSettingsClientListOptions struct {
}

IngestionSettingsClientListOptions contains the optional parameters for the IngestionSettingsClient.List method.

type IngestionSettingsClientListResponse added in v0.3.0

type IngestionSettingsClientListResponse struct {
	IngestionSettingList
}

IngestionSettingsClientListResponse contains the response from method IngestionSettingsClient.List.

type IngestionSettingsClientListTokensOptions added in v0.3.0

type IngestionSettingsClientListTokensOptions struct {
}

IngestionSettingsClientListTokensOptions contains the optional parameters for the IngestionSettingsClient.ListTokens method.

type IngestionSettingsClientListTokensResponse added in v0.3.0

type IngestionSettingsClientListTokensResponse struct {
	IngestionSettingToken
}

IngestionSettingsClientListTokensResponse contains the response from method IngestionSettingsClient.ListTokens.

type Intent

type Intent string

Intent - The kill chain related intent behind the alert. For list of supported values, and explanations of Azure Security Center's supported kill chain intents.

const (
	// IntentCollection - Collection consists of techniques used to identify and gather information, such as sensitive files,
	// from a target network prior to exfiltration.
	IntentCollection Intent = "Collection"
	// IntentCommandAndControl - The command and control tactic represents how adversaries communicate with systems under their
	// control within a target network.
	IntentCommandAndControl Intent = "CommandAndControl"
	// IntentCredentialAccess - Credential access represents techniques resulting in access to or control over system, domain,
	// or service credentials that are used within an enterprise environment.
	IntentCredentialAccess Intent = "CredentialAccess"
	// IntentDefenseEvasion - Defense evasion consists of techniques an adversary may use to evade detection or avoid other defenses.
	IntentDefenseEvasion Intent = "DefenseEvasion"
	// IntentDiscovery - Discovery consists of techniques that allow the adversary to gain knowledge about the system and internal
	// network.
	IntentDiscovery Intent = "Discovery"
	// IntentExecution - The execution tactic represents techniques that result in execution of adversary-controlled code on a
	// local or remote system.
	IntentExecution Intent = "Execution"
	// IntentExfiltration - Exfiltration refers to techniques and attributes that result or aid in the adversary removing files
	// and information from a target network.
	IntentExfiltration Intent = "Exfiltration"
	// IntentExploitation - Exploitation is the stage where an attacker manages to get a foothold on the attacked resource. This
	// stage is relevant for compute hosts and resources such as user accounts, certificates etc.
	IntentExploitation Intent = "Exploitation"
	// IntentImpact - Impact events primarily try to directly reduce the availability or integrity of a system, service, or network;
	// including manipulation of data to impact a business or operational process.
	IntentImpact Intent = "Impact"
	// IntentInitialAccess - InitialAccess is the stage where an attacker manages to get foothold on the attacked resource.
	IntentInitialAccess Intent = "InitialAccess"
	// IntentLateralMovement - Lateral movement consists of techniques that enable an adversary to access and control remote systems
	// on a network and could, but does not necessarily, include execution of tools on remote systems.
	IntentLateralMovement Intent = "LateralMovement"
	// IntentPersistence - Persistence is any access, action, or configuration change to a system that gives a threat actor a
	// persistent presence on that system.
	IntentPersistence Intent = "Persistence"
	// IntentPreAttack - PreAttack could be either an attempt to access a certain resource regardless of a malicious intent, or
	// a failed attempt to gain access to a target system to gather information prior to exploitation. This step is usually detected
	// as an attempt, originating from outside the network, to scan the target system and find a way in. Further details on the
	// PreAttack stage can be read in [MITRE Pre-Att&ck matrix](https://attack.mitre.org/matrices/pre/).
	IntentPreAttack Intent = "PreAttack"
	// IntentPrivilegeEscalation - Privilege escalation is the result of actions that allow an adversary to obtain a higher level
	// of permissions on a system or network.
	IntentPrivilegeEscalation Intent = "PrivilegeEscalation"
	// IntentProbing - Probing could be either an attempt to access a certain resource regardless of a malicious intent, or a
	// failed attempt to gain access to a target system to gather information prior to exploitation.
	IntentProbing Intent = "Probing"
	// IntentUnknown - Unknown
	IntentUnknown Intent = "Unknown"
)

func PossibleIntentValues

func PossibleIntentValues() []Intent

PossibleIntentValues returns the possible values for the Intent const type.

type IoTSecurityAggregatedAlert

type IoTSecurityAggregatedAlert struct {
	// IoT Security solution aggregated alert details.
	Properties *IoTSecurityAggregatedAlertProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

IoTSecurityAggregatedAlert - Security Solution Aggregated Alert information

func (IoTSecurityAggregatedAlert) MarshalJSON

func (i IoTSecurityAggregatedAlert) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedAlert.

func (*IoTSecurityAggregatedAlert) UnmarshalJSON

func (i *IoTSecurityAggregatedAlert) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedAlert.

type IoTSecurityAggregatedAlertList

type IoTSecurityAggregatedAlertList struct {
	// REQUIRED; List of aggregated alerts data.
	Value []*IoTSecurityAggregatedAlert `json:"value,omitempty"`

	// READ-ONLY; When there is too much alert data for one page, use this URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

IoTSecurityAggregatedAlertList - List of IoT Security solution aggregated alert data.

func (IoTSecurityAggregatedAlertList) MarshalJSON

func (i IoTSecurityAggregatedAlertList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedAlertList.

func (*IoTSecurityAggregatedAlertList) UnmarshalJSON added in v0.8.0

func (i *IoTSecurityAggregatedAlertList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedAlertList.

type IoTSecurityAggregatedAlertProperties

type IoTSecurityAggregatedAlertProperties struct {
	// READ-ONLY; IoT Security solution alert response.
	ActionTaken *string `json:"actionTaken,omitempty" azure:"ro"`

	// READ-ONLY; Date of detection.
	AggregatedDateUTC *time.Time `json:"aggregatedDateUtc,omitempty" azure:"ro"`

	// READ-ONLY; Display name of the alert type.
	AlertDisplayName *string `json:"alertDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; Name of the alert type.
	AlertType *string `json:"alertType,omitempty" azure:"ro"`

	// READ-ONLY; Number of alerts occurrences within the aggregated time window.
	Count *int64 `json:"count,omitempty" azure:"ro"`

	// READ-ONLY; Description of the suspected vulnerability and meaning.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource ID of the resource that received the alerts.
	EffectedResourceType *string `json:"effectedResourceType,omitempty" azure:"ro"`

	// READ-ONLY; Log analytics query for getting the list of affected devices/alerts.
	LogAnalyticsQuery *string `json:"logAnalyticsQuery,omitempty" azure:"ro"`

	// READ-ONLY; Recommended steps for remediation.
	RemediationSteps *string `json:"remediationSteps,omitempty" azure:"ro"`

	// READ-ONLY; Assessed alert severity.
	ReportedSeverity *ReportedSeverity `json:"reportedSeverity,omitempty" azure:"ro"`

	// READ-ONLY; The type of the alerted resource (Azure, Non-Azure).
	SystemSource *string `json:"systemSource,omitempty" azure:"ro"`

	// READ-ONLY; 10 devices with the highest number of occurrences of this alert type, on this day.
	TopDevicesList []*IoTSecurityAggregatedAlertPropertiesTopDevicesListItem `json:"topDevicesList,omitempty" azure:"ro"`

	// READ-ONLY; Name of the organization that raised the alert.
	VendorName *string `json:"vendorName,omitempty" azure:"ro"`
}

IoTSecurityAggregatedAlertProperties - IoT Security solution aggregated alert details.

func (IoTSecurityAggregatedAlertProperties) MarshalJSON

func (i IoTSecurityAggregatedAlertProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedAlertProperties.

func (*IoTSecurityAggregatedAlertProperties) UnmarshalJSON

func (i *IoTSecurityAggregatedAlertProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedAlertProperties.

type IoTSecurityAggregatedAlertPropertiesTopDevicesListItem

type IoTSecurityAggregatedAlertPropertiesTopDevicesListItem struct {
	// READ-ONLY; Number of alerts raised for this device.
	AlertsCount *int64 `json:"alertsCount,omitempty" azure:"ro"`

	// READ-ONLY; Name of the device.
	DeviceID *string `json:"deviceId,omitempty" azure:"ro"`

	// READ-ONLY; Most recent time this alert was raised for this device, on this day.
	LastOccurrence *string `json:"lastOccurrence,omitempty" azure:"ro"`
}

func (IoTSecurityAggregatedAlertPropertiesTopDevicesListItem) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.

func (*IoTSecurityAggregatedAlertPropertiesTopDevicesListItem) UnmarshalJSON added in v0.8.0

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.

type IoTSecurityAggregatedRecommendation

type IoTSecurityAggregatedRecommendation struct {
	// Security Solution data
	Properties *IoTSecurityAggregatedRecommendationProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

IoTSecurityAggregatedRecommendation - IoT Security solution recommendation information.

func (IoTSecurityAggregatedRecommendation) MarshalJSON

func (i IoTSecurityAggregatedRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedRecommendation.

func (*IoTSecurityAggregatedRecommendation) UnmarshalJSON

func (i *IoTSecurityAggregatedRecommendation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedRecommendation.

type IoTSecurityAggregatedRecommendationList

type IoTSecurityAggregatedRecommendationList struct {
	// REQUIRED; List of aggregated recommendations data.
	Value []*IoTSecurityAggregatedRecommendation `json:"value,omitempty"`

	// READ-ONLY; When there is too much alert data for one page, use this URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

IoTSecurityAggregatedRecommendationList - List of IoT Security solution aggregated recommendations.

func (IoTSecurityAggregatedRecommendationList) MarshalJSON

func (i IoTSecurityAggregatedRecommendationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedRecommendationList.

func (*IoTSecurityAggregatedRecommendationList) UnmarshalJSON added in v0.8.0

func (i *IoTSecurityAggregatedRecommendationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedRecommendationList.

type IoTSecurityAggregatedRecommendationProperties

type IoTSecurityAggregatedRecommendationProperties struct {
	// Name of the recommendation.
	RecommendationName *string `json:"recommendationName,omitempty"`

	// READ-ONLY; Description of the suspected vulnerability and meaning.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Name of the organization that made the recommendation.
	DetectedBy *string `json:"detectedBy,omitempty" azure:"ro"`

	// READ-ONLY; Number of healthy devices within the IoT Security solution.
	HealthyDevices *int64 `json:"healthyDevices,omitempty" azure:"ro"`

	// READ-ONLY; Log analytics query for getting the list of affected devices/alerts.
	LogAnalyticsQuery *string `json:"logAnalyticsQuery,omitempty" azure:"ro"`

	// READ-ONLY; Display name of the recommendation type.
	RecommendationDisplayName *string `json:"recommendationDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; Recommendation-type GUID.
	RecommendationTypeID *string `json:"recommendationTypeId,omitempty" azure:"ro"`

	// READ-ONLY; Recommended steps for remediation
	RemediationSteps *string `json:"remediationSteps,omitempty" azure:"ro"`

	// READ-ONLY; Assessed recommendation severity.
	ReportedSeverity *ReportedSeverity `json:"reportedSeverity,omitempty" azure:"ro"`

	// READ-ONLY; Number of unhealthy devices within the IoT Security solution.
	UnhealthyDeviceCount *int64 `json:"unhealthyDeviceCount,omitempty" azure:"ro"`
}

IoTSecurityAggregatedRecommendationProperties - IoT Security solution aggregated recommendation information

func (IoTSecurityAggregatedRecommendationProperties) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAggregatedRecommendationProperties.

func (*IoTSecurityAggregatedRecommendationProperties) UnmarshalJSON added in v0.8.0

func (i *IoTSecurityAggregatedRecommendationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAggregatedRecommendationProperties.

type IoTSecurityAlertedDevice

type IoTSecurityAlertedDevice struct {
	// READ-ONLY; Number of alerts raised for this device.
	AlertsCount *int64 `json:"alertsCount,omitempty" azure:"ro"`

	// READ-ONLY; Device identifier.
	DeviceID *string `json:"deviceId,omitempty" azure:"ro"`
}

IoTSecurityAlertedDevice - Statistical information about the number of alerts per device during last set number of days.

func (IoTSecurityAlertedDevice) MarshalJSON added in v0.8.0

func (i IoTSecurityAlertedDevice) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityAlertedDevice.

func (*IoTSecurityAlertedDevice) UnmarshalJSON added in v0.8.0

func (i *IoTSecurityAlertedDevice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityAlertedDevice.

type IoTSecurityDeviceAlert

type IoTSecurityDeviceAlert struct {
	// READ-ONLY; Display name of the alert
	AlertDisplayName *string `json:"alertDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; Number of alerts raised for this alert type.
	AlertsCount *int64 `json:"alertsCount,omitempty" azure:"ro"`

	// READ-ONLY; Assessed Alert severity.
	ReportedSeverity *ReportedSeverity `json:"reportedSeverity,omitempty" azure:"ro"`
}

IoTSecurityDeviceAlert - Statistical information about the number of alerts per alert type during last set number of days

func (IoTSecurityDeviceAlert) MarshalJSON added in v0.8.0

func (i IoTSecurityDeviceAlert) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityDeviceAlert.

func (*IoTSecurityDeviceAlert) UnmarshalJSON added in v0.8.0

func (i *IoTSecurityDeviceAlert) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityDeviceAlert.

type IoTSecurityDeviceRecommendation

type IoTSecurityDeviceRecommendation struct {
	// READ-ONLY; Number of devices with this recommendation.
	DevicesCount *int64 `json:"devicesCount,omitempty" azure:"ro"`

	// READ-ONLY; Display name of the recommendation.
	RecommendationDisplayName *string `json:"recommendationDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; Assessed recommendation severity.
	ReportedSeverity *ReportedSeverity `json:"reportedSeverity,omitempty" azure:"ro"`
}

IoTSecurityDeviceRecommendation - Statistical information about the number of recommendations per device, per recommendation type.

func (IoTSecurityDeviceRecommendation) MarshalJSON added in v0.8.0

func (i IoTSecurityDeviceRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecurityDeviceRecommendation.

func (*IoTSecurityDeviceRecommendation) UnmarshalJSON added in v0.8.0

func (i *IoTSecurityDeviceRecommendation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecurityDeviceRecommendation.

type IoTSecuritySolutionAnalyticsModel

type IoTSecuritySolutionAnalyticsModel struct {
	// Security Solution Aggregated Alert data
	Properties *IoTSecuritySolutionAnalyticsModelProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

IoTSecuritySolutionAnalyticsModel - Security analytics of your IoT Security solution

func (IoTSecuritySolutionAnalyticsModel) MarshalJSON

func (i IoTSecuritySolutionAnalyticsModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionAnalyticsModel.

func (*IoTSecuritySolutionAnalyticsModel) UnmarshalJSON

func (i *IoTSecuritySolutionAnalyticsModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionAnalyticsModel.

type IoTSecuritySolutionAnalyticsModelList

type IoTSecuritySolutionAnalyticsModelList struct {
	// REQUIRED; List of Security analytics of your IoT Security solution
	Value []*IoTSecuritySolutionAnalyticsModel `json:"value,omitempty"`

	// READ-ONLY; When there is too much alert data for one page, use this URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

IoTSecuritySolutionAnalyticsModelList - List of Security analytics of your IoT Security solution

func (IoTSecuritySolutionAnalyticsModelList) MarshalJSON

func (i IoTSecuritySolutionAnalyticsModelList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionAnalyticsModelList.

func (*IoTSecuritySolutionAnalyticsModelList) UnmarshalJSON added in v0.8.0

func (i *IoTSecuritySolutionAnalyticsModelList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionAnalyticsModelList.

type IoTSecuritySolutionAnalyticsModelProperties

type IoTSecuritySolutionAnalyticsModelProperties struct {
	// List of the 3 most prevalent device alerts.
	MostPrevalentDeviceAlerts []*IoTSecurityDeviceAlert `json:"mostPrevalentDeviceAlerts,omitempty"`

	// List of the 3 most prevalent device recommendations.
	MostPrevalentDeviceRecommendations []*IoTSecurityDeviceRecommendation `json:"mostPrevalentDeviceRecommendations,omitempty"`

	// List of the 3 devices with the most alerts.
	TopAlertedDevices []*IoTSecurityAlertedDevice `json:"topAlertedDevices,omitempty"`

	// READ-ONLY; List of device metrics by the aggregation date.
	DevicesMetrics []*IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem `json:"devicesMetrics,omitempty" azure:"ro"`

	// READ-ONLY; Security analytics of your IoT Security solution.
	Metrics *IoTSeverityMetrics `json:"metrics,omitempty" azure:"ro"`

	// READ-ONLY; Number of unhealthy devices within your IoT Security solution.
	UnhealthyDeviceCount *int64 `json:"unhealthyDeviceCount,omitempty" azure:"ro"`
}

IoTSecuritySolutionAnalyticsModelProperties - Security analytics properties of your IoT Security solution

func (IoTSecuritySolutionAnalyticsModelProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionAnalyticsModelProperties.

func (*IoTSecuritySolutionAnalyticsModelProperties) UnmarshalJSON added in v0.8.0

func (i *IoTSecuritySolutionAnalyticsModelProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionAnalyticsModelProperties.

type IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem

type IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem struct {
	// Aggregation of IoT Security solution device alert metrics by date.
	Date *time.Time `json:"date,omitempty"`

	// Device alert count by severity.
	DevicesMetrics *IoTSeverityMetrics `json:"devicesMetrics,omitempty"`
}

func (IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem.

func (*IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem.

type IoTSecuritySolutionModel

type IoTSecuritySolutionModel struct {
	// The resource location.
	Location *string `json:"location,omitempty"`

	// Security Solution data
	Properties *IoTSecuritySolutionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

IoTSecuritySolutionModel - IoT Security solution configuration and resource information.

func (IoTSecuritySolutionModel) MarshalJSON

func (i IoTSecuritySolutionModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionModel.

func (*IoTSecuritySolutionModel) UnmarshalJSON

func (i *IoTSecuritySolutionModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionModel.

type IoTSecuritySolutionProperties

type IoTSecuritySolutionProperties struct {
	// REQUIRED; Resource display name.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; IoT Hub resource IDs
	IotHubs []*string `json:"iotHubs,omitempty"`

	// List of additional workspaces
	AdditionalWorkspaces []*AdditionalWorkspacesProperties `json:"additionalWorkspaces,omitempty"`

	// Disabled data sources. Disabling these data sources compromises the system.
	DisabledDataSources []*DataSource `json:"disabledDataSources,omitempty"`

	// List of additional options for exporting to workspace data.
	Export []*ExportData `json:"export,omitempty"`

	// List of the configuration status for each recommendation type.
	RecommendationsConfiguration []*RecommendationConfigurationProperties `json:"recommendationsConfiguration,omitempty"`

	// Status of the IoT Security solution.
	Status *SecuritySolutionStatus `json:"status,omitempty"`

	// Unmasked IP address logging status
	UnmaskedIPLoggingStatus *UnmaskedIPLoggingStatus `json:"unmaskedIpLoggingStatus,omitempty"`

	// Properties of the IoT Security solution's user defined resources.
	UserDefinedResources *UserDefinedResourcesProperties `json:"userDefinedResources,omitempty"`

	// Workspace resource ID
	Workspace *string `json:"workspace,omitempty"`

	// READ-ONLY; List of resources that were automatically discovered as relevant to the security solution.
	AutoDiscoveredResources []*string `json:"autoDiscoveredResources,omitempty" azure:"ro"`
}

IoTSecuritySolutionProperties - Security Solution setting data

func (IoTSecuritySolutionProperties) MarshalJSON

func (i IoTSecuritySolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionProperties.

func (*IoTSecuritySolutionProperties) UnmarshalJSON added in v0.8.0

func (i *IoTSecuritySolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionProperties.

type IoTSecuritySolutionsList

type IoTSecuritySolutionsList struct {
	// REQUIRED; List of IoT Security solutions
	Value []*IoTSecuritySolutionModel `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

IoTSecuritySolutionsList - List of IoT Security solutions.

func (IoTSecuritySolutionsList) MarshalJSON

func (i IoTSecuritySolutionsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSecuritySolutionsList.

func (*IoTSecuritySolutionsList) UnmarshalJSON added in v0.8.0

func (i *IoTSecuritySolutionsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSecuritySolutionsList.

type IoTSeverityMetrics

type IoTSeverityMetrics struct {
	// Count of high severity alerts/recommendations.
	High *int64 `json:"high,omitempty"`

	// Count of low severity alerts/recommendations.
	Low *int64 `json:"low,omitempty"`

	// Count of medium severity alerts/recommendations.
	Medium *int64 `json:"medium,omitempty"`
}

IoTSeverityMetrics - IoT Security solution analytics severity metrics.

func (IoTSeverityMetrics) MarshalJSON added in v0.8.0

func (i IoTSeverityMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IoTSeverityMetrics.

func (*IoTSeverityMetrics) UnmarshalJSON added in v0.8.0

func (i *IoTSeverityMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IoTSeverityMetrics.

type IotSecuritySolutionAnalyticsClient

type IotSecuritySolutionAnalyticsClient struct {
	// contains filtered or unexported fields
}

IotSecuritySolutionAnalyticsClient contains the methods for the IotSecuritySolutionAnalytics group. Don't use this type directly, use NewIotSecuritySolutionAnalyticsClient() instead.

func NewIotSecuritySolutionAnalyticsClient

func NewIotSecuritySolutionAnalyticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IotSecuritySolutionAnalyticsClient, error)

NewIotSecuritySolutionAnalyticsClient creates a new instance of IotSecuritySolutionAnalyticsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*IotSecuritySolutionAnalyticsClient) Get

Get - Use this method to get IoT Security Analytics metrics. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. options - IotSecuritySolutionAnalyticsClientGetOptions contains the optional parameters for the IotSecuritySolutionAnalyticsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAnalytics.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionAnalyticsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IotSecuritySolutionAnalyticsClient) List

List - Use this method to get IoT security Analytics metrics in an array. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. options - IotSecuritySolutionAnalyticsClientListOptions contains the optional parameters for the IotSecuritySolutionAnalyticsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAnalyticsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionAnalyticsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type IotSecuritySolutionAnalyticsClientGetOptions added in v0.3.0

type IotSecuritySolutionAnalyticsClientGetOptions struct {
}

IotSecuritySolutionAnalyticsClientGetOptions contains the optional parameters for the IotSecuritySolutionAnalyticsClient.Get method.

type IotSecuritySolutionAnalyticsClientGetResponse added in v0.3.0

type IotSecuritySolutionAnalyticsClientGetResponse struct {
	IoTSecuritySolutionAnalyticsModel
}

IotSecuritySolutionAnalyticsClientGetResponse contains the response from method IotSecuritySolutionAnalyticsClient.Get.

type IotSecuritySolutionAnalyticsClientListOptions added in v0.3.0

type IotSecuritySolutionAnalyticsClientListOptions struct {
}

IotSecuritySolutionAnalyticsClientListOptions contains the optional parameters for the IotSecuritySolutionAnalyticsClient.List method.

type IotSecuritySolutionAnalyticsClientListResponse added in v0.3.0

type IotSecuritySolutionAnalyticsClientListResponse struct {
	IoTSecuritySolutionAnalyticsModelList
}

IotSecuritySolutionAnalyticsClientListResponse contains the response from method IotSecuritySolutionAnalyticsClient.List.

type IotSecuritySolutionClient

type IotSecuritySolutionClient struct {
	// contains filtered or unexported fields
}

IotSecuritySolutionClient contains the methods for the IotSecuritySolution group. Don't use this type directly, use NewIotSecuritySolutionClient() instead.

func NewIotSecuritySolutionClient

func NewIotSecuritySolutionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IotSecuritySolutionClient, error)

NewIotSecuritySolutionClient creates a new instance of IotSecuritySolutionClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*IotSecuritySolutionClient) CreateOrUpdate

func (client *IotSecuritySolutionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, solutionName string, iotSecuritySolutionData IoTSecuritySolutionModel, options *IotSecuritySolutionClientCreateOrUpdateOptions) (IotSecuritySolutionClientCreateOrUpdateResponse, error)

CreateOrUpdate - Use this method to create or update yours IoT Security solution If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. iotSecuritySolutionData - The security solution data options - IotSecuritySolutionClientCreateOrUpdateOptions contains the optional parameters for the IotSecuritySolutionClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/CreateIoTSecuritySolution.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "MyGroup", "default", armsecurity.IoTSecuritySolutionModel{
		Tags:     map[string]*string{},
		Location: to.Ptr("East Us"),
		Properties: &armsecurity.IoTSecuritySolutionProperties{
			DisabledDataSources: []*armsecurity.DataSource{},
			DisplayName:         to.Ptr("Solution Default"),
			Export:              []*armsecurity.ExportData{},
			IotHubs: []*string{
				to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
			RecommendationsConfiguration: []*armsecurity.RecommendationConfigurationProperties{
				{
					RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
					Status:             to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
				},
				{
					RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
					Status:             to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
				}},
			Status:                  to.Ptr(armsecurity.SecuritySolutionStatusEnabled),
			UnmaskedIPLoggingStatus: to.Ptr(armsecurity.UnmaskedIPLoggingStatusEnabled),
			UserDefinedResources: &armsecurity.UserDefinedResourcesProperties{
				Query: to.Ptr("where type != \"microsoft.devices/iothubs\" | where name contains \"iot\""),
				QuerySubscriptions: []*string{
					to.Ptr("075423e9-7d33-4166-8bdf-3920b04e3735")},
			},
			Workspace: to.Ptr("/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IotSecuritySolutionClient) Delete

Delete - Use this method to delete yours IoT Security solution If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. options - IotSecuritySolutionClientDeleteOptions contains the optional parameters for the IotSecuritySolutionClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/DeleteIoTSecuritySolution.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*IotSecuritySolutionClient) Get

Get - User this method to get details of a specific IoT Security solution based on solution name If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. options - IotSecuritySolutionClientGetOptions contains the optional parameters for the IotSecuritySolutionClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolution.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IotSecuritySolutionClient) NewListByResourceGroupPager added in v0.6.0

NewListByResourceGroupPager - Use this method to get the list IoT Security solutions organized by resource group. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - IotSecuritySolutionClientListByResourceGroupOptions contains the optional parameters for the IotSecuritySolutionClient.ListByResourceGroup method.

Example (ListIoTSecuritySolutionsByResourceGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsListByRg.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("MyGroup", &armsecurity.IotSecuritySolutionClientListByResourceGroupOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (ListIoTSecuritySolutionsByResourceGroupAndIoTHub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsListByIotHubAndRg.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("MyRg", &armsecurity.IotSecuritySolutionClientListByResourceGroupOptions{Filter: to.Ptr("properties.iotHubs/any(i eq \"/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub\")")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*IotSecuritySolutionClient) NewListBySubscriptionPager added in v0.6.0

NewListBySubscriptionPager - Use this method to get the list of IoT Security solutions by subscription. Generated from API version 2019-08-01 options - IotSecuritySolutionClientListBySubscriptionOptions contains the optional parameters for the IotSecuritySolutionClient.ListBySubscription method.

Example (ListIoTSecuritySolutionsByIoTHub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsListByIotHub.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(&armsecurity.IotSecuritySolutionClientListBySubscriptionOptions{Filter: to.Ptr("properties.iotHubs/any(i eq \"/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub\")")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (ListIoTSecuritySolutionsBySubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(&armsecurity.IotSecuritySolutionClientListBySubscriptionOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*IotSecuritySolutionClient) Update

func (client *IotSecuritySolutionClient) Update(ctx context.Context, resourceGroupName string, solutionName string, updateIotSecuritySolutionData UpdateIotSecuritySolutionData, options *IotSecuritySolutionClientUpdateOptions) (IotSecuritySolutionClientUpdateResponse, error)

Update - Use this method to update existing IoT Security solution tags or user defined resources. To update other fields use the CreateOrUpdate method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. updateIotSecuritySolutionData - The security solution data options - IotSecuritySolutionClientUpdateOptions contains the optional parameters for the IotSecuritySolutionClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/UpdateIoTSecuritySolution.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx, "myRg", "default", armsecurity.UpdateIotSecuritySolutionData{
		Tags: map[string]*string{
			"foo": to.Ptr("bar"),
		},
		Properties: &armsecurity.UpdateIoTSecuritySolutionProperties{
			RecommendationsConfiguration: []*armsecurity.RecommendationConfigurationProperties{
				{
					RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
					Status:             to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
				},
				{
					RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
					Status:             to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
				}},
			UserDefinedResources: &armsecurity.UserDefinedResourcesProperties{
				Query: to.Ptr("where type != \"microsoft.devices/iothubs\" | where name contains \"v2\""),
				QuerySubscriptions: []*string{
					to.Ptr("075423e9-7d33-4166-8bdf-3920b04e3735")},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type IotSecuritySolutionClientCreateOrUpdateOptions added in v0.3.0

type IotSecuritySolutionClientCreateOrUpdateOptions struct {
}

IotSecuritySolutionClientCreateOrUpdateOptions contains the optional parameters for the IotSecuritySolutionClient.CreateOrUpdate method.

type IotSecuritySolutionClientCreateOrUpdateResponse added in v0.3.0

type IotSecuritySolutionClientCreateOrUpdateResponse struct {
	IoTSecuritySolutionModel
}

IotSecuritySolutionClientCreateOrUpdateResponse contains the response from method IotSecuritySolutionClient.CreateOrUpdate.

type IotSecuritySolutionClientDeleteOptions added in v0.3.0

type IotSecuritySolutionClientDeleteOptions struct {
}

IotSecuritySolutionClientDeleteOptions contains the optional parameters for the IotSecuritySolutionClient.Delete method.

type IotSecuritySolutionClientDeleteResponse added in v0.3.0

type IotSecuritySolutionClientDeleteResponse struct {
}

IotSecuritySolutionClientDeleteResponse contains the response from method IotSecuritySolutionClient.Delete.

type IotSecuritySolutionClientGetOptions added in v0.3.0

type IotSecuritySolutionClientGetOptions struct {
}

IotSecuritySolutionClientGetOptions contains the optional parameters for the IotSecuritySolutionClient.Get method.

type IotSecuritySolutionClientGetResponse added in v0.3.0

type IotSecuritySolutionClientGetResponse struct {
	IoTSecuritySolutionModel
}

IotSecuritySolutionClientGetResponse contains the response from method IotSecuritySolutionClient.Get.

type IotSecuritySolutionClientListByResourceGroupOptions added in v0.3.0

type IotSecuritySolutionClientListByResourceGroupOptions struct {
	// Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs.
	Filter *string
}

IotSecuritySolutionClientListByResourceGroupOptions contains the optional parameters for the IotSecuritySolutionClient.ListByResourceGroup method.

type IotSecuritySolutionClientListByResourceGroupResponse added in v0.3.0

type IotSecuritySolutionClientListByResourceGroupResponse struct {
	IoTSecuritySolutionsList
}

IotSecuritySolutionClientListByResourceGroupResponse contains the response from method IotSecuritySolutionClient.ListByResourceGroup.

type IotSecuritySolutionClientListBySubscriptionOptions added in v0.3.0

type IotSecuritySolutionClientListBySubscriptionOptions struct {
	// Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs.
	Filter *string
}

IotSecuritySolutionClientListBySubscriptionOptions contains the optional parameters for the IotSecuritySolutionClient.ListBySubscription method.

type IotSecuritySolutionClientListBySubscriptionResponse added in v0.3.0

type IotSecuritySolutionClientListBySubscriptionResponse struct {
	IoTSecuritySolutionsList
}

IotSecuritySolutionClientListBySubscriptionResponse contains the response from method IotSecuritySolutionClient.ListBySubscription.

type IotSecuritySolutionClientUpdateOptions added in v0.3.0

type IotSecuritySolutionClientUpdateOptions struct {
}

IotSecuritySolutionClientUpdateOptions contains the optional parameters for the IotSecuritySolutionClient.Update method.

type IotSecuritySolutionClientUpdateResponse added in v0.3.0

type IotSecuritySolutionClientUpdateResponse struct {
	IoTSecuritySolutionModel
}

IotSecuritySolutionClientUpdateResponse contains the response from method IotSecuritySolutionClient.Update.

type IotSecuritySolutionsAnalyticsAggregatedAlertClient

type IotSecuritySolutionsAnalyticsAggregatedAlertClient struct {
	// contains filtered or unexported fields
}

IotSecuritySolutionsAnalyticsAggregatedAlertClient contains the methods for the IotSecuritySolutionsAnalyticsAggregatedAlert group. Don't use this type directly, use NewIotSecuritySolutionsAnalyticsAggregatedAlertClient() instead.

func NewIotSecuritySolutionsAnalyticsAggregatedAlertClient

func NewIotSecuritySolutionsAnalyticsAggregatedAlertClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IotSecuritySolutionsAnalyticsAggregatedAlertClient, error)

NewIotSecuritySolutionsAnalyticsAggregatedAlertClient creates a new instance of IotSecuritySolutionsAnalyticsAggregatedAlertClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*IotSecuritySolutionsAnalyticsAggregatedAlertClient) Dismiss

Dismiss - Use this method to dismiss an aggregated IoT Security Solution Alert. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. aggregatedAlertName - Identifier of the aggregated alert. options - IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsAggregatedAlertClient.Dismiss method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/PostIoTSecuritySolutionsSecurityAggregatedAlertDismiss.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionsAnalyticsAggregatedAlertClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Dismiss(ctx, "IoTEdgeResources", "default", "IoT_Bruteforce_Fail/2019-02-02/dismiss", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*IotSecuritySolutionsAnalyticsAggregatedAlertClient) Get

Get - Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is performed by alert name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. aggregatedAlertName - Identifier of the aggregated alert. options - IotSecuritySolutionsAnalyticsAggregatedAlertClientGetOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsAggregatedAlertClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAggregatedAlert.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionsAnalyticsAggregatedAlertClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "MyGroup", "default", "IoT_Bruteforce_Fail/2019-02-02", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IotSecuritySolutionsAnalyticsAggregatedAlertClient) NewListPager added in v0.6.0

NewListPager - Use this method to get the aggregated alert list of yours IoT Security solution. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. options - IotSecuritySolutionsAnalyticsAggregatedAlertClientListOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsAggregatedAlertClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAggregatedAlertList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionsAnalyticsAggregatedAlertClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("MyGroup", "default", &armsecurity.IotSecuritySolutionsAnalyticsAggregatedAlertClientListOptions{Top: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissOptions added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissOptions struct {
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsAggregatedAlertClient.Dismiss method.

type IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissResponse struct {
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientDismissResponse contains the response from method IotSecuritySolutionsAnalyticsAggregatedAlertClient.Dismiss.

type IotSecuritySolutionsAnalyticsAggregatedAlertClientGetOptions added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientGetOptions struct {
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientGetOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsAggregatedAlertClient.Get method.

type IotSecuritySolutionsAnalyticsAggregatedAlertClientGetResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientGetResponse struct {
	IoTSecurityAggregatedAlert
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientGetResponse contains the response from method IotSecuritySolutionsAnalyticsAggregatedAlertClient.Get.

type IotSecuritySolutionsAnalyticsAggregatedAlertClientListOptions added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientListOptions struct {
	// Number of results to retrieve.
	Top *int32
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientListOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsAggregatedAlertClient.List method.

type IotSecuritySolutionsAnalyticsAggregatedAlertClientListResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientListResponse struct {
	IoTSecurityAggregatedAlertList
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientListResponse contains the response from method IotSecuritySolutionsAnalyticsAggregatedAlertClient.List.

type IotSecuritySolutionsAnalyticsRecommendationClient

type IotSecuritySolutionsAnalyticsRecommendationClient struct {
	// contains filtered or unexported fields
}

IotSecuritySolutionsAnalyticsRecommendationClient contains the methods for the IotSecuritySolutionsAnalyticsRecommendation group. Don't use this type directly, use NewIotSecuritySolutionsAnalyticsRecommendationClient() instead.

func NewIotSecuritySolutionsAnalyticsRecommendationClient

func NewIotSecuritySolutionsAnalyticsRecommendationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IotSecuritySolutionsAnalyticsRecommendationClient, error)

NewIotSecuritySolutionsAnalyticsRecommendationClient creates a new instance of IotSecuritySolutionsAnalyticsRecommendationClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*IotSecuritySolutionsAnalyticsRecommendationClient) Get

Get - Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This aggregation is performed by recommendation name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. aggregatedRecommendationName - Name of the recommendation aggregated for this query. options - IotSecuritySolutionsAnalyticsRecommendationClientGetOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsRecommendationClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionsAnalyticsRecommendationClient("075423e9-7d33-4166-8bdf-3920b04e3735", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "IoTEdgeResources", "default", "OpenPortsOnDevice", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*IotSecuritySolutionsAnalyticsRecommendationClient) NewListPager added in v0.6.0

NewListPager - Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. Generated from API version 2019-08-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. solutionName - The name of the IoT Security solution. options - IotSecuritySolutionsAnalyticsRecommendationClientListOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsRecommendationClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendationList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewIotSecuritySolutionsAnalyticsRecommendationClient("075423e9-7d33-4166-8bdf-3920b04e3735", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("IoTEdgeResources", "default", &armsecurity.IotSecuritySolutionsAnalyticsRecommendationClientListOptions{Top: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type IotSecuritySolutionsAnalyticsRecommendationClientGetOptions added in v0.3.0

type IotSecuritySolutionsAnalyticsRecommendationClientGetOptions struct {
}

IotSecuritySolutionsAnalyticsRecommendationClientGetOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsRecommendationClient.Get method.

type IotSecuritySolutionsAnalyticsRecommendationClientGetResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsRecommendationClientGetResponse struct {
	IoTSecurityAggregatedRecommendation
}

IotSecuritySolutionsAnalyticsRecommendationClientGetResponse contains the response from method IotSecuritySolutionsAnalyticsRecommendationClient.Get.

type IotSecuritySolutionsAnalyticsRecommendationClientListOptions added in v0.3.0

type IotSecuritySolutionsAnalyticsRecommendationClientListOptions struct {
	// Number of results to retrieve.
	Top *int32
}

IotSecuritySolutionsAnalyticsRecommendationClientListOptions contains the optional parameters for the IotSecuritySolutionsAnalyticsRecommendationClient.List method.

type IotSecuritySolutionsAnalyticsRecommendationClientListResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsRecommendationClientListResponse struct {
	IoTSecurityAggregatedRecommendationList
}

IotSecuritySolutionsAnalyticsRecommendationClientListResponse contains the response from method IotSecuritySolutionsAnalyticsRecommendationClient.List.

type JitNetworkAccessPoliciesClient

type JitNetworkAccessPoliciesClient struct {
	// contains filtered or unexported fields
}

JitNetworkAccessPoliciesClient contains the methods for the JitNetworkAccessPolicies group. Don't use this type directly, use NewJitNetworkAccessPoliciesClient() instead.

func NewJitNetworkAccessPoliciesClient

func NewJitNetworkAccessPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JitNetworkAccessPoliciesClient, error)

NewJitNetworkAccessPoliciesClient creates a new instance of JitNetworkAccessPoliciesClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*JitNetworkAccessPoliciesClient) CreateOrUpdate

CreateOrUpdate - Create a policy for protecting resources using Just-in-Time access control If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations jitNetworkAccessPolicyName - Name of a Just-in-Time access configuration policy. options - JitNetworkAccessPoliciesClientCreateOrUpdateOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "myRg1", "westeurope", "default", armsecurity.JitNetworkAccessPolicy{
		Kind:     to.Ptr("Basic"),
		Location: to.Ptr("westeurope"),
		Name:     to.Ptr("default"),
		Type:     to.Ptr("Microsoft.Security/locations/jitNetworkAccessPolicies"),
		ID:       to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/jitNetworkAccessPolicies/default"),
		Properties: &armsecurity.JitNetworkAccessPolicyProperties{
			ProvisioningState: to.Ptr("Succeeded"),
			Requests: []*armsecurity.JitNetworkAccessRequest{
				{
					Requestor:    to.Ptr("barbara@contoso.com"),
					StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T08:06:45.5691611Z"); return t }()),
					VirtualMachines: []*armsecurity.JitNetworkAccessRequestVirtualMachine{
						{
							ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
							Ports: []*armsecurity.JitNetworkAccessRequestPort{
								{
									AllowedSourceAddressPrefix: to.Ptr("192.127.0.2"),
									EndTimeUTC:                 to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T09:06:45.5691611Z"); return t }()),
									Number:                     to.Ptr[int32](3389),
									Status:                     to.Ptr(armsecurity.StatusInitiated),
									StatusReason:               to.Ptr(armsecurity.StatusReasonUserRequested),
								}},
						}},
				}},
			VirtualMachines: []*armsecurity.JitNetworkAccessPolicyVirtualMachine{
				{
					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
					Ports: []*armsecurity.JitNetworkAccessPortRule{
						{
							AllowedSourceAddressPrefix: to.Ptr("*"),
							MaxRequestAccessDuration:   to.Ptr("PT3H"),
							Number:                     to.Ptr[int32](22),
							Protocol:                   to.Ptr(armsecurity.ProtocolAll),
						},
						{
							AllowedSourceAddressPrefix: to.Ptr("*"),
							MaxRequestAccessDuration:   to.Ptr("PT3H"),
							Number:                     to.Ptr[int32](3389),
							Protocol:                   to.Ptr(armsecurity.ProtocolAll),
						}},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*JitNetworkAccessPoliciesClient) Delete

func (client *JitNetworkAccessPoliciesClient) Delete(ctx context.Context, resourceGroupName string, ascLocation string, jitNetworkAccessPolicyName string, options *JitNetworkAccessPoliciesClientDeleteOptions) (JitNetworkAccessPoliciesClientDeleteResponse, error)

Delete - Delete a Just-in-Time access control policy. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations jitNetworkAccessPolicyName - Name of a Just-in-Time access configuration policy. options - JitNetworkAccessPoliciesClientDeleteOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/DeleteJitNetworkAccessPolicy_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "myRg1", "westeurope", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*JitNetworkAccessPoliciesClient) Get

func (client *JitNetworkAccessPoliciesClient) Get(ctx context.Context, resourceGroupName string, ascLocation string, jitNetworkAccessPolicyName string, options *JitNetworkAccessPoliciesClientGetOptions) (JitNetworkAccessPoliciesClientGetResponse, error)

Get - Policies for protecting resources using Just-in-Time access control for the subscription, location If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations jitNetworkAccessPolicyName - Name of a Just-in-Time access configuration policy. options - JitNetworkAccessPoliciesClientGetOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPolicy_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myRg1", "westeurope", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*JitNetworkAccessPoliciesClient) Initiate

Initiate - Initiate a JIT access from a specific Just-in-Time policy configuration. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations jitNetworkAccessPolicyName - Name of a Just-in-Time access configuration policy. options - JitNetworkAccessPoliciesClientInitiateOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.Initiate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Initiate(ctx, "myRg1", "westeurope", "default", armsecurity.JitNetworkAccessPolicyInitiateRequest{
		Justification: to.Ptr("testing a new version of the product"),
		VirtualMachines: []*armsecurity.JitNetworkAccessPolicyInitiateVirtualMachine{
			{
				ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
				Ports: []*armsecurity.JitNetworkAccessPolicyInitiatePort{
					{
						AllowedSourceAddressPrefix: to.Ptr("192.127.0.2"),
						Number:                     to.Ptr[int32](3389),
					}},
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*JitNetworkAccessPoliciesClient) NewListByRegionPager added in v0.6.0

NewListByRegionPager - Policies for protecting resources using Just-in-Time access control for the subscription, location Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - JitNetworkAccessPoliciesClientListByRegionOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.ListByRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByRegionPager("westeurope", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*JitNetworkAccessPoliciesClient) NewListByResourceGroupAndRegionPager added in v0.6.0

NewListByResourceGroupAndRegionPager - Policies for protecting resources using Just-in-Time access control for the subscription, location Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.ListByResourceGroupAndRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupAndRegionPager("myRg1", "westeurope", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*JitNetworkAccessPoliciesClient) NewListByResourceGroupPager added in v0.6.0

NewListByResourceGroupPager - Policies for protecting resources using Just-in-Time access control for the subscription, location Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. options - JitNetworkAccessPoliciesClientListByResourceGroupOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesResourceGroup_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myRg1", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*JitNetworkAccessPoliciesClient) NewListPager added in v0.6.0

NewListPager - Policies for protecting resources using Just-in-Time access control. Generated from API version 2020-01-01 options - JitNetworkAccessPoliciesClientListOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewJitNetworkAccessPoliciesClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type JitNetworkAccessPoliciesClientCreateOrUpdateOptions added in v0.3.0

type JitNetworkAccessPoliciesClientCreateOrUpdateOptions struct {
}

JitNetworkAccessPoliciesClientCreateOrUpdateOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.CreateOrUpdate method.

type JitNetworkAccessPoliciesClientCreateOrUpdateResponse added in v0.3.0

type JitNetworkAccessPoliciesClientCreateOrUpdateResponse struct {
	JitNetworkAccessPolicy
}

JitNetworkAccessPoliciesClientCreateOrUpdateResponse contains the response from method JitNetworkAccessPoliciesClient.CreateOrUpdate.

type JitNetworkAccessPoliciesClientDeleteOptions added in v0.3.0

type JitNetworkAccessPoliciesClientDeleteOptions struct {
}

JitNetworkAccessPoliciesClientDeleteOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.Delete method.

type JitNetworkAccessPoliciesClientDeleteResponse added in v0.3.0

type JitNetworkAccessPoliciesClientDeleteResponse struct {
}

JitNetworkAccessPoliciesClientDeleteResponse contains the response from method JitNetworkAccessPoliciesClient.Delete.

type JitNetworkAccessPoliciesClientGetOptions added in v0.3.0

type JitNetworkAccessPoliciesClientGetOptions struct {
}

JitNetworkAccessPoliciesClientGetOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.Get method.

type JitNetworkAccessPoliciesClientGetResponse added in v0.3.0

type JitNetworkAccessPoliciesClientGetResponse struct {
	JitNetworkAccessPolicy
}

JitNetworkAccessPoliciesClientGetResponse contains the response from method JitNetworkAccessPoliciesClient.Get.

type JitNetworkAccessPoliciesClientInitiateOptions added in v0.3.0

type JitNetworkAccessPoliciesClientInitiateOptions struct {
}

JitNetworkAccessPoliciesClientInitiateOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.Initiate method.

type JitNetworkAccessPoliciesClientInitiateResponse added in v0.3.0

type JitNetworkAccessPoliciesClientInitiateResponse struct {
	JitNetworkAccessRequest
}

JitNetworkAccessPoliciesClientInitiateResponse contains the response from method JitNetworkAccessPoliciesClient.Initiate.

type JitNetworkAccessPoliciesClientListByRegionOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListByRegionOptions struct {
}

JitNetworkAccessPoliciesClientListByRegionOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.ListByRegion method.

type JitNetworkAccessPoliciesClientListByRegionResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListByRegionResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListByRegionResponse contains the response from method JitNetworkAccessPoliciesClient.ListByRegion.

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions struct {
}

JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.ListByResourceGroupAndRegion method.

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListByResourceGroupAndRegionResponse contains the response from method JitNetworkAccessPoliciesClient.ListByResourceGroupAndRegion.

type JitNetworkAccessPoliciesClientListByResourceGroupOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupOptions struct {
}

JitNetworkAccessPoliciesClientListByResourceGroupOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.ListByResourceGroup method.

type JitNetworkAccessPoliciesClientListByResourceGroupResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListByResourceGroupResponse contains the response from method JitNetworkAccessPoliciesClient.ListByResourceGroup.

type JitNetworkAccessPoliciesClientListOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListOptions struct {
}

JitNetworkAccessPoliciesClientListOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.List method.

type JitNetworkAccessPoliciesClientListResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListResponse contains the response from method JitNetworkAccessPoliciesClient.List.

type JitNetworkAccessPoliciesList

type JitNetworkAccessPoliciesList struct {
	Value []*JitNetworkAccessPolicy `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

func (JitNetworkAccessPoliciesList) MarshalJSON

func (j JitNetworkAccessPoliciesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPoliciesList.

func (*JitNetworkAccessPoliciesList) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessPoliciesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPoliciesList.

type JitNetworkAccessPolicy

type JitNetworkAccessPolicy struct {
	// REQUIRED
	Properties *JitNetworkAccessPolicyProperties `json:"properties,omitempty"`

	// Kind of the resource
	Kind *string `json:"kind,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (JitNetworkAccessPolicy) MarshalJSON

func (j JitNetworkAccessPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPolicy.

func (*JitNetworkAccessPolicy) UnmarshalJSON

func (j *JitNetworkAccessPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPolicy.

type JitNetworkAccessPolicyInitiatePort

type JitNetworkAccessPolicyInitiatePort struct {
	// REQUIRED; The time to close the request in UTC
	EndTimeUTC *time.Time `json:"endTimeUtc,omitempty"`

	// REQUIRED
	Number *int32 `json:"number,omitempty"`

	// Source of the allowed traffic. If omitted, the request will be for the source IP address of the initiate request.
	AllowedSourceAddressPrefix *string `json:"allowedSourceAddressPrefix,omitempty"`
}

func (JitNetworkAccessPolicyInitiatePort) MarshalJSON

func (j JitNetworkAccessPolicyInitiatePort) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPolicyInitiatePort.

func (*JitNetworkAccessPolicyInitiatePort) UnmarshalJSON

func (j *JitNetworkAccessPolicyInitiatePort) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPolicyInitiatePort.

type JitNetworkAccessPolicyInitiateRequest

type JitNetworkAccessPolicyInitiateRequest struct {
	// REQUIRED; A list of virtual machines & ports to open access for
	VirtualMachines []*JitNetworkAccessPolicyInitiateVirtualMachine `json:"virtualMachines,omitempty"`

	// The justification for making the initiate request
	Justification *string `json:"justification,omitempty"`
}

func (JitNetworkAccessPolicyInitiateRequest) MarshalJSON

func (j JitNetworkAccessPolicyInitiateRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPolicyInitiateRequest.

func (*JitNetworkAccessPolicyInitiateRequest) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessPolicyInitiateRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPolicyInitiateRequest.

type JitNetworkAccessPolicyInitiateVirtualMachine

type JitNetworkAccessPolicyInitiateVirtualMachine struct {
	// REQUIRED; Resource ID of the virtual machine that is linked to this policy
	ID *string `json:"id,omitempty"`

	// REQUIRED; The ports to open for the resource with the id
	Ports []*JitNetworkAccessPolicyInitiatePort `json:"ports,omitempty"`
}

func (JitNetworkAccessPolicyInitiateVirtualMachine) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPolicyInitiateVirtualMachine.

func (*JitNetworkAccessPolicyInitiateVirtualMachine) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessPolicyInitiateVirtualMachine) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPolicyInitiateVirtualMachine.

type JitNetworkAccessPolicyProperties

type JitNetworkAccessPolicyProperties struct {
	// REQUIRED; Configurations for Microsoft.Compute/virtualMachines resource type.
	VirtualMachines []*JitNetworkAccessPolicyVirtualMachine `json:"virtualMachines,omitempty"`
	Requests        []*JitNetworkAccessRequest              `json:"requests,omitempty"`

	// READ-ONLY; Gets the provisioning state of the Just-in-Time policy.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

func (JitNetworkAccessPolicyProperties) MarshalJSON

func (j JitNetworkAccessPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPolicyProperties.

func (*JitNetworkAccessPolicyProperties) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPolicyProperties.

type JitNetworkAccessPolicyVirtualMachine

type JitNetworkAccessPolicyVirtualMachine struct {
	// REQUIRED; Resource ID of the virtual machine that is linked to this policy
	ID *string `json:"id,omitempty"`

	// REQUIRED; Port configurations for the virtual machine
	Ports []*JitNetworkAccessPortRule `json:"ports,omitempty"`

	// Public IP address of the Azure Firewall that is linked to this policy, if applicable
	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
}

func (JitNetworkAccessPolicyVirtualMachine) MarshalJSON

func (j JitNetworkAccessPolicyVirtualMachine) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPolicyVirtualMachine.

func (*JitNetworkAccessPolicyVirtualMachine) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessPolicyVirtualMachine) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPolicyVirtualMachine.

type JitNetworkAccessPortRule

type JitNetworkAccessPortRule struct {
	// REQUIRED; Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day
	MaxRequestAccessDuration *string `json:"maxRequestAccessDuration,omitempty"`

	// REQUIRED
	Number *int32 `json:"number,omitempty"`

	// REQUIRED
	Protocol *Protocol `json:"protocol,omitempty"`

	// Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3"
	// or "192.168.0.0/16".
	AllowedSourceAddressPrefix *string `json:"allowedSourceAddressPrefix,omitempty"`

	// Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
	AllowedSourceAddressPrefixes []*string `json:"allowedSourceAddressPrefixes,omitempty"`
}

func (JitNetworkAccessPortRule) MarshalJSON

func (j JitNetworkAccessPortRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessPortRule.

func (*JitNetworkAccessPortRule) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessPortRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessPortRule.

type JitNetworkAccessRequest

type JitNetworkAccessRequest struct {
	// REQUIRED; The identity of the person who made the request
	Requestor *string `json:"requestor,omitempty"`

	// REQUIRED; The start time of the request in UTC
	StartTimeUTC *time.Time `json:"startTimeUtc,omitempty"`

	// REQUIRED
	VirtualMachines []*JitNetworkAccessRequestVirtualMachine `json:"virtualMachines,omitempty"`

	// The justification for making the initiate request
	Justification *string `json:"justification,omitempty"`
}

func (JitNetworkAccessRequest) MarshalJSON

func (j JitNetworkAccessRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessRequest.

func (*JitNetworkAccessRequest) UnmarshalJSON

func (j *JitNetworkAccessRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessRequest.

type JitNetworkAccessRequestPort

type JitNetworkAccessRequestPort struct {
	// REQUIRED; The date & time at which the request ends in UTC
	EndTimeUTC *time.Time `json:"endTimeUtc,omitempty"`

	// REQUIRED
	Number *int32 `json:"number,omitempty"`

	// REQUIRED; The status of the port
	Status *Status `json:"status,omitempty"`

	// REQUIRED; A description of why the status has its value
	StatusReason *StatusReason `json:"statusReason,omitempty"`

	// Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3"
	// or "192.168.0.0/16".
	AllowedSourceAddressPrefix *string `json:"allowedSourceAddressPrefix,omitempty"`

	// Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
	AllowedSourceAddressPrefixes []*string `json:"allowedSourceAddressPrefixes,omitempty"`

	// The port which is mapped to this port's number in the Azure Firewall, if applicable
	MappedPort *int32 `json:"mappedPort,omitempty"`
}

func (JitNetworkAccessRequestPort) MarshalJSON

func (j JitNetworkAccessRequestPort) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessRequestPort.

func (*JitNetworkAccessRequestPort) UnmarshalJSON

func (j *JitNetworkAccessRequestPort) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessRequestPort.

type JitNetworkAccessRequestVirtualMachine

type JitNetworkAccessRequestVirtualMachine struct {
	// REQUIRED; Resource ID of the virtual machine that is linked to this policy
	ID *string `json:"id,omitempty"`

	// REQUIRED; The ports that were opened for the virtual machine
	Ports []*JitNetworkAccessRequestPort `json:"ports,omitempty"`
}

func (JitNetworkAccessRequestVirtualMachine) MarshalJSON

func (j JitNetworkAccessRequestVirtualMachine) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JitNetworkAccessRequestVirtualMachine.

func (*JitNetworkAccessRequestVirtualMachine) UnmarshalJSON added in v0.8.0

func (j *JitNetworkAccessRequestVirtualMachine) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JitNetworkAccessRequestVirtualMachine.

type Kind

type Kind string

Kind - The kind of alert simulation.

const (
	// KindBundles - Simulate alerts according to bundles
	KindBundles Kind = "Bundles"
)

func PossibleKindValues

func PossibleKindValues() []Kind

PossibleKindValues returns the possible values for the Kind const type.

type KindAutoGenerated

type KindAutoGenerated struct {
	// Kind of the resource
	Kind *string `json:"kind,omitempty"`
}

KindAutoGenerated - Describes an Azure resource with kind

func (KindAutoGenerated) MarshalJSON

func (k KindAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KindAutoGenerated.

func (*KindAutoGenerated) UnmarshalJSON

func (k *KindAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KindAutoGenerated.

type ListCustomAlertRule

type ListCustomAlertRule struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

ListCustomAlertRule - A List custom alert rule.

func (*ListCustomAlertRule) GetCustomAlertRule added in v0.3.0

func (l *ListCustomAlertRule) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type ListCustomAlertRule.

func (*ListCustomAlertRule) GetListCustomAlertRule

func (l *ListCustomAlertRule) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type ListCustomAlertRule.

func (ListCustomAlertRule) MarshalJSON added in v0.3.0

func (l ListCustomAlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListCustomAlertRule.

func (*ListCustomAlertRule) UnmarshalJSON

func (l *ListCustomAlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListCustomAlertRule.

type ListCustomAlertRuleClassification

type ListCustomAlertRuleClassification interface {
	CustomAlertRuleClassification
	// GetListCustomAlertRule returns the ListCustomAlertRule content of the underlying type.
	GetListCustomAlertRule() *ListCustomAlertRule
}

ListCustomAlertRuleClassification provides polymorphic access to related types. Call the interface's GetListCustomAlertRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AllowlistCustomAlertRule, *ConnectionFromIPNotAllowed, *ConnectionToIPNotAllowed, *DenylistCustomAlertRule, *ListCustomAlertRule, - *LocalUserNotAllowed, *ProcessNotAllowed

type LocalUserNotAllowed

type LocalUserNotAllowed struct {
	// REQUIRED; The values to allow. The format of the values depends on the rule type.
	AllowlistValues []*string `json:"allowlistValues,omitempty"`

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

LocalUserNotAllowed - Login by a local user that isn't allowed. Allow list consists of login names to allow.

func (*LocalUserNotAllowed) GetAllowlistCustomAlertRule added in v0.3.0

func (l *LocalUserNotAllowed) GetAllowlistCustomAlertRule() *AllowlistCustomAlertRule

GetAllowlistCustomAlertRule implements the AllowlistCustomAlertRuleClassification interface for type LocalUserNotAllowed.

func (*LocalUserNotAllowed) GetCustomAlertRule added in v0.3.0

func (l *LocalUserNotAllowed) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type LocalUserNotAllowed.

func (*LocalUserNotAllowed) GetListCustomAlertRule added in v0.3.0

func (l *LocalUserNotAllowed) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type LocalUserNotAllowed.

func (LocalUserNotAllowed) MarshalJSON

func (l LocalUserNotAllowed) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LocalUserNotAllowed.

func (*LocalUserNotAllowed) UnmarshalJSON added in v0.3.0

func (l *LocalUserNotAllowed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LocalUserNotAllowed.

type Location

type Location struct {
	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`
}

Location - Describes an Azure resource with location

func (Location) MarshalJSON

func (l Location) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Location.

func (*Location) UnmarshalJSON

func (l *Location) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Location.

type LocationsClient

type LocationsClient struct {
	// contains filtered or unexported fields
}

LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.

func NewLocationsClient

func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)

NewLocationsClient creates a new instance of LocationsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LocationsClient) Get

Get - Details of a specific location If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-06-01-preview ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Locations/GetLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewLocationsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "centralus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LocationsClient) NewListPager added in v0.6.0

NewListPager - The location of the responsible ASC of the specific subscription (home region). For each subscription there is only one responsible location. The location in the response should be used to read or write other resources in ASC according to their ID. Generated from API version 2015-06-01-preview options - LocationsClientListOptions contains the optional parameters for the LocationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Locations/GetLocations_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewLocationsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type LocationsClientGetOptions added in v0.3.0

type LocationsClientGetOptions struct {
}

LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method.

type LocationsClientGetResponse added in v0.3.0

type LocationsClientGetResponse struct {
	AscLocation
}

LocationsClientGetResponse contains the response from method LocationsClient.Get.

type LocationsClientListOptions added in v0.3.0

type LocationsClientListOptions struct {
}

LocationsClientListOptions contains the optional parameters for the LocationsClient.List method.

type LocationsClientListResponse added in v0.3.0

type LocationsClientListResponse struct {
	AscLocationList
}

LocationsClientListResponse contains the response from method LocationsClient.List.

type LogAnalyticsIdentifier

type LogAnalyticsIdentifier struct {
	// REQUIRED; There can be multiple identifiers of different type per alert, this field specify the identifier type.
	Type *ResourceIdentifierType `json:"type,omitempty"`

	// READ-ONLY; (optional) The LogAnalytics agent id reporting the event that this alert is based on.
	AgentID *string `json:"agentId,omitempty" azure:"ro"`

	// READ-ONLY; The LogAnalytics workspace id that stores this alert.
	WorkspaceID *string `json:"workspaceId,omitempty" azure:"ro"`

	// READ-ONLY; The azure resource group for the LogAnalytics workspace storing this alert
	WorkspaceResourceGroup *string `json:"workspaceResourceGroup,omitempty" azure:"ro"`

	// READ-ONLY; The azure subscription id for the LogAnalytics workspace storing this alert.
	WorkspaceSubscriptionID *string `json:"workspaceSubscriptionId,omitempty" azure:"ro"`
}

LogAnalyticsIdentifier - Represents a Log Analytics workspace scope identifier.

func (*LogAnalyticsIdentifier) GetResourceIdentifier added in v0.3.0

func (l *LogAnalyticsIdentifier) GetResourceIdentifier() *ResourceIdentifier

GetResourceIdentifier implements the ResourceIdentifierClassification interface for type LogAnalyticsIdentifier.

func (LogAnalyticsIdentifier) MarshalJSON

func (l LogAnalyticsIdentifier) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogAnalyticsIdentifier.

func (*LogAnalyticsIdentifier) UnmarshalJSON

func (l *LogAnalyticsIdentifier) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsIdentifier.

type MdeOnboardingData added in v0.2.0

type MdeOnboardingData struct {
	// Properties of the MDE configuration or data parameter needed to onboard the machine to MDE
	Properties *MdeOnboardingDataProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

MdeOnboardingData - The resource of the configuration or data needed to onboard the machine to MDE

func (MdeOnboardingData) MarshalJSON added in v0.2.0

func (m MdeOnboardingData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MdeOnboardingData.

func (*MdeOnboardingData) UnmarshalJSON added in v0.2.0

func (m *MdeOnboardingData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MdeOnboardingData.

type MdeOnboardingDataList added in v0.2.0

type MdeOnboardingDataList struct {
	// List of the resources of the configuration or data needed to onboard the machine to MDE
	Value []*MdeOnboardingData `json:"value,omitempty"`
}

MdeOnboardingDataList - List of all MDE onboarding data resources

func (MdeOnboardingDataList) MarshalJSON added in v0.2.0

func (m MdeOnboardingDataList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MdeOnboardingDataList.

func (*MdeOnboardingDataList) UnmarshalJSON added in v0.8.0

func (m *MdeOnboardingDataList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MdeOnboardingDataList.

type MdeOnboardingDataProperties added in v0.2.0

type MdeOnboardingDataProperties struct {
	// The onboarding package used to onboard Linux machines to MDE, coded in base64. This can also be used for onboarding using
	// the dedicated VM Extension
	OnboardingPackageLinux []byte `json:"onboardingPackageLinux,omitempty"`

	// The onboarding package used to onboard Windows machines to MDE, coded in base64. This can also be used for onboarding using
	// the dedicated VM Extension
	OnboardingPackageWindows []byte `json:"onboardingPackageWindows,omitempty"`
}

MdeOnboardingDataProperties - Properties of the MDE configuration or data parameter needed to onboard the machine to MDE

func (MdeOnboardingDataProperties) MarshalJSON added in v0.2.0

func (m MdeOnboardingDataProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MdeOnboardingDataProperties.

func (*MdeOnboardingDataProperties) UnmarshalJSON added in v0.2.0

func (m *MdeOnboardingDataProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MdeOnboardingDataProperties.

type MdeOnboardingsClient added in v0.2.0

type MdeOnboardingsClient struct {
	// contains filtered or unexported fields
}

MdeOnboardingsClient contains the methods for the MdeOnboardings group. Don't use this type directly, use NewMdeOnboardingsClient() instead.

func NewMdeOnboardingsClient added in v0.2.0

func NewMdeOnboardingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MdeOnboardingsClient, error)

NewMdeOnboardingsClient creates a new instance of MdeOnboardingsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*MdeOnboardingsClient) Get added in v0.2.0

Get - The default configuration or data needed to onboard the machine to MDE If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01-preview options - MdeOnboardingsClientGetOptions contains the optional parameters for the MdeOnboardingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-10-01-preview/examples/MdeOnboardings/GetMdeOnboardings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewMdeOnboardingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MdeOnboardingsClient) List added in v0.2.0

List - The configuration or data needed to onboard the machine to MDE If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-01-preview options - MdeOnboardingsClientListOptions contains the optional parameters for the MdeOnboardingsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-10-01-preview/examples/MdeOnboardings/ListMdeOnboardings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewMdeOnboardingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type MdeOnboardingsClientGetOptions added in v0.3.0

type MdeOnboardingsClientGetOptions struct {
}

MdeOnboardingsClientGetOptions contains the optional parameters for the MdeOnboardingsClient.Get method.

type MdeOnboardingsClientGetResponse added in v0.3.0

type MdeOnboardingsClientGetResponse struct {
	MdeOnboardingData
}

MdeOnboardingsClientGetResponse contains the response from method MdeOnboardingsClient.Get.

type MdeOnboardingsClientListOptions added in v0.3.0

type MdeOnboardingsClientListOptions struct {
}

MdeOnboardingsClientListOptions contains the optional parameters for the MdeOnboardingsClient.List method.

type MdeOnboardingsClientListResponse added in v0.3.0

type MdeOnboardingsClientListResponse struct {
	MdeOnboardingDataList
}

MdeOnboardingsClientListResponse contains the response from method MdeOnboardingsClient.List.

type MinimalSeverity added in v0.9.0

type MinimalSeverity string

MinimalSeverity - Defines the minimal alert severity which will be sent as email notifications

const (
	// MinimalSeverityHigh - Get notifications on new alerts with High severity
	MinimalSeverityHigh MinimalSeverity = "High"
	// MinimalSeverityLow - Don't get notifications on new alerts with low, medium or high severity
	MinimalSeverityLow MinimalSeverity = "Low"
	// MinimalSeverityMedium - Get notifications on new alerts with medium or high severity
	MinimalSeverityMedium MinimalSeverity = "Medium"
)

func PossibleMinimalSeverityValues added in v0.9.0

func PossibleMinimalSeverityValues() []MinimalSeverity

PossibleMinimalSeverityValues returns the possible values for the MinimalSeverity const type.

type MqttC2DMessagesNotInAllowedRange

type MqttC2DMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

MqttC2DMessagesNotInAllowedRange - Number of cloud to device messages (MQTT protocol) is not in allowed range.

func (*MqttC2DMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (m *MqttC2DMessagesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type MqttC2DMessagesNotInAllowedRange.

func (*MqttC2DMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (m *MqttC2DMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type MqttC2DMessagesNotInAllowedRange.

func (*MqttC2DMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (m *MqttC2DMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type MqttC2DMessagesNotInAllowedRange.

func (MqttC2DMessagesNotInAllowedRange) MarshalJSON

func (m MqttC2DMessagesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MqttC2DMessagesNotInAllowedRange.

func (*MqttC2DMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (m *MqttC2DMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MqttC2DMessagesNotInAllowedRange.

type MqttC2DRejectedMessagesNotInAllowedRange

type MqttC2DRejectedMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

MqttC2DRejectedMessagesNotInAllowedRange - Number of rejected cloud to device messages (MQTT protocol) is not in allowed range.

func (*MqttC2DRejectedMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type MqttC2DRejectedMessagesNotInAllowedRange.

func (*MqttC2DRejectedMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (m *MqttC2DRejectedMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type MqttC2DRejectedMessagesNotInAllowedRange.

func (*MqttC2DRejectedMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (m *MqttC2DRejectedMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type MqttC2DRejectedMessagesNotInAllowedRange.

func (MqttC2DRejectedMessagesNotInAllowedRange) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type MqttC2DRejectedMessagesNotInAllowedRange.

func (*MqttC2DRejectedMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (m *MqttC2DRejectedMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MqttC2DRejectedMessagesNotInAllowedRange.

type MqttD2CMessagesNotInAllowedRange

type MqttD2CMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

MqttD2CMessagesNotInAllowedRange - Number of device to cloud messages (MQTT protocol) is not in allowed range.

func (*MqttD2CMessagesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (m *MqttD2CMessagesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type MqttD2CMessagesNotInAllowedRange.

func (*MqttD2CMessagesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (m *MqttD2CMessagesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type MqttD2CMessagesNotInAllowedRange.

func (*MqttD2CMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (m *MqttD2CMessagesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type MqttD2CMessagesNotInAllowedRange.

func (MqttD2CMessagesNotInAllowedRange) MarshalJSON

func (m MqttD2CMessagesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MqttD2CMessagesNotInAllowedRange.

func (*MqttD2CMessagesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (m *MqttD2CMessagesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MqttD2CMessagesNotInAllowedRange.

type OfferingType added in v0.2.0

type OfferingType string

OfferingType - The type of the security offering.

const (
	OfferingTypeCspmMonitorAws               OfferingType = "CspmMonitorAws"
	OfferingTypeCspmMonitorAzureDevOps       OfferingType = "CspmMonitorAzureDevOps"
	OfferingTypeCspmMonitorGcp               OfferingType = "CspmMonitorGcp"
	OfferingTypeCspmMonitorGithub            OfferingType = "CspmMonitorGithub"
	OfferingTypeDefenderCspmAws              OfferingType = "DefenderCspmAws"
	OfferingTypeDefenderCspmGcp              OfferingType = "DefenderCspmGcp"
	OfferingTypeDefenderForContainersAws     OfferingType = "DefenderForContainersAws"
	OfferingTypeDefenderForContainersGcp     OfferingType = "DefenderForContainersGcp"
	OfferingTypeDefenderForDatabasesAws      OfferingType = "DefenderForDatabasesAws"
	OfferingTypeDefenderForDatabasesGcp      OfferingType = "DefenderForDatabasesGcp"
	OfferingTypeDefenderForDevOpsAzureDevOps OfferingType = "DefenderForDevOpsAzureDevOps"
	OfferingTypeDefenderForDevOpsGithub      OfferingType = "DefenderForDevOpsGithub"
	OfferingTypeDefenderForServersAws        OfferingType = "DefenderForServersAws"
	OfferingTypeDefenderForServersGcp        OfferingType = "DefenderForServersGcp"
	OfferingTypeInformationProtectionAws     OfferingType = "InformationProtectionAws"
)

func PossibleOfferingTypeValues added in v0.2.0

func PossibleOfferingTypeValues() []OfferingType

PossibleOfferingTypeValues returns the possible values for the OfferingType const type.

type OnPremiseResourceDetails added in v0.3.0

type OnPremiseResourceDetails struct {
	// REQUIRED; The name of the machine
	MachineName *string `json:"machineName,omitempty"`

	// REQUIRED; The platform where the assessed resource resides
	Source *Source `json:"source,omitempty"`

	// REQUIRED; The oms agent Id installed on the machine
	SourceComputerID *string `json:"sourceComputerId,omitempty"`

	// REQUIRED; The unique Id of the machine
	Vmuuid *string `json:"vmuuid,omitempty"`

	// REQUIRED; Azure resource Id of the workspace the machine is attached to
	WorkspaceID *string `json:"workspaceId,omitempty"`
}

OnPremiseResourceDetails - Details of the On Premise resource that was assessed

func (*OnPremiseResourceDetails) GetOnPremiseResourceDetails added in v0.3.0

func (o *OnPremiseResourceDetails) GetOnPremiseResourceDetails() *OnPremiseResourceDetails

GetOnPremiseResourceDetails implements the OnPremiseResourceDetailsClassification interface for type OnPremiseResourceDetails.

func (*OnPremiseResourceDetails) GetResourceDetails added in v0.3.0

func (o *OnPremiseResourceDetails) GetResourceDetails() *ResourceDetails

GetResourceDetails implements the ResourceDetailsClassification interface for type OnPremiseResourceDetails.

func (OnPremiseResourceDetails) MarshalJSON added in v0.3.0

func (o OnPremiseResourceDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OnPremiseResourceDetails.

func (*OnPremiseResourceDetails) UnmarshalJSON added in v0.3.0

func (o *OnPremiseResourceDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OnPremiseResourceDetails.

type OnPremiseResourceDetailsClassification added in v0.3.0

type OnPremiseResourceDetailsClassification interface {
	ResourceDetailsClassification
	// GetOnPremiseResourceDetails returns the OnPremiseResourceDetails content of the underlying type.
	GetOnPremiseResourceDetails() *OnPremiseResourceDetails
}

OnPremiseResourceDetailsClassification provides polymorphic access to related types. Call the interface's GetOnPremiseResourceDetails() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *OnPremiseResourceDetails, *OnPremiseSQLResourceDetails

type OnPremiseSQLResourceDetails added in v0.3.0

type OnPremiseSQLResourceDetails struct {
	// REQUIRED; The Sql database name installed on the machine
	DatabaseName *string `json:"databaseName,omitempty"`

	// REQUIRED; The name of the machine
	MachineName *string `json:"machineName,omitempty"`

	// REQUIRED; The Sql server name installed on the machine
	ServerName *string `json:"serverName,omitempty"`

	// REQUIRED; The platform where the assessed resource resides
	Source *Source `json:"source,omitempty"`

	// REQUIRED; The oms agent Id installed on the machine
	SourceComputerID *string `json:"sourceComputerId,omitempty"`

	// REQUIRED; The unique Id of the machine
	Vmuuid *string `json:"vmuuid,omitempty"`

	// REQUIRED; Azure resource Id of the workspace the machine is attached to
	WorkspaceID *string `json:"workspaceId,omitempty"`
}

OnPremiseSQLResourceDetails - Details of the On Premise Sql resource that was assessed

func (*OnPremiseSQLResourceDetails) GetOnPremiseResourceDetails added in v0.3.0

func (o *OnPremiseSQLResourceDetails) GetOnPremiseResourceDetails() *OnPremiseResourceDetails

GetOnPremiseResourceDetails implements the OnPremiseResourceDetailsClassification interface for type OnPremiseSQLResourceDetails.

func (*OnPremiseSQLResourceDetails) GetResourceDetails added in v0.3.0

func (o *OnPremiseSQLResourceDetails) GetResourceDetails() *ResourceDetails

GetResourceDetails implements the ResourceDetailsClassification interface for type OnPremiseSQLResourceDetails.

func (OnPremiseSQLResourceDetails) MarshalJSON added in v0.3.0

func (o OnPremiseSQLResourceDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OnPremiseSQLResourceDetails.

func (*OnPremiseSQLResourceDetails) UnmarshalJSON added in v0.3.0

func (o *OnPremiseSQLResourceDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OnPremiseSQLResourceDetails.

type Operation

type Operation struct {
	// Security operation display
	Display *OperationDisplay `json:"display,omitempty"`

	// READ-ONLY; Name of the operation
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Where the operation is originated
	Origin *string `json:"origin,omitempty" azure:"ro"`
}

Operation - Possible operation in the REST API of Microsoft.Security

func (Operation) MarshalJSON added in v0.8.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.8.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The description of the operation.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the security operation.
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The resource provider for the operation.
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the resource the operation applies to.
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - Security operation display

func (OperationDisplay) MarshalJSON added in v0.8.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.8.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// List of Security operations
	Value []*Operation `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

OperationList - List of possible operations for Microsoft.Security resource provider

func (OperationList) MarshalJSON

func (o OperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v0.8.0

func (o *OperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.6.0

NewListPager - Exposes all available operations for discovery purposes. Generated from API version 2015-06-01-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type Operator

type Operator string

Operator - A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType.

const (
	// OperatorContains - Applies only for non-decimal operands
	OperatorContains Operator = "Contains"
	// OperatorEndsWith - Applies only for non-decimal operands
	OperatorEndsWith Operator = "EndsWith"
	// OperatorEquals - Applies for decimal and non-decimal operands
	OperatorEquals Operator = "Equals"
	// OperatorGreaterThan - Applies only for decimal operands
	OperatorGreaterThan Operator = "GreaterThan"
	// OperatorGreaterThanOrEqualTo - Applies only for decimal operands
	OperatorGreaterThanOrEqualTo Operator = "GreaterThanOrEqualTo"
	// OperatorLesserThan - Applies only for decimal operands
	OperatorLesserThan Operator = "LesserThan"
	// OperatorLesserThanOrEqualTo - Applies only for decimal operands
	OperatorLesserThanOrEqualTo Operator = "LesserThanOrEqualTo"
	// OperatorNotEquals - Applies for decimal and non-decimal operands
	OperatorNotEquals Operator = "NotEquals"
	// OperatorStartsWith - Applies only for non-decimal operands
	OperatorStartsWith Operator = "StartsWith"
)

func PossibleOperatorValues

func PossibleOperatorValues() []Operator

PossibleOperatorValues returns the possible values for the Operator const type.

type OrganizationMembershipType added in v0.2.0

type OrganizationMembershipType string

OrganizationMembershipType - The multi cloud account's membership type in the organization

const (
	OrganizationMembershipTypeMember       OrganizationMembershipType = "Member"
	OrganizationMembershipTypeOrganization OrganizationMembershipType = "Organization"
)

func PossibleOrganizationMembershipTypeValues added in v0.2.0

func PossibleOrganizationMembershipTypeValues() []OrganizationMembershipType

PossibleOrganizationMembershipTypeValues returns the possible values for the OrganizationMembershipType const type.

type PathRecommendation

type PathRecommendation struct {
	// The recommendation action of the machine or rule
	Action *RecommendationAction `json:"action,omitempty"`

	// Whether the application is commonly run on the machine
	Common *bool `json:"common,omitempty"`

	// The configuration status of the machines group or machine or rule
	ConfigurationStatus *ConfigurationStatus `json:"configurationStatus,omitempty"`

	// The type of the file (for Linux files - Executable is used)
	FileType *FileType `json:"fileType,omitempty"`

	// The full path of the file, or an identifier of the application
	Path *string `json:"path,omitempty"`

	// Represents the publisher information of a process/rule
	PublisherInfo *PublisherInfo `json:"publisherInfo,omitempty"`

	// The type of IoT Security recommendation.
	Type      *RecommendationType   `json:"type,omitempty"`
	UserSids  []*string             `json:"userSids,omitempty"`
	Usernames []*UserRecommendation `json:"usernames,omitempty"`
}

PathRecommendation - Represents a path that is recommended to be allowed and its properties

func (PathRecommendation) MarshalJSON

func (p PathRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PathRecommendation.

func (*PathRecommendation) UnmarshalJSON added in v0.8.0

func (p *PathRecommendation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PathRecommendation.

type PermissionProperty

type PermissionProperty string

PermissionProperty - A permission detected in the cloud account.

const (
	// PermissionPropertyAWSAWSSecurityHubReadOnlyAccess - This permission provides read only access to AWS Security Hub resources.
	PermissionPropertyAWSAWSSecurityHubReadOnlyAccess PermissionProperty = "AWS::AWSSecurityHubReadOnlyAccess"
	// PermissionPropertyAWSAmazonSSMAutomationRole - The permission provides for EC2 Automation service to execute activities
	// defined within Automation documents.
	PermissionPropertyAWSAmazonSSMAutomationRole PermissionProperty = "AWS::AmazonSSMAutomationRole"
	// PermissionPropertyAWSSecurityAudit - This permission grants access to read security configuration metadata.
	PermissionPropertyAWSSecurityAudit PermissionProperty = "AWS::SecurityAudit"
	// PermissionPropertyGCPSecurityCenterAdminViewer - This permission provides read only access to GCP Security Command Center.
	PermissionPropertyGCPSecurityCenterAdminViewer PermissionProperty = "GCP::Security Center Admin Viewer"
)

func PossiblePermissionPropertyValues

func PossiblePermissionPropertyValues() []PermissionProperty

PossiblePermissionPropertyValues returns the possible values for the PermissionProperty const type.

type Pricing

type Pricing struct {
	// Pricing data
	Properties *PricingProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Pricing - Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features.

func (Pricing) MarshalJSON

func (p Pricing) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Pricing.

func (*Pricing) UnmarshalJSON

func (p *Pricing) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Pricing.

type PricingList

type PricingList struct {
	// REQUIRED; List of pricing configurations
	Value []*Pricing `json:"value,omitempty"`
}

PricingList - List of pricing configurations response.

func (PricingList) MarshalJSON

func (p PricingList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PricingList.

func (*PricingList) UnmarshalJSON added in v0.8.0

func (p *PricingList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PricingList.

type PricingProperties

type PricingProperties struct {
	// REQUIRED; The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with
	// the standard tier available with a trial period. The standard tier offers advanced
	// security capabilities, while the free tier offers basic security features.
	PricingTier *PricingTier `json:"pricingTier,omitempty"`

	// The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables
	// a set of security features. When not specified, full plan is applied.
	SubPlan *string `json:"subPlan,omitempty"`

	// READ-ONLY; Optional. True if the plan is deprecated. If there are replacing plans they will appear in replacedBy property
	Deprecated *bool `json:"deprecated,omitempty" azure:"ro"`

	// READ-ONLY; The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
	FreeTrialRemainingTime *string `json:"freeTrialRemainingTime,omitempty" azure:"ro"`

	// READ-ONLY; Optional. List of plans that replace this plan. This property exists only if this plan is deprecated.
	ReplacedBy []*string `json:"replacedBy,omitempty" azure:"ro"`
}

PricingProperties - Pricing properties for the relevant scope

func (PricingProperties) MarshalJSON added in v0.8.0

func (p PricingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PricingProperties.

func (*PricingProperties) UnmarshalJSON added in v0.8.0

func (p *PricingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PricingProperties.

type PricingTier

type PricingTier string

PricingTier - The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features.

const (
	// PricingTierFree - Get free Microsoft Defender for Cloud experience with basic security features
	PricingTierFree PricingTier = "Free"
	// PricingTierStandard - Get the standard Microsoft Defender for Cloud experience with advanced security features
	PricingTierStandard PricingTier = "Standard"
)

func PossiblePricingTierValues

func PossiblePricingTierValues() []PricingTier

PossiblePricingTierValues returns the possible values for the PricingTier const type.

type PricingsClient

type PricingsClient struct {
	// contains filtered or unexported fields
}

PricingsClient contains the methods for the Pricings group. Don't use this type directly, use NewPricingsClient() instead.

func NewPricingsClient

func NewPricingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PricingsClient, error)

NewPricingsClient creates a new instance of PricingsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PricingsClient) Get

Get - Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 pricingName - name of the pricing configuration options - PricingsClientGetOptions contains the optional parameters for the PricingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/GetPricingByName_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewPricingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "VirtualMachines", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PricingsClient) List

List - Lists Microsoft Defender for Cloud pricing configurations in the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 options - PricingsClientListOptions contains the optional parameters for the PricingsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/ListPricings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewPricingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PricingsClient) Update

func (client *PricingsClient) Update(ctx context.Context, pricingName string, pricing Pricing, options *PricingsClientUpdateOptions) (PricingsClientUpdateResponse, error)

Update - Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-03-01 pricingName - name of the pricing configuration pricing - Pricing object options - PricingsClientUpdateOptions contains the optional parameters for the PricingsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/PutPricingByName_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewPricingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx, "VirtualMachines", armsecurity.Pricing{
		Properties: &armsecurity.PricingProperties{
			PricingTier: to.Ptr(armsecurity.PricingTierStandard),
			SubPlan:     to.Ptr("P2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type PricingsClientGetOptions added in v0.3.0

type PricingsClientGetOptions struct {
}

PricingsClientGetOptions contains the optional parameters for the PricingsClient.Get method.

type PricingsClientGetResponse added in v0.3.0

type PricingsClientGetResponse struct {
	Pricing
}

PricingsClientGetResponse contains the response from method PricingsClient.Get.

type PricingsClientListOptions added in v0.3.0

type PricingsClientListOptions struct {
}

PricingsClientListOptions contains the optional parameters for the PricingsClient.List method.

type PricingsClientListResponse added in v0.3.0

type PricingsClientListResponse struct {
	PricingList
}

PricingsClientListResponse contains the response from method PricingsClient.List.

type PricingsClientUpdateOptions added in v0.3.0

type PricingsClientUpdateOptions struct {
}

PricingsClientUpdateOptions contains the optional parameters for the PricingsClient.Update method.

type PricingsClientUpdateResponse added in v0.3.0

type PricingsClientUpdateResponse struct {
	Pricing
}

PricingsClientUpdateResponse contains the response from method PricingsClient.Update.

type ProcessNotAllowed

type ProcessNotAllowed struct {
	// REQUIRED; The values to allow. The format of the values depends on the rule type.
	AllowlistValues []*string `json:"allowlistValues,omitempty"`

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType `json:"valueType,omitempty" azure:"ro"`
}

ProcessNotAllowed - Execution of a process that isn't allowed. Allow list consists of process names to allow.

func (*ProcessNotAllowed) GetAllowlistCustomAlertRule added in v0.3.0

func (p *ProcessNotAllowed) GetAllowlistCustomAlertRule() *AllowlistCustomAlertRule

GetAllowlistCustomAlertRule implements the AllowlistCustomAlertRuleClassification interface for type ProcessNotAllowed.

func (*ProcessNotAllowed) GetCustomAlertRule added in v0.3.0

func (p *ProcessNotAllowed) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type ProcessNotAllowed.

func (*ProcessNotAllowed) GetListCustomAlertRule added in v0.3.0

func (p *ProcessNotAllowed) GetListCustomAlertRule() *ListCustomAlertRule

GetListCustomAlertRule implements the ListCustomAlertRuleClassification interface for type ProcessNotAllowed.

func (ProcessNotAllowed) MarshalJSON

func (p ProcessNotAllowed) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProcessNotAllowed.

func (*ProcessNotAllowed) UnmarshalJSON added in v0.3.0

func (p *ProcessNotAllowed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProcessNotAllowed.

type PropertyType

type PropertyType string

PropertyType - The data type of the compared operands (string, integer, floating point number or a boolean true/false]

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

func PossiblePropertyTypeValues

func PossiblePropertyTypeValues() []PropertyType

PossiblePropertyTypeValues returns the possible values for the PropertyType const type.

type ProtectionMode

type ProtectionMode struct {
	// The application control policy enforcement/protection mode of the machine group
	Exe *EnforcementMode `json:"exe,omitempty"`

	// The application control policy enforcement/protection mode of the machine group
	Executable *EnforcementMode `json:"executable,omitempty"`

	// The application control policy enforcement/protection mode of the machine group
	Msi *EnforcementMode `json:"msi,omitempty"`

	// The application control policy enforcement/protection mode of the machine group
	Script *EnforcementMode `json:"script,omitempty"`
}

ProtectionMode - The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux.

func (ProtectionMode) MarshalJSON added in v0.8.0

func (p ProtectionMode) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProtectionMode.

func (*ProtectionMode) UnmarshalJSON added in v0.8.0

func (p *ProtectionMode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionMode.

type Protocol

type Protocol string
const (
	ProtocolAll Protocol = "*"
	ProtocolTCP Protocol = "TCP"
	ProtocolUDP Protocol = "UDP"
)

func PossibleProtocolValues

func PossibleProtocolValues() []Protocol

PossibleProtocolValues returns the possible values for the Protocol const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The security family provisioning State

const (
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyServerProperties

type ProxyServerProperties struct {
	// Proxy server IP
	IP *string `json:"ip,omitempty"`

	// Proxy server port
	Port *string `json:"port,omitempty"`
}

ProxyServerProperties - For a non-Azure machine that is not connected directly to the internet, specify a proxy server that the non-Azure machine can use.

func (ProxyServerProperties) MarshalJSON added in v0.8.0

func (p ProxyServerProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyServerProperties.

func (*ProxyServerProperties) UnmarshalJSON added in v0.8.0

func (p *ProxyServerProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyServerProperties.

type PublisherInfo

type PublisherInfo struct {
	// The "OriginalName" field taken from the file's version resource
	BinaryName *string `json:"binaryName,omitempty"`

	// The product name taken from the file's version resource
	ProductName *string `json:"productName,omitempty"`

	// The Subject field of the x.509 certificate used to sign the code, using the following fields - O = Organization, L = Locality,
	// S = State or Province, and C = Country
	PublisherName *string `json:"publisherName,omitempty"`

	// The binary file version taken from the file's version resource
	Version *string `json:"version,omitempty"`
}

PublisherInfo - Represents the publisher information of a process/rule

func (PublisherInfo) MarshalJSON added in v0.8.0

func (p PublisherInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PublisherInfo.

func (*PublisherInfo) UnmarshalJSON added in v0.8.0

func (p *PublisherInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PublisherInfo.

type QueryCheck

type QueryCheck struct {
	// Column names of expected result.
	ColumnNames []*string `json:"columnNames,omitempty"`

	// Expected result.
	ExpectedResult [][]*string `json:"expectedResult,omitempty"`

	// The rule query.
	Query *string `json:"query,omitempty"`
}

QueryCheck - The rule query details.

func (QueryCheck) MarshalJSON

func (q QueryCheck) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QueryCheck.

func (*QueryCheck) UnmarshalJSON added in v0.8.0

func (q *QueryCheck) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QueryCheck.

type QueuePurgesNotInAllowedRange

type QueuePurgesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

QueuePurgesNotInAllowedRange - Number of device queue purges is not in allowed range.

func (*QueuePurgesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (q *QueuePurgesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type QueuePurgesNotInAllowedRange.

func (*QueuePurgesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (q *QueuePurgesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type QueuePurgesNotInAllowedRange.

func (*QueuePurgesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (q *QueuePurgesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type QueuePurgesNotInAllowedRange.

func (QueuePurgesNotInAllowedRange) MarshalJSON

func (q QueuePurgesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QueuePurgesNotInAllowedRange.

func (*QueuePurgesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (q *QueuePurgesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QueuePurgesNotInAllowedRange.

type Rank

type Rank string

Rank - The rank of the sensitivity label.

const (
	RankNone     Rank = "None"
	RankLow      Rank = "Low"
	RankMedium   Rank = "Medium"
	RankHigh     Rank = "High"
	RankCritical Rank = "Critical"
)

func PossibleRankValues

func PossibleRankValues() []Rank

PossibleRankValues returns the possible values for the Rank const type.

type RecommendationAction

type RecommendationAction string

RecommendationAction - The recommendation action of the machine or rule

const (
	RecommendationActionAdd         RecommendationAction = "Add"
	RecommendationActionRecommended RecommendationAction = "Recommended"
	RecommendationActionRemove      RecommendationAction = "Remove"
)

func PossibleRecommendationActionValues

func PossibleRecommendationActionValues() []RecommendationAction

PossibleRecommendationActionValues returns the possible values for the RecommendationAction const type.

type RecommendationConfigStatus

type RecommendationConfigStatus string

RecommendationConfigStatus - Recommendation status. When the recommendation status is disabled recommendations are not generated.

const (
	RecommendationConfigStatusDisabled RecommendationConfigStatus = "Disabled"
	RecommendationConfigStatusEnabled  RecommendationConfigStatus = "Enabled"
)

func PossibleRecommendationConfigStatusValues

func PossibleRecommendationConfigStatusValues() []RecommendationConfigStatus

PossibleRecommendationConfigStatusValues returns the possible values for the RecommendationConfigStatus const type.

type RecommendationConfigurationProperties

type RecommendationConfigurationProperties struct {
	// REQUIRED; The type of IoT Security recommendation.
	RecommendationType *RecommendationType `json:"recommendationType,omitempty"`

	// REQUIRED; Recommendation status. When the recommendation status is disabled recommendations are not generated.
	Status *RecommendationConfigStatus `json:"status,omitempty"`

	// READ-ONLY
	Name *string `json:"name,omitempty" azure:"ro"`
}

RecommendationConfigurationProperties - The type of IoT Security recommendation.

func (RecommendationConfigurationProperties) MarshalJSON added in v0.8.0

func (r RecommendationConfigurationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecommendationConfigurationProperties.

func (*RecommendationConfigurationProperties) UnmarshalJSON added in v0.8.0

func (r *RecommendationConfigurationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationConfigurationProperties.

type RecommendationStatus

type RecommendationStatus string

RecommendationStatus - The initial recommendation status of the machine group or machine

const (
	RecommendationStatusNoStatus       RecommendationStatus = "NoStatus"
	RecommendationStatusNotAvailable   RecommendationStatus = "NotAvailable"
	RecommendationStatusNotRecommended RecommendationStatus = "NotRecommended"
	RecommendationStatusRecommended    RecommendationStatus = "Recommended"
)

func PossibleRecommendationStatusValues

func PossibleRecommendationStatusValues() []RecommendationStatus

PossibleRecommendationStatusValues returns the possible values for the RecommendationStatus const type.

type RecommendationType

type RecommendationType string

RecommendationType - The type of IoT Security recommendation.

const (
	// RecommendationTypeIoTAcrauthentication - Authentication schema used for pull an edge module from an ACR repository does
	// not use Service Principal Authentication.
	RecommendationTypeIoTAcrauthentication RecommendationType = "IoT_ACRAuthentication"
	// RecommendationTypeIoTAgentSendsUnutilizedMessages - IoT agent message size capacity is currently underutilized, causing
	// an increase in the number of sent messages. Adjust message intervals for better utilization.
	RecommendationTypeIoTAgentSendsUnutilizedMessages RecommendationType = "IoT_AgentSendsUnutilizedMessages"
	// RecommendationTypeIoTBaseline - Identified security related system configuration issues.
	RecommendationTypeIoTBaseline RecommendationType = "IoT_Baseline"
	// RecommendationTypeIoTEdgeHubMemOptimize - You can optimize Edge Hub memory usage by turning off protocol heads for any
	// protocols not used by Edge modules in your solution.
	RecommendationTypeIoTEdgeHubMemOptimize RecommendationType = "IoT_EdgeHubMemOptimize"
	// RecommendationTypeIoTEdgeLoggingOptions - Logging is disabled for this edge module.
	RecommendationTypeIoTEdgeLoggingOptions RecommendationType = "IoT_EdgeLoggingOptions"
	// RecommendationTypeIoTInconsistentModuleSettings - A minority within a device security group has inconsistent Edge Module
	// settings with the rest of their group.
	RecommendationTypeIoTInconsistentModuleSettings RecommendationType = "IoT_InconsistentModuleSettings"
	// RecommendationTypeIoTInstallAgent - Install the Azure Security of Things Agent.
	RecommendationTypeIoTInstallAgent RecommendationType = "IoT_InstallAgent"
	// RecommendationTypeIoTIpfilterDenyAll - IP Filter Configuration should have rules defined for allowed traffic and should
	// deny all other traffic by default.
	RecommendationTypeIoTIpfilterDenyAll RecommendationType = "IoT_IPFilter_DenyAll"
	// RecommendationTypeIoTIpfilterPermissiveRule - An Allow IP Filter rules source IP range is too large. Overly permissive
	// rules might expose your IoT hub to malicious intenders.
	RecommendationTypeIoTIpfilterPermissiveRule RecommendationType = "IoT_IPFilter_PermissiveRule"
	// RecommendationTypeIoTOpenPorts - A listening endpoint was found on the device.
	RecommendationTypeIoTOpenPorts RecommendationType = "IoT_OpenPorts"
	// RecommendationTypeIoTPermissiveFirewallPolicy - An Allowed firewall policy was found (INPUT/OUTPUT). The policy should
	// Deny all traffic by default and define rules to allow necessary communication to/from the device.
	RecommendationTypeIoTPermissiveFirewallPolicy RecommendationType = "IoT_PermissiveFirewallPolicy"
	// RecommendationTypeIoTPermissiveInputFirewallRules - A rule in the firewall has been found that contains a permissive pattern
	// for a wide range of IP addresses or Ports.
	RecommendationTypeIoTPermissiveInputFirewallRules RecommendationType = "IoT_PermissiveInputFirewallRules"
	// RecommendationTypeIoTPermissiveOutputFirewallRules - A rule in the firewall has been found that contains a permissive pattern
	// for a wide range of IP addresses or Ports.
	RecommendationTypeIoTPermissiveOutputFirewallRules RecommendationType = "IoT_PermissiveOutputFirewallRules"
	// RecommendationTypeIoTPrivilegedDockerOptions - Edge module is configured to run in privileged mode, with extensive Linux
	// capabilities or with host-level network access (send/receive data to host machine).
	RecommendationTypeIoTPrivilegedDockerOptions RecommendationType = "IoT_PrivilegedDockerOptions"
	// RecommendationTypeIoTSharedCredentials - Same authentication credentials to the IoT Hub used by multiple devices. This
	// could indicate an illegitimate device impersonating a legitimate device. It also exposes the risk of device impersonation
	// by an attacker.
	RecommendationTypeIoTSharedCredentials RecommendationType = "IoT_SharedCredentials"
	// RecommendationTypeIoTVulnerableTLSCipherSuite - Insecure TLS configurations detected. Immediate upgrade recommended.
	RecommendationTypeIoTVulnerableTLSCipherSuite RecommendationType = "IoT_VulnerableTLSCipherSuite"
)

func PossibleRecommendationTypeValues

func PossibleRecommendationTypeValues() []RecommendationType

PossibleRecommendationTypeValues returns the possible values for the RecommendationType const type.

type RegulatoryComplianceAssessment

type RegulatoryComplianceAssessment struct {
	// Regulatory compliance assessment data
	Properties *RegulatoryComplianceAssessmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RegulatoryComplianceAssessment - Regulatory compliance assessment details and state

func (RegulatoryComplianceAssessment) MarshalJSON

func (r RegulatoryComplianceAssessment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceAssessment.

func (*RegulatoryComplianceAssessment) UnmarshalJSON

func (r *RegulatoryComplianceAssessment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceAssessment.

type RegulatoryComplianceAssessmentList

type RegulatoryComplianceAssessmentList struct {
	// REQUIRED
	Value []*RegulatoryComplianceAssessment `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

RegulatoryComplianceAssessmentList - List of regulatory compliance assessment response

func (RegulatoryComplianceAssessmentList) MarshalJSON

func (r RegulatoryComplianceAssessmentList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceAssessmentList.

func (*RegulatoryComplianceAssessmentList) UnmarshalJSON added in v0.8.0

func (r *RegulatoryComplianceAssessmentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceAssessmentList.

type RegulatoryComplianceAssessmentProperties

type RegulatoryComplianceAssessmentProperties struct {
	// Aggregative state based on the assessment's scanned resources states
	State *State `json:"state,omitempty"`

	// READ-ONLY; Link to more detailed assessment results data. The response type will be according to the assessmentType field
	AssessmentDetailsLink *string `json:"assessmentDetailsLink,omitempty" azure:"ro"`

	// READ-ONLY; The expected type of assessment contained in the AssessmentDetailsLink
	AssessmentType *string `json:"assessmentType,omitempty" azure:"ro"`

	// READ-ONLY; The description of the regulatory compliance assessment
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The given assessment's related resources count with failed state.
	FailedResources *int32 `json:"failedResources,omitempty" azure:"ro"`

	// READ-ONLY; The given assessment's related resources count with passed state.
	PassedResources *int32 `json:"passedResources,omitempty" azure:"ro"`

	// READ-ONLY; The given assessment's related resources count with skipped state.
	SkippedResources *int32 `json:"skippedResources,omitempty" azure:"ro"`

	// READ-ONLY; The given assessment's related resources count with unsupported state.
	UnsupportedResources *int32 `json:"unsupportedResources,omitempty" azure:"ro"`
}

RegulatoryComplianceAssessmentProperties - Regulatory compliance assessment data

func (RegulatoryComplianceAssessmentProperties) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceAssessmentProperties.

func (*RegulatoryComplianceAssessmentProperties) UnmarshalJSON added in v0.8.0

func (r *RegulatoryComplianceAssessmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceAssessmentProperties.

type RegulatoryComplianceAssessmentsClient

type RegulatoryComplianceAssessmentsClient struct {
	// contains filtered or unexported fields
}

RegulatoryComplianceAssessmentsClient contains the methods for the RegulatoryComplianceAssessments group. Don't use this type directly, use NewRegulatoryComplianceAssessmentsClient() instead.

func NewRegulatoryComplianceAssessmentsClient

func NewRegulatoryComplianceAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegulatoryComplianceAssessmentsClient, error)

NewRegulatoryComplianceAssessmentsClient creates a new instance of RegulatoryComplianceAssessmentsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RegulatoryComplianceAssessmentsClient) Get

func (client *RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string, options *RegulatoryComplianceAssessmentsClientGetOptions) (RegulatoryComplianceAssessmentsClientGetResponse, error)

Get - Supported regulatory compliance details and state for selected assessment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview regulatoryComplianceStandardName - Name of the regulatory compliance standard object regulatoryComplianceControlName - Name of the regulatory compliance control object regulatoryComplianceAssessmentName - Name of the regulatory compliance assessment object options - RegulatoryComplianceAssessmentsClientGetOptions contains the optional parameters for the RegulatoryComplianceAssessmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewRegulatoryComplianceAssessmentsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "PCI-DSS-3.2", "1.1", "968548cb-02b3-8cd2-11f8-0cf64ab1a347", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*RegulatoryComplianceAssessmentsClient) NewListPager added in v0.6.0

func (client *RegulatoryComplianceAssessmentsClient) NewListPager(regulatoryComplianceStandardName string, regulatoryComplianceControlName string, options *RegulatoryComplianceAssessmentsClientListOptions) *runtime.Pager[RegulatoryComplianceAssessmentsClientListResponse]

NewListPager - Details and state of assessments mapped to selected regulatory compliance control Generated from API version 2019-01-01-preview regulatoryComplianceStandardName - Name of the regulatory compliance standard object regulatoryComplianceControlName - Name of the regulatory compliance control object options - RegulatoryComplianceAssessmentsClientListOptions contains the optional parameters for the RegulatoryComplianceAssessmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewRegulatoryComplianceAssessmentsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("PCI-DSS-3.2", "1.1", &armsecurity.RegulatoryComplianceAssessmentsClientListOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type RegulatoryComplianceAssessmentsClientGetOptions added in v0.3.0

type RegulatoryComplianceAssessmentsClientGetOptions struct {
}

RegulatoryComplianceAssessmentsClientGetOptions contains the optional parameters for the RegulatoryComplianceAssessmentsClient.Get method.

type RegulatoryComplianceAssessmentsClientGetResponse added in v0.3.0

type RegulatoryComplianceAssessmentsClientGetResponse struct {
	RegulatoryComplianceAssessment
}

RegulatoryComplianceAssessmentsClientGetResponse contains the response from method RegulatoryComplianceAssessmentsClient.Get.

type RegulatoryComplianceAssessmentsClientListOptions added in v0.3.0

type RegulatoryComplianceAssessmentsClientListOptions struct {
	// OData filter. Optional.
	Filter *string
}

RegulatoryComplianceAssessmentsClientListOptions contains the optional parameters for the RegulatoryComplianceAssessmentsClient.List method.

type RegulatoryComplianceAssessmentsClientListResponse added in v0.3.0

type RegulatoryComplianceAssessmentsClientListResponse struct {
	RegulatoryComplianceAssessmentList
}

RegulatoryComplianceAssessmentsClientListResponse contains the response from method RegulatoryComplianceAssessmentsClient.List.

type RegulatoryComplianceControl

type RegulatoryComplianceControl struct {
	// Regulatory compliance control data
	Properties *RegulatoryComplianceControlProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RegulatoryComplianceControl - Regulatory compliance control details and state

func (RegulatoryComplianceControl) MarshalJSON

func (r RegulatoryComplianceControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceControl.

func (*RegulatoryComplianceControl) UnmarshalJSON

func (r *RegulatoryComplianceControl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceControl.

type RegulatoryComplianceControlList

type RegulatoryComplianceControlList struct {
	// REQUIRED; List of regulatory compliance controls
	Value []*RegulatoryComplianceControl `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

RegulatoryComplianceControlList - List of regulatory compliance controls response

func (RegulatoryComplianceControlList) MarshalJSON

func (r RegulatoryComplianceControlList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceControlList.

func (*RegulatoryComplianceControlList) UnmarshalJSON added in v0.8.0

func (r *RegulatoryComplianceControlList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceControlList.

type RegulatoryComplianceControlProperties

type RegulatoryComplianceControlProperties struct {
	// Aggregative state based on the control's supported assessments states
	State *State `json:"state,omitempty"`

	// READ-ONLY; The description of the regulatory compliance control
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The number of supported regulatory compliance assessments of the given control with a failed state
	FailedAssessments *int32 `json:"failedAssessments,omitempty" azure:"ro"`

	// READ-ONLY; The number of supported regulatory compliance assessments of the given control with a passed state
	PassedAssessments *int32 `json:"passedAssessments,omitempty" azure:"ro"`

	// READ-ONLY; The number of supported regulatory compliance assessments of the given control with a skipped state
	SkippedAssessments *int32 `json:"skippedAssessments,omitempty" azure:"ro"`
}

RegulatoryComplianceControlProperties - Regulatory compliance control data

func (RegulatoryComplianceControlProperties) MarshalJSON added in v0.8.0

func (r RegulatoryComplianceControlProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceControlProperties.

func (*RegulatoryComplianceControlProperties) UnmarshalJSON added in v0.8.0

func (r *RegulatoryComplianceControlProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceControlProperties.

type RegulatoryComplianceControlsClient

type RegulatoryComplianceControlsClient struct {
	// contains filtered or unexported fields
}

RegulatoryComplianceControlsClient contains the methods for the RegulatoryComplianceControls group. Don't use this type directly, use NewRegulatoryComplianceControlsClient() instead.

func NewRegulatoryComplianceControlsClient

func NewRegulatoryComplianceControlsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegulatoryComplianceControlsClient, error)

NewRegulatoryComplianceControlsClient creates a new instance of RegulatoryComplianceControlsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RegulatoryComplianceControlsClient) Get

func (client *RegulatoryComplianceControlsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, options *RegulatoryComplianceControlsClientGetOptions) (RegulatoryComplianceControlsClientGetResponse, error)

Get - Selected regulatory compliance control details and state If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview regulatoryComplianceStandardName - Name of the regulatory compliance standard object regulatoryComplianceControlName - Name of the regulatory compliance control object options - RegulatoryComplianceControlsClientGetOptions contains the optional parameters for the RegulatoryComplianceControlsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewRegulatoryComplianceControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "PCI-DSS-3.2", "1.1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*RegulatoryComplianceControlsClient) NewListPager added in v0.6.0

NewListPager - All supported regulatory compliance controls details and state for selected standard Generated from API version 2019-01-01-preview regulatoryComplianceStandardName - Name of the regulatory compliance standard object options - RegulatoryComplianceControlsClientListOptions contains the optional parameters for the RegulatoryComplianceControlsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewRegulatoryComplianceControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("PCI-DSS-3.2", &armsecurity.RegulatoryComplianceControlsClientListOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type RegulatoryComplianceControlsClientGetOptions added in v0.3.0

type RegulatoryComplianceControlsClientGetOptions struct {
}

RegulatoryComplianceControlsClientGetOptions contains the optional parameters for the RegulatoryComplianceControlsClient.Get method.

type RegulatoryComplianceControlsClientGetResponse added in v0.3.0

type RegulatoryComplianceControlsClientGetResponse struct {
	RegulatoryComplianceControl
}

RegulatoryComplianceControlsClientGetResponse contains the response from method RegulatoryComplianceControlsClient.Get.

type RegulatoryComplianceControlsClientListOptions added in v0.3.0

type RegulatoryComplianceControlsClientListOptions struct {
	// OData filter. Optional.
	Filter *string
}

RegulatoryComplianceControlsClientListOptions contains the optional parameters for the RegulatoryComplianceControlsClient.List method.

type RegulatoryComplianceControlsClientListResponse added in v0.3.0

type RegulatoryComplianceControlsClientListResponse struct {
	RegulatoryComplianceControlList
}

RegulatoryComplianceControlsClientListResponse contains the response from method RegulatoryComplianceControlsClient.List.

type RegulatoryComplianceStandard

type RegulatoryComplianceStandard struct {
	// Regulatory compliance standard data
	Properties *RegulatoryComplianceStandardProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RegulatoryComplianceStandard - Regulatory compliance standard details and state

func (RegulatoryComplianceStandard) MarshalJSON

func (r RegulatoryComplianceStandard) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceStandard.

func (*RegulatoryComplianceStandard) UnmarshalJSON

func (r *RegulatoryComplianceStandard) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceStandard.

type RegulatoryComplianceStandardList

type RegulatoryComplianceStandardList struct {
	// REQUIRED
	Value []*RegulatoryComplianceStandard `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

RegulatoryComplianceStandardList - List of regulatory compliance standards response

func (RegulatoryComplianceStandardList) MarshalJSON

func (r RegulatoryComplianceStandardList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceStandardList.

func (*RegulatoryComplianceStandardList) UnmarshalJSON added in v0.8.0

func (r *RegulatoryComplianceStandardList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceStandardList.

type RegulatoryComplianceStandardProperties

type RegulatoryComplianceStandardProperties struct {
	// Aggregative state based on the standard's supported controls states
	State *State `json:"state,omitempty"`

	// READ-ONLY; The number of supported regulatory compliance controls of the given standard with a failed state
	FailedControls *int32 `json:"failedControls,omitempty" azure:"ro"`

	// READ-ONLY; The number of supported regulatory compliance controls of the given standard with a passed state
	PassedControls *int32 `json:"passedControls,omitempty" azure:"ro"`

	// READ-ONLY; The number of supported regulatory compliance controls of the given standard with a skipped state
	SkippedControls *int32 `json:"skippedControls,omitempty" azure:"ro"`

	// READ-ONLY; The number of regulatory compliance controls of the given standard which are unsupported by automated assessments
	UnsupportedControls *int32 `json:"unsupportedControls,omitempty" azure:"ro"`
}

RegulatoryComplianceStandardProperties - Regulatory compliance standard data

func (RegulatoryComplianceStandardProperties) MarshalJSON added in v0.8.0

func (r RegulatoryComplianceStandardProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegulatoryComplianceStandardProperties.

func (*RegulatoryComplianceStandardProperties) UnmarshalJSON added in v0.8.0

func (r *RegulatoryComplianceStandardProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegulatoryComplianceStandardProperties.

type RegulatoryComplianceStandardsClient

type RegulatoryComplianceStandardsClient struct {
	// contains filtered or unexported fields
}

RegulatoryComplianceStandardsClient contains the methods for the RegulatoryComplianceStandards group. Don't use this type directly, use NewRegulatoryComplianceStandardsClient() instead.

func NewRegulatoryComplianceStandardsClient

func NewRegulatoryComplianceStandardsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegulatoryComplianceStandardsClient, error)

NewRegulatoryComplianceStandardsClient creates a new instance of RegulatoryComplianceStandardsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RegulatoryComplianceStandardsClient) Get

Get - Supported regulatory compliance details state for selected standard If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview regulatoryComplianceStandardName - Name of the regulatory compliance standard object options - RegulatoryComplianceStandardsClientGetOptions contains the optional parameters for the RegulatoryComplianceStandardsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewRegulatoryComplianceStandardsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "PCI-DSS-3.2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*RegulatoryComplianceStandardsClient) NewListPager added in v0.6.0

NewListPager - Supported regulatory compliance standards details and state Generated from API version 2019-01-01-preview options - RegulatoryComplianceStandardsClientListOptions contains the optional parameters for the RegulatoryComplianceStandardsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewRegulatoryComplianceStandardsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armsecurity.RegulatoryComplianceStandardsClientListOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type RegulatoryComplianceStandardsClientGetOptions added in v0.3.0

type RegulatoryComplianceStandardsClientGetOptions struct {
}

RegulatoryComplianceStandardsClientGetOptions contains the optional parameters for the RegulatoryComplianceStandardsClient.Get method.

type RegulatoryComplianceStandardsClientGetResponse added in v0.3.0

type RegulatoryComplianceStandardsClientGetResponse struct {
	RegulatoryComplianceStandard
}

RegulatoryComplianceStandardsClientGetResponse contains the response from method RegulatoryComplianceStandardsClient.Get.

type RegulatoryComplianceStandardsClientListOptions added in v0.3.0

type RegulatoryComplianceStandardsClientListOptions struct {
	// OData filter. Optional.
	Filter *string
}

RegulatoryComplianceStandardsClientListOptions contains the optional parameters for the RegulatoryComplianceStandardsClient.List method.

type RegulatoryComplianceStandardsClientListResponse added in v0.3.0

type RegulatoryComplianceStandardsClientListResponse struct {
	RegulatoryComplianceStandardList
}

RegulatoryComplianceStandardsClientListResponse contains the response from method RegulatoryComplianceStandardsClient.List.

type Remediation

type Remediation struct {
	// Is remediation automated.
	Automated *bool `json:"automated,omitempty"`

	// Remediation description.
	Description *string `json:"description,omitempty"`

	// Optional link to remediate in Azure Portal.
	PortalLink *string `json:"portalLink,omitempty"`

	// Remediation script.
	Scripts []*string `json:"scripts,omitempty"`
}

Remediation details.

func (Remediation) MarshalJSON

func (r Remediation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Remediation.

func (*Remediation) UnmarshalJSON added in v0.8.0

func (r *Remediation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Remediation.

type RemediationEta added in v0.8.0

type RemediationEta struct {
	// REQUIRED; ETA for remediation.
	Eta *time.Time `json:"eta,omitempty"`

	// REQUIRED; Justification for change of Eta.
	Justification *string `json:"justification,omitempty"`
}

RemediationEta - The ETA (estimated time of arrival) for remediation

func (RemediationEta) MarshalJSON added in v0.8.0

func (r RemediationEta) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RemediationEta.

func (*RemediationEta) UnmarshalJSON added in v0.8.0

func (r *RemediationEta) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RemediationEta.

type ReportedSeverity

type ReportedSeverity string

ReportedSeverity - Assessed alert severity.

const (
	ReportedSeverityHigh          ReportedSeverity = "High"
	ReportedSeverityInformational ReportedSeverity = "Informational"
	ReportedSeverityLow           ReportedSeverity = "Low"
	ReportedSeverityMedium        ReportedSeverity = "Medium"
)

func PossibleReportedSeverityValues

func PossibleReportedSeverityValues() []ReportedSeverity

PossibleReportedSeverityValues returns the possible values for the ReportedSeverity const type.

type Resource

type Resource struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Describes an Azure resource.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceDetails

type ResourceDetails struct {
	// REQUIRED; The platform where the assessed resource resides
	Source *Source `json:"source,omitempty"`
}

ResourceDetails - Details of the resource that was assessed

func (*ResourceDetails) GetResourceDetails

func (r *ResourceDetails) GetResourceDetails() *ResourceDetails

GetResourceDetails implements the ResourceDetailsClassification interface for type ResourceDetails.

func (ResourceDetails) MarshalJSON added in v0.8.0

func (r ResourceDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceDetails.

func (*ResourceDetails) UnmarshalJSON added in v0.8.0

func (r *ResourceDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDetails.

type ResourceDetailsClassification

type ResourceDetailsClassification interface {
	// GetResourceDetails returns the ResourceDetails content of the underlying type.
	GetResourceDetails() *ResourceDetails
}

ResourceDetailsClassification provides polymorphic access to related types. Call the interface's GetResourceDetails() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureResourceDetails, *OnPremiseResourceDetails, *OnPremiseSQLResourceDetails, *ResourceDetails

type ResourceIdentifier

type ResourceIdentifier struct {
	// REQUIRED; There can be multiple identifiers of different type per alert, this field specify the identifier type.
	Type *ResourceIdentifierType `json:"type,omitempty"`
}

ResourceIdentifier - A resource identifier for an alert which can be used to direct the alert to the right product exposure group (tenant, workspace, subscription etc.).

func (*ResourceIdentifier) GetResourceIdentifier

func (r *ResourceIdentifier) GetResourceIdentifier() *ResourceIdentifier

GetResourceIdentifier implements the ResourceIdentifierClassification interface for type ResourceIdentifier.

func (ResourceIdentifier) MarshalJSON added in v0.8.0

func (r ResourceIdentifier) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceIdentifier.

func (*ResourceIdentifier) UnmarshalJSON

func (r *ResourceIdentifier) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceIdentifier.

type ResourceIdentifierClassification

type ResourceIdentifierClassification interface {
	// GetResourceIdentifier returns the ResourceIdentifier content of the underlying type.
	GetResourceIdentifier() *ResourceIdentifier
}

ResourceIdentifierClassification provides polymorphic access to related types. Call the interface's GetResourceIdentifier() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureResourceIdentifier, *LogAnalyticsIdentifier, *ResourceIdentifier

type ResourceIdentifierType

type ResourceIdentifierType string

ResourceIdentifierType - There can be multiple identifiers of different type per alert, this field specify the identifier type.

const (
	ResourceIdentifierTypeAzureResource ResourceIdentifierType = "AzureResource"
	ResourceIdentifierTypeLogAnalytics  ResourceIdentifierType = "LogAnalytics"
)

func PossibleResourceIdentifierTypeValues

func PossibleResourceIdentifierTypeValues() []ResourceIdentifierType

PossibleResourceIdentifierTypeValues returns the possible values for the ResourceIdentifierType const type.

type ResourceStatus

type ResourceStatus string

ResourceStatus - The status of the resource regarding a single assessment

const (
	// ResourceStatusHealthy - This assessment on the resource is healthy
	ResourceStatusHealthy ResourceStatus = "Healthy"
	// ResourceStatusNotApplicable - This assessment is not applicable to this resource
	ResourceStatusNotApplicable ResourceStatus = "NotApplicable"
	// ResourceStatusNotHealthy - This assessment on the resource is not healthy
	ResourceStatusNotHealthy ResourceStatus = "NotHealthy"
	// ResourceStatusOffByPolicy - This assessment is turned off by policy on this subscription
	ResourceStatusOffByPolicy ResourceStatus = "OffByPolicy"
)

func PossibleResourceStatusValues

func PossibleResourceStatusValues() []ResourceStatus

PossibleResourceStatusValues returns the possible values for the ResourceStatus const type.

type Roles added in v0.9.0

type Roles string

Roles - A possible role to configure sending security notification alerts to

const (
	// RolesAccountAdmin - If enabled, send notification on new alerts to the account admins
	RolesAccountAdmin Roles = "AccountAdmin"
	// RolesContributor - If enabled, send notification on new alerts to the subscription contributors
	RolesContributor Roles = "Contributor"
	// RolesOwner - If enabled, send notification on new alerts to the subscription owners
	RolesOwner Roles = "Owner"
	// RolesServiceAdmin - If enabled, send notification on new alerts to the service admins
	RolesServiceAdmin Roles = "ServiceAdmin"
)

func PossibleRolesValues added in v0.9.0

func PossibleRolesValues() []Roles

PossibleRolesValues returns the possible values for the Roles const type.

type Rule

type Rule struct {
	// The rule's destination port
	DestinationPort *int32 `json:"destinationPort,omitempty"`

	// The rule's direction
	Direction *Direction `json:"direction,omitempty"`

	// The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol
	IPAddresses []*string `json:"ipAddresses,omitempty"`

	// The name of the rule
	Name *string `json:"name,omitempty"`

	// The rule's transport protocols
	Protocols []*TransportProtocol `json:"protocols,omitempty"`
}

Rule - Describes remote addresses that is recommended to communicate with the Azure resource on some (Protocol, Port, Direction). All other remote addresses are recommended to be blocked

func (Rule) MarshalJSON

func (r Rule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Rule.

func (*Rule) UnmarshalJSON added in v0.8.0

func (r *Rule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Rule.

type RuleResults

type RuleResults struct {
	// Rule results properties.
	Properties *RuleResultsProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

RuleResults - Rule results.

func (RuleResults) MarshalJSON

func (r RuleResults) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleResults.

func (*RuleResults) UnmarshalJSON

func (r *RuleResults) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleResults.

type RuleResultsInput

type RuleResultsInput struct {
	// Take results from latest scan.
	LatestScan *bool `json:"latestScan,omitempty"`

	// Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
	Results [][]*string `json:"results,omitempty"`
}

RuleResultsInput - Rule results input.

func (RuleResultsInput) MarshalJSON

func (r RuleResultsInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleResultsInput.

func (*RuleResultsInput) UnmarshalJSON added in v0.8.0

func (r *RuleResultsInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleResultsInput.

type RuleResultsProperties

type RuleResultsProperties struct {
	// Expected results in the baseline.
	Results [][]*string `json:"results,omitempty"`
}

RuleResultsProperties - Rule results properties.

func (RuleResultsProperties) MarshalJSON

func (r RuleResultsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleResultsProperties.

func (*RuleResultsProperties) UnmarshalJSON added in v0.8.0

func (r *RuleResultsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleResultsProperties.

type RuleSeverity

type RuleSeverity string

RuleSeverity - The rule severity.

const (
	// RuleSeverityHigh - High
	RuleSeverityHigh RuleSeverity = "High"
	// RuleSeverityInformational - Informational
	RuleSeverityInformational RuleSeverity = "Informational"
	// RuleSeverityLow - Low
	RuleSeverityLow RuleSeverity = "Low"
	// RuleSeverityMedium - Medium
	RuleSeverityMedium RuleSeverity = "Medium"
	// RuleSeverityObsolete - Obsolete
	RuleSeverityObsolete RuleSeverity = "Obsolete"
)

func PossibleRuleSeverityValues

func PossibleRuleSeverityValues() []RuleSeverity

PossibleRuleSeverityValues returns the possible values for the RuleSeverity const type.

type RuleState

type RuleState string

RuleState - Possible states of the rule

const (
	RuleStateEnabled  RuleState = "Enabled"
	RuleStateDisabled RuleState = "Disabled"
	RuleStateExpired  RuleState = "Expired"
)

func PossibleRuleStateValues

func PossibleRuleStateValues() []RuleState

PossibleRuleStateValues returns the possible values for the RuleState const type.

type RuleStatus

type RuleStatus string

RuleStatus - The rule result status.

const (
	// RuleStatusFinding - Finding
	RuleStatusFinding RuleStatus = "Finding"
	// RuleStatusInternalError - InternalError
	RuleStatusInternalError RuleStatus = "InternalError"
	// RuleStatusNonFinding - NonFinding
	RuleStatusNonFinding RuleStatus = "NonFinding"
)

func PossibleRuleStatusValues

func PossibleRuleStatusValues() []RuleStatus

PossibleRuleStatusValues returns the possible values for the RuleStatus const type.

type RuleType

type RuleType string

RuleType - The rule type.

const (
	// RuleTypeBaselineExpected - BaselineExpected
	RuleTypeBaselineExpected RuleType = "BaselineExpected"
	// RuleTypeBinary - Binary
	RuleTypeBinary RuleType = "Binary"
	// RuleTypeNegativeList - NegativeList
	RuleTypeNegativeList RuleType = "NegativeList"
	// RuleTypePositiveList - PositiveList
	RuleTypePositiveList RuleType = "PositiveList"
)

func PossibleRuleTypeValues

func PossibleRuleTypeValues() []RuleType

PossibleRuleTypeValues returns the possible values for the RuleType const type.

type RulesResults

type RulesResults struct {
	// List of rule results.
	Value []*RuleResults `json:"value,omitempty"`
}

RulesResults - A list of rules results.

func (RulesResults) MarshalJSON

func (r RulesResults) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesResults.

func (*RulesResults) UnmarshalJSON added in v0.8.0

func (r *RulesResults) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesResults.

type RulesResultsInput

type RulesResultsInput struct {
	// Take results from latest scan.
	LatestScan *bool `json:"latestScan,omitempty"`

	// Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
	Results map[string][][]*string `json:"results,omitempty"`
}

RulesResultsInput - Rules results input.

func (RulesResultsInput) MarshalJSON

func (r RulesResultsInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesResultsInput.

func (*RulesResultsInput) UnmarshalJSON added in v0.8.0

func (r *RulesResultsInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesResultsInput.

type SQLServerVulnerabilityProperties

type SQLServerVulnerabilityProperties struct {
	// REQUIRED; Sub-assessment resource type
	AssessedResourceType *AssessedResourceType `json:"assessedResourceType,omitempty"`

	// READ-ONLY; The T-SQL query that runs on your SQL database to perform the particular check
	Query *string `json:"query,omitempty" azure:"ro"`

	// READ-ONLY; The resource type the sub assessment refers to in its resource details
	Type *string `json:"type,omitempty" azure:"ro"`
}

SQLServerVulnerabilityProperties - Details of the resource that was assessed

func (*SQLServerVulnerabilityProperties) GetAdditionalData added in v0.3.0

func (s *SQLServerVulnerabilityProperties) GetAdditionalData() *AdditionalData

GetAdditionalData implements the AdditionalDataClassification interface for type SQLServerVulnerabilityProperties.

func (SQLServerVulnerabilityProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SQLServerVulnerabilityProperties.

func (*SQLServerVulnerabilityProperties) UnmarshalJSON

func (s *SQLServerVulnerabilityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SQLServerVulnerabilityProperties.

type SQLVulnerabilityAssessmentBaselineRulesClient

type SQLVulnerabilityAssessmentBaselineRulesClient struct {
	// contains filtered or unexported fields
}

SQLVulnerabilityAssessmentBaselineRulesClient contains the methods for the SQLVulnerabilityAssessmentBaselineRules group. Don't use this type directly, use NewSQLVulnerabilityAssessmentBaselineRulesClient() instead.

func NewSQLVulnerabilityAssessmentBaselineRulesClient

func NewSQLVulnerabilityAssessmentBaselineRulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLVulnerabilityAssessmentBaselineRulesClient, error)

NewSQLVulnerabilityAssessmentBaselineRulesClient creates a new instance of SQLVulnerabilityAssessmentBaselineRulesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SQLVulnerabilityAssessmentBaselineRulesClient) Add

Add - Add a list of baseline rules. Will overwrite any previously existing results (for all rules). If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentBaselineRulesClientAddOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.Add method.

Example (CreateABaselineForAllRules)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Add.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Add(ctx, "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", &armsecurity.SQLVulnerabilityAssessmentBaselineRulesClientAddOptions{Body: &armsecurity.RulesResultsInput{
		LatestScan: to.Ptr(false),
		Results: map[string][][]*string{
			"VA1234": {
				{
					to.Ptr("userA"),
					to.Ptr("SELECT")},
				{
					to.Ptr("userB"),
					to.Ptr("SELECT")}},
			"VA5678": {
				{
					to.Ptr("Test"),
					to.Ptr("0.0.0.0"),
					to.Ptr("125.125.125.125")}},
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (CreateABaselineForAllRulesUsingTheLatestScanResults)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_AddLatest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Add(ctx, "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", &armsecurity.SQLVulnerabilityAssessmentBaselineRulesClientAddOptions{Body: &armsecurity.RulesResultsInput{
		LatestScan: to.Ptr(true),
		Results:    map[string][][]*string{},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SQLVulnerabilityAssessmentBaselineRulesClient) CreateOrUpdate

CreateOrUpdate - Creates a Baseline for a rule in a database. Will overwrite any previously existing results. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview ruleID - The rule Id. workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.CreateOrUpdate method.

Example (CreateABaseline)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "VA1234", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", &armsecurity.SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateOptions{Body: &armsecurity.RuleResultsInput{
		LatestScan: to.Ptr(false),
		Results: [][]*string{
			{
				to.Ptr("userA"),
				to.Ptr("SELECT")},
			{
				to.Ptr("userB"),
				to.Ptr("SELECT")}},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (CreateABaselineUsingTheLatestScanResults)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_PutLatest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "VA1234", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", &armsecurity.SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateOptions{Body: &armsecurity.RuleResultsInput{
		LatestScan: to.Ptr(true),
		Results:    [][]*string{},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SQLVulnerabilityAssessmentBaselineRulesClient) Delete

Delete - Deletes a rule from the Baseline of a given database. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview ruleID - The rule Id. workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentBaselineRulesClientDeleteOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "VA1234", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*SQLVulnerabilityAssessmentBaselineRulesClient) Get

Get - Gets the results for a given rule in the Baseline. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview ruleID - The rule Id. workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentBaselineRulesClientGetOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "VA1234", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SQLVulnerabilityAssessmentBaselineRulesClient) List

List - Gets the results for all rules in the Baseline. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentBaselineRulesClientListOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentBaselineRulesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SQLVulnerabilityAssessmentBaselineRulesClientAddOptions added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientAddOptions struct {
	// The baseline rules.
	Body *RulesResultsInput
}

SQLVulnerabilityAssessmentBaselineRulesClientAddOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.Add method.

type SQLVulnerabilityAssessmentBaselineRulesClientAddResponse added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientAddResponse struct {
	RulesResults
}

SQLVulnerabilityAssessmentBaselineRulesClientAddResponse contains the response from method SQLVulnerabilityAssessmentBaselineRulesClient.Add.

type SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateOptions added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateOptions struct {
	// The baseline results for this rule.
	Body *RuleResultsInput
}

SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.CreateOrUpdate method.

type SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateResponse added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateResponse struct {
	RuleResults
}

SQLVulnerabilityAssessmentBaselineRulesClientCreateOrUpdateResponse contains the response from method SQLVulnerabilityAssessmentBaselineRulesClient.CreateOrUpdate.

type SQLVulnerabilityAssessmentBaselineRulesClientDeleteOptions added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientDeleteOptions struct {
}

SQLVulnerabilityAssessmentBaselineRulesClientDeleteOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.Delete method.

type SQLVulnerabilityAssessmentBaselineRulesClientDeleteResponse added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientDeleteResponse struct {
}

SQLVulnerabilityAssessmentBaselineRulesClientDeleteResponse contains the response from method SQLVulnerabilityAssessmentBaselineRulesClient.Delete.

type SQLVulnerabilityAssessmentBaselineRulesClientGetOptions added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientGetOptions struct {
}

SQLVulnerabilityAssessmentBaselineRulesClientGetOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.Get method.

type SQLVulnerabilityAssessmentBaselineRulesClientGetResponse added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientGetResponse struct {
	RuleResults
}

SQLVulnerabilityAssessmentBaselineRulesClientGetResponse contains the response from method SQLVulnerabilityAssessmentBaselineRulesClient.Get.

type SQLVulnerabilityAssessmentBaselineRulesClientListOptions added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientListOptions struct {
}

SQLVulnerabilityAssessmentBaselineRulesClientListOptions contains the optional parameters for the SQLVulnerabilityAssessmentBaselineRulesClient.List method.

type SQLVulnerabilityAssessmentBaselineRulesClientListResponse added in v0.3.0

type SQLVulnerabilityAssessmentBaselineRulesClientListResponse struct {
	RulesResults
}

SQLVulnerabilityAssessmentBaselineRulesClientListResponse contains the response from method SQLVulnerabilityAssessmentBaselineRulesClient.List.

type SQLVulnerabilityAssessmentScanResultsClient

type SQLVulnerabilityAssessmentScanResultsClient struct {
	// contains filtered or unexported fields
}

SQLVulnerabilityAssessmentScanResultsClient contains the methods for the SQLVulnerabilityAssessmentScanResults group. Don't use this type directly, use NewSQLVulnerabilityAssessmentScanResultsClient() instead.

func NewSQLVulnerabilityAssessmentScanResultsClient

func NewSQLVulnerabilityAssessmentScanResultsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLVulnerabilityAssessmentScanResultsClient, error)

NewSQLVulnerabilityAssessmentScanResultsClient creates a new instance of SQLVulnerabilityAssessmentScanResultsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SQLVulnerabilityAssessmentScanResultsClient) Get

Get - Gets the scan results of a single rule in a scan record. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview scanID - The scan Id. Type 'latest' to get the scan results for the latest scan. scanResultID - The rule Id of the results. workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentScanResultsClientGetOptions contains the optional parameters for the SQLVulnerabilityAssessmentScanResultsClient.Get method.

Example (GetScanDetailsOfAScanRecord)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScanResultsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "Scheduled-20200623", "VA2063", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (GetScanDetailsOfTheLatestScanRecord)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_GetLatest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScanResultsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "latest", "VA2063", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SQLVulnerabilityAssessmentScanResultsClient) List

List - Gets a list of scan results for a single scan record. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview scanID - The scan Id. Type 'latest' to get the scan results for the latest scan. workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentScanResultsClientListOptions contains the optional parameters for the SQLVulnerabilityAssessmentScanResultsClient.List method.

Example (ListScanResults)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScanResultsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, "Scheduled-20200623", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (ListScanResultsOfTheLatestScan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_ListLatest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScanResultsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, "latest", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SQLVulnerabilityAssessmentScanResultsClientGetOptions added in v0.3.0

type SQLVulnerabilityAssessmentScanResultsClientGetOptions struct {
}

SQLVulnerabilityAssessmentScanResultsClientGetOptions contains the optional parameters for the SQLVulnerabilityAssessmentScanResultsClient.Get method.

type SQLVulnerabilityAssessmentScanResultsClientGetResponse added in v0.3.0

type SQLVulnerabilityAssessmentScanResultsClientGetResponse struct {
	ScanResult
}

SQLVulnerabilityAssessmentScanResultsClientGetResponse contains the response from method SQLVulnerabilityAssessmentScanResultsClient.Get.

type SQLVulnerabilityAssessmentScanResultsClientListOptions added in v0.3.0

type SQLVulnerabilityAssessmentScanResultsClientListOptions struct {
}

SQLVulnerabilityAssessmentScanResultsClientListOptions contains the optional parameters for the SQLVulnerabilityAssessmentScanResultsClient.List method.

type SQLVulnerabilityAssessmentScanResultsClientListResponse added in v0.3.0

type SQLVulnerabilityAssessmentScanResultsClientListResponse struct {
	ScanResults
}

SQLVulnerabilityAssessmentScanResultsClientListResponse contains the response from method SQLVulnerabilityAssessmentScanResultsClient.List.

type SQLVulnerabilityAssessmentScansClient

type SQLVulnerabilityAssessmentScansClient struct {
	// contains filtered or unexported fields
}

SQLVulnerabilityAssessmentScansClient contains the methods for the SQLVulnerabilityAssessmentScans group. Don't use this type directly, use NewSQLVulnerabilityAssessmentScansClient() instead.

func NewSQLVulnerabilityAssessmentScansClient

func NewSQLVulnerabilityAssessmentScansClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLVulnerabilityAssessmentScansClient, error)

NewSQLVulnerabilityAssessmentScansClient creates a new instance of SQLVulnerabilityAssessmentScansClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SQLVulnerabilityAssessmentScansClient) Get

Get - Gets the scan details of a single scan record. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview scanID - The scan Id. Type 'latest' to get the scan record for the latest scan. workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLVulnerabilityAssessmentScansClient.Get method.

Example (GetScanDetailsOfAScanRecord)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScansClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "Scheduled-20200623", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (GetScanDetailsOfTheLatestScanRecord)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_GetLatest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScansClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "latest", "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SQLVulnerabilityAssessmentScansClient) List

List - Gets a list of scan records. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview workspaceID - The workspace Id. resourceID - The identifier of the resource. options - SQLVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLVulnerabilityAssessmentScansClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSQLVulnerabilityAssessmentScansClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, "55555555-6666-7777-8888-999999999999", "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SQLVulnerabilityAssessmentScansClientGetOptions added in v0.3.0

type SQLVulnerabilityAssessmentScansClientGetOptions struct {
}

SQLVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLVulnerabilityAssessmentScansClient.Get method.

type SQLVulnerabilityAssessmentScansClientGetResponse added in v0.3.0

type SQLVulnerabilityAssessmentScansClientGetResponse struct {
	Scan
}

SQLVulnerabilityAssessmentScansClientGetResponse contains the response from method SQLVulnerabilityAssessmentScansClient.Get.

type SQLVulnerabilityAssessmentScansClientListOptions added in v0.3.0

type SQLVulnerabilityAssessmentScansClientListOptions struct {
}

SQLVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLVulnerabilityAssessmentScansClient.List method.

type SQLVulnerabilityAssessmentScansClientListResponse added in v0.3.0

type SQLVulnerabilityAssessmentScansClientListResponse struct {
	Scans
}

SQLVulnerabilityAssessmentScansClientListResponse contains the response from method SQLVulnerabilityAssessmentScansClient.List.

type Scan

type Scan struct {
	// A vulnerability assessment scan record properties.
	Properties *ScanProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Scan - A vulnerability assessment scan record.

func (Scan) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Scan.

func (*Scan) UnmarshalJSON

func (s *Scan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Scan.

type ScanProperties

type ScanProperties struct {
	// The database name.
	Database *string `json:"database,omitempty"`

	// Scan results are valid until end time (UTC).
	EndTime *time.Time `json:"endTime,omitempty"`

	// The number of failed rules with high severity.
	HighSeverityFailedRulesCount *int32 `json:"highSeverityFailedRulesCount,omitempty"`

	// Baseline created for this database, and has one or more rules.
	IsBaselineApplied *bool `json:"isBaselineApplied,omitempty"`

	// The number of failed rules with low severity.
	LowSeverityFailedRulesCount *int32 `json:"lowSeverityFailedRulesCount,omitempty"`

	// The number of failed rules with medium severity.
	MediumSeverityFailedRulesCount *int32 `json:"mediumSeverityFailedRulesCount,omitempty"`

	// The SQL version.
	SQLVersion *string `json:"sqlVersion,omitempty"`

	// The server name.
	Server *string `json:"server,omitempty"`

	// The scan start time (UTC).
	StartTime *time.Time `json:"startTime,omitempty"`

	// The scan status.
	State *ScanState `json:"state,omitempty"`

	// The number of total failed rules.
	TotalFailedRulesCount *int32 `json:"totalFailedRulesCount,omitempty"`

	// The number of total passed rules.
	TotalPassedRulesCount *int32 `json:"totalPassedRulesCount,omitempty"`

	// The number of total rules assessed.
	TotalRulesCount *int32 `json:"totalRulesCount,omitempty"`

	// The scan trigger type.
	TriggerType *ScanTriggerType `json:"triggerType,omitempty"`
}

ScanProperties - A vulnerability assessment scan record properties.

func (ScanProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScanProperties.

func (*ScanProperties) UnmarshalJSON

func (s *ScanProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScanProperties.

type ScanResult

type ScanResult struct {
	// A vulnerability assessment scan result properties for a single rule.
	Properties *ScanResultProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ScanResult - A vulnerability assessment scan result for a single rule.

func (ScanResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScanResult.

func (*ScanResult) UnmarshalJSON

func (s *ScanResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScanResult.

type ScanResultProperties

type ScanResultProperties struct {
	// The rule result adjusted with baseline.
	BaselineAdjustedResult *BaselineAdjustedResult `json:"baselineAdjustedResult,omitempty"`

	// Indicated whether the results specified here are trimmed.
	IsTrimmed *bool `json:"isTrimmed,omitempty"`

	// The results of the query that was run.
	QueryResults [][]*string `json:"queryResults,omitempty"`

	// Remediation details.
	Remediation *Remediation `json:"remediation,omitempty"`

	// The rule Id.
	RuleID *string `json:"ruleId,omitempty"`

	// vulnerability assessment rule metadata details.
	RuleMetadata *VaRule `json:"ruleMetadata,omitempty"`

	// The rule result status.
	Status *RuleStatus `json:"status,omitempty"`
}

ScanResultProperties - A vulnerability assessment scan result properties for a single rule.

func (ScanResultProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScanResultProperties.

func (*ScanResultProperties) UnmarshalJSON added in v0.8.0

func (s *ScanResultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScanResultProperties.

type ScanResults

type ScanResults struct {
	// List of vulnerability assessment scan results.
	Value []*ScanResult `json:"value,omitempty"`
}

ScanResults - A list of vulnerability assessment scan results.

func (ScanResults) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScanResults.

func (*ScanResults) UnmarshalJSON added in v0.8.0

func (s *ScanResults) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScanResults.

type ScanState

type ScanState string

ScanState - The scan status.

const (
	// ScanStateFailed - Failed
	ScanStateFailed ScanState = "Failed"
	// ScanStateFailedToRun - FailedToRun
	ScanStateFailedToRun ScanState = "FailedToRun"
	// ScanStateInProgress - InProgress
	ScanStateInProgress ScanState = "InProgress"
	// ScanStatePassed - Passed
	ScanStatePassed ScanState = "Passed"
)

func PossibleScanStateValues

func PossibleScanStateValues() []ScanState

PossibleScanStateValues returns the possible values for the ScanState const type.

type ScanTriggerType

type ScanTriggerType string

ScanTriggerType - The scan trigger type.

const (
	// ScanTriggerTypeOnDemand - OnDemand
	ScanTriggerTypeOnDemand ScanTriggerType = "OnDemand"
	// ScanTriggerTypeRecurring - Recurring
	ScanTriggerTypeRecurring ScanTriggerType = "Recurring"
)

func PossibleScanTriggerTypeValues

func PossibleScanTriggerTypeValues() []ScanTriggerType

PossibleScanTriggerTypeValues returns the possible values for the ScanTriggerType const type.

type ScanningMode added in v0.8.0

type ScanningMode string

ScanningMode - The scanning mode for the vm scan.

const (
	ScanningModeDefault ScanningMode = "Default"
)

func PossibleScanningModeValues added in v0.8.0

func PossibleScanningModeValues() []ScanningMode

PossibleScanningModeValues returns the possible values for the ScanningMode const type.

type Scans

type Scans struct {
	// List of vulnerability assessment scan records.
	Value []*Scan `json:"value,omitempty"`
}

Scans - A list of vulnerability assessment scan records.

func (Scans) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Scans.

func (*Scans) UnmarshalJSON added in v0.8.0

func (s *Scans) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Scans.

type ScopeElement

type ScopeElement struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// The alert entity type to suppress by.
	Field *string `json:"field,omitempty"`
}

ScopeElement - A more specific scope used to identify the alerts to suppress.

func (ScopeElement) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScopeElement.

func (*ScopeElement) UnmarshalJSON

func (s *ScopeElement) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopeElement.

type ScoreDetails

type ScoreDetails struct {
	// READ-ONLY; Current score
	Current *float64 `json:"current,omitempty" azure:"ro"`

	// READ-ONLY; Maximum score available
	Max *int32 `json:"max,omitempty" azure:"ro"`

	// READ-ONLY; Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point
	Percentage *float64 `json:"percentage,omitempty" azure:"ro"`
}

ScoreDetails - Calculation result data

func (ScoreDetails) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type ScoreDetails.

func (*ScoreDetails) UnmarshalJSON added in v0.8.0

func (s *ScoreDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScoreDetails.

type SecureScoreControlDefinitionItem

type SecureScoreControlDefinitionItem struct {
	// Security Control Definition Properties.
	Properties *SecureScoreControlDefinitionItemProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

SecureScoreControlDefinitionItem - Information about the security control.

func (SecureScoreControlDefinitionItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlDefinitionItem.

func (*SecureScoreControlDefinitionItem) UnmarshalJSON

func (s *SecureScoreControlDefinitionItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlDefinitionItem.

type SecureScoreControlDefinitionItemProperties

type SecureScoreControlDefinitionItemProperties struct {
	// READ-ONLY; Array of assessments metadata IDs that are included in this security control
	AssessmentDefinitions []*AzureResourceLink `json:"assessmentDefinitions,omitempty" azure:"ro"`

	// READ-ONLY; User friendly description of the control
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; User friendly display name of the control
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Maximum control score (0..10)
	MaxScore *int32 `json:"maxScore,omitempty" azure:"ro"`

	// READ-ONLY; Source object from which the control was created
	Source *SecureScoreControlDefinitionSource `json:"source,omitempty" azure:"ro"`
}

SecureScoreControlDefinitionItemProperties - Security Control Definition Properties.

func (SecureScoreControlDefinitionItemProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlDefinitionItemProperties.

func (*SecureScoreControlDefinitionItemProperties) UnmarshalJSON added in v0.8.0

func (s *SecureScoreControlDefinitionItemProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlDefinitionItemProperties.

type SecureScoreControlDefinitionList

type SecureScoreControlDefinitionList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of security controls definition in this page
	Value []*SecureScoreControlDefinitionItem `json:"value,omitempty" azure:"ro"`
}

SecureScoreControlDefinitionList - List of security controls definition

func (SecureScoreControlDefinitionList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlDefinitionList.

func (*SecureScoreControlDefinitionList) UnmarshalJSON added in v0.8.0

func (s *SecureScoreControlDefinitionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlDefinitionList.

type SecureScoreControlDefinitionSource

type SecureScoreControlDefinitionSource struct {
	// The type of security control (for example, BuiltIn)
	SourceType *ControlType `json:"sourceType,omitempty"`
}

SecureScoreControlDefinitionSource - The type of the security control (For example, BuiltIn)

func (SecureScoreControlDefinitionSource) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlDefinitionSource.

func (*SecureScoreControlDefinitionSource) UnmarshalJSON added in v0.8.0

func (s *SecureScoreControlDefinitionSource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlDefinitionSource.

type SecureScoreControlDefinitionsClient

type SecureScoreControlDefinitionsClient struct {
	// contains filtered or unexported fields
}

SecureScoreControlDefinitionsClient contains the methods for the SecureScoreControlDefinitions group. Don't use this type directly, use NewSecureScoreControlDefinitionsClient() instead.

func NewSecureScoreControlDefinitionsClient

func NewSecureScoreControlDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecureScoreControlDefinitionsClient, error)

NewSecureScoreControlDefinitionsClient creates a new instance of SecureScoreControlDefinitionsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SecureScoreControlDefinitionsClient) NewListBySubscriptionPager added in v0.6.0

NewListBySubscriptionPager - For a specified subscription, list the available security controls, their assessments, and the max score Generated from API version 2020-01-01 options - SecureScoreControlDefinitionsClientListBySubscriptionOptions contains the optional parameters for the SecureScoreControlDefinitionsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScoreControlDefinitions/ListSecureScoreControlDefinitions_subscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoreControlDefinitionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SecureScoreControlDefinitionsClient) NewListPager added in v0.6.0

NewListPager - List the available security controls, their assessments, and the max score Generated from API version 2020-01-01 options - SecureScoreControlDefinitionsClientListOptions contains the optional parameters for the SecureScoreControlDefinitionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScoreControlDefinitions/ListSecureScoreControlDefinitions_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoreControlDefinitionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SecureScoreControlDefinitionsClientListBySubscriptionOptions added in v0.3.0

type SecureScoreControlDefinitionsClientListBySubscriptionOptions struct {
}

SecureScoreControlDefinitionsClientListBySubscriptionOptions contains the optional parameters for the SecureScoreControlDefinitionsClient.ListBySubscription method.

type SecureScoreControlDefinitionsClientListBySubscriptionResponse added in v0.3.0

type SecureScoreControlDefinitionsClientListBySubscriptionResponse struct {
	SecureScoreControlDefinitionList
}

SecureScoreControlDefinitionsClientListBySubscriptionResponse contains the response from method SecureScoreControlDefinitionsClient.ListBySubscription.

type SecureScoreControlDefinitionsClientListOptions added in v0.3.0

type SecureScoreControlDefinitionsClientListOptions struct {
}

SecureScoreControlDefinitionsClientListOptions contains the optional parameters for the SecureScoreControlDefinitionsClient.List method.

type SecureScoreControlDefinitionsClientListResponse added in v0.3.0

type SecureScoreControlDefinitionsClientListResponse struct {
	SecureScoreControlDefinitionList
}

SecureScoreControlDefinitionsClientListResponse contains the response from method SecureScoreControlDefinitionsClient.List.

type SecureScoreControlDetails

type SecureScoreControlDetails struct {
	// Calculation result data in control level
	Properties *SecureScoreControlScoreDetails `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

SecureScoreControlDetails - Details of the security control, its score, and the health status of the relevant resources.

func (SecureScoreControlDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlDetails.

func (*SecureScoreControlDetails) UnmarshalJSON

func (s *SecureScoreControlDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlDetails.

type SecureScoreControlList

type SecureScoreControlList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of security controls in this page
	Value []*SecureScoreControlDetails `json:"value,omitempty" azure:"ro"`
}

SecureScoreControlList - List of security controls

func (SecureScoreControlList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlList.

func (*SecureScoreControlList) UnmarshalJSON added in v0.8.0

func (s *SecureScoreControlList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlList.

type SecureScoreControlScore

type SecureScoreControlScore struct {
	// READ-ONLY; Actual score for the control = (achieved points / total points) * max score. if total points is zeroed, the
	// return number is 0.00
	Current *float64 `json:"current,omitempty" azure:"ro"`

	// READ-ONLY; Maximum control score (0..10)
	Max *int32 `json:"max,omitempty" azure:"ro"`

	// READ-ONLY; Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point
	Percentage *float64 `json:"percentage,omitempty" azure:"ro"`
}

SecureScoreControlScore - Calculation result data

func (SecureScoreControlScore) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlScore.

func (*SecureScoreControlScore) UnmarshalJSON added in v0.8.0

func (s *SecureScoreControlScore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlScore.

type SecureScoreControlScoreDetails

type SecureScoreControlScoreDetails struct {
	// Information about the security control.
	Definition *SecureScoreControlDefinitionItem `json:"definition,omitempty"`

	// READ-ONLY; User friendly display name of the control
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Number of healthy resources in the control
	HealthyResourceCount *int32 `json:"healthyResourceCount,omitempty" azure:"ro"`

	// READ-ONLY; Number of not applicable resources in the control
	NotApplicableResourceCount *int32 `json:"notApplicableResourceCount,omitempty" azure:"ro"`

	// READ-ONLY; Actual score object for the control
	Score *ScoreDetails `json:"score,omitempty" azure:"ro"`

	// READ-ONLY; Number of unhealthy resources in the control
	UnhealthyResourceCount *int32 `json:"unhealthyResourceCount,omitempty" azure:"ro"`

	// READ-ONLY; The relative weight for this specific control in each of your subscriptions. Used when calculating an aggregated
	// score for this control across all of your subscriptions.
	Weight *int64 `json:"weight,omitempty" azure:"ro"`
}

SecureScoreControlScoreDetails - Calculation result data in control level

func (SecureScoreControlScoreDetails) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreControlScoreDetails.

func (*SecureScoreControlScoreDetails) UnmarshalJSON added in v0.8.0

func (s *SecureScoreControlScoreDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreControlScoreDetails.

type SecureScoreControlsClient

type SecureScoreControlsClient struct {
	// contains filtered or unexported fields
}

SecureScoreControlsClient contains the methods for the SecureScoreControls group. Don't use this type directly, use NewSecureScoreControlsClient() instead.

func NewSecureScoreControlsClient

func NewSecureScoreControlsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecureScoreControlsClient, error)

NewSecureScoreControlsClient creates a new instance of SecureScoreControlsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SecureScoreControlsClient) NewListBySecureScorePager added in v0.6.0

NewListBySecureScorePager - Get all security controls for a specific initiative within a scope Generated from API version 2020-01-01 secureScoreName - The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample request below. options - SecureScoreControlsClientListBySecureScoreOptions contains the optional parameters for the SecureScoreControlsClient.ListBySecureScore method.

Example (GetSecurityControlsAndTheirCurrentScoreForTheSpecifiedInitiative)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControlsForName_builtin_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoreControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySecureScorePager("ascScore", &armsecurity.SecureScoreControlsClientListBySecureScoreOptions{Expand: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (GetSecurityControlsAndTheirCurrentScoreForTheSpecifiedInitiativeWithTheExpandParameter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControlsForNameWithExpand_builtin_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoreControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySecureScorePager("ascScore", &armsecurity.SecureScoreControlsClientListBySecureScoreOptions{Expand: to.Ptr(armsecurity.ExpandControlsEnumDefinition)})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SecureScoreControlsClient) NewListPager added in v0.6.0

NewListPager - Get all security controls within a scope Generated from API version 2020-01-01 options - SecureScoreControlsClientListOptions contains the optional parameters for the SecureScoreControlsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControls_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoreControlsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armsecurity.SecureScoreControlsClientListOptions{Expand: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SecureScoreControlsClientListBySecureScoreOptions added in v0.3.0

type SecureScoreControlsClientListBySecureScoreOptions struct {
	// OData expand. Optional.
	Expand *ExpandControlsEnum
}

SecureScoreControlsClientListBySecureScoreOptions contains the optional parameters for the SecureScoreControlsClient.ListBySecureScore method.

type SecureScoreControlsClientListBySecureScoreResponse added in v0.3.0

type SecureScoreControlsClientListBySecureScoreResponse struct {
	SecureScoreControlList
}

SecureScoreControlsClientListBySecureScoreResponse contains the response from method SecureScoreControlsClient.ListBySecureScore.

type SecureScoreControlsClientListOptions added in v0.3.0

type SecureScoreControlsClientListOptions struct {
	// OData expand. Optional.
	Expand *ExpandControlsEnum
}

SecureScoreControlsClientListOptions contains the optional parameters for the SecureScoreControlsClient.List method.

type SecureScoreControlsClientListResponse added in v0.3.0

type SecureScoreControlsClientListResponse struct {
	SecureScoreControlList
}

SecureScoreControlsClientListResponse contains the response from method SecureScoreControlsClient.List.

type SecureScoreItem

type SecureScoreItem struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Secure score item
	Properties *SecureScoreItemProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

SecureScoreItem - Secure score item data model

func (SecureScoreItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreItem.

func (*SecureScoreItem) UnmarshalJSON

func (s *SecureScoreItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreItem.

type SecureScoreItemProperties

type SecureScoreItemProperties struct {
	// READ-ONLY; The initiative’s name
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; score object
	Score *ScoreDetails `json:"score,omitempty" azure:"ro"`

	// READ-ONLY; The relative weight for each subscription. Used when calculating an aggregated secure score for multiple subscriptions.
	Weight *int64 `json:"weight,omitempty" azure:"ro"`
}

SecureScoreItemProperties - Describes properties of a calculated secure score.

func (SecureScoreItemProperties) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SecureScoreItemProperties.

func (*SecureScoreItemProperties) UnmarshalJSON added in v0.8.0

func (s *SecureScoreItemProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoreItemProperties.

type SecureScoresClient

type SecureScoresClient struct {
	// contains filtered or unexported fields
}

SecureScoresClient contains the methods for the SecureScores group. Don't use this type directly, use NewSecureScoresClient() instead.

func NewSecureScoresClient

func NewSecureScoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecureScoresClient, error)

NewSecureScoresClient creates a new instance of SecureScoresClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SecureScoresClient) Get

Get - Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC Default initiative, use 'ascScore'. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 secureScoreName - The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample request below. options - SecureScoresClientGetOptions contains the optional parameters for the SecureScoresClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/GetSecureScoresSingle_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoresClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "ascScore", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SecureScoresClient) NewListPager added in v0.6.0

NewListPager - List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. Generated from API version 2020-01-01 options - SecureScoresClientListOptions contains the optional parameters for the SecureScoresClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScores_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSecureScoresClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SecureScoresClientGetOptions added in v0.3.0

type SecureScoresClientGetOptions struct {
}

SecureScoresClientGetOptions contains the optional parameters for the SecureScoresClient.Get method.

type SecureScoresClientGetResponse added in v0.3.0

type SecureScoresClientGetResponse struct {
	SecureScoreItem
}

SecureScoresClientGetResponse contains the response from method SecureScoresClient.Get.

type SecureScoresClientListOptions added in v0.3.0

type SecureScoresClientListOptions struct {
}

SecureScoresClientListOptions contains the optional parameters for the SecureScoresClient.List method.

type SecureScoresClientListResponse added in v0.3.0

type SecureScoresClientListResponse struct {
	SecureScoresList
}

SecureScoresClientListResponse contains the response from method SecureScoresClient.List.

type SecureScoresList

type SecureScoresList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of secure scores in this page
	Value []*SecureScoreItem `json:"value,omitempty" azure:"ro"`
}

SecureScoresList - List of secure scores

func (SecureScoresList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecureScoresList.

func (*SecureScoresList) UnmarshalJSON added in v0.8.0

func (s *SecureScoresList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecureScoresList.

type SecurityFamily

type SecurityFamily string

SecurityFamily - The security family of the discovered solution

const (
	SecurityFamilyNgfw    SecurityFamily = "Ngfw"
	SecurityFamilySaasWaf SecurityFamily = "SaasWaf"
	SecurityFamilyVa      SecurityFamily = "Va"
	SecurityFamilyWaf     SecurityFamily = "Waf"
)

func PossibleSecurityFamilyValues

func PossibleSecurityFamilyValues() []SecurityFamily

PossibleSecurityFamilyValues returns the possible values for the SecurityFamily const type.

type SecuritySolutionStatus

type SecuritySolutionStatus string

SecuritySolutionStatus - Status of the IoT Security solution.

const (
	SecuritySolutionStatusDisabled SecuritySolutionStatus = "Disabled"
	SecuritySolutionStatusEnabled  SecuritySolutionStatus = "Enabled"
)

func PossibleSecuritySolutionStatusValues

func PossibleSecuritySolutionStatusValues() []SecuritySolutionStatus

PossibleSecuritySolutionStatusValues returns the possible values for the SecuritySolutionStatus const type.

type SensitivityLabel

type SensitivityLabel struct {
	// The description of the sensitivity label.
	Description *string `json:"description,omitempty"`

	// The name of the sensitivity label.
	DisplayName *string `json:"displayName,omitempty"`

	// Indicates whether the label is enabled or not.
	Enabled *bool `json:"enabled,omitempty"`

	// The order of the sensitivity label.
	Order *int32 `json:"order,omitempty"`

	// The rank of the sensitivity label.
	Rank *Rank `json:"rank,omitempty"`
}

SensitivityLabel - The sensitivity label.

func (SensitivityLabel) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SensitivityLabel.

func (*SensitivityLabel) UnmarshalJSON added in v0.8.0

func (s *SensitivityLabel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabel.

type ServerVulnerabilityAssessment

type ServerVulnerabilityAssessment struct {
	// describes ServerVulnerabilityAssessment properties.
	Properties *ServerVulnerabilityAssessmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ServerVulnerabilityAssessment - Describes the server vulnerability assessment details on a resource

func (ServerVulnerabilityAssessment) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessment.

func (*ServerVulnerabilityAssessment) UnmarshalJSON

func (s *ServerVulnerabilityAssessment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessment.

type ServerVulnerabilityAssessmentClient

type ServerVulnerabilityAssessmentClient struct {
	// contains filtered or unexported fields
}

ServerVulnerabilityAssessmentClient contains the methods for the ServerVulnerabilityAssessment group. Don't use this type directly, use NewServerVulnerabilityAssessmentClient() instead.

func NewServerVulnerabilityAssessmentClient

func NewServerVulnerabilityAssessmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerVulnerabilityAssessmentClient, error)

NewServerVulnerabilityAssessmentClient creates a new instance of ServerVulnerabilityAssessmentClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ServerVulnerabilityAssessmentClient) BeginDelete

BeginDelete - Removing server vulnerability assessment from a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. options - ServerVulnerabilityAssessmentClientBeginDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewServerVulnerabilityAssessmentClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ServerVulnerabilityAssessmentClient) CreateOrUpdate

CreateOrUpdate - Creating a server vulnerability assessment on a resource, which will onboard a resource for having a vulnerability assessment on it If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. options - ServerVulnerabilityAssessmentClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/CreateServerVulnerabilityAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewServerVulnerabilityAssessmentClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.CreateOrUpdate(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ServerVulnerabilityAssessmentClient) Get

func (client *ServerVulnerabilityAssessmentClient) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, options *ServerVulnerabilityAssessmentClientGetOptions) (ServerVulnerabilityAssessmentClientGetResponse, error)

Get - Gets a server vulnerability assessment onboarding statuses on a given resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. options - ServerVulnerabilityAssessmentClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetServerVulnerabilityAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewServerVulnerabilityAssessmentClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ServerVulnerabilityAssessmentClient) ListByExtendedResource

ListByExtendedResource - Gets a list of server vulnerability assessment onboarding statuses on a given resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The Namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. options - ServerVulnerabilityAssessmentClientListByExtendedResourceOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.ListByExtendedResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/ListByExtendedResourceServerVulnerabilityAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewServerVulnerabilityAssessmentClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListByExtendedResource(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ServerVulnerabilityAssessmentClientBeginDeleteOptions added in v0.3.0

type ServerVulnerabilityAssessmentClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServerVulnerabilityAssessmentClientBeginDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.BeginDelete method.

type ServerVulnerabilityAssessmentClientCreateOrUpdateOptions added in v0.3.0

type ServerVulnerabilityAssessmentClientCreateOrUpdateOptions struct {
}

ServerVulnerabilityAssessmentClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.CreateOrUpdate method.

type ServerVulnerabilityAssessmentClientCreateOrUpdateResponse added in v0.3.0

type ServerVulnerabilityAssessmentClientCreateOrUpdateResponse struct {
	ServerVulnerabilityAssessment
}

ServerVulnerabilityAssessmentClientCreateOrUpdateResponse contains the response from method ServerVulnerabilityAssessmentClient.CreateOrUpdate.

type ServerVulnerabilityAssessmentClientDeleteResponse added in v0.3.0

type ServerVulnerabilityAssessmentClientDeleteResponse struct {
}

ServerVulnerabilityAssessmentClientDeleteResponse contains the response from method ServerVulnerabilityAssessmentClient.Delete.

type ServerVulnerabilityAssessmentClientGetOptions added in v0.3.0

type ServerVulnerabilityAssessmentClientGetOptions struct {
}

ServerVulnerabilityAssessmentClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.Get method.

type ServerVulnerabilityAssessmentClientGetResponse added in v0.3.0

type ServerVulnerabilityAssessmentClientGetResponse struct {
	ServerVulnerabilityAssessment
}

ServerVulnerabilityAssessmentClientGetResponse contains the response from method ServerVulnerabilityAssessmentClient.Get.

type ServerVulnerabilityAssessmentClientListByExtendedResourceOptions added in v0.3.0

type ServerVulnerabilityAssessmentClientListByExtendedResourceOptions struct {
}

ServerVulnerabilityAssessmentClientListByExtendedResourceOptions contains the optional parameters for the ServerVulnerabilityAssessmentClient.ListByExtendedResource method.

type ServerVulnerabilityAssessmentClientListByExtendedResourceResponse added in v0.3.0

type ServerVulnerabilityAssessmentClientListByExtendedResourceResponse struct {
	ServerVulnerabilityAssessmentsList
}

ServerVulnerabilityAssessmentClientListByExtendedResourceResponse contains the response from method ServerVulnerabilityAssessmentClient.ListByExtendedResource.

type ServerVulnerabilityAssessmentProperties

type ServerVulnerabilityAssessmentProperties struct {
	// READ-ONLY; The provisioningState of the vulnerability assessment capability on the VM
	ProvisioningState *ServerVulnerabilityAssessmentPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

ServerVulnerabilityAssessmentProperties - describes ServerVulnerabilityAssessment properties.

func (ServerVulnerabilityAssessmentProperties) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentProperties.

func (*ServerVulnerabilityAssessmentProperties) UnmarshalJSON added in v0.8.0

func (s *ServerVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentProperties.

type ServerVulnerabilityAssessmentPropertiesProvisioningState

type ServerVulnerabilityAssessmentPropertiesProvisioningState string

ServerVulnerabilityAssessmentPropertiesProvisioningState - The provisioningState of the vulnerability assessment capability on the VM

const (
	ServerVulnerabilityAssessmentPropertiesProvisioningStateCanceled       ServerVulnerabilityAssessmentPropertiesProvisioningState = "Canceled"
	ServerVulnerabilityAssessmentPropertiesProvisioningStateDeprovisioning ServerVulnerabilityAssessmentPropertiesProvisioningState = "Deprovisioning"
	ServerVulnerabilityAssessmentPropertiesProvisioningStateFailed         ServerVulnerabilityAssessmentPropertiesProvisioningState = "Failed"
	ServerVulnerabilityAssessmentPropertiesProvisioningStateProvisioning   ServerVulnerabilityAssessmentPropertiesProvisioningState = "Provisioning"
	ServerVulnerabilityAssessmentPropertiesProvisioningStateSucceeded      ServerVulnerabilityAssessmentPropertiesProvisioningState = "Succeeded"
)

func PossibleServerVulnerabilityAssessmentPropertiesProvisioningStateValues

func PossibleServerVulnerabilityAssessmentPropertiesProvisioningStateValues() []ServerVulnerabilityAssessmentPropertiesProvisioningState

PossibleServerVulnerabilityAssessmentPropertiesProvisioningStateValues returns the possible values for the ServerVulnerabilityAssessmentPropertiesProvisioningState const type.

type ServerVulnerabilityAssessmentsList

type ServerVulnerabilityAssessmentsList struct {
	Value []*ServerVulnerabilityAssessment `json:"value,omitempty"`
}

ServerVulnerabilityAssessmentsList - List of server vulnerability assessments

func (ServerVulnerabilityAssessmentsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentsList.

func (*ServerVulnerabilityAssessmentsList) UnmarshalJSON added in v0.8.0

func (s *ServerVulnerabilityAssessmentsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentsList.

type ServerVulnerabilityProperties

type ServerVulnerabilityProperties struct {
	// REQUIRED; Sub-assessment resource type
	AssessedResourceType *AssessedResourceType `json:"assessedResourceType,omitempty"`

	// READ-ONLY; List of CVEs
	Cve []*CVE `json:"cve,omitempty" azure:"ro"`

	// READ-ONLY; Dictionary from cvss version to cvss details object
	Cvss map[string]*CVSS `json:"cvss,omitempty" azure:"ro"`

	// READ-ONLY; Indicates whether a patch is available or not
	Patchable *bool `json:"patchable,omitempty" azure:"ro"`

	// READ-ONLY; Published time
	PublishedTime *time.Time `json:"publishedTime,omitempty" azure:"ro"`

	// READ-ONLY; Threat name
	Threat *string `json:"threat,omitempty" azure:"ro"`

	// READ-ONLY; Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered
	Type *string `json:"type,omitempty" azure:"ro"`

	// READ-ONLY
	VendorReferences []*VendorReference `json:"vendorReferences,omitempty" azure:"ro"`
}

ServerVulnerabilityProperties - Additional context fields for server vulnerability assessment

func (*ServerVulnerabilityProperties) GetAdditionalData added in v0.3.0

func (s *ServerVulnerabilityProperties) GetAdditionalData() *AdditionalData

GetAdditionalData implements the AdditionalDataClassification interface for type ServerVulnerabilityProperties.

func (ServerVulnerabilityProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityProperties.

func (*ServerVulnerabilityProperties) UnmarshalJSON

func (s *ServerVulnerabilityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityProperties.

type ServicePrincipalProperties

type ServicePrincipalProperties struct {
	// Application ID of service principal.
	ApplicationID *string `json:"applicationId,omitempty"`

	// A secret string that the application uses to prove its identity, also can be referred to as application password (write
	// only).
	Secret *string `json:"secret,omitempty"`
}

ServicePrincipalProperties - Details of the service principal.

func (ServicePrincipalProperties) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type ServicePrincipalProperties.

func (*ServicePrincipalProperties) UnmarshalJSON added in v0.8.0

func (s *ServicePrincipalProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalProperties.

type Setting

type Setting struct {
	// REQUIRED; the kind of the settings string
	Kind *SettingKind `json:"kind,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Setting - The kind of the security setting

func (*Setting) GetSetting

func (s *Setting) GetSetting() *Setting

GetSetting implements the SettingClassification interface for type Setting.

func (Setting) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type Setting.

func (*Setting) UnmarshalJSON

func (s *Setting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Setting.

type SettingClassification

type SettingClassification interface {
	// GetSetting returns the Setting content of the underlying type.
	GetSetting() *Setting
}

SettingClassification provides polymorphic access to related types. Call the interface's GetSetting() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AlertSyncSettings, *DataExportSettings, *Setting

type SettingKind

type SettingKind string

SettingKind - the kind of the settings string

const (
	SettingKindAlertSuppressionSetting SettingKind = "AlertSuppressionSetting"
	SettingKindAlertSyncSettings       SettingKind = "AlertSyncSettings"
	SettingKindDataExportSettings      SettingKind = "DataExportSettings"
)

func PossibleSettingKindValues

func PossibleSettingKindValues() []SettingKind

PossibleSettingKindValues returns the possible values for the SettingKind const type.

type SettingName added in v0.4.0

type SettingName string
const (
	SettingNameMCAS                           SettingName = "MCAS"
	SettingNameSentinel                       SettingName = "Sentinel"
	SettingNameWDATP                          SettingName = "WDATP"
	SettingNameWDATPEXCLUDELINUXPUBLICPREVIEW SettingName = "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW"
	SettingNameWDATPUNIFIEDSOLUTION           SettingName = "WDATP_UNIFIED_SOLUTION"
)

func PossibleSettingNameValues added in v0.4.0

func PossibleSettingNameValues() []SettingName

PossibleSettingNameValues returns the possible values for the SettingName const type.

type SettingsClient

type SettingsClient struct {
	// contains filtered or unexported fields
}

SettingsClient contains the methods for the Settings group. Don't use this type directly, use NewSettingsClient() instead.

func NewSettingsClient

func NewSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SettingsClient, error)

NewSettingsClient creates a new instance of SettingsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SettingsClient) Get

Get - Settings of different configurations in Microsoft Defender for Cloud If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 settingName - The name of the setting options - SettingsClientGetOptions contains the optional parameters for the SettingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/GetSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, armsecurity.SettingNameMCAS, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SettingsClient) NewListPager added in v0.6.0

NewListPager - Settings about different configurations in Microsoft Defender for Cloud Generated from API version 2022-05-01 options - SettingsClientListOptions contains the optional parameters for the SettingsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/GetSettings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SettingsClient) Update

Update - updating settings about different configurations in Microsoft Defender for Cloud If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 settingName - The name of the setting setting - Setting object options - SettingsClientUpdateOptions contains the optional parameters for the SettingsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/UpdateSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx, armsecurity.SettingNameMCAS, &armsecurity.DataExportSettings{
		Kind: to.Ptr(armsecurity.SettingKindDataExportSettings),
		Properties: &armsecurity.DataExportSettingProperties{
			Enabled: to.Ptr(true),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SettingsClientGetOptions added in v0.3.0

type SettingsClientGetOptions struct {
}

SettingsClientGetOptions contains the optional parameters for the SettingsClient.Get method.

type SettingsClientGetResponse added in v0.3.0

type SettingsClientGetResponse struct {
	SettingClassification
}

SettingsClientGetResponse contains the response from method SettingsClient.Get.

func (*SettingsClientGetResponse) UnmarshalJSON added in v0.5.0

func (s *SettingsClientGetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SettingsClientGetResponse.

type SettingsClientListOptions added in v0.3.0

type SettingsClientListOptions struct {
}

SettingsClientListOptions contains the optional parameters for the SettingsClient.List method.

type SettingsClientListResponse added in v0.3.0

type SettingsClientListResponse struct {
	SettingsList
}

SettingsClientListResponse contains the response from method SettingsClient.List.

type SettingsClientUpdateOptions added in v0.3.0

type SettingsClientUpdateOptions struct {
}

SettingsClientUpdateOptions contains the optional parameters for the SettingsClient.Update method.

type SettingsClientUpdateResponse added in v0.3.0

type SettingsClientUpdateResponse struct {
	SettingClassification
}

SettingsClientUpdateResponse contains the response from method SettingsClient.Update.

func (*SettingsClientUpdateResponse) UnmarshalJSON added in v0.5.0

func (s *SettingsClientUpdateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SettingsClientUpdateResponse.

type SettingsList

type SettingsList struct {
	// The settings list.
	Value []SettingClassification `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

SettingsList - Subscription settings list.

func (SettingsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SettingsList.

func (*SettingsList) UnmarshalJSON

func (s *SettingsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SettingsList.

type Severity

type Severity string

Severity - The sub-assessment severity level

const (
	SeverityHigh   Severity = "High"
	SeverityLow    Severity = "Low"
	SeverityMedium Severity = "Medium"
)

func PossibleSeverityValues

func PossibleSeverityValues() []Severity

PossibleSeverityValues returns the possible values for the Severity const type.

type SeverityEnum

type SeverityEnum string

SeverityEnum - The severity to relate to the assessments generated by this assessment automation.

const (
	SeverityEnumHigh   SeverityEnum = "High"
	SeverityEnumLow    SeverityEnum = "Low"
	SeverityEnumMedium SeverityEnum = "Medium"
)

func PossibleSeverityEnumValues

func PossibleSeverityEnumValues() []SeverityEnum

PossibleSeverityEnumValues returns the possible values for the SeverityEnum const type.

type Software

type Software struct {
	// REQUIRED; Properties of the Software Inventory resource
	Properties *SoftwareProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Software - Represents a software data

func (Software) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Software.

func (*Software) UnmarshalJSON

func (s *Software) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Software.

type SoftwareInventoriesClient

type SoftwareInventoriesClient struct {
	// contains filtered or unexported fields
}

SoftwareInventoriesClient contains the methods for the SoftwareInventories group. Don't use this type directly, use NewSoftwareInventoriesClient() instead.

func NewSoftwareInventoriesClient

func NewSoftwareInventoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SoftwareInventoriesClient, error)

NewSoftwareInventoriesClient creates a new instance of SoftwareInventoriesClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SoftwareInventoriesClient) Get

func (client *SoftwareInventoriesClient) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, softwareName string, options *SoftwareInventoriesClientGetOptions) (SoftwareInventoriesClientGetResponse, error)

Get - Gets a single software data of the virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-05-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. softwareName - Name of the installed software. options - SoftwareInventoriesClientGetOptions contains the optional parameters for the SoftwareInventoriesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/SoftwareInventories/GetSoftware_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSoftwareInventoriesClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "EITAN-TESTS", "Microsoft.Compute", "virtualMachines", "Eitan-Test1", "outlook_16.0.10371.20060", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SoftwareInventoriesClient) NewListByExtendedResourcePager added in v0.6.0

func (client *SoftwareInventoriesClient) NewListByExtendedResourcePager(resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, options *SoftwareInventoriesClientListByExtendedResourceOptions) *runtime.Pager[SoftwareInventoriesClientListByExtendedResourceResponse]

NewListByExtendedResourcePager - Gets the software inventory of the virtual machine. Generated from API version 2021-05-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. resourceNamespace - The namespace of the resource. resourceType - The type of the resource. resourceName - Name of the resource. options - SoftwareInventoriesClientListByExtendedResourceOptions contains the optional parameters for the SoftwareInventoriesClient.ListByExtendedResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/SoftwareInventories/ListByExtendedResourceSoftwareInventories_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSoftwareInventoriesClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByExtendedResourcePager("EITAN-TESTS", "Microsoft.Compute", "virtualMachines", "Eitan-Test1", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SoftwareInventoriesClient) NewListBySubscriptionPager added in v0.6.0

NewListBySubscriptionPager - Gets the software inventory of all virtual machines in the subscriptions. Generated from API version 2021-05-01-preview options - SoftwareInventoriesClientListBySubscriptionOptions contains the optional parameters for the SoftwareInventoriesClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/SoftwareInventories/ListBySubscriptionSoftwareInventories_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSoftwareInventoriesClient("e5d1b86c-3051-44d5-8802-aa65d45a279b", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SoftwareInventoriesClientGetOptions added in v0.3.0

type SoftwareInventoriesClientGetOptions struct {
}

SoftwareInventoriesClientGetOptions contains the optional parameters for the SoftwareInventoriesClient.Get method.

type SoftwareInventoriesClientGetResponse added in v0.3.0

type SoftwareInventoriesClientGetResponse struct {
	Software
}

SoftwareInventoriesClientGetResponse contains the response from method SoftwareInventoriesClient.Get.

type SoftwareInventoriesClientListByExtendedResourceOptions added in v0.3.0

type SoftwareInventoriesClientListByExtendedResourceOptions struct {
}

SoftwareInventoriesClientListByExtendedResourceOptions contains the optional parameters for the SoftwareInventoriesClient.ListByExtendedResource method.

type SoftwareInventoriesClientListByExtendedResourceResponse added in v0.3.0

type SoftwareInventoriesClientListByExtendedResourceResponse struct {
	SoftwaresList
}

SoftwareInventoriesClientListByExtendedResourceResponse contains the response from method SoftwareInventoriesClient.ListByExtendedResource.

type SoftwareInventoriesClientListBySubscriptionOptions added in v0.3.0

type SoftwareInventoriesClientListBySubscriptionOptions struct {
}

SoftwareInventoriesClientListBySubscriptionOptions contains the optional parameters for the SoftwareInventoriesClient.ListBySubscription method.

type SoftwareInventoriesClientListBySubscriptionResponse added in v0.3.0

type SoftwareInventoriesClientListBySubscriptionResponse struct {
	SoftwaresList
}

SoftwareInventoriesClientListBySubscriptionResponse contains the response from method SoftwareInventoriesClient.ListBySubscription.

type SoftwareProperties

type SoftwareProperties struct {
	// Unique identifier for the virtual machine in the service.
	DeviceID *string `json:"deviceId,omitempty"`

	// The end of support date in case the product is upcoming end of support.
	EndOfSupportDate *string `json:"endOfSupportDate,omitempty"`

	// End of support status.
	EndOfSupportStatus *EndOfSupportStatus `json:"endOfSupportStatus,omitempty"`

	// First time that the software was seen in the device.
	FirstSeenAt *string `json:"firstSeenAt,omitempty"`

	// Number of weaknesses.
	NumberOfKnownVulnerabilities *int32 `json:"numberOfKnownVulnerabilities,omitempty"`

	// Platform of the operating system running on the device.
	OSPlatform *string `json:"osPlatform,omitempty"`

	// Name of the software product.
	SoftwareName *string `json:"softwareName,omitempty"`

	// Name of the software vendor.
	Vendor *string `json:"vendor,omitempty"`

	// Version number of the software product.
	Version *string `json:"version,omitempty"`
}

SoftwareProperties - Software Inventory resource properties

func (SoftwareProperties) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SoftwareProperties.

func (*SoftwareProperties) UnmarshalJSON added in v0.8.0

func (s *SoftwareProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SoftwareProperties.

type SoftwaresList

type SoftwaresList struct {
	Value []*Software `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

SoftwaresList - Represents the software inventory of the virtual machine.

func (SoftwaresList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SoftwaresList.

func (*SoftwaresList) UnmarshalJSON added in v0.8.0

func (s *SoftwaresList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SoftwaresList.

type Solution added in v0.3.0

type Solution struct {
	Properties *SolutionProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (Solution) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type Solution.

func (*Solution) UnmarshalJSON added in v0.8.0

func (s *Solution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Solution.

type SolutionList added in v0.3.0

type SolutionList struct {
	Value []*Solution `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

func (SolutionList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SolutionList.

func (*SolutionList) UnmarshalJSON added in v0.8.0

func (s *SolutionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionList.

type SolutionProperties added in v0.3.0

type SolutionProperties struct {
	// REQUIRED; The security solutions' status
	ProtectionStatus *string `json:"protectionStatus,omitempty"`

	// REQUIRED; The security family provisioning State
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`

	// REQUIRED; The security family of the security solution
	SecurityFamily *SecurityFamily `json:"securityFamily,omitempty"`

	// REQUIRED; The security solutions' template
	Template *string `json:"template,omitempty"`
}

func (SolutionProperties) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SolutionProperties.

func (*SolutionProperties) UnmarshalJSON added in v0.8.0

func (s *SolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionProperties.

type SolutionsClient added in v0.3.0

type SolutionsClient struct {
	// contains filtered or unexported fields
}

SolutionsClient contains the methods for the SecuritySolutions group. Don't use this type directly, use NewSolutionsClient() instead.

func NewSolutionsClient added in v0.3.0

func NewSolutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SolutionsClient, error)

NewSolutionsClient creates a new instance of SolutionsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SolutionsClient) Get added in v0.3.0

func (client *SolutionsClient) Get(ctx context.Context, resourceGroupName string, ascLocation string, securitySolutionName string, options *SolutionsClientGetOptions) (SolutionsClientGetResponse, error)

Get - Gets a specific Security Solution. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations securitySolutionName - Name of security solution. options - SolutionsClientGetOptions contains the optional parameters for the SolutionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/GetSecuritySolutionsResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myRg2", "centralus", "paloalto7", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SolutionsClient) NewListPager added in v0.6.0

NewListPager - Gets a list of Security Solutions for the subscription. Generated from API version 2020-01-01 options - SolutionsClientListOptions contains the optional parameters for the SolutionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/GetSecuritySolutionsSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSolutionsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SolutionsClientGetOptions added in v0.3.0

type SolutionsClientGetOptions struct {
}

SolutionsClientGetOptions contains the optional parameters for the SolutionsClient.Get method.

type SolutionsClientGetResponse added in v0.3.0

type SolutionsClientGetResponse struct {
	Solution
}

SolutionsClientGetResponse contains the response from method SolutionsClient.Get.

type SolutionsClientListOptions added in v0.3.0

type SolutionsClientListOptions struct {
}

SolutionsClientListOptions contains the optional parameters for the SolutionsClient.List method.

type SolutionsClientListResponse added in v0.3.0

type SolutionsClientListResponse struct {
	SolutionList
}

SolutionsClientListResponse contains the response from method SolutionsClient.List.

type SolutionsReferenceData added in v0.3.0

type SolutionsReferenceData struct {
	// REQUIRED
	Properties *SolutionsReferenceDataProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (SolutionsReferenceData) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SolutionsReferenceData.

func (*SolutionsReferenceData) UnmarshalJSON added in v0.8.0

func (s *SolutionsReferenceData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionsReferenceData.

type SolutionsReferenceDataClient added in v0.3.0

type SolutionsReferenceDataClient struct {
	// contains filtered or unexported fields
}

SolutionsReferenceDataClient contains the methods for the SecuritySolutionsReferenceData group. Don't use this type directly, use NewSolutionsReferenceDataClient() instead.

func NewSolutionsReferenceDataClient added in v0.3.0

func NewSolutionsReferenceDataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SolutionsReferenceDataClient, error)

NewSolutionsReferenceDataClient creates a new instance of SolutionsReferenceDataClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SolutionsReferenceDataClient) List added in v0.3.0

List - Gets a list of all supported Security Solutions for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 options - SolutionsReferenceDataClientListOptions contains the optional parameters for the SolutionsReferenceDataClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutionsReferenceData/GetSecuritySolutionsReferenceDataSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSolutionsReferenceDataClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SolutionsReferenceDataClient) ListByHomeRegion added in v0.3.0

ListByHomeRegion - Gets list of all supported Security Solutions for subscription and location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - SolutionsReferenceDataClientListByHomeRegionOptions contains the optional parameters for the SolutionsReferenceDataClient.ListByHomeRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutionsReferenceData/GetSecuritySolutionsReferenceDataSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSolutionsReferenceDataClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListByHomeRegion(ctx, "westcentralus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SolutionsReferenceDataClientListByHomeRegionOptions added in v0.3.0

type SolutionsReferenceDataClientListByHomeRegionOptions struct {
}

SolutionsReferenceDataClientListByHomeRegionOptions contains the optional parameters for the SolutionsReferenceDataClient.ListByHomeRegion method.

type SolutionsReferenceDataClientListByHomeRegionResponse added in v0.3.0

type SolutionsReferenceDataClientListByHomeRegionResponse struct {
	SolutionsReferenceDataList
}

SolutionsReferenceDataClientListByHomeRegionResponse contains the response from method SolutionsReferenceDataClient.ListByHomeRegion.

type SolutionsReferenceDataClientListOptions added in v0.3.0

type SolutionsReferenceDataClientListOptions struct {
}

SolutionsReferenceDataClientListOptions contains the optional parameters for the SolutionsReferenceDataClient.List method.

type SolutionsReferenceDataClientListResponse added in v0.3.0

type SolutionsReferenceDataClientListResponse struct {
	SolutionsReferenceDataList
}

SolutionsReferenceDataClientListResponse contains the response from method SolutionsReferenceDataClient.List.

type SolutionsReferenceDataList added in v0.3.0

type SolutionsReferenceDataList struct {
	Value []*SolutionsReferenceData `json:"value,omitempty"`
}

func (SolutionsReferenceDataList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SolutionsReferenceDataList.

func (*SolutionsReferenceDataList) UnmarshalJSON added in v0.8.0

func (s *SolutionsReferenceDataList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionsReferenceDataList.

type SolutionsReferenceDataProperties added in v0.3.0

type SolutionsReferenceDataProperties struct {
	// REQUIRED; The security solutions' vendor name
	AlertVendorName *string `json:"alertVendorName,omitempty"`

	// REQUIRED; The security solutions' package info url
	PackageInfoURL *string `json:"packageInfoUrl,omitempty"`

	// REQUIRED; The security solutions' product name
	ProductName *string `json:"productName,omitempty"`

	// REQUIRED; The security solutions' publisher
	Publisher *string `json:"publisher,omitempty"`

	// REQUIRED; The security solutions' publisher display name
	PublisherDisplayName *string `json:"publisherDisplayName,omitempty"`

	// REQUIRED; The security family of the security solution
	SecurityFamily *SecurityFamily `json:"securityFamily,omitempty"`

	// REQUIRED; The security solutions' template
	Template *string `json:"template,omitempty"`
}

func (SolutionsReferenceDataProperties) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SolutionsReferenceDataProperties.

func (*SolutionsReferenceDataProperties) UnmarshalJSON added in v0.8.0

func (s *SolutionsReferenceDataProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionsReferenceDataProperties.

type Source

type Source string

Source - The platform where the assessed resource resides

const (
	// SourceAzure - Resource is in Azure
	SourceAzure Source = "Azure"
	// SourceOnPremise - Resource in an on premise machine connected to Azure cloud
	SourceOnPremise Source = "OnPremise"
	// SourceOnPremiseSQL - SQL Resource in an on premise machine connected to Azure cloud
	SourceOnPremiseSQL Source = "OnPremiseSql"
)

func PossibleSourceValues

func PossibleSourceValues() []Source

PossibleSourceValues returns the possible values for the Source const type.

type SourceSystem

type SourceSystem string

SourceSystem - The source type of the machine group

const (
	SourceSystemAzureAppLocker    SourceSystem = "Azure_AppLocker"
	SourceSystemAzureAuditD       SourceSystem = "Azure_AuditD"
	SourceSystemNonAzureAppLocker SourceSystem = "NonAzure_AppLocker"
	SourceSystemNonAzureAuditD    SourceSystem = "NonAzure_AuditD"
	SourceSystemNone              SourceSystem = "None"
)

func PossibleSourceSystemValues

func PossibleSourceSystemValues() []SourceSystem

PossibleSourceSystemValues returns the possible values for the SourceSystem const type.

type State

type State string

State - Aggregative state based on the standard's supported controls states

const (
	// StateFailed - At least one supported regulatory compliance control in the given standard has a state of failed
	StateFailed State = "Failed"
	// StatePassed - All supported regulatory compliance controls in the given standard have a passed state
	StatePassed State = "Passed"
	// StateSkipped - All supported regulatory compliance controls in the given standard have a state of skipped
	StateSkipped State = "Skipped"
	// StateUnsupported - No supported regulatory compliance data for the given standard
	StateUnsupported State = "Unsupported"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

type Status

type Status string

Status - The status of the port

const (
	StatusInitiated Status = "Initiated"
	StatusRevoked   Status = "Revoked"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type StatusReason

type StatusReason string

StatusReason - A description of why the status has its value

const (
	StatusReasonExpired               StatusReason = "Expired"
	StatusReasonNewerRequestInitiated StatusReason = "NewerRequestInitiated"
	StatusReasonUserRequested         StatusReason = "UserRequested"
)

func PossibleStatusReasonValues

func PossibleStatusReasonValues() []StatusReason

PossibleStatusReasonValues returns the possible values for the StatusReason const type.

type SubAssessment added in v0.3.0

type SubAssessment struct {
	// Describes properties of an sub-assessment.
	Properties *SubAssessmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

SubAssessment - Security sub-assessment on a resource

func (SubAssessment) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SubAssessment.

func (*SubAssessment) UnmarshalJSON added in v0.8.0

func (s *SubAssessment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubAssessment.

type SubAssessmentList added in v0.3.0

type SubAssessmentList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY
	Value []*SubAssessment `json:"value,omitempty" azure:"ro"`
}

SubAssessmentList - List of security sub-assessments

func (SubAssessmentList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SubAssessmentList.

func (*SubAssessmentList) UnmarshalJSON added in v0.8.0

func (s *SubAssessmentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubAssessmentList.

type SubAssessmentProperties added in v0.3.0

type SubAssessmentProperties struct {
	// Details of the sub-assessment
	AdditionalData AdditionalDataClassification `json:"additionalData,omitempty"`

	// Details of the resource that was assessed
	ResourceDetails ResourceDetailsClassification `json:"resourceDetails,omitempty"`

	// Status of the sub-assessment
	Status *SubAssessmentStatus `json:"status,omitempty"`

	// READ-ONLY; Category of the sub-assessment
	Category *string `json:"category,omitempty" azure:"ro"`

	// READ-ONLY; Human readable description of the assessment status
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; User friendly display name of the sub-assessment
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Vulnerability ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Description of the impact of this sub-assessment
	Impact *string `json:"impact,omitempty" azure:"ro"`

	// READ-ONLY; Information on how to remediate this sub-assessment
	Remediation *string `json:"remediation,omitempty" azure:"ro"`

	// READ-ONLY; The date and time the sub-assessment was generated
	TimeGenerated *time.Time `json:"timeGenerated,omitempty" azure:"ro"`
}

SubAssessmentProperties - Describes properties of an sub-assessment.

func (SubAssessmentProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SubAssessmentProperties.

func (*SubAssessmentProperties) UnmarshalJSON added in v0.3.0

func (s *SubAssessmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubAssessmentProperties.

type SubAssessmentStatus

type SubAssessmentStatus struct {
	// READ-ONLY; Programmatic code for the cause of the assessment status
	Cause *string `json:"cause,omitempty" azure:"ro"`

	// READ-ONLY; Programmatic code for the status of the assessment
	Code *SubAssessmentStatusCode `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Human readable description of the assessment status
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The sub-assessment severity level
	Severity *Severity `json:"severity,omitempty" azure:"ro"`
}

SubAssessmentStatus - Status of the sub-assessment

func (SubAssessmentStatus) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type SubAssessmentStatus.

func (*SubAssessmentStatus) UnmarshalJSON added in v0.8.0

func (s *SubAssessmentStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubAssessmentStatus.

type SubAssessmentStatusCode

type SubAssessmentStatusCode string

SubAssessmentStatusCode - Programmatic code for the status of the assessment

const (
	// SubAssessmentStatusCodeHealthy - The resource is healthy
	SubAssessmentStatusCodeHealthy SubAssessmentStatusCode = "Healthy"
	// SubAssessmentStatusCodeNotApplicable - Assessment for this resource did not happen
	SubAssessmentStatusCodeNotApplicable SubAssessmentStatusCode = "NotApplicable"
	// SubAssessmentStatusCodeUnhealthy - The resource has a security issue that needs to be addressed
	SubAssessmentStatusCodeUnhealthy SubAssessmentStatusCode = "Unhealthy"
)

func PossibleSubAssessmentStatusCodeValues

func PossibleSubAssessmentStatusCodeValues() []SubAssessmentStatusCode

PossibleSubAssessmentStatusCodeValues returns the possible values for the SubAssessmentStatusCode const type.

type SubAssessmentsClient

type SubAssessmentsClient struct {
	// contains filtered or unexported fields
}

SubAssessmentsClient contains the methods for the SubAssessments group. Don't use this type directly, use NewSubAssessmentsClient() instead.

func NewSubAssessmentsClient

func NewSubAssessmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SubAssessmentsClient, error)

NewSubAssessmentsClient creates a new instance of SubAssessmentsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SubAssessmentsClient) Get

func (client *SubAssessmentsClient) Get(ctx context.Context, scope string, assessmentName string, subAssessmentName string, options *SubAssessmentsClientGetOptions) (SubAssessmentsClientGetResponse, error)

Get - Get a security sub-assessment on your scanned resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). assessmentName - The Assessment Key - Unique key for the assessment type subAssessmentName - The Sub-Assessment Key - Unique key for the sub-assessment type options - SubAssessmentsClientGetOptions contains the optional parameters for the SubAssessmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/GetSubAssessment_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSubAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/DEMORG/providers/Microsoft.Compute/virtualMachines/vm2", "1195afff-c881-495e-9bc5-1486211ae03f", "95f7da9c-a2a4-1322-0758-fcd24ef09b85", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SubAssessmentsClient) NewListAllPager added in v0.6.0

NewListAllPager - Get security sub-assessments on all your scanned resources inside a subscription scope Generated from API version 2019-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). options - SubAssessmentsClientListAllOptions contains the optional parameters for the SubAssessmentsClient.ListAll method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ListSubscriptionSubAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSubAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAllPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SubAssessmentsClient) NewListPager added in v0.6.0

NewListPager - Get security sub-assessments on all your scanned resources inside a scope Generated from API version 2019-01-01-preview scope - Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName). assessmentName - The Assessment Key - Unique key for the assessment type options - SubAssessmentsClientListOptions contains the optional parameters for the SubAssessmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ListSubAssessments_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSubAssessmentsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "82e20e14-edc5-4373-bfc4-f13121257c37", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SubAssessmentsClientGetOptions added in v0.3.0

type SubAssessmentsClientGetOptions struct {
}

SubAssessmentsClientGetOptions contains the optional parameters for the SubAssessmentsClient.Get method.

type SubAssessmentsClientGetResponse added in v0.3.0

type SubAssessmentsClientGetResponse struct {
	SubAssessment
}

SubAssessmentsClientGetResponse contains the response from method SubAssessmentsClient.Get.

type SubAssessmentsClientListAllOptions added in v0.3.0

type SubAssessmentsClientListAllOptions struct {
}

SubAssessmentsClientListAllOptions contains the optional parameters for the SubAssessmentsClient.ListAll method.

type SubAssessmentsClientListAllResponse added in v0.3.0

type SubAssessmentsClientListAllResponse struct {
	SubAssessmentList
}

SubAssessmentsClientListAllResponse contains the response from method SubAssessmentsClient.ListAll.

type SubAssessmentsClientListOptions added in v0.3.0

type SubAssessmentsClientListOptions struct {
}

SubAssessmentsClientListOptions contains the optional parameters for the SubAssessmentsClient.List method.

type SubAssessmentsClientListResponse added in v0.3.0

type SubAssessmentsClientListResponse struct {
	SubAssessmentList
}

SubAssessmentsClientListResponse contains the response from method SubAssessmentsClient.List.

type SubPlan added in v0.8.0

type SubPlan string

SubPlan - The available sub plans

const (
	SubPlanP1 SubPlan = "P1"
	SubPlanP2 SubPlan = "P2"
)

func PossibleSubPlanValues added in v0.8.0

func PossibleSubPlanValues() []SubPlan

PossibleSubPlanValues returns the possible values for the SubPlan const type.

type SubscriptionGovernanceRulesExecuteStatusClient added in v0.8.0

type SubscriptionGovernanceRulesExecuteStatusClient struct {
	// contains filtered or unexported fields
}

SubscriptionGovernanceRulesExecuteStatusClient contains the methods for the SubscriptionGovernanceRulesExecuteStatus group. Don't use this type directly, use NewSubscriptionGovernanceRulesExecuteStatusClient() instead.

func NewSubscriptionGovernanceRulesExecuteStatusClient added in v0.8.0

func NewSubscriptionGovernanceRulesExecuteStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionGovernanceRulesExecuteStatusClient, error)

NewSubscriptionGovernanceRulesExecuteStatusClient creates a new instance of SubscriptionGovernanceRulesExecuteStatusClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SubscriptionGovernanceRulesExecuteStatusClient) BeginGet added in v0.8.0

BeginGet - Get a specific governanceRule execution status for the requested scope by ruleId and operationId If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview ruleID - The security GovernanceRule key - unique key for the standard GovernanceRule operationID - The security GovernanceRule execution key - unique key for the execution of GovernanceRule options - SubscriptionGovernanceRulesExecuteStatusClientBeginGetOptions contains the optional parameters for the SubscriptionGovernanceRulesExecuteStatusClient.BeginGet method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewSubscriptionGovernanceRulesExecuteStatusClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGet(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SubscriptionGovernanceRulesExecuteStatusClientBeginGetOptions added in v0.8.0

type SubscriptionGovernanceRulesExecuteStatusClientBeginGetOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SubscriptionGovernanceRulesExecuteStatusClientBeginGetOptions contains the optional parameters for the SubscriptionGovernanceRulesExecuteStatusClient.BeginGet method.

type SubscriptionGovernanceRulesExecuteStatusClientGetResponse added in v0.8.0

type SubscriptionGovernanceRulesExecuteStatusClientGetResponse struct {
	ExecuteRuleStatus
}

SubscriptionGovernanceRulesExecuteStatusClientGetResponse contains the response from method SubscriptionGovernanceRulesExecuteStatusClient.Get.

type SupportedCloudEnum

type SupportedCloudEnum string

SupportedCloudEnum - Relevant cloud for the custom assessment automation.

const (
	SupportedCloudEnumAWS SupportedCloudEnum = "AWS"
	SupportedCloudEnumGCP SupportedCloudEnum = "GCP"
)

func PossibleSupportedCloudEnumValues

func PossibleSupportedCloudEnumValues() []SupportedCloudEnum

PossibleSupportedCloudEnumValues returns the possible values for the SupportedCloudEnum const type.

type SuppressionAlertsScope

type SuppressionAlertsScope struct {
	// REQUIRED; All the conditions inside need to be true in order to suppress the alert
	AllOf []*ScopeElement `json:"allOf,omitempty"`
}

func (SuppressionAlertsScope) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SuppressionAlertsScope.

func (*SuppressionAlertsScope) UnmarshalJSON added in v0.8.0

func (s *SuppressionAlertsScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SuppressionAlertsScope.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Tactics

type Tactics string

Tactics - Tactic of the assessment

const (
	TacticsCollection          Tactics = "Collection"
	TacticsCommandAndControl   Tactics = "Command and Control"
	TacticsCredentialAccess    Tactics = "Credential Access"
	TacticsDefenseEvasion      Tactics = "Defense Evasion"
	TacticsDiscovery           Tactics = "Discovery"
	TacticsExecution           Tactics = "Execution"
	TacticsExfiltration        Tactics = "Exfiltration"
	TacticsImpact              Tactics = "Impact"
	TacticsInitialAccess       Tactics = "Initial Access"
	TacticsLateralMovement     Tactics = "Lateral Movement"
	TacticsPersistence         Tactics = "Persistence"
	TacticsPrivilegeEscalation Tactics = "Privilege Escalation"
	TacticsReconnaissance      Tactics = "Reconnaissance"
	TacticsResourceDevelopment Tactics = "Resource Development"
)

func PossibleTacticsValues

func PossibleTacticsValues() []Tactics

PossibleTacticsValues returns the possible values for the Tactics const type.

type Tags

type Tags struct {
	// A list of key value pairs that describe the resource.
	Tags map[string]*string `json:"tags,omitempty"`
}

Tags - A list of key value pairs that describe the resource.

func (Tags) MarshalJSON

func (t Tags) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Tags.

func (*Tags) UnmarshalJSON

func (t *Tags) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Tags.

type TagsResource

type TagsResource struct {
	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags.

func (TagsResource) MarshalJSON

func (t TagsResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagsResource.

func (*TagsResource) UnmarshalJSON

func (t *TagsResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagsResource.

type Task added in v0.3.0

type Task struct {
	// Describes properties of a task.
	Properties *TaskProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

Task - Security task that we recommend to do in order to strengthen security

func (Task) MarshalJSON added in v0.8.0

func (t Task) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Task.

func (*Task) UnmarshalJSON added in v0.8.0

func (t *Task) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Task.

type TaskList added in v0.3.0

type TaskList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY
	Value []*Task `json:"value,omitempty" azure:"ro"`
}

TaskList - List of security task recommendations

func (TaskList) MarshalJSON added in v0.3.0

func (t TaskList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskList.

func (*TaskList) UnmarshalJSON added in v0.8.0

func (t *TaskList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaskList.

type TaskParameters added in v0.3.0

type TaskParameters struct {
	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// READ-ONLY; Name of the task type
	Name *string `json:"name,omitempty" azure:"ro"`
}

TaskParameters - Changing set of properties, depending on the task type that is derived from the name field

func (TaskParameters) MarshalJSON added in v0.3.0

func (t TaskParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskParameters.

func (*TaskParameters) UnmarshalJSON added in v0.3.0

func (t *TaskParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaskParameters.

type TaskProperties added in v0.3.0

type TaskProperties struct {
	// Changing set of properties, depending on the task type that is derived from the name field
	SecurityTaskParameters *TaskParameters `json:"securityTaskParameters,omitempty"`

	// READ-ONLY; The time this task was discovered in UTC
	CreationTimeUTC *time.Time `json:"creationTimeUtc,omitempty" azure:"ro"`

	// READ-ONLY; The time this task's details were last changed in UTC
	LastStateChangeTimeUTC *time.Time `json:"lastStateChangeTimeUtc,omitempty" azure:"ro"`

	// READ-ONLY; State of the task (Active, Resolved etc.)
	State *string `json:"state,omitempty" azure:"ro"`

	// READ-ONLY; Additional data on the state of the task
	SubState *string `json:"subState,omitempty" azure:"ro"`
}

TaskProperties - Describes properties of a task.

func (TaskProperties) MarshalJSON added in v0.3.0

func (t TaskProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskProperties.

func (*TaskProperties) UnmarshalJSON added in v0.3.0

func (t *TaskProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaskProperties.

type TaskUpdateActionType added in v0.4.0

type TaskUpdateActionType string
const (
	TaskUpdateActionTypeActivate TaskUpdateActionType = "Activate"
	TaskUpdateActionTypeClose    TaskUpdateActionType = "Close"
	TaskUpdateActionTypeDismiss  TaskUpdateActionType = "Dismiss"
	TaskUpdateActionTypeResolve  TaskUpdateActionType = "Resolve"
	TaskUpdateActionTypeStart    TaskUpdateActionType = "Start"
)

func PossibleTaskUpdateActionTypeValues added in v0.4.0

func PossibleTaskUpdateActionTypeValues() []TaskUpdateActionType

PossibleTaskUpdateActionTypeValues returns the possible values for the TaskUpdateActionType const type.

type TasksClient

type TasksClient struct {
	// contains filtered or unexported fields
}

TasksClient contains the methods for the Tasks group. Don't use this type directly, use NewTasksClient() instead.

func NewTasksClient

func NewTasksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TasksClient, error)

NewTasksClient creates a new instance of TasksClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TasksClient) GetResourceGroupLevelTask

func (client *TasksClient) GetResourceGroupLevelTask(ctx context.Context, resourceGroupName string, ascLocation string, taskName string, options *TasksClientGetResourceGroupLevelTaskOptions) (TasksClientGetResourceGroupLevelTaskResponse, error)

GetResourceGroupLevelTask - Recommended tasks that will help improve the security of the subscription proactively If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-06-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations taskName - Name of the task object, will be a GUID options - TasksClientGetResourceGroupLevelTaskOptions contains the optional parameters for the TasksClient.GetResourceGroupLevelTask method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTaskResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetResourceGroupLevelTask(ctx, "myRg", "westeurope", "d55b4dc0-779c-c66c-33e5-d7bce24c4222", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TasksClient) GetSubscriptionLevelTask

func (client *TasksClient) GetSubscriptionLevelTask(ctx context.Context, ascLocation string, taskName string, options *TasksClientGetSubscriptionLevelTaskOptions) (TasksClientGetSubscriptionLevelTaskResponse, error)

GetSubscriptionLevelTask - Recommended tasks that will help improve the security of the subscription proactively If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-06-01-preview ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations taskName - Name of the task object, will be a GUID options - TasksClientGetSubscriptionLevelTaskOptions contains the optional parameters for the TasksClient.GetSubscriptionLevelTask method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTaskSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetSubscriptionLevelTask(ctx, "westeurope", "62609ee7-d0a5-8616-9fe4-1df5cca7758d", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TasksClient) NewListByHomeRegionPager added in v0.6.0

func (client *TasksClient) NewListByHomeRegionPager(ascLocation string, options *TasksClientListByHomeRegionOptions) *runtime.Pager[TasksClientListByHomeRegionResponse]

NewListByHomeRegionPager - Recommended tasks that will help improve the security of the subscription proactively Generated from API version 2015-06-01-preview ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - TasksClientListByHomeRegionOptions contains the optional parameters for the TasksClient.ListByHomeRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTasksSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHomeRegionPager("westeurope", &armsecurity.TasksClientListByHomeRegionOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*TasksClient) NewListByResourceGroupPager added in v0.6.0

func (client *TasksClient) NewListByResourceGroupPager(resourceGroupName string, ascLocation string, options *TasksClientListByResourceGroupOptions) *runtime.Pager[TasksClientListByResourceGroupResponse]

NewListByResourceGroupPager - Recommended tasks that will help improve the security of the subscription proactively Generated from API version 2015-06-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - TasksClientListByResourceGroupOptions contains the optional parameters for the TasksClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTasksResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myRg", "westeurope", &armsecurity.TasksClientListByResourceGroupOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*TasksClient) NewListPager added in v0.6.0

func (client *TasksClient) NewListPager(options *TasksClientListOptions) *runtime.Pager[TasksClientListResponse]

NewListPager - Recommended tasks that will help improve the security of the subscription proactively Generated from API version 2015-06-01-preview options - TasksClientListOptions contains the optional parameters for the TasksClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTasksSubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armsecurity.TasksClientListOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*TasksClient) UpdateResourceGroupLevelTaskState

func (client *TasksClient) UpdateResourceGroupLevelTaskState(ctx context.Context, resourceGroupName string, ascLocation string, taskName string, taskUpdateActionType TaskUpdateActionType, options *TasksClientUpdateResourceGroupLevelTaskStateOptions) (TasksClientUpdateResourceGroupLevelTaskStateResponse, error)

UpdateResourceGroupLevelTaskState - Recommended tasks that will help improve the security of the subscription proactively If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-06-01-preview resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations taskName - Name of the task object, will be a GUID taskUpdateActionType - Type of the action to do on the task options - TasksClientUpdateResourceGroupLevelTaskStateOptions contains the optional parameters for the TasksClient.UpdateResourceGroupLevelTaskState method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/UpdateTaskResourceGroupLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateResourceGroupLevelTaskState(ctx, "myRg", "westeurope", "d55b4dc0-779c-c66c-33e5-d7bce24c4222", armsecurity.TaskUpdateActionTypeDismiss, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*TasksClient) UpdateSubscriptionLevelTaskState

func (client *TasksClient) UpdateSubscriptionLevelTaskState(ctx context.Context, ascLocation string, taskName string, taskUpdateActionType TaskUpdateActionType, options *TasksClientUpdateSubscriptionLevelTaskStateOptions) (TasksClientUpdateSubscriptionLevelTaskStateResponse, error)

UpdateSubscriptionLevelTaskState - Recommended tasks that will help improve the security of the subscription proactively If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-06-01-preview ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations taskName - Name of the task object, will be a GUID taskUpdateActionType - Type of the action to do on the task options - TasksClientUpdateSubscriptionLevelTaskStateOptions contains the optional parameters for the TasksClient.UpdateSubscriptionLevelTaskState method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/UpdateTaskSubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTasksClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.UpdateSubscriptionLevelTaskState(ctx, "westeurope", "62609ee7-d0a5-8616-9fe4-1df5cca7758d", armsecurity.TaskUpdateActionTypeDismiss, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type TasksClientGetResourceGroupLevelTaskOptions added in v0.3.0

type TasksClientGetResourceGroupLevelTaskOptions struct {
}

TasksClientGetResourceGroupLevelTaskOptions contains the optional parameters for the TasksClient.GetResourceGroupLevelTask method.

type TasksClientGetResourceGroupLevelTaskResponse added in v0.3.0

type TasksClientGetResourceGroupLevelTaskResponse struct {
	Task
}

TasksClientGetResourceGroupLevelTaskResponse contains the response from method TasksClient.GetResourceGroupLevelTask.

type TasksClientGetSubscriptionLevelTaskOptions added in v0.3.0

type TasksClientGetSubscriptionLevelTaskOptions struct {
}

TasksClientGetSubscriptionLevelTaskOptions contains the optional parameters for the TasksClient.GetSubscriptionLevelTask method.

type TasksClientGetSubscriptionLevelTaskResponse added in v0.3.0

type TasksClientGetSubscriptionLevelTaskResponse struct {
	Task
}

TasksClientGetSubscriptionLevelTaskResponse contains the response from method TasksClient.GetSubscriptionLevelTask.

type TasksClientListByHomeRegionOptions added in v0.3.0

type TasksClientListByHomeRegionOptions struct {
	// OData filter. Optional.
	Filter *string
}

TasksClientListByHomeRegionOptions contains the optional parameters for the TasksClient.ListByHomeRegion method.

type TasksClientListByHomeRegionResponse added in v0.3.0

type TasksClientListByHomeRegionResponse struct {
	TaskList
}

TasksClientListByHomeRegionResponse contains the response from method TasksClient.ListByHomeRegion.

type TasksClientListByResourceGroupOptions added in v0.3.0

type TasksClientListByResourceGroupOptions struct {
	// OData filter. Optional.
	Filter *string
}

TasksClientListByResourceGroupOptions contains the optional parameters for the TasksClient.ListByResourceGroup method.

type TasksClientListByResourceGroupResponse added in v0.3.0

type TasksClientListByResourceGroupResponse struct {
	TaskList
}

TasksClientListByResourceGroupResponse contains the response from method TasksClient.ListByResourceGroup.

type TasksClientListOptions added in v0.3.0

type TasksClientListOptions struct {
	// OData filter. Optional.
	Filter *string
}

TasksClientListOptions contains the optional parameters for the TasksClient.List method.

type TasksClientListResponse added in v0.3.0

type TasksClientListResponse struct {
	TaskList
}

TasksClientListResponse contains the response from method TasksClient.List.

type TasksClientUpdateResourceGroupLevelTaskStateOptions added in v0.3.0

type TasksClientUpdateResourceGroupLevelTaskStateOptions struct {
}

TasksClientUpdateResourceGroupLevelTaskStateOptions contains the optional parameters for the TasksClient.UpdateResourceGroupLevelTaskState method.

type TasksClientUpdateResourceGroupLevelTaskStateResponse added in v0.3.0

type TasksClientUpdateResourceGroupLevelTaskStateResponse struct {
}

TasksClientUpdateResourceGroupLevelTaskStateResponse contains the response from method TasksClient.UpdateResourceGroupLevelTaskState.

type TasksClientUpdateSubscriptionLevelTaskStateOptions added in v0.3.0

type TasksClientUpdateSubscriptionLevelTaskStateOptions struct {
}

TasksClientUpdateSubscriptionLevelTaskStateOptions contains the optional parameters for the TasksClient.UpdateSubscriptionLevelTaskState method.

type TasksClientUpdateSubscriptionLevelTaskStateResponse added in v0.3.0

type TasksClientUpdateSubscriptionLevelTaskStateResponse struct {
}

TasksClientUpdateSubscriptionLevelTaskStateResponse contains the response from method TasksClient.UpdateSubscriptionLevelTaskState.

type Techniques

type Techniques string

Techniques - Techniques of the assessment

const (
	TechniquesAbuseElevationControlMechanism          Techniques = "Abuse Elevation Control Mechanism"
	TechniquesAccessTokenManipulation                 Techniques = "Access Token Manipulation"
	TechniquesAccountDiscovery                        Techniques = "Account Discovery"
	TechniquesAccountManipulation                     Techniques = "Account Manipulation"
	TechniquesActiveScanning                          Techniques = "Active Scanning"
	TechniquesApplicationLayerProtocol                Techniques = "Application Layer Protocol"
	TechniquesAudioCapture                            Techniques = "Audio Capture"
	TechniquesBootOrLogonAutostartExecution           Techniques = "Boot or Logon Autostart Execution"
	TechniquesBootOrLogonInitializationScripts        Techniques = "Boot or Logon Initialization Scripts"
	TechniquesBruteForce                              Techniques = "Brute Force"
	TechniquesCloudInfrastructureDiscovery            Techniques = "Cloud Infrastructure Discovery"
	TechniquesCloudServiceDashboard                   Techniques = "Cloud Service Dashboard"
	TechniquesCloudServiceDiscovery                   Techniques = "Cloud Service Discovery"
	TechniquesCommandAndScriptingInterpreter          Techniques = "Command and Scripting Interpreter"
	TechniquesCompromiseClientSoftwareBinary          Techniques = "Compromise Client Software Binary"
	TechniquesCompromiseInfrastructure                Techniques = "Compromise Infrastructure"
	TechniquesContainerAndResourceDiscovery           Techniques = "Container and Resource Discovery"
	TechniquesCreateAccount                           Techniques = "Create Account"
	TechniquesCreateOrModifySystemProcess             Techniques = "Create or Modify System Process"
	TechniquesCredentialsFromPasswordStores           Techniques = "Credentials from Password Stores"
	TechniquesDataDestruction                         Techniques = "Data Destruction"
	TechniquesDataEncryptedForImpact                  Techniques = "Data Encrypted for Impact"
	TechniquesDataFromCloudStorageObject              Techniques = "Data from Cloud Storage Object"
	TechniquesDataFromConfigurationRepository         Techniques = "Data from Configuration Repository"
	TechniquesDataFromInformationRepositories         Techniques = "Data from Information Repositories"
	TechniquesDataFromLocalSystem                     Techniques = "Data from Local System"
	TechniquesDataManipulation                        Techniques = "Data Manipulation"
	TechniquesDataStaged                              Techniques = "Data Staged"
	TechniquesDefacement                              Techniques = "Defacement"
	TechniquesDeobfuscateDecodeFilesOrInformation     Techniques = "Deobfuscate/Decode Files or Information"
	TechniquesDiskWipe                                Techniques = "Disk Wipe"
	TechniquesDomainTrustDiscovery                    Techniques = "Domain Trust Discovery"
	TechniquesDriveByCompromise                       Techniques = "Drive-by Compromise"
	TechniquesDynamicResolution                       Techniques = "Dynamic Resolution"
	TechniquesEndpointDenialOfService                 Techniques = "Endpoint Denial of Service"
	TechniquesEventTriggeredExecution                 Techniques = "Event Triggered Execution"
	TechniquesExfiltrationOverAlternativeProtocol     Techniques = "Exfiltration Over Alternative Protocol"
	TechniquesExploitPublicFacingApplication          Techniques = "Exploit Public-Facing Application"
	TechniquesExploitationForClientExecution          Techniques = "Exploitation for Client Execution"
	TechniquesExploitationForCredentialAccess         Techniques = "Exploitation for Credential Access"
	TechniquesExploitationForDefenseEvasion           Techniques = "Exploitation for Defense Evasion"
	TechniquesExploitationForPrivilegeEscalation      Techniques = "Exploitation for Privilege Escalation"
	TechniquesExploitationOfRemoteServices            Techniques = "Exploitation of Remote Services"
	TechniquesExternalRemoteServices                  Techniques = "External Remote Services"
	TechniquesFallbackChannels                        Techniques = "Fallback Channels"
	TechniquesFileAndDirectoryDiscovery               Techniques = "File and Directory Discovery"
	TechniquesFileAndDirectoryPermissionsModification Techniques = "File and Directory Permissions Modification"
	TechniquesGatherVictimNetworkInformation          Techniques = "Gather Victim Network Information"
	TechniquesHideArtifacts                           Techniques = "Hide Artifacts"
	TechniquesHijackExecutionFlow                     Techniques = "Hijack Execution Flow"
	TechniquesImpairDefenses                          Techniques = "Impair Defenses"
	TechniquesImplantContainerImage                   Techniques = "Implant Container Image"
	TechniquesIndicatorRemovalOnHost                  Techniques = "Indicator Removal on Host"
	TechniquesIndirectCommandExecution                Techniques = "Indirect Command Execution"
	TechniquesIngressToolTransfer                     Techniques = "Ingress Tool Transfer"
	TechniquesInputCapture                            Techniques = "Input Capture"
	TechniquesInterProcessCommunication               Techniques = "Inter-Process Communication"
	TechniquesLateralToolTransfer                     Techniques = "Lateral Tool Transfer"
	TechniquesManInTheMiddle                          Techniques = "Man-in-the-Middle"
	TechniquesMasquerading                            Techniques = "Masquerading"
	TechniquesModifyAuthenticationProcess             Techniques = "Modify Authentication Process"
	TechniquesModifyRegistry                          Techniques = "Modify Registry"
	TechniquesNetworkDenialOfService                  Techniques = "Network Denial of Service"
	TechniquesNetworkServiceScanning                  Techniques = "Network Service Scanning"
	TechniquesNetworkSniffing                         Techniques = "Network Sniffing"
	TechniquesNonApplicationLayerProtocol             Techniques = "Non-Application Layer Protocol"
	TechniquesNonStandardPort                         Techniques = "Non-Standard Port"
	TechniquesOSCredentialDumping                     Techniques = "OS Credential Dumping"
	TechniquesObfuscatedFilesOrInformation            Techniques = "Obfuscated Files or Information"
	TechniquesObtainCapabilities                      Techniques = "Obtain Capabilities"
	TechniquesOfficeApplicationStartup                Techniques = "Office Application Startup"
	TechniquesPermissionGroupsDiscovery               Techniques = "Permission Groups Discovery"
	TechniquesPhishing                                Techniques = "Phishing"
	TechniquesPreOSBoot                               Techniques = "Pre-OS Boot"
	TechniquesProcessDiscovery                        Techniques = "Process Discovery"
	TechniquesProcessInjection                        Techniques = "Process Injection"
	TechniquesProtocolTunneling                       Techniques = "Protocol Tunneling"
	TechniquesProxy                                   Techniques = "Proxy"
	TechniquesQueryRegistry                           Techniques = "Query Registry"
	TechniquesRemoteAccessSoftware                    Techniques = "Remote Access Software"
	TechniquesRemoteServiceSessionHijacking           Techniques = "Remote Service Session Hijacking"
	TechniquesRemoteServices                          Techniques = "Remote Services"
	TechniquesRemoteSystemDiscovery                   Techniques = "Remote System Discovery"
	TechniquesResourceHijacking                       Techniques = "Resource Hijacking"
	TechniquesSQLStoredProcedures                     Techniques = "SQL Stored Procedures"
	TechniquesScheduledTaskJob                        Techniques = "Scheduled Task/Job"
	TechniquesScreenCapture                           Techniques = "Screen Capture"
	TechniquesSearchVictimOwnedWebsites               Techniques = "Search Victim-Owned Websites"
	TechniquesServerSoftwareComponent                 Techniques = "Server Software Component"
	TechniquesServiceStop                             Techniques = "Service Stop"
	TechniquesSignedBinaryProxyExecution              Techniques = "Signed Binary Proxy Execution"
	TechniquesSoftwareDeploymentTools                 Techniques = "Software Deployment Tools"
	TechniquesStealOrForgeKerberosTickets             Techniques = "Steal or Forge Kerberos Tickets"
	TechniquesSubvertTrustControls                    Techniques = "Subvert Trust Controls"
	TechniquesSupplyChainCompromise                   Techniques = "Supply Chain Compromise"
	TechniquesSystemInformationDiscovery              Techniques = "System Information Discovery"
	TechniquesTaintSharedContent                      Techniques = "Taint Shared Content"
	TechniquesTrafficSignaling                        Techniques = "Traffic Signaling"
	TechniquesTransferDataToCloudAccount              Techniques = "Transfer Data to Cloud Account"
	TechniquesTrustedRelationship                     Techniques = "Trusted Relationship"
	TechniquesUnsecuredCredentials                    Techniques = "Unsecured Credentials"
	TechniquesUserExecution                           Techniques = "User Execution"
	TechniquesValidAccounts                           Techniques = "Valid Accounts"
	TechniquesWindowsManagementInstrumentation        Techniques = "Windows Management Instrumentation"
)

func PossibleTechniquesValues

func PossibleTechniquesValues() []Techniques

PossibleTechniquesValues returns the possible values for the Techniques const type.

type Threats

type Threats string

Threats - Threats impact of the assessment

const (
	ThreatsAccountBreach        Threats = "accountBreach"
	ThreatsDataExfiltration     Threats = "dataExfiltration"
	ThreatsDataSpillage         Threats = "dataSpillage"
	ThreatsDenialOfService      Threats = "denialOfService"
	ThreatsElevationOfPrivilege Threats = "elevationOfPrivilege"
	ThreatsMaliciousInsider     Threats = "maliciousInsider"
	ThreatsMissingCoverage      Threats = "missingCoverage"
	ThreatsThreatResistance     Threats = "threatResistance"
)

func PossibleThreatsValues

func PossibleThreatsValues() []Threats

PossibleThreatsValues returns the possible values for the Threats const type.

type ThresholdCustomAlertRule

type ThresholdCustomAlertRule struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

ThresholdCustomAlertRule - A custom alert rule that checks if a value (depends on the custom alert type) is within the given range.

func (*ThresholdCustomAlertRule) GetCustomAlertRule added in v0.3.0

func (t *ThresholdCustomAlertRule) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type ThresholdCustomAlertRule.

func (*ThresholdCustomAlertRule) GetThresholdCustomAlertRule

func (t *ThresholdCustomAlertRule) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type ThresholdCustomAlertRule.

func (ThresholdCustomAlertRule) MarshalJSON added in v0.3.0

func (t ThresholdCustomAlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ThresholdCustomAlertRule.

func (*ThresholdCustomAlertRule) UnmarshalJSON

func (t *ThresholdCustomAlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ThresholdCustomAlertRule.

type ThresholdCustomAlertRuleClassification

type ThresholdCustomAlertRuleClassification interface {
	CustomAlertRuleClassification
	// GetThresholdCustomAlertRule returns the ThresholdCustomAlertRule content of the underlying type.
	GetThresholdCustomAlertRule() *ThresholdCustomAlertRule
}

ThresholdCustomAlertRuleClassification provides polymorphic access to related types. Call the interface's GetThresholdCustomAlertRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ActiveConnectionsNotInAllowedRange, *AmqpC2DMessagesNotInAllowedRange, *AmqpC2DRejectedMessagesNotInAllowedRange, *AmqpD2CMessagesNotInAllowedRange, - *DirectMethodInvokesNotInAllowedRange, *FailedLocalLoginsNotInAllowedRange, *FileUploadsNotInAllowedRange, *HTTPC2DMessagesNotInAllowedRange, - *HTTPC2DRejectedMessagesNotInAllowedRange, *HTTPD2CMessagesNotInAllowedRange, *MqttC2DMessagesNotInAllowedRange, *MqttC2DRejectedMessagesNotInAllowedRange, - *MqttD2CMessagesNotInAllowedRange, *QueuePurgesNotInAllowedRange, *ThresholdCustomAlertRule, *TimeWindowCustomAlertRule, - *TwinUpdatesNotInAllowedRange, *UnauthorizedOperationsNotInAllowedRange

type TimeWindowCustomAlertRule

type TimeWindowCustomAlertRule struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

TimeWindowCustomAlertRule - A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range.

func (*TimeWindowCustomAlertRule) GetCustomAlertRule added in v0.3.0

func (t *TimeWindowCustomAlertRule) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type TimeWindowCustomAlertRule.

func (*TimeWindowCustomAlertRule) GetThresholdCustomAlertRule added in v0.3.0

func (t *TimeWindowCustomAlertRule) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type TimeWindowCustomAlertRule.

func (*TimeWindowCustomAlertRule) GetTimeWindowCustomAlertRule

func (t *TimeWindowCustomAlertRule) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type TimeWindowCustomAlertRule.

func (TimeWindowCustomAlertRule) MarshalJSON

func (t TimeWindowCustomAlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TimeWindowCustomAlertRule.

func (*TimeWindowCustomAlertRule) UnmarshalJSON

func (t *TimeWindowCustomAlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TimeWindowCustomAlertRule.

type TimeWindowCustomAlertRuleClassification

type TimeWindowCustomAlertRuleClassification interface {
	ThresholdCustomAlertRuleClassification
	// GetTimeWindowCustomAlertRule returns the TimeWindowCustomAlertRule content of the underlying type.
	GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule
}

TimeWindowCustomAlertRuleClassification provides polymorphic access to related types. Call the interface's GetTimeWindowCustomAlertRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ActiveConnectionsNotInAllowedRange, *AmqpC2DMessagesNotInAllowedRange, *AmqpC2DRejectedMessagesNotInAllowedRange, *AmqpD2CMessagesNotInAllowedRange, - *DirectMethodInvokesNotInAllowedRange, *FailedLocalLoginsNotInAllowedRange, *FileUploadsNotInAllowedRange, *HTTPC2DMessagesNotInAllowedRange, - *HTTPC2DRejectedMessagesNotInAllowedRange, *HTTPD2CMessagesNotInAllowedRange, *MqttC2DMessagesNotInAllowedRange, *MqttC2DRejectedMessagesNotInAllowedRange, - *MqttD2CMessagesNotInAllowedRange, *QueuePurgesNotInAllowedRange, *TimeWindowCustomAlertRule, *TwinUpdatesNotInAllowedRange, - *UnauthorizedOperationsNotInAllowedRange

type TopologyClient

type TopologyClient struct {
	// contains filtered or unexported fields
}

TopologyClient contains the methods for the Topology group. Don't use this type directly, use NewTopologyClient() instead.

func NewTopologyClient

func NewTopologyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TopologyClient, error)

NewTopologyClient creates a new instance of TopologyClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TopologyClient) Get

func (client *TopologyClient) Get(ctx context.Context, resourceGroupName string, ascLocation string, topologyResourceName string, options *TopologyClientGetOptions) (TopologyClientGetResponse, error)

Get - Gets a specific topology component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-01-01 resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations topologyResourceName - Name of a topology resources collection. options - TopologyClientGetOptions contains the optional parameters for the TopologyClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/GetTopology_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTopologyClient("3eeab341-f466-499c-a8be-85427e154bad", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myservers", "centralus", "vnets", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TopologyClient) NewListByHomeRegionPager added in v0.6.0

func (client *TopologyClient) NewListByHomeRegionPager(ascLocation string, options *TopologyClientListByHomeRegionOptions) *runtime.Pager[TopologyClientListByHomeRegionResponse]

NewListByHomeRegionPager - Gets a list that allows to build a topology view of a subscription and location. Generated from API version 2020-01-01 ascLocation - The location where ASC stores the data of the subscription. can be retrieved from Get locations options - TopologyClientListByHomeRegionOptions contains the optional parameters for the TopologyClient.ListByHomeRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/GetTopologySubscriptionLocation_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTopologyClient("3eeab341-f466-499c-a8be-85427e154bad", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*TopologyClient) NewListPager added in v0.6.0

NewListPager - Gets a list that allows to build a topology view of a subscription. Generated from API version 2020-01-01 options - TopologyClientListOptions contains the optional parameters for the TopologyClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/GetTopologySubscription_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewTopologyClient("3eeab341-f466-499c-a8be-85427e154bad", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type TopologyClientGetOptions added in v0.3.0

type TopologyClientGetOptions struct {
}

TopologyClientGetOptions contains the optional parameters for the TopologyClient.Get method.

type TopologyClientGetResponse added in v0.3.0

type TopologyClientGetResponse struct {
	TopologyResource
}

TopologyClientGetResponse contains the response from method TopologyClient.Get.

type TopologyClientListByHomeRegionOptions added in v0.3.0

type TopologyClientListByHomeRegionOptions struct {
}

TopologyClientListByHomeRegionOptions contains the optional parameters for the TopologyClient.ListByHomeRegion method.

type TopologyClientListByHomeRegionResponse added in v0.3.0

type TopologyClientListByHomeRegionResponse struct {
	TopologyList
}

TopologyClientListByHomeRegionResponse contains the response from method TopologyClient.ListByHomeRegion.

type TopologyClientListOptions added in v0.3.0

type TopologyClientListOptions struct {
}

TopologyClientListOptions contains the optional parameters for the TopologyClient.List method.

type TopologyClientListResponse added in v0.3.0

type TopologyClientListResponse struct {
	TopologyList
}

TopologyClientListResponse contains the response from method TopologyClient.List.

type TopologyList

type TopologyList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY
	Value []*TopologyResource `json:"value,omitempty" azure:"ro"`
}

func (TopologyList) MarshalJSON

func (t TopologyList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TopologyList.

func (*TopologyList) UnmarshalJSON added in v0.8.0

func (t *TopologyList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TopologyList.

type TopologyResource

type TopologyResource struct {
	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Location where the resource is stored
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY
	Properties *TopologyResourceProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

func (TopologyResource) MarshalJSON

func (t TopologyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TopologyResource.

func (*TopologyResource) UnmarshalJSON

func (t *TopologyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TopologyResource.

type TopologyResourceProperties

type TopologyResourceProperties struct {
	// READ-ONLY; The UTC time on which the topology was calculated
	CalculatedDateTime *time.Time `json:"calculatedDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Azure resources which are part of this topology resource
	TopologyResources []*TopologySingleResource `json:"topologyResources,omitempty" azure:"ro"`
}

func (TopologyResourceProperties) MarshalJSON

func (t TopologyResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TopologyResourceProperties.

func (*TopologyResourceProperties) UnmarshalJSON

func (t *TopologyResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TopologyResourceProperties.

type TopologySingleResource

type TopologySingleResource struct {
	// READ-ONLY; Azure resources connected to this resource which are in lower level in the topology view
	Children []*TopologySingleResourceChild `json:"children,omitempty" azure:"ro"`

	// READ-ONLY; The location of this resource
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.)
	NetworkZones *string `json:"networkZones,omitempty" azure:"ro"`

	// READ-ONLY; Azure resources connected to this resource which are in higher level in the topology view
	Parents []*TopologySingleResourceParent `json:"parents,omitempty" azure:"ro"`

	// READ-ONLY; Indicates if the resource has security recommendations
	RecommendationsExist *bool `json:"recommendationsExist,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource id
	ResourceID *string `json:"resourceId,omitempty" azure:"ro"`

	// READ-ONLY; The security severity of the resource
	Severity *string `json:"severity,omitempty" azure:"ro"`

	// READ-ONLY; Score of the resource based on its security severity
	TopologyScore *int32 `json:"topologyScore,omitempty" azure:"ro"`
}

func (TopologySingleResource) MarshalJSON

func (t TopologySingleResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TopologySingleResource.

func (*TopologySingleResource) UnmarshalJSON added in v0.8.0

func (t *TopologySingleResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TopologySingleResource.

type TopologySingleResourceChild

type TopologySingleResourceChild struct {
	// READ-ONLY; Azure resource id which serves as child resource in topology view
	ResourceID *string `json:"resourceId,omitempty" azure:"ro"`
}

func (TopologySingleResourceChild) MarshalJSON added in v0.8.0

func (t TopologySingleResourceChild) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TopologySingleResourceChild.

func (*TopologySingleResourceChild) UnmarshalJSON added in v0.8.0

func (t *TopologySingleResourceChild) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TopologySingleResourceChild.

type TopologySingleResourceParent

type TopologySingleResourceParent struct {
	// READ-ONLY; Azure resource id which serves as parent resource in topology view
	ResourceID *string `json:"resourceId,omitempty" azure:"ro"`
}

func (TopologySingleResourceParent) MarshalJSON added in v0.8.0

func (t TopologySingleResourceParent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TopologySingleResourceParent.

func (*TopologySingleResourceParent) UnmarshalJSON added in v0.8.0

func (t *TopologySingleResourceParent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TopologySingleResourceParent.

type TrackedResource

type TrackedResource struct {
	// Entity tag is used for comparing two or more entities from the same requested resource.
	Etag *string `json:"etag,omitempty"`

	// Kind of the resource
	Kind *string `json:"kind,omitempty"`

	// Location where the resource is stored
	Location *string `json:"location,omitempty"`

	// A list of key value pairs that describe the resource.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - Describes an Azure tracked resource.

func (TrackedResource) MarshalJSON added in v0.3.0

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v0.8.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type TransportProtocol

type TransportProtocol string
const (
	TransportProtocolTCP TransportProtocol = "TCP"
	TransportProtocolUDP TransportProtocol = "UDP"
)

func PossibleTransportProtocolValues

func PossibleTransportProtocolValues() []TransportProtocol

PossibleTransportProtocolValues returns the possible values for the TransportProtocol const type.

type TwinUpdatesNotInAllowedRange

type TwinUpdatesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

TwinUpdatesNotInAllowedRange - Number of twin updates is not in allowed range.

func (*TwinUpdatesNotInAllowedRange) GetCustomAlertRule added in v0.3.0

func (t *TwinUpdatesNotInAllowedRange) GetCustomAlertRule() *CustomAlertRule

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type TwinUpdatesNotInAllowedRange.

func (*TwinUpdatesNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (t *TwinUpdatesNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type TwinUpdatesNotInAllowedRange.

func (*TwinUpdatesNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (t *TwinUpdatesNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type TwinUpdatesNotInAllowedRange.

func (TwinUpdatesNotInAllowedRange) MarshalJSON

func (t TwinUpdatesNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TwinUpdatesNotInAllowedRange.

func (*TwinUpdatesNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (t *TwinUpdatesNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TwinUpdatesNotInAllowedRange.

type Type added in v0.8.0

type Type string

Type - The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'

const (
	TypeQualys Type = "Qualys"
	TypeTVM    Type = "TVM"
)

func PossibleTypeValues added in v0.8.0

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type UnauthorizedOperationsNotInAllowedRange

type UnauthorizedOperationsNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32 `json:"maxThreshold,omitempty"`

	// REQUIRED; The minimum threshold.
	MinThreshold *int32 `json:"minThreshold,omitempty"`

	// REQUIRED; The type of the custom alert rule.
	RuleType *string `json:"ruleType,omitempty"`

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string `json:"timeWindowSize,omitempty"`

	// READ-ONLY; The description of the custom alert.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`
}

UnauthorizedOperationsNotInAllowedRange - Number of unauthorized operations is not in allowed range.

func (*UnauthorizedOperationsNotInAllowedRange) GetCustomAlertRule added in v0.3.0

GetCustomAlertRule implements the CustomAlertRuleClassification interface for type UnauthorizedOperationsNotInAllowedRange.

func (*UnauthorizedOperationsNotInAllowedRange) GetThresholdCustomAlertRule added in v0.3.0

func (u *UnauthorizedOperationsNotInAllowedRange) GetThresholdCustomAlertRule() *ThresholdCustomAlertRule

GetThresholdCustomAlertRule implements the ThresholdCustomAlertRuleClassification interface for type UnauthorizedOperationsNotInAllowedRange.

func (*UnauthorizedOperationsNotInAllowedRange) GetTimeWindowCustomAlertRule added in v0.3.0

func (u *UnauthorizedOperationsNotInAllowedRange) GetTimeWindowCustomAlertRule() *TimeWindowCustomAlertRule

GetTimeWindowCustomAlertRule implements the TimeWindowCustomAlertRuleClassification interface for type UnauthorizedOperationsNotInAllowedRange.

func (UnauthorizedOperationsNotInAllowedRange) MarshalJSON

func (u UnauthorizedOperationsNotInAllowedRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UnauthorizedOperationsNotInAllowedRange.

func (*UnauthorizedOperationsNotInAllowedRange) UnmarshalJSON added in v0.3.0

func (u *UnauthorizedOperationsNotInAllowedRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UnauthorizedOperationsNotInAllowedRange.

type UnmaskedIPLoggingStatus

type UnmaskedIPLoggingStatus string

UnmaskedIPLoggingStatus - Unmasked IP address logging status

const (
	// UnmaskedIPLoggingStatusDisabled - Unmasked IP logging is disabled
	UnmaskedIPLoggingStatusDisabled UnmaskedIPLoggingStatus = "Disabled"
	// UnmaskedIPLoggingStatusEnabled - Unmasked IP logging is enabled
	UnmaskedIPLoggingStatusEnabled UnmaskedIPLoggingStatus = "Enabled"
)

func PossibleUnmaskedIPLoggingStatusValues

func PossibleUnmaskedIPLoggingStatusValues() []UnmaskedIPLoggingStatus

PossibleUnmaskedIPLoggingStatusValues returns the possible values for the UnmaskedIPLoggingStatus const type.

type UpdateIoTSecuritySolutionProperties

type UpdateIoTSecuritySolutionProperties struct {
	// List of the configuration status for each recommendation type.
	RecommendationsConfiguration []*RecommendationConfigurationProperties `json:"recommendationsConfiguration,omitempty"`

	// Properties of the IoT Security solution's user defined resources.
	UserDefinedResources *UserDefinedResourcesProperties `json:"userDefinedResources,omitempty"`
}

UpdateIoTSecuritySolutionProperties - Update Security Solution setting data

func (UpdateIoTSecuritySolutionProperties) MarshalJSON

func (u UpdateIoTSecuritySolutionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateIoTSecuritySolutionProperties.

func (*UpdateIoTSecuritySolutionProperties) UnmarshalJSON added in v0.8.0

func (u *UpdateIoTSecuritySolutionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateIoTSecuritySolutionProperties.

type UpdateIotSecuritySolutionData

type UpdateIotSecuritySolutionData struct {
	// Security Solution data
	Properties *UpdateIoTSecuritySolutionProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

func (UpdateIotSecuritySolutionData) MarshalJSON

func (u UpdateIotSecuritySolutionData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateIotSecuritySolutionData.

func (*UpdateIotSecuritySolutionData) UnmarshalJSON

func (u *UpdateIotSecuritySolutionData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateIotSecuritySolutionData.

type UserDefinedResourcesProperties

type UserDefinedResourcesProperties struct {
	// REQUIRED; Azure Resource Graph query which represents the security solution's user defined resources. Required to start
	// with "where type != "Microsoft.Devices/IotHubs""
	Query *string `json:"query,omitempty"`

	// REQUIRED; List of Azure subscription ids on which the user defined resources query should be executed.
	QuerySubscriptions []*string `json:"querySubscriptions,omitempty"`
}

UserDefinedResourcesProperties - Properties of the IoT Security solution's user defined resources.

func (UserDefinedResourcesProperties) MarshalJSON

func (u UserDefinedResourcesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserDefinedResourcesProperties.

func (*UserDefinedResourcesProperties) UnmarshalJSON added in v0.8.0

func (u *UserDefinedResourcesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserDefinedResourcesProperties.

type UserImpact

type UserImpact string

UserImpact - The user impact of the assessment

const (
	UserImpactHigh     UserImpact = "High"
	UserImpactLow      UserImpact = "Low"
	UserImpactModerate UserImpact = "Moderate"
)

func PossibleUserImpactValues

func PossibleUserImpactValues() []UserImpact

PossibleUserImpactValues returns the possible values for the UserImpact const type.

type UserRecommendation

type UserRecommendation struct {
	// The recommendation action of the machine or rule
	RecommendationAction *RecommendationAction `json:"recommendationAction,omitempty"`

	// Represents a user that is recommended to be allowed for a certain rule
	Username *string `json:"username,omitempty"`
}

UserRecommendation - Represents a user that is recommended to be allowed for a certain rule

func (UserRecommendation) MarshalJSON added in v0.8.0

func (u UserRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserRecommendation.

func (*UserRecommendation) UnmarshalJSON added in v0.8.0

func (u *UserRecommendation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserRecommendation.

type VMRecommendation

type VMRecommendation struct {
	// The configuration status of the machines group or machine or rule
	ConfigurationStatus *ConfigurationStatus `json:"configurationStatus,omitempty"`

	// The machine supportability of Enforce feature
	EnforcementSupport *EnforcementSupport `json:"enforcementSupport,omitempty"`

	// The recommendation action of the machine or rule
	RecommendationAction *RecommendationAction `json:"recommendationAction,omitempty"`

	// The full resource id of the machine
	ResourceID *string `json:"resourceId,omitempty"`
}

VMRecommendation - Represents a machine that is part of a machine group

func (VMRecommendation) MarshalJSON added in v0.8.0

func (v VMRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMRecommendation.

func (*VMRecommendation) UnmarshalJSON added in v0.8.0

func (v *VMRecommendation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMRecommendation.

type VaRule

type VaRule struct {
	// The benchmark references.
	BenchmarkReferences []*BenchmarkReference `json:"benchmarkReferences,omitempty"`

	// The rule category.
	Category *string `json:"category,omitempty"`

	// The rule description.
	Description *string `json:"description,omitempty"`

	// The rule query details.
	QueryCheck *QueryCheck `json:"queryCheck,omitempty"`

	// The rule rationale.
	Rationale *string `json:"rationale,omitempty"`

	// The rule Id.
	RuleID *string `json:"ruleId,omitempty"`

	// The rule type.
	RuleType *RuleType `json:"ruleType,omitempty"`

	// The rule severity.
	Severity *RuleSeverity `json:"severity,omitempty"`

	// The rule title.
	Title *string `json:"title,omitempty"`
}

VaRule - vulnerability assessment rule metadata details.

func (VaRule) MarshalJSON

func (v VaRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VaRule.

func (*VaRule) UnmarshalJSON added in v0.8.0

func (v *VaRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VaRule.

type ValueType

type ValueType string

ValueType - The value type of the items in the list.

const (
	// ValueTypeIPCidr - An IP range in CIDR format (e.g. '192.168.0.1/8').
	ValueTypeIPCidr ValueType = "IpCidr"
	// ValueTypeString - Any string value.
	ValueTypeString ValueType = "String"
)

func PossibleValueTypeValues

func PossibleValueTypeValues() []ValueType

PossibleValueTypeValues returns the possible values for the ValueType const type.

type VendorReference

type VendorReference struct {
	// READ-ONLY; Link url
	Link *string `json:"link,omitempty" azure:"ro"`

	// READ-ONLY; Link title
	Title *string `json:"title,omitempty" azure:"ro"`
}

VendorReference - Vendor reference

func (VendorReference) MarshalJSON added in v0.8.0

func (v VendorReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorReference.

func (*VendorReference) UnmarshalJSON added in v0.8.0

func (v *VendorReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorReference.

type WorkspaceSetting

type WorkspaceSetting struct {
	// Workspace setting data
	Properties *WorkspaceSettingProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

WorkspaceSetting - Configures where to store the OMS agent data for workspaces under a scope

func (WorkspaceSetting) MarshalJSON

func (w WorkspaceSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceSetting.

func (*WorkspaceSetting) UnmarshalJSON

func (w *WorkspaceSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceSetting.

type WorkspaceSettingList

type WorkspaceSettingList struct {
	// REQUIRED; List of workspace settings
	Value []*WorkspaceSetting `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

WorkspaceSettingList - List of workspace settings response

func (WorkspaceSettingList) MarshalJSON

func (w WorkspaceSettingList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceSettingList.

func (*WorkspaceSettingList) UnmarshalJSON added in v0.8.0

func (w *WorkspaceSettingList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceSettingList.

type WorkspaceSettingProperties

type WorkspaceSettingProperties struct {
	// REQUIRED; All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting
	// with more specific scope
	Scope *string `json:"scope,omitempty"`

	// REQUIRED; The full Azure ID of the workspace to save the data in
	WorkspaceID *string `json:"workspaceId,omitempty"`
}

WorkspaceSettingProperties - Workspace setting data

func (WorkspaceSettingProperties) MarshalJSON added in v0.8.0

func (w WorkspaceSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceSettingProperties.

func (*WorkspaceSettingProperties) UnmarshalJSON added in v0.8.0

func (w *WorkspaceSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceSettingProperties.

type WorkspaceSettingsClient

type WorkspaceSettingsClient struct {
	// contains filtered or unexported fields
}

WorkspaceSettingsClient contains the methods for the WorkspaceSettings group. Don't use this type directly, use NewWorkspaceSettingsClient() instead.

func NewWorkspaceSettingsClient

func NewWorkspaceSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceSettingsClient, error)

NewWorkspaceSettingsClient creates a new instance of WorkspaceSettingsClient with the specified values. subscriptionID - Azure subscription ID credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*WorkspaceSettingsClient) Create

Create - creating settings about where we should store your security data and logs If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview workspaceSettingName - Name of the security setting workspaceSetting - Security data setting object options - WorkspaceSettingsClientCreateOptions contains the optional parameters for the WorkspaceSettingsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/CreateWorkspaceSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewWorkspaceSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx, "default", armsecurity.WorkspaceSetting{
		Name: to.Ptr("default"),
		Type: to.Ptr("Microsoft.Security/workspaceSettings"),
		ID:   to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/workspaceSettings/default"),
		Properties: &armsecurity.WorkspaceSettingProperties{
			Scope:       to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
			WorkspaceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkspaceSettingsClient) Delete

Delete - Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview workspaceSettingName - Name of the security setting options - WorkspaceSettingsClientDeleteOptions contains the optional parameters for the WorkspaceSettingsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/DeleteWorkspaceSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewWorkspaceSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkspaceSettingsClient) Get

Get - Settings about where we should store your security data and logs. If the result is empty, it means that no custom-workspace configuration was set If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview workspaceSettingName - Name of the security setting options - WorkspaceSettingsClientGetOptions contains the optional parameters for the WorkspaceSettingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/GetWorkspaceSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewWorkspaceSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkspaceSettingsClient) NewListPager added in v0.6.0

NewListPager - Settings about where we should store your security data and logs. If the result is empty, it means that no custom-workspace configuration was set Generated from API version 2017-08-01-preview options - WorkspaceSettingsClientListOptions contains the optional parameters for the WorkspaceSettingsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/GetWorkspaceSettings_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewWorkspaceSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkspaceSettingsClient) Update

Update - Settings about where we should store your security data and logs If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2017-08-01-preview workspaceSettingName - Name of the security setting workspaceSetting - Security data setting object options - WorkspaceSettingsClientUpdateOptions contains the optional parameters for the WorkspaceSettingsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/UpdateWorkspaceSetting_example.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armsecurity.NewWorkspaceSettingsClient("20ff7fc3-e762-44dd-bd96-b71116dcdc23", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx, "default", armsecurity.WorkspaceSetting{
		Name: to.Ptr("default"),
		Type: to.Ptr("Microsoft.Security/workspaceSettings"),
		ID:   to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/workspaceSettings/default"),
		Properties: &armsecurity.WorkspaceSettingProperties{
			WorkspaceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type WorkspaceSettingsClientCreateOptions added in v0.3.0

type WorkspaceSettingsClientCreateOptions struct {
}

WorkspaceSettingsClientCreateOptions contains the optional parameters for the WorkspaceSettingsClient.Create method.

type WorkspaceSettingsClientCreateResponse added in v0.3.0

type WorkspaceSettingsClientCreateResponse struct {
	WorkspaceSetting
}

WorkspaceSettingsClientCreateResponse contains the response from method WorkspaceSettingsClient.Create.

type WorkspaceSettingsClientDeleteOptions added in v0.3.0

type WorkspaceSettingsClientDeleteOptions struct {
}

WorkspaceSettingsClientDeleteOptions contains the optional parameters for the WorkspaceSettingsClient.Delete method.

type WorkspaceSettingsClientDeleteResponse added in v0.3.0

type WorkspaceSettingsClientDeleteResponse struct {
}

WorkspaceSettingsClientDeleteResponse contains the response from method WorkspaceSettingsClient.Delete.

type WorkspaceSettingsClientGetOptions added in v0.3.0

type WorkspaceSettingsClientGetOptions struct {
}

WorkspaceSettingsClientGetOptions contains the optional parameters for the WorkspaceSettingsClient.Get method.

type WorkspaceSettingsClientGetResponse added in v0.3.0

type WorkspaceSettingsClientGetResponse struct {
	WorkspaceSetting
}

WorkspaceSettingsClientGetResponse contains the response from method WorkspaceSettingsClient.Get.

type WorkspaceSettingsClientListOptions added in v0.3.0

type WorkspaceSettingsClientListOptions struct {
}

WorkspaceSettingsClientListOptions contains the optional parameters for the WorkspaceSettingsClient.List method.

type WorkspaceSettingsClientListResponse added in v0.3.0

type WorkspaceSettingsClientListResponse struct {
	WorkspaceSettingList
}

WorkspaceSettingsClientListResponse contains the response from method WorkspaceSettingsClient.List.

type WorkspaceSettingsClientUpdateOptions added in v0.3.0

type WorkspaceSettingsClientUpdateOptions struct {
}

WorkspaceSettingsClientUpdateOptions contains the optional parameters for the WorkspaceSettingsClient.Update method.

type WorkspaceSettingsClientUpdateResponse added in v0.3.0

type WorkspaceSettingsClientUpdateResponse struct {
	WorkspaceSetting
}

WorkspaceSettingsClientUpdateResponse contains the response from method WorkspaceSettingsClient.Update.

Source Files

Jump to

Keyboard shortcuts

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