armsecurity

package module
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 16 Imported by: 71

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.

Client Factory

Azure Security module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armsecurity.NewClientFactory(<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,
    },
}
clientFactory, err := armsecurity.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAPICollectionsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

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
}

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 {
	// REQUIRED; The kind of the external solution
	Kind *ExternalSecuritySolutionKind

	// The external security solution properties for AAD solutions
	Properties *AADSolutionProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

func (*AADExternalSecuritySolution) GetExternalSecuritySolution added in v0.12.0

func (a *AADExternalSecuritySolution) GetExternalSecuritySolution() *ExternalSecuritySolution

GetExternalSecuritySolution implements the ExternalSecuritySolutionClassification interface for type AADExternalSecuritySolution.

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]any

	// The connectivity state of the external AAD solution
	ConnectivityState *AADConnectivityState
	DeviceType        *string
	DeviceVendor      *string

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace
}

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 APICollection added in v0.13.0

type APICollection struct {
	// Describes the properties of an API collection.
	Properties *APICollectionProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

APICollection - An API collection as represented by Microsoft Defender for APIs.

func (APICollection) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type APICollection.

func (*APICollection) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICollection.

type APICollectionList added in v0.13.0

type APICollectionList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string

	// READ-ONLY; API collections in this page.
	Value []*APICollection
}

APICollectionList - Page of a list of API collections as represented by Microsoft Defender for APIs.

func (APICollectionList) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type APICollectionList.

func (*APICollectionList) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICollectionList.

type APICollectionProperties added in v0.11.0

type APICollectionProperties struct {
	// READ-ONLY; The base URI for this API collection. All endpoints of this API collection extend this base URI.
	BaseURL *string

	// READ-ONLY; The resource Id of the resource from where this API collection was discovered.
	DiscoveredVia *string

	// READ-ONLY; The display name of the API collection.
	DisplayName *string

	// READ-ONLY; The number of API endpoints discovered in this API collection.
	NumberOfAPIEndpoints *int64

	// READ-ONLY; The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or
	// responses.
	NumberOfAPIEndpointsWithSensitiveDataExposed *int64

	// READ-ONLY; The number of API endpoints in this API collection for which API traffic from the internet was observed.
	NumberOfExternalAPIEndpoints *int64

	// READ-ONLY; The number of API endpoints in this API collection that have not received any API traffic in the last 30 days.
	NumberOfInactiveAPIEndpoints *int64

	// READ-ONLY; The number of API endpoints in this API collection that are unauthenticated.
	NumberOfUnauthenticatedAPIEndpoints *int64

	// READ-ONLY; Gets the provisioning state of the API collection.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The highest priority sensitivity label from Microsoft Purview in this API collection.
	SensitivityLabel *string
}

APICollectionProperties - Describes the properties of an API collection.

func (APICollectionProperties) MarshalJSON added in v0.11.0

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

MarshalJSON implements the json.Marshaller interface for type APICollectionProperties.

func (*APICollectionProperties) UnmarshalJSON added in v0.11.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICollectionProperties.

type APICollectionsClient added in v0.13.0

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

APICollectionsClient contains the methods for the APICollections group. Don't use this type directly, use NewAPICollectionsClient() instead.

func NewAPICollectionsClient added in v0.13.0

func NewAPICollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APICollectionsClient, error)

NewAPICollectionsClient creates a new instance of APICollectionsClient 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 (*APICollectionsClient) BeginOnboardAzureAPIManagementAPI added in v0.13.0

BeginOnboardAzureAPIManagementAPI - Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APICollectionsClientBeginOnboardAzureAPIManagementAPIOptions contains the optional parameters for the APICollectionsClient.BeginOnboardAzureAPIManagementAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAPICollectionsClient().BeginOnboardAzureAPIManagementAPI(ctx, "rg1", "apimService1", "echo-api", 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.APICollection = armsecurity.APICollection{
	// 	Name: to.Ptr("echo-api"),
	// 	Type: to.Ptr("Microsoft.Security/apiCollections"),
	// 	ID: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api"),
	// 	Properties: &armsecurity.APICollectionProperties{
	// 		BaseURL: to.Ptr("https://apimservice1.azure-api.net/echo"),
	// 		DiscoveredVia: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
	// 		DisplayName: to.Ptr("Echo API"),
	// 		NumberOfAPIEndpoints: to.Ptr[int64](6),
	// 		NumberOfAPIEndpointsWithSensitiveDataExposed: to.Ptr[int64](1),
	// 		NumberOfExternalAPIEndpoints: to.Ptr[int64](3),
	// 		NumberOfInactiveAPIEndpoints: to.Ptr[int64](3),
	// 		NumberOfUnauthenticatedAPIEndpoints: to.Ptr[int64](1),
	// 		ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
	// 		SensitivityLabel: to.Ptr("Highly Confidential"),
	// 	},
	// }
}
Output:

func (*APICollectionsClient) GetByAzureAPIManagementService added in v0.13.0

GetByAzureAPIManagementService - Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APICollectionsClientGetByAzureAPIManagementServiceOptions contains the optional parameters for the APICollectionsClient.GetByAzureAPIManagementService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAPICollectionsClient().GetByAzureAPIManagementService(ctx, "rg1", "apimService1", "echo-api", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.APICollection = armsecurity.APICollection{
	// 	Name: to.Ptr("echo-api"),
	// 	Type: to.Ptr("Microsoft.Security/apiCollections"),
	// 	ID: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api"),
	// 	Properties: &armsecurity.APICollectionProperties{
	// 		BaseURL: to.Ptr("https://apimservice1.azure-api.net/echo"),
	// 		DiscoveredVia: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
	// 		DisplayName: to.Ptr("Echo API"),
	// 		NumberOfAPIEndpoints: to.Ptr[int64](6),
	// 		NumberOfAPIEndpointsWithSensitiveDataExposed: to.Ptr[int64](1),
	// 		NumberOfExternalAPIEndpoints: to.Ptr[int64](3),
	// 		NumberOfInactiveAPIEndpoints: to.Ptr[int64](3),
	// 		NumberOfUnauthenticatedAPIEndpoints: to.Ptr[int64](1),
	// 		ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
	// 		SensitivityLabel: to.Ptr("Highly Confidential"),
	// 	},
	// }
}
Output:

func (*APICollectionsClient) NewListByAzureAPIManagementServicePager added in v0.13.0

NewListByAzureAPIManagementServicePager - Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - APICollectionsClientListByAzureAPIManagementServiceOptions contains the optional parameters for the APICollectionsClient.NewListByAzureAPIManagementServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAPICollectionsClient().NewListByAzureAPIManagementServicePager("rg1", "apimService1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.APICollectionList = armsecurity.APICollectionList{
		// 	Value: []*armsecurity.APICollection{
		// 		{
		// 			Name: to.Ptr("echo-api"),
		// 			Type: to.Ptr("Microsoft.Security/apiCollections"),
		// 			ID: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api"),
		// 			Properties: &armsecurity.APICollectionProperties{
		// 				BaseURL: to.Ptr("https://apimservice1.azure-api.net/echo"),
		// 				DiscoveredVia: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
		// 				DisplayName: to.Ptr("Echo API"),
		// 				NumberOfAPIEndpoints: to.Ptr[int64](6),
		// 				NumberOfAPIEndpointsWithSensitiveDataExposed: to.Ptr[int64](1),
		// 				NumberOfExternalAPIEndpoints: to.Ptr[int64](3),
		// 				NumberOfInactiveAPIEndpoints: to.Ptr[int64](3),
		// 				NumberOfUnauthenticatedAPIEndpoints: to.Ptr[int64](1),
		// 				ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
		// 				SensitivityLabel: to.Ptr("Highly Confidential"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*APICollectionsClient) NewListByResourceGroupPager added in v0.13.0

NewListByResourceGroupPager - Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - APICollectionsClientListByResourceGroupOptions contains the optional parameters for the APICollectionsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAPICollectionsClient().NewListByResourceGroupPager("rg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.APICollectionList = armsecurity.APICollectionList{
		// 	Value: []*armsecurity.APICollection{
		// 		{
		// 			Name: to.Ptr("echo-api"),
		// 			Type: to.Ptr("Microsoft.Security/apiCollections"),
		// 			ID: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api"),
		// 			Properties: &armsecurity.APICollectionProperties{
		// 				BaseURL: to.Ptr("https://apimservice1.azure-api.net/echo"),
		// 				DiscoveredVia: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
		// 				DisplayName: to.Ptr("Echo API"),
		// 				NumberOfAPIEndpoints: to.Ptr[int64](6),
		// 				NumberOfAPIEndpointsWithSensitiveDataExposed: to.Ptr[int64](1),
		// 				NumberOfExternalAPIEndpoints: to.Ptr[int64](3),
		// 				NumberOfInactiveAPIEndpoints: to.Ptr[int64](3),
		// 				NumberOfUnauthenticatedAPIEndpoints: to.Ptr[int64](1),
		// 				ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
		// 				SensitivityLabel: to.Ptr("Highly Confidential"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*APICollectionsClient) NewListBySubscriptionPager added in v0.13.0

NewListBySubscriptionPager - Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs.

Generated from API version 2023-11-15

  • options - APICollectionsClientListBySubscriptionOptions contains the optional parameters for the APICollectionsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAPICollectionsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.APICollectionList = armsecurity.APICollectionList{
		// 	Value: []*armsecurity.APICollection{
		// 		{
		// 			Name: to.Ptr("echo-api"),
		// 			Type: to.Ptr("Microsoft.Security/apiCollections"),
		// 			ID: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api"),
		// 			Properties: &armsecurity.APICollectionProperties{
		// 				BaseURL: to.Ptr("https://apimservice1.azure-api.net/echo"),
		// 				DiscoveredVia: to.Ptr("/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
		// 				DisplayName: to.Ptr("Echo API"),
		// 				NumberOfAPIEndpoints: to.Ptr[int64](6),
		// 				NumberOfAPIEndpointsWithSensitiveDataExposed: to.Ptr[int64](1),
		// 				NumberOfExternalAPIEndpoints: to.Ptr[int64](3),
		// 				NumberOfInactiveAPIEndpoints: to.Ptr[int64](3),
		// 				NumberOfUnauthenticatedAPIEndpoints: to.Ptr[int64](1),
		// 				ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
		// 				SensitivityLabel: to.Ptr("Highly Confidential"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*APICollectionsClient) OffboardAzureAPIManagementAPI added in v0.13.0

OffboardAzureAPIManagementAPI - Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APICollectionsClientOffboardAzureAPIManagementAPIOptions contains the optional parameters for the APICollectionsClient.OffboardAzureAPIManagementAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAPICollectionsClient().OffboardAzureAPIManagementAPI(ctx, "rg1", "apimService1", "echo-api", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type APICollectionsClientBeginOnboardAzureAPIManagementAPIOptions added in v0.13.0

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

APICollectionsClientBeginOnboardAzureAPIManagementAPIOptions contains the optional parameters for the APICollectionsClient.BeginOnboardAzureAPIManagementAPI method.

type APICollectionsClientGetByAzureAPIManagementServiceOptions added in v0.13.0

type APICollectionsClientGetByAzureAPIManagementServiceOptions struct {
}

APICollectionsClientGetByAzureAPIManagementServiceOptions contains the optional parameters for the APICollectionsClient.GetByAzureAPIManagementService method.

type APICollectionsClientGetByAzureAPIManagementServiceResponse added in v0.13.0

type APICollectionsClientGetByAzureAPIManagementServiceResponse struct {
	// An API collection as represented by Microsoft Defender for APIs.
	APICollection
}

APICollectionsClientGetByAzureAPIManagementServiceResponse contains the response from method APICollectionsClient.GetByAzureAPIManagementService.

type APICollectionsClientListByAzureAPIManagementServiceOptions added in v0.13.0

type APICollectionsClientListByAzureAPIManagementServiceOptions struct {
}

APICollectionsClientListByAzureAPIManagementServiceOptions contains the optional parameters for the APICollectionsClient.NewListByAzureAPIManagementServicePager method.

type APICollectionsClientListByAzureAPIManagementServiceResponse added in v0.13.0

type APICollectionsClientListByAzureAPIManagementServiceResponse struct {
	// Page of a list of API collections as represented by Microsoft Defender for APIs.
	APICollectionList
}

APICollectionsClientListByAzureAPIManagementServiceResponse contains the response from method APICollectionsClient.NewListByAzureAPIManagementServicePager.

type APICollectionsClientListByResourceGroupOptions added in v0.13.0

type APICollectionsClientListByResourceGroupOptions struct {
}

APICollectionsClientListByResourceGroupOptions contains the optional parameters for the APICollectionsClient.NewListByResourceGroupPager method.

type APICollectionsClientListByResourceGroupResponse added in v0.13.0

type APICollectionsClientListByResourceGroupResponse struct {
	// Page of a list of API collections as represented by Microsoft Defender for APIs.
	APICollectionList
}

APICollectionsClientListByResourceGroupResponse contains the response from method APICollectionsClient.NewListByResourceGroupPager.

type APICollectionsClientListBySubscriptionOptions added in v0.13.0

type APICollectionsClientListBySubscriptionOptions struct {
}

APICollectionsClientListBySubscriptionOptions contains the optional parameters for the APICollectionsClient.NewListBySubscriptionPager method.

type APICollectionsClientListBySubscriptionResponse added in v0.13.0

type APICollectionsClientListBySubscriptionResponse struct {
	// Page of a list of API collections as represented by Microsoft Defender for APIs.
	APICollectionList
}

APICollectionsClientListBySubscriptionResponse contains the response from method APICollectionsClient.NewListBySubscriptionPager.

type APICollectionsClientOffboardAzureAPIManagementAPIOptions added in v0.13.0

type APICollectionsClientOffboardAzureAPIManagementAPIOptions struct {
}

APICollectionsClientOffboardAzureAPIManagementAPIOptions contains the optional parameters for the APICollectionsClient.OffboardAzureAPIManagementAPI method.

type APICollectionsClientOffboardAzureAPIManagementAPIResponse added in v0.13.0

type APICollectionsClientOffboardAzureAPIManagementAPIResponse struct {
}

APICollectionsClientOffboardAzureAPIManagementAPIResponse contains the response from method APICollectionsClient.OffboardAzureAPIManagementAPI.

type APICollectionsClientOnboardAzureAPIManagementAPIResponse added in v0.13.0

type APICollectionsClientOnboardAzureAPIManagementAPIResponse struct {
	// An API collection as represented by Microsoft Defender for APIs.
	APICollection
}

APICollectionsClientOnboardAzureAPIManagementAPIResponse contains the response from method APICollectionsClient.BeginOnboardAzureAPIManagementAPI.

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountConnectorsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConnectorSetting = armsecurity.ConnectorSetting{
	// 	Name: to.Ptr("aws_dev2"),
	// 	Type: to.Ptr("Microsoft.Security/connectors"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/aws_dev2"),
	// 	Properties: &armsecurity.ConnectorSettingProperties{
	// 		AuthenticationDetails: &armsecurity.AwAssumeRoleAuthenticationDetailsProperties{
	// 			AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
	// 			AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsAssumeRole),
	// 			GrantedPermissions: []*armsecurity.PermissionProperty{
	// 				to.Ptr(armsecurity.PermissionPropertyAWSAWSSecurityHubReadOnlyAccess),
	// 				to.Ptr(armsecurity.PermissionPropertyAWSSecurityAudit),
	// 				to.Ptr(armsecurity.PermissionPropertyAWSAmazonSSMAutomationRole)},
	// 				AccountID: to.Ptr("81231569658"),
	// 				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),
	// 				HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateValid),
	// 				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"),
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

Example (AwsCredCreateACloudAccountConnectorForASubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountConnectorsClient().CreateOrUpdate(ctx, "aws_dev1", armsecurity.ConnectorSetting{
		Properties: &armsecurity.ConnectorSettingProperties{
			AuthenticationDetails: &armsecurity.AwsCredsAuthenticationDetailsProperties{
				AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsCreds),
				AwsAccessKeyID:     to.Ptr("<awsAccessKeyId>"),
				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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConnectorSetting = armsecurity.ConnectorSetting{
	// 	Name: to.Ptr("aws_dev1"),
	// 	Type: to.Ptr("Microsoft.Security/connectors"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/aws_dev1"),
	// 	Properties: &armsecurity.ConnectorSettingProperties{
	// 		AuthenticationDetails: &armsecurity.AwsCredsAuthenticationDetailsProperties{
	// 			AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
	// 			AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsCreds),
	// 			GrantedPermissions: []*armsecurity.PermissionProperty{
	// 				to.Ptr(armsecurity.PermissionPropertyAWSAWSSecurityHubReadOnlyAccess),
	// 				to.Ptr(armsecurity.PermissionPropertyAWSSecurityAudit),
	// 				to.Ptr(armsecurity.PermissionPropertyAWSAmazonSSMAutomationRole)},
	// 				AccountID: to.Ptr("922315681122"),
	// 				AwsAccessKeyID: to.Ptr(""),
	// 				AwsSecretAccessKey: to.Ptr(""),
	// 			},
	// 			HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
	// 				AutoProvision: to.Ptr(armsecurity.AutoProvisionOn),
	// 				HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateValid),
	// 				ProxyServer: &armsecurity.ProxyServerProperties{
	// 					IP: to.Ptr("287.221.107.152"),
	// 					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"),
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

Example (GcpCredentialsCreateACloudAccountConnectorForASubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountConnectorsClient().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("******"),
				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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConnectorSetting = armsecurity.ConnectorSetting{
	// 	Name: to.Ptr("gcp_dev"),
	// 	Type: to.Ptr("Microsoft.Security/connectors"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/gcp_dev"),
	// 	Properties: &armsecurity.ConnectorSettingProperties{
	// 		AuthenticationDetails: &armsecurity.GcpCredentialsDetailsProperties{
	// 			AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
	// 			AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeGcpCredentials),
	// 			GrantedPermissions: []*armsecurity.PermissionProperty{
	// 				to.Ptr(armsecurity.PermissionPropertyGCPSecurityCenterAdminViewer)},
	// 				Type: to.Ptr(""),
	// 				AuthProviderX509CertURL: to.Ptr(""),
	// 				AuthURI: to.Ptr(""),
	// 				ClientEmail: to.Ptr(""),
	// 				ClientID: to.Ptr(""),
	// 				ClientX509CertURL: to.Ptr(""),
	// 				OrganizationID: to.Ptr("AscDemoOrg"),
	// 				PrivateKey: to.Ptr(""),
	// 				PrivateKeyID: to.Ptr(""),
	// 				ProjectID: to.Ptr(""),
	// 				TokenURI: to.Ptr(""),
	// 			},
	// 			HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
	// 				AutoProvision: to.Ptr(armsecurity.AutoProvisionOff),
	// 				HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateInvalid),
	// 				Region: to.Ptr(""),
	// 				ResourceGroupName: to.Ptr(""),
	// 			},
	// 		},
	// 	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAccountConnectorsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountConnectorsClient().Get(ctx, "aws_dev1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConnectorSetting = armsecurity.ConnectorSetting{
	// 	Name: to.Ptr("aws_dev1"),
	// 	Type: to.Ptr("Microsoft.Security/connectors"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/aws_dev1"),
	// 	Properties: &armsecurity.ConnectorSettingProperties{
	// 		AuthenticationDetails: &armsecurity.AwsCredsAuthenticationDetailsProperties{
	// 			AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
	// 			AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsCreds),
	// 			GrantedPermissions: []*armsecurity.PermissionProperty{
	// 				to.Ptr(armsecurity.PermissionPropertyAWSAWSSecurityHubReadOnlyAccess),
	// 				to.Ptr(armsecurity.PermissionPropertyAWSSecurityAudit),
	// 				to.Ptr(armsecurity.PermissionPropertyAWSAmazonSSMAutomationRole)},
	// 				AccountID: to.Ptr("922315681122"),
	// 				AwsAccessKeyID: to.Ptr(""),
	// 				AwsSecretAccessKey: to.Ptr(""),
	// 			},
	// 			HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
	// 				AutoProvision: to.Ptr(armsecurity.AutoProvisionOn),
	// 				HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateValid),
	// 				ProxyServer: &armsecurity.ProxyServerProperties{
	// 					IP: to.Ptr("287.221.107.152"),
	// 					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"),
	// 				},
	// 			},
	// 		},
	// 	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountConnectorsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ConnectorSettingList = armsecurity.ConnectorSettingList{
		// 	Value: []*armsecurity.ConnectorSetting{
		// 		{
		// 			Name: to.Ptr("aws_dev1"),
		// 			Type: to.Ptr("Microsoft.Security/connectors"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/aws_dev1"),
		// 			Properties: &armsecurity.ConnectorSettingProperties{
		// 				AuthenticationDetails: &armsecurity.AwsCredsAuthenticationDetailsProperties{
		// 					AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
		// 					AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsCreds),
		// 					GrantedPermissions: []*armsecurity.PermissionProperty{
		// 						to.Ptr(armsecurity.PermissionPropertyAWSAWSSecurityHubReadOnlyAccess),
		// 						to.Ptr(armsecurity.PermissionPropertyAWSSecurityAudit),
		// 						to.Ptr(armsecurity.PermissionPropertyAWSAmazonSSMAutomationRole)},
		// 						AccountID: to.Ptr("922315681122"),
		// 						AwsAccessKeyID: to.Ptr(""),
		// 						AwsSecretAccessKey: to.Ptr(""),
		// 					},
		// 					HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
		// 						AutoProvision: to.Ptr(armsecurity.AutoProvisionOn),
		// 						HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateValid),
		// 						ProxyServer: &armsecurity.ProxyServerProperties{
		// 							IP: to.Ptr("287.221.107.152"),
		// 							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"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("aws_dev2"),
		// 				Type: to.Ptr("Microsoft.Security/connectors"),
		// 				ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/aws_dev2"),
		// 				Properties: &armsecurity.ConnectorSettingProperties{
		// 					AuthenticationDetails: &armsecurity.AwAssumeRoleAuthenticationDetailsProperties{
		// 						AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
		// 						AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeAwsAssumeRole),
		// 						GrantedPermissions: []*armsecurity.PermissionProperty{
		// 							to.Ptr(armsecurity.PermissionPropertyAWSAWSSecurityHubReadOnlyAccess),
		// 							to.Ptr(armsecurity.PermissionPropertyAWSSecurityAudit),
		// 							to.Ptr(armsecurity.PermissionPropertyAWSAmazonSSMAutomationRole)},
		// 							AccountID: to.Ptr("81231569658"),
		// 							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),
		// 							HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateValid),
		// 							ProxyServer: &armsecurity.ProxyServerProperties{
		// 								IP: to.Ptr("167.210.187.160"),
		// 								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"),
		// 							},
		// 						},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("gcp_dev"),
		// 					Type: to.Ptr("Microsoft.Security/connectors"),
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/connectors/gcp_dev"),
		// 					Properties: &armsecurity.ConnectorSettingProperties{
		// 						AuthenticationDetails: &armsecurity.GcpCredentialsDetailsProperties{
		// 							AuthenticationProvisioningState: to.Ptr(armsecurity.AuthenticationProvisioningStateValid),
		// 							AuthenticationType: to.Ptr(armsecurity.AuthenticationTypeGcpCredentials),
		// 							GrantedPermissions: []*armsecurity.PermissionProperty{
		// 								to.Ptr(armsecurity.PermissionPropertyGCPSecurityCenterAdminViewer)},
		// 								Type: to.Ptr(""),
		// 								AuthProviderX509CertURL: to.Ptr(""),
		// 								AuthURI: to.Ptr(""),
		// 								ClientEmail: to.Ptr(""),
		// 								ClientID: to.Ptr(""),
		// 								ClientX509CertURL: to.Ptr(""),
		// 								OrganizationID: to.Ptr("AscDemoOrg"),
		// 								PrivateKey: to.Ptr(""),
		// 								PrivateKeyID: to.Ptr(""),
		// 								ProjectID: to.Ptr(""),
		// 								TokenURI: to.Ptr(""),
		// 							},
		// 							HybridComputeSettings: &armsecurity.HybridComputeSettingsProperties{
		// 								AutoProvision: to.Ptr(armsecurity.AutoProvisionOff),
		// 								HybridComputeProvisioningState: to.Ptr(armsecurity.HybridComputeProvisioningStateInvalid),
		// 								Region: to.Ptr(""),
		// 								ResourceGroupName: to.Ptr(""),
		// 							},
		// 						},
		// 				}},
		// 			}
	}
}
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 {
	// The connector setting
	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 {
	// The connector setting
	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.NewListPager method.

type AccountConnectorsClientListResponse added in v0.3.0

type AccountConnectorsClientListResponse struct {
	// For a subscription, list of all cloud account connectors and their settings
	ConnectorSettingList
}

AccountConnectorsClientListResponse contains the response from method AccountConnectorsClient.NewListPager.

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 ActionableRemediation added in v0.13.0

type ActionableRemediation struct {
	// Repository branch configuration for PR Annotations.
	BranchConfiguration *TargetBranchConfiguration

	// Gets or sets list of categories and severity levels.
	CategoryConfigurations []*CategoryConfiguration

	// Update Settings.
	// Enabled - Resource should inherit configurations from parent. Disabled - Resource should not inherit configurations from
	// parent.
	InheritFromParentState *InheritFromParentState

	// ActionableRemediation Setting. None - the setting was never set. Enabled - ActionableRemediation is enabled. Disabled -
	// ActionableRemediation is disabled.
	State *ActionableRemediationState
}

ActionableRemediation - Configuration payload for PR Annotations.

func (ActionableRemediation) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type ActionableRemediation.

func (*ActionableRemediation) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ActionableRemediation.

type ActionableRemediationState added in v0.13.0

type ActionableRemediationState string

ActionableRemediationState - ActionableRemediation Setting. None - the setting was never set. Enabled - ActionableRemediation is enabled. Disabled - ActionableRemediation is disabled.

const (
	ActionableRemediationStateDisabled ActionableRemediationState = "Disabled"
	ActionableRemediationStateEnabled  ActionableRemediationState = "Enabled"
	ActionableRemediationStateNone     ActionableRemediationState = "None"
)

func PossibleActionableRemediationStateValues added in v0.13.0

func PossibleActionableRemediationStateValues() []ActionableRemediationState

PossibleActionableRemediationStateValues returns the possible values for the ActionableRemediationState const type.

type ActiveConnectionsNotInAllowedRange

type ActiveConnectionsNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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
	PathRecommendations []*PathRecommendation

	// The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux.
	ProtectionMode    *ProtectionMode
	VMRecommendations []*VMRecommendation

	// READ-ONLY; The configuration status of the machines group or machine or rule
	ConfigurationStatus *ConfigurationStatus

	// READ-ONLY
	Issues []*AdaptiveApplicationControlIssueSummary

	// READ-ONLY; The initial recommendation status of the machine group or machine
	RecommendationStatus *RecommendationStatus

	// READ-ONLY; The source type of the machine group
	SourceSystem *SourceSystem
}

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
}

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

	// The number of machines in the group that have this alert
	NumberOfVMs *float32
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAdaptiveApplicationControlsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAdaptiveApplicationControlsClient().Get(ctx, "centralus", "ERELGROUP1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdaptiveApplicationControlGroup = armsecurity.AdaptiveApplicationControlGroup{
	// 	Location: to.Ptr("centralus"),
	// 	Name: to.Ptr("ERELGROUP1"),
	// 	Type: to.Ptr("Microsoft.Security/applicationWhitelistings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus/applicationWhitelistings/ERELGROUP1"),
	// 	Properties: &armsecurity.AdaptiveApplicationControlGroupData{
	// 		ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 		EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
	// 		Issues: []*armsecurity.AdaptiveApplicationControlIssueSummary{
	// 		},
	// 		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),
	// 							ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 							FileType: to.Ptr(armsecurity.FileTypeExe),
	// 							UserSids: []*string{
	// 								to.Ptr("S-1-1-0")},
	// 								Usernames: []*armsecurity.UserRecommendation{
	// 									{
	// 										RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 										Username: to.Ptr("Everyone"),
	// 								}},
	// 						}},
	// 						ProtectionMode: &armsecurity.ProtectionMode{
	// 							Exe: to.Ptr(armsecurity.EnforcementModeAudit),
	// 							Msi: to.Ptr(armsecurity.EnforcementModeAudit),
	// 							Script: to.Ptr(armsecurity.EnforcementModeNone),
	// 						},
	// 						RecommendationStatus: to.Ptr(armsecurity.RecommendationStatusRecommended),
	// 						SourceSystem: to.Ptr(armsecurity.SourceSystemAzureAppLocker),
	// 						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"),
	// 						}},
	// 					},
	// 				}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAdaptiveApplicationControlsClient().List(ctx, &armsecurity.AdaptiveApplicationControlsClientListOptions{IncludePathRecommendations: to.Ptr(true),
		Summary: to.Ptr(false),
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdaptiveApplicationControlGroups = armsecurity.AdaptiveApplicationControlGroups{
	// 	Value: []*armsecurity.AdaptiveApplicationControlGroup{
	// 		{
	// 			Location: to.Ptr("centralus"),
	// 			Name: to.Ptr("AMIT-VA"),
	// 			Type: to.Ptr("Microsoft.Security/applicationWhitelistings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus/applicationWhitelistings/AMIT-VA"),
	// 			Properties: &armsecurity.AdaptiveApplicationControlGroupData{
	// 				ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 				EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
	// 				Issues: []*armsecurity.AdaptiveApplicationControlIssueSummary{
	// 				},
	// 				PathRecommendations: []*armsecurity.PathRecommendation{
	// 					{
	// 						Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 						Path: to.Ptr("C:\\Windows\\SoftwareDistribution\\Download\\Install\\Windows-KB890830-x64-V5.53-delta.exe"),
	// 						Action: to.Ptr(armsecurity.RecommendationActionRemove),
	// 						Common: to.Ptr(true),
	// 						ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusNoStatus),
	// 						FileType: to.Ptr(armsecurity.FileTypeExe),
	// 						UserSids: []*string{
	// 							to.Ptr("S-1-5-18")},
	// 							Usernames: []*armsecurity.UserRecommendation{
	// 								{
	// 									RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 									Username: to.Ptr("LOCAL SYSTEM"),
	// 							}},
	// 						},
	// 						{
	// 							Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 							Path: to.Ptr("C:\\WindowsAzure\\GuestAgent_2.7.1198.822\\CollectGuestLogs.exe"),
	// 							Action: to.Ptr(armsecurity.RecommendationActionRemove),
	// 							Common: to.Ptr(true),
	// 							ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusNoStatus),
	// 							FileType: to.Ptr(armsecurity.FileTypeExe),
	// 							UserSids: []*string{
	// 								to.Ptr("S-1-5-18")},
	// 								Usernames: []*armsecurity.UserRecommendation{
	// 									{
	// 										RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 										Username: to.Ptr("LOCAL SYSTEM"),
	// 								}},
	// 							},
	// 							{
	// 								Type: to.Ptr(armsecurity.RecommendationType("PublisherSignature")),
	// 								Path: to.Ptr("C:\\Windows\\System32\\wbem\\WmiPrvSE.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("O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US"),
	// 									Version: to.Ptr("0.0.0.0"),
	// 								},
	// 								UserSids: []*string{
	// 									to.Ptr("S-1-5-18"),
	// 									to.Ptr("S-1-1-0")},
	// 									Usernames: []*armsecurity.UserRecommendation{
	// 										{
	// 											RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 											Username: to.Ptr("Everyone"),
	// 									}},
	// 								},
	// 								{
	// 									Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 									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),
	// 									UserSids: []*string{
	// 										to.Ptr("S-1-1-0")},
	// 										Usernames: []*armsecurity.UserRecommendation{
	// 											{
	// 												RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 												Username: to.Ptr("Everyone"),
	// 										}},
	// 								}},
	// 								ProtectionMode: &armsecurity.ProtectionMode{
	// 									Exe: to.Ptr(armsecurity.EnforcementModeAudit),
	// 									Msi: to.Ptr(armsecurity.EnforcementModeAudit),
	// 									Script: to.Ptr(armsecurity.EnforcementModeNone),
	// 								},
	// 								RecommendationStatus: to.Ptr(armsecurity.RecommendationStatusRecommended),
	// 								SourceSystem: to.Ptr(armsecurity.SourceSystemAzureAppLocker),
	// 								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-dsc/providers/microsoft.compute/virtualmachines/erelh-14011"),
	// 									},
	// 									{
	// 										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/amit-va/providers/microsoft.compute/virtualmachines/ream-test"),
	// 									},
	// 									{
	// 										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/v-arrikl-scheduledapps/providers/microsoft.compute/virtualmachines/v-arrikl-14060"),
	// 								}},
	// 							},
	// 						},
	// 						{
	// 							Location: to.Ptr("centralus"),
	// 							Name: to.Ptr("ERELGROUP1"),
	// 							Type: to.Ptr("Microsoft.Security/applicationWhitelistings"),
	// 							ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus/applicationWhitelistings/ERELGROUP1"),
	// 							Properties: &armsecurity.AdaptiveApplicationControlGroupData{
	// 								ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 								EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
	// 								Issues: []*armsecurity.AdaptiveApplicationControlIssueSummary{
	// 								},
	// 								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"),
	// 											}},
	// 									}},
	// 									ProtectionMode: &armsecurity.ProtectionMode{
	// 										Exe: to.Ptr(armsecurity.EnforcementModeAudit),
	// 										Msi: to.Ptr(armsecurity.EnforcementModeNone),
	// 										Script: to.Ptr(armsecurity.EnforcementModeNone),
	// 									},
	// 									RecommendationStatus: to.Ptr(armsecurity.RecommendationStatusRecommended),
	// 									SourceSystem: to.Ptr(armsecurity.SourceSystemAzureAppLocker),
	// 									VMRecommendations: []*armsecurity.VMRecommendation{
	// 										{
	// 											ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 											EnforcementSupport: to.Ptr(armsecurity.EnforcementSupportNotSupported),
	// 											RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 											ResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090"),
	// 									}},
	// 								},
	// 							},
	// 							{
	// 								Location: to.Ptr("centralus"),
	// 								Name: to.Ptr("GROUP1"),
	// 								Type: to.Ptr("Microsoft.Security/applicationWhitelistings"),
	// 								ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus/applicationWhitelistings/GROUP1"),
	// 								Properties: &armsecurity.AdaptiveApplicationControlGroupData{
	// 									ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 									EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
	// 									Issues: []*armsecurity.AdaptiveApplicationControlIssueSummary{
	// 									},
	// 									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("%PROGRAMFILES%\\RAPID7\\INSIGHT AGENT\\COMPONENTS\\INSIGHT_AGENT\\2.6.7.9\\GET_PROXY.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("O=RAPID7 LLC, L=BOSTON, S=MASSACHUSETTS, 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("NT AUTHORITY\\SYSTEM"),
	// 														}},
	// 													},
	// 													{
	// 														Type: to.Ptr(armsecurity.RecommendationType("ProductSignature")),
	// 														Path: to.Ptr("%PROGRAMFILES%\\GOOGLE\\CHROME\\APPLICATION\\CHROME.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("GOOGLE CHROME"),
	// 															PublisherName: to.Ptr("O=GOOGLE LLC, L=MOUNTAIN VIEW, S=CA, 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("NT AUTHORITY\\SYSTEM"),
	// 															}},
	// 														},
	// 														{
	// 															Type: to.Ptr(armsecurity.RecommendationType("ProductSignature")),
	// 															Path: to.Ptr("O=GOOGLE INC, L=MOUNTAIN VIEW, S=CALIFORNIA, C=US\\GOOGLE UPDATE\\*\\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("GOOGLE UPDATE"),
	// 																PublisherName: to.Ptr("O=GOOGLE INC, L=MOUNTAIN VIEW, S=CALIFORNIA, 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("NT AUTHORITY\\SYSTEM"),
	// 																}},
	// 														}},
	// 														ProtectionMode: &armsecurity.ProtectionMode{
	// 															Exe: to.Ptr(armsecurity.EnforcementModeAudit),
	// 															Msi: to.Ptr(armsecurity.EnforcementModeNone),
	// 															Script: to.Ptr(armsecurity.EnforcementModeNone),
	// 														},
	// 														RecommendationStatus: to.Ptr(armsecurity.RecommendationStatusRecommended),
	// 														SourceSystem: to.Ptr(armsecurity.SourceSystemAzureAppLocker),
	// 														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/talk-va/providers/microsoft.compute/virtualmachines/tal-win-vm"),
	// 															},
	// 															{
	// 																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/talk-va/providers/microsoft.compute/virtualmachines/tal-win-vm-jit"),
	// 															},
	// 															{
	// 																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/myresourcegroup/providers/microsoft.compute/virtualmachines/myvmweb"),
	// 															},
	// 															{
	// 																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/v-arrikl-scheduledapps/providers/microsoft.compute/virtualmachines/v-arrikl-14061"),
	// 														}},
	// 													},
	// 												},
	// 												{
	// 													Location: to.Ptr("westeurope"),
	// 													Name: to.Ptr("GROUP1"),
	// 													Type: to.Ptr("Microsoft.Security/applicationWhitelistings"),
	// 													ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/applicationWhitelistings/GROUP1"),
	// 													Properties: &armsecurity.AdaptiveApplicationControlGroupData{
	// 														ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 														EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
	// 														Issues: []*armsecurity.AdaptiveApplicationControlIssueSummary{
	// 															{
	// 																Issue: to.Ptr(armsecurity.AdaptiveApplicationControlIssueExecutableViolationsAudited),
	// 																NumberOfVMs: to.Ptr[float32](1),
	// 														}},
	// 														PathRecommendations: []*armsecurity.PathRecommendation{
	// 															{
	// 																Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																Path: to.Ptr("/sbin/init"),
	// 																Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																Common: to.Ptr(true),
	// 																ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																UserSids: []*string{
	// 																	to.Ptr("S-1-1-0")},
	// 																	Usernames: []*armsecurity.UserRecommendation{
	// 																		{
	// 																			RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																			Username: to.Ptr("root"),
	// 																	}},
	// 																},
	// 																{
	// 																	Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																	Path: to.Ptr("/sbin/upstart-udev-bridge"),
	// 																	Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																	Common: to.Ptr(true),
	// 																	ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																	FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																	UserSids: []*string{
	// 																		to.Ptr("S-1-1-0")},
	// 																		Usernames: []*armsecurity.UserRecommendation{
	// 																			{
	// 																				RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																				Username: to.Ptr("root"),
	// 																		}},
	// 																	},
	// 																	{
	// 																		Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																		Path: to.Ptr("/lib/systemd/systemd-udevd"),
	// 																		Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																		Common: to.Ptr(true),
	// 																		ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																		FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																		UserSids: []*string{
	// 																			to.Ptr("S-1-1-0")},
	// 																			Usernames: []*armsecurity.UserRecommendation{
	// 																				{
	// 																					RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																					Username: to.Ptr("root"),
	// 																			}},
	// 																		},
	// 																		{
	// 																			Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																			Path: to.Ptr("/sbin/upstart-socket-bridge"),
	// 																			Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																			Common: to.Ptr(true),
	// 																			ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																			FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																			UserSids: []*string{
	// 																				to.Ptr("S-1-1-0")},
	// 																				Usernames: []*armsecurity.UserRecommendation{
	// 																					{
	// 																						RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																						Username: to.Ptr("root"),
	// 																				}},
	// 																			},
	// 																			{
	// 																				Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																				Path: to.Ptr("/sbin/dhclient"),
	// 																				Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																				Common: to.Ptr(true),
	// 																				ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																				FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																				UserSids: []*string{
	// 																					to.Ptr("S-1-1-0")},
	// 																					Usernames: []*armsecurity.UserRecommendation{
	// 																						{
	// 																							RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																							Username: to.Ptr("root"),
	// 																					}},
	// 																				},
	// 																				{
	// 																					Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																					Path: to.Ptr("/usr/bin/python3.4"),
	// 																					Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																					Common: to.Ptr(true),
	// 																					ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																					FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																					UserSids: []*string{
	// 																						to.Ptr("S-1-1-0")},
	// 																						Usernames: []*armsecurity.UserRecommendation{
	// 																							{
	// 																								RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																								Username: to.Ptr("root"),
	// 																						}},
	// 																					},
	// 																					{
	// 																						Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																						Path: to.Ptr("/sbin/upstart-file-bridge"),
	// 																						Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																						Common: to.Ptr(true),
	// 																						ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																						FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																						UserSids: []*string{
	// 																							to.Ptr("S-1-1-0")},
	// 																							Usernames: []*armsecurity.UserRecommendation{
	// 																								{
	// 																									RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																									Username: to.Ptr("root"),
	// 																							}},
	// 																						},
	// 																						{
	// 																							Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																							Path: to.Ptr("/bin/dbus-daemon"),
	// 																							Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																							Common: to.Ptr(true),
	// 																							ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																							FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																							UserSids: []*string{
	// 																								to.Ptr("S-1-1-0")},
	// 																								Usernames: []*armsecurity.UserRecommendation{
	// 																									{
	// 																										RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																										Username: to.Ptr("messagebus"),
	// 																								}},
	// 																							},
	// 																							{
	// 																								Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																								Path: to.Ptr("/lib/systemd/systemd-logind"),
	// 																								Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																								Common: to.Ptr(true),
	// 																								ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																								FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																								UserSids: []*string{
	// 																									to.Ptr("S-1-1-0")},
	// 																									Usernames: []*armsecurity.UserRecommendation{
	// 																										{
	// 																											RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																											Username: to.Ptr("root"),
	// 																									}},
	// 																								},
	// 																								{
	// 																									Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																									Path: to.Ptr("/sbin/getty"),
	// 																									Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																									Common: to.Ptr(true),
	// 																									ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																									FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																									UserSids: []*string{
	// 																										to.Ptr("S-1-1-0")},
	// 																										Usernames: []*armsecurity.UserRecommendation{
	// 																											{
	// 																												RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																												Username: to.Ptr("root"),
	// 																										}},
	// 																									},
	// 																									{
	// 																										Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																										Path: to.Ptr("/usr/sbin/atd"),
	// 																										Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																										Common: to.Ptr(true),
	// 																										ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																										FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																										UserSids: []*string{
	// 																											to.Ptr("S-1-1-0")},
	// 																											Usernames: []*armsecurity.UserRecommendation{
	// 																												{
	// 																													RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																													Username: to.Ptr("root"),
	// 																											}},
	// 																										},
	// 																										{
	// 																											Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																											Path: to.Ptr("/usr/sbin/cron"),
	// 																											Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																											Common: to.Ptr(true),
	// 																											ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																											FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																											UserSids: []*string{
	// 																												to.Ptr("S-1-1-0")},
	// 																												Usernames: []*armsecurity.UserRecommendation{
	// 																													{
	// 																														RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																														Username: to.Ptr("root"),
	// 																												}},
	// 																											},
	// 																											{
	// 																												Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																												Path: to.Ptr("/usr/sbin/acpid"),
	// 																												Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																												Common: to.Ptr(true),
	// 																												ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																												FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																												UserSids: []*string{
	// 																													to.Ptr("S-1-1-0")},
	// 																													Usernames: []*armsecurity.UserRecommendation{
	// 																														{
	// 																															RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																															Username: to.Ptr("root"),
	// 																													}},
	// 																												},
	// 																												{
	// 																													Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																													Path: to.Ptr("/usr/sbin/sshd"),
	// 																													Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																													Common: to.Ptr(true),
	// 																													ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																													FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																													UserSids: []*string{
	// 																														to.Ptr("S-1-1-0")},
	// 																														Usernames: []*armsecurity.UserRecommendation{
	// 																															{
	// 																																RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																Username: to.Ptr("root"),
	// 																														}},
	// 																													},
	// 																													{
	// 																														Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																														Path: to.Ptr("/usr/lib/linux-lts-xenial-tools-4.4.0-103/hv_vss_daemon"),
	// 																														Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																														Common: to.Ptr(true),
	// 																														ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																														FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																														UserSids: []*string{
	// 																															to.Ptr("S-1-1-0")},
	// 																															Usernames: []*armsecurity.UserRecommendation{
	// 																																{
	// 																																	RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																	Username: to.Ptr("root"),
	// 																															}},
	// 																														},
	// 																														{
	// 																															Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																															Path: to.Ptr("/usr/lib/linux-lts-xenial-tools-4.4.0-103/hv_kvp_daemon"),
	// 																															Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																															Common: to.Ptr(true),
	// 																															ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																															FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																															UserSids: []*string{
	// 																																to.Ptr("S-1-1-0")},
	// 																																Usernames: []*armsecurity.UserRecommendation{
	// 																																	{
	// 																																		RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																		Username: to.Ptr("root"),
	// 																																}},
	// 																															},
	// 																															{
	// 																																Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																Path: to.Ptr("/usr/sbin/nscd"),
	// 																																Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																Common: to.Ptr(true),
	// 																																ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																UserSids: []*string{
	// 																																	to.Ptr("S-1-1-0")},
	// 																																	Usernames: []*armsecurity.UserRecommendation{
	// 																																		{
	// 																																			RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																			Username: to.Ptr("unscd"),
	// 																																	}},
	// 																																},
	// 																																{
	// 																																	Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																	Path: to.Ptr("/usr/sbin/ntpd"),
	// 																																	Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																	Common: to.Ptr(true),
	// 																																	ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																	FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																	UserSids: []*string{
	// 																																		to.Ptr("S-1-1-0")},
	// 																																		Usernames: []*armsecurity.UserRecommendation{
	// 																																			{
	// 																																				RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																				Username: to.Ptr("ntp"),
	// 																																		}},
	// 																																	},
	// 																																	{
	// 																																		Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																		Path: to.Ptr("/opt/microsoft/auoms/bin/auomscollect"),
	// 																																		Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																		Common: to.Ptr(true),
	// 																																		ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																		FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																		UserSids: []*string{
	// 																																			to.Ptr("S-1-1-0")},
	// 																																			Usernames: []*armsecurity.UserRecommendation{
	// 																																				{
	// 																																					RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																					Username: to.Ptr("root"),
	// 																																			}},
	// 																																		},
	// 																																		{
	// 																																			Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																			Path: to.Ptr("/opt/omi/bin/omiserver"),
	// 																																			Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																			Common: to.Ptr(true),
	// 																																			ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																			FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																			UserSids: []*string{
	// 																																				to.Ptr("S-1-1-0")},
	// 																																				Usernames: []*armsecurity.UserRecommendation{
	// 																																					{
	// 																																						RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																						Username: to.Ptr("root"),
	// 																																				}},
	// 																																			},
	// 																																			{
	// 																																				Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																				Path: to.Ptr("/opt/omi/bin/omiengine"),
	// 																																				Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																				Common: to.Ptr(true),
	// 																																				ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																				FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																				UserSids: []*string{
	// 																																					to.Ptr("S-1-1-0")},
	// 																																					Usernames: []*armsecurity.UserRecommendation{
	// 																																						{
	// 																																							RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																							Username: to.Ptr("omi"),
	// 																																					}},
	// 																																				},
	// 																																				{
	// 																																					Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																					Path: to.Ptr("/opt/omi/bin/omiagent"),
	// 																																					Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																					Common: to.Ptr(true),
	// 																																					ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																					FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																					UserSids: []*string{
	// 																																						to.Ptr("S-1-1-0")},
	// 																																						Usernames: []*armsecurity.UserRecommendation{
	// 																																							{
	// 																																								RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																								Username: to.Ptr("root"),
	// 																																						}},
	// 																																					},
	// 																																					{
	// 																																						Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																						Path: to.Ptr("/usr/sbin/rsyslogd"),
	// 																																						Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																						Common: to.Ptr(true),
	// 																																						ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																						FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																						UserSids: []*string{
	// 																																							to.Ptr("S-1-1-0")},
	// 																																							Usernames: []*armsecurity.UserRecommendation{
	// 																																								{
	// 																																									RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																									Username: to.Ptr("syslog"),
	// 																																							}},
	// 																																						},
	// 																																						{
	// 																																							Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																							Path: to.Ptr("/usr/bin/python2.7"),
	// 																																							Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																							Common: to.Ptr(true),
	// 																																							ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																							FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																							UserSids: []*string{
	// 																																								to.Ptr("S-1-1-0")},
	// 																																								Usernames: []*armsecurity.UserRecommendation{
	// 																																									{
	// 																																										RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																										Username: to.Ptr("root"),
	// 																																									},
	// 																																									{
	// 																																										RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																										Username: to.Ptr("omsagent"),
	// 																																								}},
	// 																																							},
	// 																																							{
	// 																																								Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																								Path: to.Ptr("/opt/microsoft/omsagent/ruby/bin/ruby"),
	// 																																								Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																								Common: to.Ptr(true),
	// 																																								ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																								FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																								UserSids: []*string{
	// 																																									to.Ptr("S-1-1-0")},
	// 																																									Usernames: []*armsecurity.UserRecommendation{
	// 																																										{
	// 																																											RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																											Username: to.Ptr("omsagent"),
	// 																																									}},
	// 																																								},
	// 																																								{
	// 																																									Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																									Path: to.Ptr("/opt/microsoft/auoms/bin/auoms"),
	// 																																									Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																									Common: to.Ptr(true),
	// 																																									ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																									FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																									UserSids: []*string{
	// 																																										to.Ptr("S-1-1-0")},
	// 																																										Usernames: []*armsecurity.UserRecommendation{
	// 																																											{
	// 																																												RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																												Username: to.Ptr("root"),
	// 																																										}},
	// 																																									},
	// 																																									{
	// 																																										Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																										Path: to.Ptr("/usr/local/qualys/cloud-agent/bin/qualys-cloud-agent"),
	// 																																										Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																										Common: to.Ptr(true),
	// 																																										ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																										FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																										UserSids: []*string{
	// 																																											to.Ptr("S-1-1-0")},
	// 																																											Usernames: []*armsecurity.UserRecommendation{
	// 																																												{
	// 																																													RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																													Username: to.Ptr("root"),
	// 																																											}},
	// 																																										},
	// 																																										{
	// 																																											Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																											Path: to.Ptr("/bin/dash"),
	// 																																											Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																											Common: to.Ptr(true),
	// 																																											ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																											FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																											UserSids: []*string{
	// 																																												to.Ptr("S-1-1-0")},
	// 																																												Usernames: []*armsecurity.UserRecommendation{
	// 																																													{
	// 																																														RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																														Username: to.Ptr("omsagent"),
	// 																																													},
	// 																																													{
	// 																																														RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																														Username: to.Ptr("root"),
	// 																																												}},
	// 																																											},
	// 																																											{
	// 																																												Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																												Path: to.Ptr("/bin/sleep"),
	// 																																												Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																												Common: to.Ptr(true),
	// 																																												ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																												FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																												UserSids: []*string{
	// 																																													to.Ptr("S-1-1-0")},
	// 																																													Usernames: []*armsecurity.UserRecommendation{
	// 																																														{
	// 																																															RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																															Username: to.Ptr("omsagent"),
	// 																																													}},
	// 																																												},
	// 																																												{
	// 																																													Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																													Path: to.Ptr("/opt/dsc/bin/dsc_host"),
	// 																																													Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																													Common: to.Ptr(false),
	// 																																													ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																													FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																													UserSids: []*string{
	// 																																														to.Ptr("S-1-1-0")},
	// 																																														Usernames: []*armsecurity.UserRecommendation{
	// 																																															{
	// 																																																RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																Username: to.Ptr("omsagent"),
	// 																																														}},
	// 																																													},
	// 																																													{
	// 																																														Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																														Path: to.Ptr("/usr/bin/sudo"),
	// 																																														Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																														Common: to.Ptr(false),
	// 																																														ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																														FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																														UserSids: []*string{
	// 																																															to.Ptr("S-1-1-0")},
	// 																																															Usernames: []*armsecurity.UserRecommendation{
	// 																																																{
	// 																																																	RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																	Username: to.Ptr("root"),
	// 																																															}},
	// 																																														},
	// 																																														{
	// 																																															Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																															Path: to.Ptr("/bin/bash"),
	// 																																															Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																															Common: to.Ptr(false),
	// 																																															ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																															FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																															UserSids: []*string{
	// 																																																to.Ptr("S-1-1-0")},
	// 																																																Usernames: []*armsecurity.UserRecommendation{
	// 																																																	{
	// 																																																		RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																		Username: to.Ptr("root"),
	// 																																																}},
	// 																																															},
	// 																																															{
	// 																																																Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																																Path: to.Ptr("/usr/bin/apt-get"),
	// 																																																Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																Common: to.Ptr(false),
	// 																																																ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																																UserSids: []*string{
	// 																																																	to.Ptr("S-1-1-0")},
	// 																																																	Usernames: []*armsecurity.UserRecommendation{
	// 																																																		{
	// 																																																			RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																			Username: to.Ptr("root"),
	// 																																																	}},
	// 																																																},
	// 																																																{
	// 																																																	Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																																	Path: to.Ptr("/usr/lib/apt/methods/http"),
	// 																																																	Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																	Common: to.Ptr(false),
	// 																																																	ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																	FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																																	UserSids: []*string{
	// 																																																		to.Ptr("S-1-1-0")},
	// 																																																		Usernames: []*armsecurity.UserRecommendation{
	// 																																																			{
	// 																																																				RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																				Username: to.Ptr("root"),
	// 																																																		}},
	// 																																																	},
	// 																																																	{
	// 																																																		Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																																		Path: to.Ptr("/usr/lib/apt/methods/gpgv"),
	// 																																																		Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																		Common: to.Ptr(false),
	// 																																																		ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																		FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																																		UserSids: []*string{
	// 																																																			to.Ptr("S-1-1-0")},
	// 																																																			Usernames: []*armsecurity.UserRecommendation{
	// 																																																				{
	// 																																																					RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																					Username: to.Ptr("root"),
	// 																																																			}},
	// 																																																		},
	// 																																																		{
	// 																																																			Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																																			Path: to.Ptr("/usr/lib/apt/methods/copy"),
	// 																																																			Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																			Common: to.Ptr(false),
	// 																																																			ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																			FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																																			UserSids: []*string{
	// 																																																				to.Ptr("S-1-1-0")},
	// 																																																				Usernames: []*armsecurity.UserRecommendation{
	// 																																																					{
	// 																																																						RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																						Username: to.Ptr("root"),
	// 																																																				}},
	// 																																																			},
	// 																																																			{
	// 																																																				Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																																				Path: to.Ptr("/usr/bin/pgrep"),
	// 																																																				Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																				Common: to.Ptr(true),
	// 																																																				ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																				FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																																				UserSids: []*string{
	// 																																																					to.Ptr("S-1-1-0")},
	// 																																																					Usernames: []*armsecurity.UserRecommendation{
	// 																																																						{
	// 																																																							RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																							Username: to.Ptr("omsagent"),
	// 																																																					}},
	// 																																																				},
	// 																																																				{
	// 																																																					Type: to.Ptr(armsecurity.RecommendationType("File")),
	// 																																																					Path: to.Ptr("/opt/microsoft/omsconfig/bin/omsconsistencyinvoker"),
	// 																																																					Action: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																					Common: to.Ptr(false),
	// 																																																					ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																					FileType: to.Ptr(armsecurity.FileTypeExecutable),
	// 																																																					UserSids: []*string{
	// 																																																						to.Ptr("S-1-1-0")},
	// 																																																						Usernames: []*armsecurity.UserRecommendation{
	// 																																																							{
	// 																																																								RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																								Username: to.Ptr("omsagent"),
	// 																																																						}},
	// 																																																				}},
	// 																																																				ProtectionMode: &armsecurity.ProtectionMode{
	// 																																																					Executable: to.Ptr(armsecurity.EnforcementModeAudit),
	// 																																																				},
	// 																																																				RecommendationStatus: to.Ptr(armsecurity.RecommendationStatusRecommended),
	// 																																																				SourceSystem: to.Ptr(armsecurity.SourceSystemAzureAuditD),
	// 																																																				VMRecommendations: []*armsecurity.VMRecommendation{
	// 																																																					{
	// 																																																						ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusConfigured),
	// 																																																						EnforcementSupport: to.Ptr(armsecurity.EnforcementSupportUnknown),
	// 																																																						RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 																																																						ResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/nic-no-pip/providers/microsoft.compute/virtualmachines/nic-no-pip-vm"),
	// 																																																				}},
	// 																																																			},
	// 																																																	}},
	// 																																																}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAdaptiveApplicationControlsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdaptiveApplicationControlGroup = armsecurity.AdaptiveApplicationControlGroup{
	// 	Location: to.Ptr("centralus"),
	// 	Name: to.Ptr("ERELGROUP1"),
	// 	Type: to.Ptr("Microsoft.Security/applicationWhitelistings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus/applicationWhitelistings/ERELGROUP1"),
	// 	Properties: &armsecurity.AdaptiveApplicationControlGroupData{
	// 		ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusInProgress),
	// 		EnforcementMode: to.Ptr(armsecurity.EnforcementModeAudit),
	// 		Issues: []*armsecurity.AdaptiveApplicationControlIssueSummary{
	// 		},
	// 		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),
	// 							ConfigurationStatus: to.Ptr(armsecurity.ConfigurationStatusNotConfigured),
	// 							FileType: to.Ptr(armsecurity.FileTypeExe),
	// 							UserSids: []*string{
	// 								to.Ptr("S-1-1-0")},
	// 								Usernames: []*armsecurity.UserRecommendation{
	// 									{
	// 										RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 										Username: to.Ptr("Everyone"),
	// 								}},
	// 						}},
	// 						ProtectionMode: &armsecurity.ProtectionMode{
	// 							Exe: to.Ptr(armsecurity.EnforcementModeAudit),
	// 							Msi: to.Ptr(armsecurity.EnforcementModeNone),
	// 							Script: to.Ptr(armsecurity.EnforcementModeNone),
	// 						},
	// 						RecommendationStatus: to.Ptr(armsecurity.RecommendationStatusRecommended),
	// 						SourceSystem: to.Ptr(armsecurity.SourceSystemAzureAppLocker),
	// 						VMRecommendations: []*armsecurity.VMRecommendation{
	// 							{
	// 								RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 								ResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090"),
	// 							},
	// 							{
	// 								RecommendationAction: to.Ptr(armsecurity.RecommendationActionRecommended),
	// 								ResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/matanvs/providers/microsoft.compute/virtualmachines/matanvs19"),
	// 						}},
	// 					},
	// 				}
}
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 {
	// Represents a list of VM/server groups and set of rules that are Recommended by Microsoft Defender for Cloud to be allowed
	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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// REQUIRED; The rules to enforce
	Rules []*Rule
}

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

	// The security rules which are recommended to be effective on the VM
	Rules []*Rule

	// The UTC time on which the rules were calculated
	RulesCalculationTime *time.Time
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAdaptiveNetworkHardeningsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAdaptiveNetworkHardeningsClient().Get(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdaptiveNetworkHardening = armsecurity.AdaptiveNetworkHardening{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/adaptiveNetworkHardenings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/adaptiveNetworkHardenings/default"),
	// 	Properties: &armsecurity.AdaptiveNetworkHardeningProperties{
	// 		EffectiveNetworkSecurityGroups: []*armsecurity.EffectiveNetworkSecurityGroups{
	// 			{
	// 				NetworkInterface: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1"),
	// 				NetworkSecurityGroups: []*string{
	// 					to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nicNsg"),
	// 					to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/subnetNsg")},
	// 				},
	// 				{
	// 					NetworkInterface: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg2/providers/Microsoft.Network/networkInterfaces/nic2"),
	// 					NetworkSecurityGroups: []*string{
	// 						to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nicNsg")},
	// 				}},
	// 				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)},
	// 							}},
	// 							RulesCalculationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-15T00:00:00.000Z"); return t}()),
	// 						},
	// 					}
}
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.NewListByExtendedResourcePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAdaptiveNetworkHardeningsClient().NewListByExtendedResourcePager("rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AdaptiveNetworkHardeningsList = armsecurity.AdaptiveNetworkHardeningsList{
		// 	Value: []*armsecurity.AdaptiveNetworkHardening{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/adaptiveNetworkHardenings"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/adaptiveNetworkHardenings/default"),
		// 			Properties: &armsecurity.AdaptiveNetworkHardeningProperties{
		// 				EffectiveNetworkSecurityGroups: []*armsecurity.EffectiveNetworkSecurityGroups{
		// 					{
		// 						NetworkInterface: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1"),
		// 						NetworkSecurityGroups: []*string{
		// 							to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nicNsg"),
		// 							to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/subnetNsg")},
		// 						},
		// 						{
		// 							NetworkInterface: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Network/networkInterfaces/nic2"),
		// 							NetworkSecurityGroups: []*string{
		// 								to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nicNsg2")},
		// 						}},
		// 						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)},
		// 									}},
		// 									RulesCalculationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-15T00:00:00.000Z"); return t}()),
		// 								},
		// 						}},
		// 					}
	}
}
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.BeginEnforce.

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 {
	// The resource whose properties describes the Adaptive Network Hardening settings for some Azure resource
	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.NewListByExtendedResourcePager method.

type AdaptiveNetworkHardeningsClientListByExtendedResourceResponse added in v0.3.0

type AdaptiveNetworkHardeningsClientListByExtendedResourceResponse struct {
	// Response for ListAdaptiveNetworkHardenings API service call
	AdaptiveNetworkHardeningsList
}

AdaptiveNetworkHardeningsClientListByExtendedResourceResponse contains the response from method AdaptiveNetworkHardeningsClient.NewListByExtendedResourcePager.

type AdaptiveNetworkHardeningsList

type AdaptiveNetworkHardeningsList struct {
	// The URL to get the next set of results
	NextLink *string

	// A list of Adaptive Network Hardenings resources
	Value []*AdaptiveNetworkHardening
}

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
}

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

	// Workspace type.
	Type *AdditionalWorkspaceType

	// Workspace resource id
	Workspace *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAdvancedThreatProtectionClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdvancedThreatProtectionSetting = 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),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAdvancedThreatProtectionClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdvancedThreatProtectionSetting = 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),
	// 	},
	// }
}
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 {
	// The Advanced Threat Protection resource.
	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 {
	// The Advanced Threat Protection resource.
	AdvancedThreatProtectionSetting
}

AdvancedThreatProtectionClientGetResponse contains the response from method AdvancedThreatProtectionClient.Get.

type AdvancedThreatProtectionProperties

type AdvancedThreatProtectionProperties struct {
	// Indicates whether Advanced Threat Protection is enabled.
	IsEnabled *bool
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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]any

	// READ-ONLY; Type of entity
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// Changing set of properties depending on the supportingEvidence type.
	SupportingEvidence *AlertPropertiesSupportingEvidence

	// READ-ONLY; The display name of the alert.
	AlertDisplayName *string

	// READ-ONLY; Unique identifier for the detection logic (all alert instances from the same detection logic will have the same
	// alertType).
	AlertType *string

	// READ-ONLY; A direct link to the alert page in Azure Portal.
	AlertURI *string

	// READ-ONLY; The display name of the resource most related to this alert.
	CompromisedEntity *string

	// READ-ONLY; Key for corelating related alerts. Alerts with the same correlation key considered to be related.
	CorrelationKey *string

	// READ-ONLY; Description of the suspicious activity that was detected.
	Description *string

	// READ-ONLY; The UTC time of the last event or activity included in the alert in ISO8601 format.
	EndTimeUTC *time.Time

	// READ-ONLY; A list of entities related to the alert.
	Entities []*AlertEntity

	// READ-ONLY; Links related to the alert
	ExtendedLinks []map[string]*string

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

	// READ-ONLY; This field determines whether the alert is an incident (a compound grouping of several alerts) or a single alert.
	IsIncident *bool

	// READ-ONLY; The UTC processing end time of the alert in ISO8601 format.
	ProcessingEndTimeUTC *time.Time

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

	// READ-ONLY; The name of the product which published this alert (Microsoft Sentinel, Microsoft Defender for Identity, Microsoft
	// Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for Cloud
	// Apps, and so on).
	ProductName *string

	// READ-ONLY; Manual action items to take to remediate the alert.
	RemediationSteps []*string

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

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

	// READ-ONLY; The UTC time of the first event or activity included in the alert in ISO8601 format.
	StartTimeUTC *time.Time

	// READ-ONLY; The life cycle status of the alert.
	Status *AlertStatus

	// READ-ONLY; Kill chain related sub-techniques behind the alert.
	SubTechniques []*string

	// READ-ONLY; Unique identifier for the alert.
	SystemAlertID *string

	// READ-ONLY; kill chain related techniques behind the alert.
	Techniques []*string

	// READ-ONLY; The UTC time the alert was generated in ISO8601 format.
	TimeGeneratedUTC *time.Time

	// READ-ONLY; The name of the vendor that raises the alert.
	VendorName *string

	// READ-ONLY; Schema version.
	Version *string
}

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]any

	// READ-ONLY; Type of the supportingEvidence
	Type *string
}

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

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

	// Bundles list.
	Bundles []*BundleType
}

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
}

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

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

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
}

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

	// Alert sync setting data
	Properties *AlertSyncSettingProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertsClient().GetResourceGroupLevel(ctx, "myRg1", "westeurope", "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Alert = armsecurity.Alert{
	// 	Name: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
	// 	Type: to.Ptr("Microsoft.Security/Locations/alerts"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/alerts/2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"),
	// 	Properties: &armsecurity.AlertProperties{
	// 		Description: to.Ptr("This is a test alert generated by Azure Security Center. No further action is needed."),
	// 		AlertDisplayName: to.Ptr("Azure Security Center test alert (not a threat)"),
	// 		AlertType: to.Ptr("VM_EICAR"),
	// 		AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
	// 		CompromisedEntity: to.Ptr("vm1"),
	// 		CorrelationKey: to.Ptr("kso0LFWxzCll5tqrk5hmrBJ+MY1BX806W6q6+0s9Lk="),
	// 		EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
	// 		Entities: []*armsecurity.AlertEntity{
	// 			{
	// 				AdditionalProperties: map[string]any{
	// 					"address": "192.0.2.1",
	// 					"location": map[string]any{
	// 						"asn": float64(6584),
	// 						"city": "sonning",
	// 						"countryCode": "gb",
	// 						"latitude": float64(51.468),
	// 						"longitude": float64(-0.909),
	// 						"state": "wokingham",
	// 					},
	// 				},
	// 				Type: to.Ptr("ip"),
	// 		}},
	// 		ExtendedLinks: []map[string]*string{
	// 			map[string]*string{
	// 				"Category": to.Ptr("threat_reports"),
	// 				"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
	// 				"Label": to.Ptr("Report: RDP Brute Forcing"),
	// 				"Type": to.Ptr("webLink"),
	// 		}},
	// 		ExtendedProperties: map[string]*string{
	// 			"Property1": to.Ptr("Property1 information"),
	// 		},
	// 		Intent: to.Ptr(armsecurity.IntentExecution),
	// 		IsIncident: to.Ptr(true),
	// 		ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.920Z"); return t}()),
	// 		ProductComponentName: to.Ptr("testName"),
	// 		ProductName: to.Ptr("Azure Security Center"),
	// 		RemediationSteps: []*string{
	// 			to.Ptr("No further action is needed.")},
	// 			ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
	// 				&armsecurity.AzureResourceIdentifier{
	// 					Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
	// 					AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 				},
	// 				&armsecurity.LogAnalyticsIdentifier{
	// 					Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
	// 					AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
	// 					WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
	// 					WorkspaceResourceGroup: to.Ptr("myRg1"),
	// 					WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
	// 			}},
	// 			Severity: to.Ptr(armsecurity.AlertSeverityHigh),
	// 			StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
	// 			Status: to.Ptr(armsecurity.AlertStatusActive),
	// 			SubTechniques: []*string{
	// 				to.Ptr("T1059.001"),
	// 				to.Ptr("T1059.006"),
	// 				to.Ptr("T1053.002")},
	// 				SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
	// 					AdditionalProperties: map[string]any{
	// 						"supportingEvidenceList": []any{
	// 							map[string]any{
	// 								"type": "nestedList",
	// 								"evidenceElements":[]any{
	// 									map[string]any{
	// 										"type": "evidenceElement",
	// 										"innerElements": nil,
	// 										"text":map[string]any{
	// 											"arguments":map[string]any{
	// 												"domainName":map[string]any{
	// 													"type": "string",
	// 													"value": "domainName",
	// 												},
	// 												"sensitiveEnumerationTypes":map[string]any{
	// 													"type": "string[]",
	// 													"value":[]any{
	// 														"UseDesKey",
	// 													},
	// 												},
	// 											},
	// 											"fallback": "Actor enumerated UseDesKey on domain1.test.local",
	// 											"localizationKey": "AATP_ALERTS_LDAP_SENSITIVE_ATTRIBUTE_RECONNAISSANCE_SECURITY_ALERT_EVIDENCE_ENUMERATION_DETAIL_A7C00BD7",
	// 										},
	// 									},
	// 								},
	// 							},
	// 							map[string]any{
	// 								"type": "tabularEvidences",
	// 								"columns":[]any{
	// 									"Date",
	// 									"Activity",
	// 									"User",
	// 									"TestedText",
	// 									"TestedValue",
	// 								},
	// 								"rows":[]any{
	// 									[]any{
	// 										"2022-01-17T07:03:52.034Z",
	// 										"Log on",
	// 										"testUser",
	// 										"false",
	// 										false,
	// 									},
	// 									[]any{
	// 										"2022-01-17T07:03:52.034Z",
	// 										"Log on",
	// 										"testUser2",
	// 										"false",
	// 										false,
	// 									},
	// 									[]any{
	// 										"2022-01-17T07:03:52.034Z",
	// 										"Log on",
	// 										"testUser3",
	// 										"true",
	// 										true,
	// 									},
	// 								},
	// 								"title": "Investigate activity test",
	// 							},
	// 						},
	// 					},
	// 					Type: to.Ptr("supportingEvidenceList"),
	// 				},
	// 				SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
	// 				Techniques: []*string{
	// 					to.Ptr("T1059"),
	// 					to.Ptr("T1053"),
	// 					to.Ptr("T1072")},
	// 					TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.000Z"); return t}()),
	// 					VendorName: to.Ptr("Microsoft"),
	// 					Version: to.Ptr("2022-01-01"),
	// 				},
	// 			}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertsClient().GetSubscriptionLevel(ctx, "westeurope", "2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Alert = armsecurity.Alert{
	// 	Name: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
	// 	Type: to.Ptr("Microsoft.Security/Locations/alerts"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/alerts/2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"),
	// 	Properties: &armsecurity.AlertProperties{
	// 		Description: to.Ptr("This is a test alert generated by Azure Security Center. No further action is needed."),
	// 		AlertDisplayName: to.Ptr("Azure Security Center test alert (not a threat)"),
	// 		AlertType: to.Ptr("VM_EICAR"),
	// 		AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
	// 		CompromisedEntity: to.Ptr("vm1"),
	// 		CorrelationKey: to.Ptr("kso0LFWxzCll5tqrk5hmrBJ+MY1BX806W6q6+0s9Lk="),
	// 		EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
	// 		Entities: []*armsecurity.AlertEntity{
	// 			{
	// 				AdditionalProperties: map[string]any{
	// 					"address": "192.0.2.1",
	// 					"location": map[string]any{
	// 						"asn": float64(6584),
	// 						"city": "sonning",
	// 						"countryCode": "gb",
	// 						"latitude": float64(51.468),
	// 						"longitude": float64(-0.909),
	// 						"state": "wokingham",
	// 					},
	// 				},
	// 				Type: to.Ptr("ip"),
	// 		}},
	// 		ExtendedLinks: []map[string]*string{
	// 			map[string]*string{
	// 				"Category": to.Ptr("threat_reports"),
	// 				"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
	// 				"Label": to.Ptr("Report: RDP Brute Forcing"),
	// 				"Type": to.Ptr("webLink"),
	// 		}},
	// 		ExtendedProperties: map[string]*string{
	// 			"Property1": to.Ptr("Property1 information"),
	// 		},
	// 		Intent: to.Ptr(armsecurity.IntentExecution),
	// 		IsIncident: to.Ptr(true),
	// 		ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.920Z"); return t}()),
	// 		ProductComponentName: to.Ptr("testName"),
	// 		ProductName: to.Ptr("Azure Security Center"),
	// 		RemediationSteps: []*string{
	// 			to.Ptr("No further action is needed.")},
	// 			ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
	// 				&armsecurity.AzureResourceIdentifier{
	// 					Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
	// 					AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 				},
	// 				&armsecurity.LogAnalyticsIdentifier{
	// 					Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
	// 					AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
	// 					WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
	// 					WorkspaceResourceGroup: to.Ptr("myRg1"),
	// 					WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
	// 			}},
	// 			Severity: to.Ptr(armsecurity.AlertSeverityHigh),
	// 			StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
	// 			Status: to.Ptr(armsecurity.AlertStatusActive),
	// 			SubTechniques: []*string{
	// 				to.Ptr("T1059.001"),
	// 				to.Ptr("T1059.006"),
	// 				to.Ptr("T1053.002")},
	// 				SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
	// 					AdditionalProperties: map[string]any{
	// 						"columns": []any{
	// 							"Date",
	// 							"Activity",
	// 							"User",
	// 							"TestedText",
	// 							"TestedValue",
	// 						},
	// 						"rows": []any{
	// 							[]any{
	// 								"2022-01-17T07:03:52.034Z",
	// 								"Log on",
	// 								"testUser",
	// 								"false",
	// 								false,
	// 							},
	// 							[]any{
	// 								"2022-01-17T07:03:52.034Z",
	// 								"Log on",
	// 								"testUser2",
	// 								"false",
	// 								false,
	// 							},
	// 							[]any{
	// 								"2022-01-17T07:03:52.034Z",
	// 								"Log on",
	// 								"testUser3",
	// 								"true",
	// 								true,
	// 							},
	// 						},
	// 						"title": "Investigate activity test",
	// 					},
	// 					Type: to.Ptr("tabularEvidences"),
	// 				},
	// 				SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
	// 				Techniques: []*string{
	// 					to.Ptr("T1059"),
	// 					to.Ptr("T1053"),
	// 					to.Ptr("T1072")},
	// 					TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.000Z"); return t}()),
	// 					VendorName: to.Ptr("Microsoft"),
	// 					Version: to.Ptr("2022-01-01"),
	// 				},
	// 			}
}
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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertsClient().NewListByResourceGroupPager("myRg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AlertList = armsecurity.AlertList{
		// 	Value: []*armsecurity.Alert{
		// 		{
		// 			Name: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 			Type: to.Ptr("Microsoft.Security/Locations/alerts"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/alerts/2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"),
		// 			Properties: &armsecurity.AlertProperties{
		// 				Description: to.Ptr("This is a test alert generated by Azure Security Center. No further action is needed."),
		// 				AlertDisplayName: to.Ptr("Azure Security Center test alert (not a threat)"),
		// 				AlertType: to.Ptr("VM_EICAR"),
		// 				AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
		// 				CompromisedEntity: to.Ptr("vm1"),
		// 				CorrelationKey: to.Ptr("kso0LFWxzCll5tqrk5hmrBJ+MY1BX806W6q6+0s9Lk="),
		// 				EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 				Entities: []*armsecurity.AlertEntity{
		// 					{
		// 						AdditionalProperties: map[string]any{
		// 							"address": "192.0.2.1",
		// 							"location": map[string]any{
		// 								"asn": float64(6584),
		// 								"city": "sonning",
		// 								"countryCode": "gb",
		// 								"latitude": float64(51.468),
		// 								"longitude": float64(-0.909),
		// 								"state": "wokingham",
		// 							},
		// 						},
		// 						Type: to.Ptr("ip"),
		// 				}},
		// 				ExtendedLinks: []map[string]*string{
		// 					map[string]*string{
		// 						"Category": to.Ptr("threat_reports"),
		// 						"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
		// 						"Label": to.Ptr("Report: RDP Brute Forcing"),
		// 						"Type": to.Ptr("webLink"),
		// 				}},
		// 				ExtendedProperties: map[string]*string{
		// 					"Property1": to.Ptr("Property1 information"),
		// 				},
		// 				Intent: to.Ptr(armsecurity.IntentExecution),
		// 				IsIncident: to.Ptr(true),
		// 				ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.920Z"); return t}()),
		// 				ProductComponentName: to.Ptr("testName"),
		// 				ProductName: to.Ptr("Azure Security Center"),
		// 				RemediationSteps: []*string{
		// 					to.Ptr("No further action is needed.")},
		// 					ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
		// 						&armsecurity.AzureResourceIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
		// 							AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 						},
		// 						&armsecurity.LogAnalyticsIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
		// 							AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
		// 							WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
		// 							WorkspaceResourceGroup: to.Ptr("myRg1"),
		// 							WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
		// 					}},
		// 					Severity: to.Ptr(armsecurity.AlertSeverityHigh),
		// 					StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 					Status: to.Ptr(armsecurity.AlertStatusActive),
		// 					SubTechniques: []*string{
		// 						to.Ptr("T1059.001"),
		// 						to.Ptr("T1059.006"),
		// 						to.Ptr("T1053.002")},
		// 						SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
		// 							AdditionalProperties: map[string]any{
		// 								"supportingEvidenceList": []any{
		// 									map[string]any{
		// 										"type": "nestedList",
		// 										"evidenceElements":[]any{
		// 											map[string]any{
		// 												"type": "evidenceElement",
		// 												"innerElements": nil,
		// 												"text":map[string]any{
		// 													"arguments":map[string]any{
		// 														"domainName":map[string]any{
		// 															"type": "string",
		// 															"value": "domainName",
		// 														},
		// 														"sensitiveEnumerationTypes":map[string]any{
		// 															"type": "string[]",
		// 															"value":[]any{
		// 																"UseDesKey",
		// 															},
		// 														},
		// 													},
		// 													"fallback": "Actor enumerated UseDesKey on domain1.test.local",
		// 													"localizationKey": "AATP_ALERTS_LDAP_SENSITIVE_ATTRIBUTE_RECONNAISSANCE_SECURITY_ALERT_EVIDENCE_ENUMERATION_DETAIL_A7C00BD7",
		// 												},
		// 											},
		// 										},
		// 									},
		// 									map[string]any{
		// 										"type": "tabularEvidences",
		// 										"columns":[]any{
		// 											"Date",
		// 											"Activity",
		// 											"User",
		// 											"TestedText",
		// 											"TestedValue",
		// 										},
		// 										"rows":[]any{
		// 											[]any{
		// 												"2022-01-17T07:03:52.034Z",
		// 												"Log on",
		// 												"testUser",
		// 												"false",
		// 												false,
		// 											},
		// 											[]any{
		// 												"2022-01-17T07:03:52.034Z",
		// 												"Log on",
		// 												"testUser2",
		// 												"false",
		// 												false,
		// 											},
		// 											[]any{
		// 												"2022-01-17T07:03:52.034Z",
		// 												"Log on",
		// 												"testUser3",
		// 												"true",
		// 												true,
		// 											},
		// 										},
		// 										"title": "Investigate activity test",
		// 									},
		// 								},
		// 							},
		// 							Type: to.Ptr("supportingEvidenceList"),
		// 						},
		// 						SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 						Techniques: []*string{
		// 							to.Ptr("T1059"),
		// 							to.Ptr("T1053"),
		// 							to.Ptr("T1072")},
		// 							TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.000Z"); return t}()),
		// 							VendorName: to.Ptr("Microsoft"),
		// 							Version: to.Ptr("2022-01-01"),
		// 						},
		// 				}},
		// 			}
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AlertList = armsecurity.AlertList{
		// 	Value: []*armsecurity.Alert{
		// 		{
		// 			Name: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 			Type: to.Ptr("Microsoft.Security/Locations/alerts"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/alerts/2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"),
		// 			Properties: &armsecurity.AlertProperties{
		// 				Description: to.Ptr("This is a test alert generated by Azure Security Center. No further action is needed."),
		// 				AlertDisplayName: to.Ptr("Azure Security Center test alert (not a threat)"),
		// 				AlertType: to.Ptr("VM_EICAR"),
		// 				AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
		// 				CompromisedEntity: to.Ptr("vm1"),
		// 				CorrelationKey: to.Ptr("kso0LFWxzCll5tqrk5hmrBJ+MY1BX806W6q6+0s9Lk="),
		// 				EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 				Entities: []*armsecurity.AlertEntity{
		// 					{
		// 						AdditionalProperties: map[string]any{
		// 							"address": "192.0.2.1",
		// 							"location": map[string]any{
		// 								"asn": float64(6584),
		// 								"city": "sonning",
		// 								"countryCode": "gb",
		// 								"latitude": float64(51.468),
		// 								"longitude": float64(-0.909),
		// 								"state": "wokingham",
		// 							},
		// 						},
		// 						Type: to.Ptr("ip"),
		// 				}},
		// 				ExtendedLinks: []map[string]*string{
		// 					map[string]*string{
		// 						"Category": to.Ptr("threat_reports"),
		// 						"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
		// 						"Label": to.Ptr("Report: RDP Brute Forcing"),
		// 						"Type": to.Ptr("webLink"),
		// 				}},
		// 				ExtendedProperties: map[string]*string{
		// 					"Property1": to.Ptr("Property1 information"),
		// 				},
		// 				Intent: to.Ptr(armsecurity.IntentExecution),
		// 				IsIncident: to.Ptr(true),
		// 				ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.920Z"); return t}()),
		// 				ProductComponentName: to.Ptr("testName"),
		// 				ProductName: to.Ptr("Azure Security Center"),
		// 				RemediationSteps: []*string{
		// 					to.Ptr("No further action is needed.")},
		// 					ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
		// 						&armsecurity.AzureResourceIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
		// 							AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 						},
		// 						&armsecurity.LogAnalyticsIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
		// 							AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
		// 							WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
		// 							WorkspaceResourceGroup: to.Ptr("myRg1"),
		// 							WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
		// 					}},
		// 					Severity: to.Ptr(armsecurity.AlertSeverityHigh),
		// 					StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 					Status: to.Ptr(armsecurity.AlertStatusActive),
		// 					SubTechniques: []*string{
		// 						to.Ptr("T1059.001"),
		// 						to.Ptr("T1059.006"),
		// 						to.Ptr("T1053.002")},
		// 						SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
		// 							AdditionalProperties: map[string]any{
		// 								"columns": []any{
		// 									"Date",
		// 									"Activity",
		// 									"User",
		// 									"TestedText",
		// 									"TestedValue",
		// 								},
		// 								"rows": []any{
		// 									[]any{
		// 										"2022-01-17T07:03:52.034Z",
		// 										"Log on",
		// 										"testUser",
		// 										"false",
		// 										false,
		// 									},
		// 									[]any{
		// 										"2022-01-17T07:03:52.034Z",
		// 										"Log on",
		// 										"testUser2",
		// 										"false",
		// 										false,
		// 									},
		// 									[]any{
		// 										"2022-01-17T07:03:52.034Z",
		// 										"Log on",
		// 										"testUser3",
		// 										"true",
		// 										true,
		// 									},
		// 								},
		// 								"title": "Investigate activity test",
		// 							},
		// 							Type: to.Ptr("tabularEvidences"),
		// 						},
		// 						SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 						Techniques: []*string{
		// 							to.Ptr("T1059"),
		// 							to.Ptr("T1053"),
		// 							to.Ptr("T1072")},
		// 							TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.000Z"); return t}()),
		// 							VendorName: to.Ptr("Microsoft"),
		// 							Version: to.Ptr("2022-01-01"),
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22"),
		// 						Type: to.Ptr("Microsoft.Security/Locations/alerts"),
		// 						ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/westeurope/alerts/2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22"),
		// 						Properties: &armsecurity.AlertProperties{
		// 							Description: to.Ptr("The process ‘c:\\users\\contosoUser\\scrsave.scr’ was observed executing from an uncommon location. Files with the .scr extensions are screen saver files and are normally reside and execute from the Windows system directory."),
		// 							AlertDisplayName: to.Ptr("Suspicious Screensaver process executed"),
		// 							AlertType: to.Ptr("VM_SuspiciousScreenSaver"),
		// 							AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
		// 							CompromisedEntity: to.Ptr("vm2"),
		// 							CorrelationKey: to.Ptr("4hno6LF0xzCl5tqrk4nrBW+MY1BX816W6q6+0srk4"),
		// 							EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:45.004Z"); return t}()),
		// 							Entities: []*armsecurity.AlertEntity{
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"OsVersion": nil,
		// 										"azureID": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/myRg2/providers/microsoft.compute/virtualmachines/vm2",
		// 										"dnsDomain": "",
		// 										"hostName": "vm2",
		// 										"netBiosName": "vm2",
		// 										"ntDomain": "",
		// 										"omsAgentID": "45b44640-3b94-4892-a28c-4a5cae27065a",
		// 										"operatingSystem": "Unknown",
		// 									},
		// 									Type: to.Ptr("host"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"name": "contosoUser",
		// 										"logonId": "0x61450d87",
		// 										"ntDomain": "vm2",
		// 										"sid": "S-1-5-21-2144575486-8928446540-5163864319-500",
		// 									},
		// 									Type: to.Ptr("account"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"name": "cmd.exe",
		// 										"directory": "c:\\windows\\system32",
		// 									},
		// 									Type: to.Ptr("file"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"processId": "0x3c44",
		// 									},
		// 									Type: to.Ptr("process"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"name": "scrsave.scr",
		// 										"directory": "c:\\users\\contosoUser",
		// 									},
		// 									Type: to.Ptr("file"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"commandLine": "c:\\users\\contosoUser\\scrsave.scr",
		// 										"creationTimeUtc": "2018-05-07T13:51:45.0045913Z",
		// 										"processId": "0x4aec",
		// 									},
		// 									Type: to.Ptr("process"),
		// 							}},
		// 							ExtendedLinks: []map[string]*string{
		// 								map[string]*string{
		// 									"Category": to.Ptr("threat_reports"),
		// 									"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
		// 									"Label": to.Ptr("Report: RDP Brute Forcing"),
		// 									"Type": to.Ptr("webLink"),
		// 							}},
		// 							ExtendedProperties: map[string]*string{
		// 								"account logon id": to.Ptr("0x61450d87"),
		// 								"command line": to.Ptr("c:\\users\\contosoUser\\scrsave.scr"),
		// 								"domain name": to.Ptr("vm2"),
		// 								"parent process": to.Ptr("cmd.exe"),
		// 								"parent process id": to.Ptr("0x3c44"),
		// 								"process id": to.Ptr("0x4aec"),
		// 								"process name": to.Ptr("c:\\users\\contosoUser\\scrsave.scr"),
		// 								"resourceType": to.Ptr("Virtual Machine"),
		// 								"user SID": to.Ptr("S-1-5-21-2144575486-8928446540-5163864319-500"),
		// 								"user name": to.Ptr("vm2\\contosoUser"),
		// 							},
		// 							Intent: to.Ptr(armsecurity.IntentExecution),
		// 							IsIncident: to.Ptr(true),
		// 							ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:48.981Z"); return t}()),
		// 							ProductComponentName: to.Ptr("testName2"),
		// 							ProductName: to.Ptr("Azure Security Center"),
		// 							RemediationSteps: []*string{
		// 								to.Ptr("1. Run Process Explorer and try to identify unknown running processes (see https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx)"),
		// 								to.Ptr("2. Make sure the machine is completely updated and has an updated anti-malware application installed"),
		// 								to.Ptr("3. Run a full anti-malware scan and verify that the threat was removed"),
		// 								to.Ptr("4. Install and run Microsoft’s Malicious Software Removal Tool (see https://www.microsoft.com/en-us/download/malicious-software-removal-tool-details.aspx)"),
		// 								to.Ptr("5. Run Microsoft’s Autoruns utility and try to identify unknown applications that are configured to run at login (see https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx)"),
		// 								to.Ptr("6. Escalate the alert to the information security team")},
		// 								ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
		// 									&armsecurity.AzureResourceIdentifier{
		// 										Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
		// 										AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 									},
		// 									&armsecurity.LogAnalyticsIdentifier{
		// 										Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
		// 										AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
		// 										WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
		// 										WorkspaceResourceGroup: to.Ptr("myRg1"),
		// 										WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
		// 								}},
		// 								Severity: to.Ptr(armsecurity.AlertSeverityMedium),
		// 								StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:45.004Z"); return t}()),
		// 								Status: to.Ptr(armsecurity.AlertStatusActive),
		// 								SubTechniques: []*string{
		// 									to.Ptr("T1059.001"),
		// 									to.Ptr("T1059.006"),
		// 									to.Ptr("T1053.002")},
		// 									SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
		// 										AdditionalProperties: map[string]any{
		// 											"supportingEvidenceList": []any{
		// 												map[string]any{
		// 													"type": "nestedList",
		// 													"evidenceElements":[]any{
		// 														map[string]any{
		// 															"type": "evidenceElement",
		// 															"innerElements": nil,
		// 															"text":map[string]any{
		// 																"arguments":map[string]any{
		// 																	"domainName":map[string]any{
		// 																		"type": "string",
		// 																		"value": "domainName",
		// 																	},
		// 																	"sensitiveEnumerationTypes":map[string]any{
		// 																		"type": "string[]",
		// 																		"value":[]any{
		// 																			"UseDesKey",
		// 																		},
		// 																	},
		// 																},
		// 																"fallback": "Actor enumerated UseDesKey on domain1.test.local",
		// 																"localizationKey": "AATP_ALERTS_LDAP_SENSITIVE_ATTRIBUTE_RECONNAISSANCE_SECURITY_ALERT_EVIDENCE_ENUMERATION_DETAIL_A7C00BD7",
		// 															},
		// 														},
		// 													},
		// 												},
		// 												map[string]any{
		// 													"type": "tabularEvidences",
		// 													"columns":[]any{
		// 														"Date",
		// 														"Activity",
		// 														"User",
		// 														"TestedText",
		// 														"TestedValue",
		// 													},
		// 													"rows":[]any{
		// 														[]any{
		// 															"2022-01-17T07:03:52.034Z",
		// 															"Log on",
		// 															"testUser",
		// 															"false",
		// 															false,
		// 														},
		// 														[]any{
		// 															"2022-01-17T07:03:52.034Z",
		// 															"Log on",
		// 															"testUser2",
		// 															"false",
		// 															false,
		// 														},
		// 														[]any{
		// 															"2022-01-17T07:03:52.034Z",
		// 															"Log on",
		// 															"testUser3",
		// 															"true",
		// 															true,
		// 														},
		// 													},
		// 													"title": "Investigate activity test",
		// 												},
		// 											},
		// 										},
		// 										Type: to.Ptr("supportingEvidenceList"),
		// 									},
		// 									SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 									Techniques: []*string{
		// 										to.Ptr("T1059"),
		// 										to.Ptr("T1053"),
		// 										to.Ptr("T1072")},
		// 										TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:48.381Z"); return t}()),
		// 										VendorName: to.Ptr("Microsoft"),
		// 										Version: to.Ptr("2022-01-01"),
		// 									},
		// 							}},
		// 						}
	}
}
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.NewListResourceGroupLevelByRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertsClient().NewListResourceGroupLevelByRegionPager("westeurope", "myRg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AlertList = armsecurity.AlertList{
		// 	Value: []*armsecurity.Alert{
		// 		{
		// 			Name: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 			Type: to.Ptr("Microsoft.Security/Locations/alerts"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/alerts/2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"),
		// 			Properties: &armsecurity.AlertProperties{
		// 				Description: to.Ptr("This is a test alert generated by Azure Security Center. No further action is needed."),
		// 				AlertDisplayName: to.Ptr("Azure Security Center test alert (not a threat)"),
		// 				AlertType: to.Ptr("VM_EICAR"),
		// 				AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
		// 				CompromisedEntity: to.Ptr("vm1"),
		// 				CorrelationKey: to.Ptr("kso0LFWxzCll5tqrk5hmrBJ+MY1BX806W6q6+0s9Lk="),
		// 				EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 				Entities: []*armsecurity.AlertEntity{
		// 					{
		// 						AdditionalProperties: map[string]any{
		// 							"address": "192.0.2.1",
		// 							"location": map[string]any{
		// 								"asn": float64(6584),
		// 								"city": "sonning",
		// 								"countryCode": "gb",
		// 								"latitude": float64(51.468),
		// 								"longitude": float64(-0.909),
		// 								"state": "wokingham",
		// 							},
		// 						},
		// 						Type: to.Ptr("ip"),
		// 				}},
		// 				ExtendedLinks: []map[string]*string{
		// 					map[string]*string{
		// 						"Category": to.Ptr("threat_reports"),
		// 						"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
		// 						"Label": to.Ptr("Report: RDP Brute Forcing"),
		// 						"Type": to.Ptr("webLink"),
		// 				}},
		// 				ExtendedProperties: map[string]*string{
		// 					"Property1": to.Ptr("Property1 information"),
		// 				},
		// 				Intent: to.Ptr(armsecurity.IntentExecution),
		// 				IsIncident: to.Ptr(true),
		// 				ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.920Z"); return t}()),
		// 				ProductComponentName: to.Ptr("testName"),
		// 				ProductName: to.Ptr("Azure Security Center"),
		// 				RemediationSteps: []*string{
		// 					to.Ptr("No further action is needed.")},
		// 					ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
		// 						&armsecurity.AzureResourceIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
		// 							AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 						},
		// 						&armsecurity.LogAnalyticsIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
		// 							AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
		// 							WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
		// 							WorkspaceResourceGroup: to.Ptr("myRg1"),
		// 							WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
		// 					}},
		// 					Severity: to.Ptr(armsecurity.AlertSeverityHigh),
		// 					StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 					Status: to.Ptr(armsecurity.AlertStatusActive),
		// 					SubTechniques: []*string{
		// 						to.Ptr("T1059.001"),
		// 						to.Ptr("T1059.006"),
		// 						to.Ptr("T1053.002")},
		// 						SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
		// 							AdditionalProperties: map[string]any{
		// 								"supportingEvidenceList": []any{
		// 									map[string]any{
		// 										"type": "nestedList",
		// 										"evidenceElements":[]any{
		// 											map[string]any{
		// 												"type": "evidenceElement",
		// 												"innerElements": nil,
		// 												"text":map[string]any{
		// 													"arguments":map[string]any{
		// 														"domainName":map[string]any{
		// 															"type": "string",
		// 															"value": "domainName",
		// 														},
		// 														"sensitiveEnumerationTypes":map[string]any{
		// 															"type": "string[]",
		// 															"value":[]any{
		// 																"UseDesKey",
		// 															},
		// 														},
		// 													},
		// 													"fallback": "Actor enumerated UseDesKey on domain1.test.local",
		// 													"localizationKey": "AATP_ALERTS_LDAP_SENSITIVE_ATTRIBUTE_RECONNAISSANCE_SECURITY_ALERT_EVIDENCE_ENUMERATION_DETAIL_A7C00BD7",
		// 												},
		// 											},
		// 										},
		// 									},
		// 									map[string]any{
		// 										"type": "tabularEvidences",
		// 										"columns":[]any{
		// 											"Date",
		// 											"Activity",
		// 											"User",
		// 											"TestedText",
		// 											"TestedValue",
		// 										},
		// 										"rows":[]any{
		// 											[]any{
		// 												"2022-01-17T07:03:52.034Z",
		// 												"Log on",
		// 												"testUser",
		// 												"false",
		// 												false,
		// 											},
		// 											[]any{
		// 												"2022-01-17T07:03:52.034Z",
		// 												"Log on",
		// 												"testUser2",
		// 												"false",
		// 												false,
		// 											},
		// 											[]any{
		// 												"2022-01-17T07:03:52.034Z",
		// 												"Log on",
		// 												"testUser3",
		// 												"true",
		// 												true,
		// 											},
		// 										},
		// 										"title": "Investigate activity test",
		// 									},
		// 								},
		// 							},
		// 							Type: to.Ptr("supportingEvidenceList"),
		// 						},
		// 						SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 						Techniques: []*string{
		// 							to.Ptr("T1059"),
		// 							to.Ptr("T1053"),
		// 							to.Ptr("T1072")},
		// 							TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.000Z"); return t}()),
		// 							VendorName: to.Ptr("Microsoft"),
		// 							Version: to.Ptr("2022-01-01"),
		// 						},
		// 				}},
		// 			}
	}
}
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.NewListSubscriptionLevelByRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertsClient().NewListSubscriptionLevelByRegionPager("westeurope", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AlertList = armsecurity.AlertList{
		// 	Value: []*armsecurity.Alert{
		// 		{
		// 			Name: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 			Type: to.Ptr("Microsoft.Security/Locations/alerts"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/alerts/2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"),
		// 			Properties: &armsecurity.AlertProperties{
		// 				Description: to.Ptr("This is a test alert generated by Azure Security Center. No further action is needed."),
		// 				AlertDisplayName: to.Ptr("Azure Security Center test alert (not a threat)"),
		// 				AlertType: to.Ptr("VM_EICAR"),
		// 				AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
		// 				CompromisedEntity: to.Ptr("vm1"),
		// 				CorrelationKey: to.Ptr("kso0LFWxzCll5tqrk5hmrBJ+MY1BX806W6q6+0s9Lk="),
		// 				EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 				Entities: []*armsecurity.AlertEntity{
		// 					{
		// 						AdditionalProperties: map[string]any{
		// 							"address": "192.0.2.1",
		// 							"location": map[string]any{
		// 								"asn": float64(6584),
		// 								"city": "sonning",
		// 								"countryCode": "gb",
		// 								"latitude": float64(51.468),
		// 								"longitude": float64(-0.909),
		// 								"state": "wokingham",
		// 							},
		// 						},
		// 						Type: to.Ptr("ip"),
		// 				}},
		// 				ExtendedLinks: []map[string]*string{
		// 					map[string]*string{
		// 						"Category": to.Ptr("threat_reports"),
		// 						"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
		// 						"Label": to.Ptr("Report: RDP Brute Forcing"),
		// 						"Type": to.Ptr("webLink"),
		// 				}},
		// 				ExtendedProperties: map[string]*string{
		// 					"Property1": to.Ptr("Property1 information"),
		// 				},
		// 				Intent: to.Ptr(armsecurity.IntentExecution),
		// 				IsIncident: to.Ptr(true),
		// 				ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.920Z"); return t}()),
		// 				ProductComponentName: to.Ptr("testName"),
		// 				ProductName: to.Ptr("Azure Security Center"),
		// 				RemediationSteps: []*string{
		// 					to.Ptr("No further action is needed.")},
		// 					ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
		// 						&armsecurity.AzureResourceIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
		// 							AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 						},
		// 						&armsecurity.LogAnalyticsIdentifier{
		// 							Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
		// 							AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
		// 							WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
		// 							WorkspaceResourceGroup: to.Ptr("myRg1"),
		// 							WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
		// 					}},
		// 					Severity: to.Ptr(armsecurity.AlertSeverityHigh),
		// 					StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-22T00:00:00.000Z"); return t}()),
		// 					Status: to.Ptr(armsecurity.AlertStatusActive),
		// 					SubTechniques: []*string{
		// 						to.Ptr("T1059.001"),
		// 						to.Ptr("T1059.006"),
		// 						to.Ptr("T1053.002")},
		// 						SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
		// 							AdditionalProperties: map[string]any{
		// 								"columns": []any{
		// 									"Date",
		// 									"Activity",
		// 									"User",
		// 									"TestedText",
		// 									"TestedValue",
		// 								},
		// 								"rows": []any{
		// 									[]any{
		// 										"2022-01-17T07:03:52.034Z",
		// 										"Log on",
		// 										"testUser",
		// 										"false",
		// 										false,
		// 									},
		// 									[]any{
		// 										"2022-01-17T07:03:52.034Z",
		// 										"Log on",
		// 										"testUser2",
		// 										"false",
		// 										false,
		// 									},
		// 									[]any{
		// 										"2022-01-17T07:03:52.034Z",
		// 										"Log on",
		// 										"testUser3",
		// 										"true",
		// 										true,
		// 									},
		// 								},
		// 								"title": "Investigate activity test",
		// 							},
		// 							Type: to.Ptr("tabularEvidences"),
		// 						},
		// 						SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 						Techniques: []*string{
		// 							to.Ptr("T1059"),
		// 							to.Ptr("T1053"),
		// 							to.Ptr("T1072")},
		// 							TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-23T13:47:58.000Z"); return t}()),
		// 							VendorName: to.Ptr("Microsoft"),
		// 							Version: to.Ptr("2022-01-01"),
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22"),
		// 						Type: to.Ptr("Microsoft.Security/Locations/alerts"),
		// 						ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/westeurope/alerts/2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22"),
		// 						Properties: &armsecurity.AlertProperties{
		// 							Description: to.Ptr("The process ‘c:\\users\\contosoUser\\scrsave.scr’ was observed executing from an uncommon location. Files with the .scr extensions are screen saver files and are normally reside and execute from the Windows system directory."),
		// 							AlertDisplayName: to.Ptr("Suspicious Screensaver process executed"),
		// 							AlertType: to.Ptr("VM_SuspiciousScreenSaver"),
		// 							AlertURI: to.Ptr("https://portal.azure.com/#blade/Microsoft_Azure_Security/AlertBlade/alertId/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/subscriptionId/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroup/myRg1/referencedFrom/alertDeepLink/location/westeurope"),
		// 							CompromisedEntity: to.Ptr("vm2"),
		// 							CorrelationKey: to.Ptr("4hno6LF0xzCl5tqrk4nrBW+MY1BX816W6q6+0srk4"),
		// 							EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:45.004Z"); return t}()),
		// 							Entities: []*armsecurity.AlertEntity{
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"OsVersion": nil,
		// 										"azureID": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/myRg2/providers/microsoft.compute/virtualmachines/vm2",
		// 										"dnsDomain": "",
		// 										"hostName": "vm2",
		// 										"netBiosName": "vm2",
		// 										"ntDomain": "",
		// 										"omsAgentID": "45b44640-3b94-4892-a28c-4a5cae27065a",
		// 										"operatingSystem": "Unknown",
		// 									},
		// 									Type: to.Ptr("host"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"name": "contosoUser",
		// 										"logonId": "0x61450d87",
		// 										"ntDomain": "vm2",
		// 										"sid": "S-1-5-21-2144575486-8928446540-5163864319-500",
		// 									},
		// 									Type: to.Ptr("account"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"name": "cmd.exe",
		// 										"directory": "c:\\windows\\system32",
		// 									},
		// 									Type: to.Ptr("file"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"processId": "0x3c44",
		// 									},
		// 									Type: to.Ptr("process"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"name": "scrsave.scr",
		// 										"directory": "c:\\users\\contosoUser",
		// 									},
		// 									Type: to.Ptr("file"),
		// 								},
		// 								{
		// 									AdditionalProperties: map[string]any{
		// 										"commandLine": "c:\\users\\contosoUser\\scrsave.scr",
		// 										"creationTimeUtc": "2018-05-07T13:51:45.0045913Z",
		// 										"processId": "0x4aec",
		// 									},
		// 									Type: to.Ptr("process"),
		// 							}},
		// 							ExtendedLinks: []map[string]*string{
		// 								map[string]*string{
		// 									"Category": to.Ptr("threat_reports"),
		// 									"Href": to.Ptr("https://contoso.com/reports/DisplayReport"),
		// 									"Label": to.Ptr("Report: RDP Brute Forcing"),
		// 									"Type": to.Ptr("webLink"),
		// 							}},
		// 							ExtendedProperties: map[string]*string{
		// 								"account logon id": to.Ptr("0x61450d87"),
		// 								"command line": to.Ptr("c:\\users\\contosoUser\\scrsave.scr"),
		// 								"domainName": to.Ptr("vm2"),
		// 								"parent process": to.Ptr("cmd.exe"),
		// 								"parent process id": to.Ptr("0x3c44"),
		// 								"process id": to.Ptr("0x4aec"),
		// 								"processName": to.Ptr("c:\\users\\contosoUser\\scrsave.scr"),
		// 								"resourceType": to.Ptr("Virtual Machine"),
		// 								"user SID": to.Ptr("S-1-5-21-2144575486-8928446540-5163864319-500"),
		// 								"userName": to.Ptr("vm2\\contosoUser"),
		// 							},
		// 							Intent: to.Ptr(armsecurity.IntentExecution),
		// 							IsIncident: to.Ptr(true),
		// 							ProcessingEndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:48.981Z"); return t}()),
		// 							ProductComponentName: to.Ptr("testName2"),
		// 							ProductName: to.Ptr("Azure Security Center"),
		// 							RemediationSteps: []*string{
		// 								to.Ptr("1. Run Process Explorer and try to identify unknown running processes (see https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx)"),
		// 								to.Ptr("2. Make sure the machine is completely updated and has an updated anti-malware application installed"),
		// 								to.Ptr("3. Run a full anti-malware scan and verify that the threat was removed"),
		// 								to.Ptr("4. Install and run Microsoft’s Malicious Software Removal Tool (see https://www.microsoft.com/en-us/download/malicious-software-removal-tool-details.aspx)"),
		// 								to.Ptr("5. Run Microsoft’s Autoruns utility and try to identify unknown applications that are configured to run at login (see https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx)"),
		// 								to.Ptr("6. Escalate the alert to the information security team")},
		// 								ResourceIdentifiers: []armsecurity.ResourceIdentifierClassification{
		// 									&armsecurity.AzureResourceIdentifier{
		// 										Type: to.Ptr(armsecurity.ResourceIdentifierTypeAzureResource),
		// 										AzureResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 									},
		// 									&armsecurity.LogAnalyticsIdentifier{
		// 										Type: to.Ptr(armsecurity.ResourceIdentifierTypeLogAnalytics),
		// 										AgentID: to.Ptr("75724a01-f021-4aa8-9ec2-329792373e6e"),
		// 										WorkspaceID: to.Ptr("f419f624-acad-4d89-b86d-f62fa387f019"),
		// 										WorkspaceResourceGroup: to.Ptr("myRg1"),
		// 										WorkspaceSubscriptionID: to.Ptr("20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
		// 								}},
		// 								Severity: to.Ptr(armsecurity.AlertSeverityMedium),
		// 								StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:45.004Z"); return t}()),
		// 								Status: to.Ptr(armsecurity.AlertStatusActive),
		// 								SubTechniques: []*string{
		// 									to.Ptr("T1059.001"),
		// 									to.Ptr("T1059.006"),
		// 									to.Ptr("T1053.002")},
		// 									SupportingEvidence: &armsecurity.AlertPropertiesSupportingEvidence{
		// 										AdditionalProperties: map[string]any{
		// 											"supportingEvidenceList": []any{
		// 												map[string]any{
		// 													"type": "nestedList",
		// 													"evidenceElements":[]any{
		// 														map[string]any{
		// 															"type": "evidenceElement",
		// 															"innerElements": nil,
		// 															"text":map[string]any{
		// 																"arguments":map[string]any{
		// 																	"domainName":map[string]any{
		// 																		"type": "string",
		// 																		"value": "domainName",
		// 																	},
		// 																	"sensitiveEnumerationTypes":map[string]any{
		// 																		"type": "string[]",
		// 																		"value":[]any{
		// 																			"UseDesKey",
		// 																		},
		// 																	},
		// 																},
		// 																"fallback": "Actor enumerated UseDesKey on domain1.test.local",
		// 																"localizationKey": "AATP_ALERTS_LDAP_SENSITIVE_ATTRIBUTE_RECONNAISSANCE_SECURITY_ALERT_EVIDENCE_ENUMERATION_DETAIL_A7C00BD7",
		// 															},
		// 														},
		// 													},
		// 												},
		// 												map[string]any{
		// 													"type": "tabularEvidences",
		// 													"columns":[]any{
		// 														"Date",
		// 														"Activity",
		// 														"User",
		// 														"TestedText",
		// 														"TestedValue",
		// 													},
		// 													"rows":[]any{
		// 														[]any{
		// 															"2022-01-17T07:03:52.034Z",
		// 															"Log on",
		// 															"testUser",
		// 															"false",
		// 															false,
		// 														},
		// 														[]any{
		// 															"2022-01-17T07:03:52.034Z",
		// 															"Log on",
		// 															"testUser2",
		// 															"false",
		// 															false,
		// 														},
		// 														[]any{
		// 															"2022-01-17T07:03:52.034Z",
		// 															"Log on",
		// 															"testUser3",
		// 															"true",
		// 															true,
		// 														},
		// 													},
		// 													"title": "Investigate activity test",
		// 												},
		// 											},
		// 										},
		// 										Type: to.Ptr("supportingEvidenceList"),
		// 									},
		// 									SystemAlertID: to.Ptr("2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a"),
		// 									Techniques: []*string{
		// 										to.Ptr("T1059"),
		// 										to.Ptr("T1053"),
		// 										to.Ptr("T1072")},
		// 										TimeGeneratedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T13:51:48.381Z"); return t}()),
		// 										VendorName: to.Ptr("Microsoft"),
		// 										Version: to.Ptr("2022-01-01"),
		// 									},
		// 							}},
		// 						}
	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsClient().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 {
	// Security alert
	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 {
	// Security alert
	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.NewListByResourceGroupPager method.

type AlertsClientListByResourceGroupResponse added in v0.3.0

type AlertsClientListByResourceGroupResponse struct {
	// List of security alerts
	AlertList
}

AlertsClientListByResourceGroupResponse contains the response from method AlertsClient.NewListByResourceGroupPager.

type AlertsClientListOptions added in v0.3.0

type AlertsClientListOptions struct {
}

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

type AlertsClientListResourceGroupLevelByRegionOptions added in v0.3.0

type AlertsClientListResourceGroupLevelByRegionOptions struct {
}

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

type AlertsClientListResourceGroupLevelByRegionResponse added in v0.3.0

type AlertsClientListResourceGroupLevelByRegionResponse struct {
	// List of security alerts
	AlertList
}

AlertsClientListResourceGroupLevelByRegionResponse contains the response from method AlertsClient.NewListResourceGroupLevelByRegionPager.

type AlertsClientListResponse added in v0.3.0

type AlertsClientListResponse struct {
	// List of security alerts
	AlertList
}

AlertsClientListResponse contains the response from method AlertsClient.NewListPager.

type AlertsClientListSubscriptionLevelByRegionOptions added in v0.3.0

type AlertsClientListSubscriptionLevelByRegionOptions struct {
}

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

type AlertsClientListSubscriptionLevelByRegionResponse added in v0.3.0

type AlertsClientListSubscriptionLevelByRegionResponse struct {
	// List of security alerts
	AlertList
}

AlertsClientListSubscriptionLevelByRegionResponse contains the response from method AlertsClient.NewListSubscriptionLevelByRegionPager.

type AlertsClientSimulateResponse added in v0.3.0

type AlertsClientSimulateResponse struct {
}

AlertsClientSimulateResponse contains the response from method AlertsClient.BeginSimulate.

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// REQUIRED; The reason for dismissing the alert
	Reason *string

	// REQUIRED; Possible states of the rule
	State *RuleState

	// Any comment regarding the rule
	Comment *string

	// Expiration date of the rule, if value is not provided or provided as null there will no expiration at all
	ExpirationDateUTC *time.Time

	// The suppression conditions
	SuppressionAlertsScope *SuppressionAlertsScope

	// READ-ONLY; The last time this rule was modified
	LastModifiedUTC *time.Time
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAlertsSuppressionRulesClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertsSuppressionRulesClient().Get(ctx, "dismissIpAnomalyAlerts", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AlertsSuppressionRule = armsecurity.AlertsSuppressionRule{
	// 	Name: to.Ptr("dismissIpAnomalyAlerts"),
	// 	Type: to.Ptr("Microsoft.Security/alertsSuppressionRules"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts"),
	// 	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.083Z"); return t}()),
	// 		LastModifiedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T19:50:47.083Z"); return t}()),
	// 		Reason: to.Ptr("FalsePositive"),
	// 		State: to.Ptr(armsecurity.RuleStateEnabled),
	// 		SuppressionAlertsScope: &armsecurity.SuppressionAlertsScope{
	// 			AllOf: []*armsecurity.ScopeElement{
	// 				{
	// 					AdditionalProperties: map[string]any{
	// 						"in": []any{
	// 							"104.215.95.187",
	// 							"52.164.206.56",
	// 						},
	// 					},
	// 					Field: to.Ptr("entities.ip.address"),
	// 				},
	// 				{
	// 					AdditionalProperties: map[string]any{
	// 						"contains": "POWERSHELL.EXE",
	// 					},
	// 					Field: to.Ptr("entities.process.commandline"),
	// 			}},
	// 		},
	// 	},
	// }
}
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.NewListPager method.
Example (GetSuppressionAlertRuleForSubscriptionFilteredByAlertType)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertsSuppressionRulesClient().NewListPager(&armsecurity.AlertsSuppressionRulesClientListOptions{AlertType: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AlertsSuppressionRulesList = armsecurity.AlertsSuppressionRulesList{
		// 	Value: []*armsecurity.AlertsSuppressionRule{
		// 		{
		// 			Name: to.Ptr("dismissIpAnomalyAlerts"),
		// 			Type: to.Ptr("Microsoft.Security/alertsSuppressionRules"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts"),
		// 			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.083Z"); return t}()),
		// 				LastModifiedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T19:50:47.083Z"); return t}()),
		// 				Reason: to.Ptr("FalsePositive"),
		// 				State: to.Ptr(armsecurity.RuleStateEnabled),
		// 				SuppressionAlertsScope: &armsecurity.SuppressionAlertsScope{
		// 					AllOf: []*armsecurity.ScopeElement{
		// 						{
		// 							AdditionalProperties: map[string]any{
		// 								"in": []any{
		// 									"104.215.95.187",
		// 									"52.164.206.56",
		// 								},
		// 							},
		// 							Field: to.Ptr("entities.ip.address"),
		// 						},
		// 						{
		// 							AdditionalProperties: map[string]any{
		// 								"contains": "POWERSHELL.EXE",
		// 							},
		// 							Field: to.Ptr("entities.process.commandline"),
		// 					}},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (GetSuppressionRulesForSubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAlertsSuppressionRulesClient().NewListPager(&armsecurity.AlertsSuppressionRulesClientListOptions{AlertType: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AlertsSuppressionRulesList = armsecurity.AlertsSuppressionRulesList{
		// 	Value: []*armsecurity.AlertsSuppressionRule{
		// 		{
		// 			Name: to.Ptr("dismissIpAnomalyAlerts"),
		// 			Type: to.Ptr("Microsoft.Security/alertsSuppressionRules"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts"),
		// 			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.083Z"); return t}()),
		// 				LastModifiedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T19:50:47.083Z"); return t}()),
		// 				Reason: to.Ptr("FalsePositive"),
		// 				State: to.Ptr(armsecurity.RuleStateEnabled),
		// 				SuppressionAlertsScope: &armsecurity.SuppressionAlertsScope{
		// 					AllOf: []*armsecurity.ScopeElement{
		// 						{
		// 							AdditionalProperties: map[string]any{
		// 								"in": []any{
		// 									"104.215.95.187",
		// 									"52.164.206.56",
		// 								},
		// 							},
		// 							Field: to.Ptr("entities.ip.address"),
		// 						},
		// 						{
		// 							AdditionalProperties: map[string]any{
		// 								"contains": "POWERSHELL.EXE",
		// 							},
		// 							Field: to.Ptr("entities.process.commandline"),
		// 					}},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("dismissDataExfiltrationAnomalyAlertsOnTestVMs"),
		// 			Type: to.Ptr("Microsoft.Security/alertsSuppressionRules"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissDataExfiltrationAnomalyAlertsOnTestVMs"),
		// 			Properties: &armsecurity.AlertsSuppressionRuleProperties{
		// 				AlertType: to.Ptr("DataExfiltrationAnomaly"),
		// 				ExpirationDateUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-01T19:50:47.083Z"); return t}()),
		// 				LastModifiedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T19:50:47.083Z"); return t}()),
		// 				Reason: to.Ptr("FalsePositive"),
		// 				State: to.Ptr(armsecurity.RuleStateEnabled),
		// 			},
		// 	}},
		// }
	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAlertsSuppressionRulesClient().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.083Z"); return t }()),
			Reason:            to.Ptr("FalsePositive"),
			State:             to.Ptr(armsecurity.RuleStateEnabled),
			SuppressionAlertsScope: &armsecurity.SuppressionAlertsScope{
				AllOf: []*armsecurity.ScopeElement{
					{
						AdditionalProperties: map[string]any{
							"in": []any{
								"104.215.95.187",
								"52.164.206.56",
							},
						},
						Field: to.Ptr("entities.ip.address"),
					},
					{
						AdditionalProperties: map[string]any{
							"contains": "POWERSHELL.EXE",
						},
						Field: to.Ptr("entities.process.commandline"),
					}},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AlertsSuppressionRule = armsecurity.AlertsSuppressionRule{
	// 	Name: to.Ptr("dismissIpAnomalyAlerts"),
	// 	Type: to.Ptr("Microsoft.Security/alertsSuppressionRules"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts"),
	// 	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.083Z"); return t}()),
	// 		LastModifiedUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-31T19:50:47.083Z"); return t}()),
	// 		Reason: to.Ptr("FalsePositive"),
	// 		State: to.Ptr(armsecurity.RuleStateEnabled),
	// 		SuppressionAlertsScope: &armsecurity.SuppressionAlertsScope{
	// 			AllOf: []*armsecurity.ScopeElement{
	// 				{
	// 					AdditionalProperties: map[string]any{
	// 						"in": []any{
	// 							"104.215.95.187",
	// 							"52.164.206.56",
	// 						},
	// 					},
	// 					Field: to.Ptr("entities.ip.address"),
	// 				},
	// 				{
	// 					AdditionalProperties: map[string]any{
	// 						"contains": "POWERSHELL.EXE",
	// 					},
	// 					Field: to.Ptr("entities.process.commandline"),
	// 			}},
	// 		},
	// 	},
	// }
}
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 {
	// Describes the suppression rule
	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.NewListPager method.

type AlertsSuppressionRulesClientListResponse added in v0.3.0

type AlertsSuppressionRulesClientListResponse struct {
	// Suppression rules list for subscription.
	AlertsSuppressionRulesList
}

AlertsSuppressionRulesClientListResponse contains the response from method AlertsSuppressionRulesClient.NewListPager.

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 {
	// Describes the suppression rule
	AlertsSuppressionRule
}

AlertsSuppressionRulesClientUpdateResponse contains the response from method AlertsSuppressionRulesClient.Update.

type AlertsSuppressionRulesList

type AlertsSuppressionRulesList struct {
	// REQUIRED
	Value []*AlertsSuppressionRule

	// READ-ONLY; URI to fetch the next page.
	NextLink *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAllowedConnectionsClient().Get(ctx, "myResourceGroup", "centralus", armsecurity.ConnectionTypeInternal, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AllowedConnectionsResource = armsecurity.AllowedConnectionsResource{
	// 	Location: to.Ptr("centralus"),
	// 	Name: to.Ptr("Internal"),
	// 	Type: to.Ptr("Microsoft.Security/locations/allowedConnections"),
	// 	ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Security/locations/centralus/allowedConnections/Internal"),
	// 	Properties: &armsecurity.AllowedConnectionsResourceProperties{
	// 		CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-06T14:55:32.351Z"); return t}()),
	// 		ConnectableResources: []*armsecurity.ConnectableResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
	// 				InboundConnectedResources: []*armsecurity.ConnectedResource{
	// 					{
	// 						ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
	// 						TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 						UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 				}},
	// 				OutboundConnectedResources: []*armsecurity.ConnectedResource{
	// 					{
	// 						ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
	// 						TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 						UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 				}},
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
	// 				InboundConnectedResources: []*armsecurity.ConnectedResource{
	// 					{
	// 						ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
	// 						TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 						UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 				}},
	// 				OutboundConnectedResources: []*armsecurity.ConnectedResource{
	// 					{
	// 						ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
	// 						TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 						UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
	// 				}},
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine3"),
	// 				InboundConnectedResources: []*armsecurity.ConnectedResource{
	// 				},
	// 				OutboundConnectedResources: []*armsecurity.ConnectedResource{
	// 				},
	// 		}},
	// 	},
	// }
}
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.NewListByHomeRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAllowedConnectionsClient().NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AllowedConnectionsList = armsecurity.AllowedConnectionsList{
		// 	Value: []*armsecurity.AllowedConnectionsResource{
		// 		{
		// 			Location: to.Ptr("centralus"),
		// 			Name: to.Ptr("Internal"),
		// 			Type: to.Ptr("Microsoft.Security/locations/allowedConnections"),
		// 			ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Security/locations/centralus/allowedConnections/Internal"),
		// 			Properties: &armsecurity.AllowedConnectionsResourceProperties{
		// 				CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-06T14:55:32.351Z"); return t}()),
		// 				ConnectableResources: []*armsecurity.ConnectableResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
		// 						InboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 						OutboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
		// 						InboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 						OutboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine3"),
		// 						InboundConnectedResources: []*armsecurity.ConnectedResource{
		// 						},
		// 						OutboundConnectedResources: []*armsecurity.ConnectedResource{
		// 						},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAllowedConnectionsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AllowedConnectionsList = armsecurity.AllowedConnectionsList{
		// 	Value: []*armsecurity.AllowedConnectionsResource{
		// 		{
		// 			Location: to.Ptr("centralus"),
		// 			Name: to.Ptr("Internal"),
		// 			Type: to.Ptr("Microsoft.Security/locations/allowedConnections"),
		// 			ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Security/locations/centralus/allowedConnections/Internal"),
		// 			Properties: &armsecurity.AllowedConnectionsResourceProperties{
		// 				CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-06T14:55:32.351Z"); return t}()),
		// 				ConnectableResources: []*armsecurity.ConnectableResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
		// 						InboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 						OutboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine2"),
		// 						InboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 						OutboundConnectedResources: []*armsecurity.ConnectedResource{
		// 							{
		// 								ConnectedResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine1"),
		// 								TCPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 								UDPPorts: to.Ptr("[0-21,23-3388,3390-5984,5987-65535]"),
		// 						}},
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtaulMachine3"),
		// 						InboundConnectedResources: []*armsecurity.ConnectedResource{
		// 						},
		// 						OutboundConnectedResources: []*armsecurity.ConnectedResource{
		// 						},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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 {
	// The resource whose properties describes the allowed traffic between Azure resources
	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.NewListByHomeRegionPager method.

type AllowedConnectionsClientListByHomeRegionResponse added in v0.3.0

type AllowedConnectionsClientListByHomeRegionResponse struct {
	// List of all possible traffic between Azure resources
	AllowedConnectionsList
}

AllowedConnectionsClientListByHomeRegionResponse contains the response from method AllowedConnectionsClient.NewListByHomeRegionPager.

type AllowedConnectionsClientListOptions added in v0.3.0

type AllowedConnectionsClientListOptions struct {
}

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

type AllowedConnectionsClientListResponse added in v0.3.0

type AllowedConnectionsClientListResponse struct {
	// List of all possible traffic between Azure resources
	AllowedConnectionsList
}

AllowedConnectionsClientListResponse contains the response from method AllowedConnectionsClient.NewListPager.

type AllowedConnectionsList

type AllowedConnectionsList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string

	// READ-ONLY
	Value []*AllowedConnectionsResource
}

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

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Describes the allowed traffic between Azure resources
	Properties *AllowedConnectionsResourceProperties

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; List of connectable resources
	ConnectableResources []*ConnectableResource
}

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

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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 AnnotateDefaultBranchState added in v0.13.0

type AnnotateDefaultBranchState string

AnnotateDefaultBranchState - Configuration of PR Annotations on default branch. Enabled - PR Annotations are enabled on the resource's default branch. Disabled - PR Annotations are disabled on the resource's default branch.

const (
	AnnotateDefaultBranchStateDisabled AnnotateDefaultBranchState = "Disabled"
	AnnotateDefaultBranchStateEnabled  AnnotateDefaultBranchState = "Enabled"
)

func PossibleAnnotateDefaultBranchStateValues added in v0.13.0

func PossibleAnnotateDefaultBranchStateValues() []AnnotateDefaultBranchState

PossibleAnnotateDefaultBranchStateValues returns the possible values for the AnnotateDefaultBranchState const type.

type Application added in v0.8.0

type Application struct {
	// Properties of a security application
	Properties *ApplicationProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewApplicationClient().CreateOrUpdate(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.Application{
		Properties: &armsecurity.ApplicationProperties{
			Description: to.Ptr("An application on critical recommendations"),
			ConditionSets: []any{
				map[string]any{
					"conditions": []any{
						map[string]any{
							"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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Application = armsecurity.Application{
	// 	Name: to.Ptr("1f3afdf9-d0c9-4c3d-847f-89da613e70a8"),
	// 	Type: to.Ptr("Microsoft.Security/applications"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/applications/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.ApplicationProperties{
	// 		Description: to.Ptr("An application on critical recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "contains",
	// 						"property": "$.Id",
	// 						"value": "-dev-",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("Admin's application"),
	// 		SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewApplicationClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewApplicationClient().Get(ctx, "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Application = armsecurity.Application{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/applications"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/applications/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.ApplicationProperties{
	// 		Description: to.Ptr("An application on critical recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "contains",
	// 						"property": "$.Id",
	// 						"value": "-bil-",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("Admin's application"),
	// 		SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
	// 	},
	// }
}
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 {
	// Security Application over a given scope
	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 {
	// Security Application over a given scope
	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

	// The application Condition's Property, e.g. ID, see examples
	Property *string

	// The application Condition's Value like IDs that contain some string, see examples
	Value *string
}

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 []any

	// REQUIRED; The application source, what it affects, e.g. Assessments
	SourceResourceType *ApplicationSourceResourceType

	// description of the application
	Description *string

	// display name of the application
	DisplayName *string
}

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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewApplicationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ApplicationsList = armsecurity.ApplicationsList{
		// 	Value: []*armsecurity.Application{
		// 		{
		// 			Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Type: to.Ptr("Microsoft.Security/applications"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/applications/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Properties: &armsecurity.ApplicationProperties{
		// 				Description: to.Ptr("An application on critical recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "contains",
		// 								"property": "$.Id",
		// 								"value": "-bil-",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Admin's application"),
		// 				SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Type: to.Ptr("Microsoft.Security/applications"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/applications/4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Properties: &armsecurity.ApplicationProperties{
		// 				Description: to.Ptr("An application on critical recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "contains",
		// 								"property": "$.Id",
		// 								"value": "-prod-",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Admin's application"),
		// 				SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ApplicationsClientListOptions added in v0.8.0

type ApplicationsClientListOptions struct {
}

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

type ApplicationsClientListResponse added in v0.8.0

type ApplicationsClientListResponse struct {
	// Page of a security applications list
	ApplicationsList
}

ApplicationsClientListResponse contains the response from method ApplicationsClient.NewListPager.

type ApplicationsList added in v0.8.0

type ApplicationsList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string

	// READ-ONLY; Collection of applications in this page
	Value []*Application
}

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 ArcAutoProvisioning added in v0.14.0

type ArcAutoProvisioning struct {
	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

ArcAutoProvisioning - The ARC autoprovisioning configuration

func (ArcAutoProvisioning) MarshalJSON added in v0.14.0

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

MarshalJSON implements the json.Marshaller interface for type ArcAutoProvisioning.

func (*ArcAutoProvisioning) UnmarshalJSON added in v0.14.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ArcAutoProvisioning.

type ArcAutoProvisioningAws added in v0.14.0

type ArcAutoProvisioningAws struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

ArcAutoProvisioningAws - The ARC autoprovisioning configuration for an AWS environment

func (ArcAutoProvisioningAws) MarshalJSON added in v0.14.0

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

MarshalJSON implements the json.Marshaller interface for type ArcAutoProvisioningAws.

func (*ArcAutoProvisioningAws) UnmarshalJSON added in v0.14.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ArcAutoProvisioningAws.

type ArcAutoProvisioningConfiguration added in v0.14.0

type ArcAutoProvisioningConfiguration struct {
	// Optional Arc private link scope resource id to link the Arc agent
	PrivateLinkScope *string

	// Optional HTTP proxy endpoint to use for the Arc agent
	Proxy *string
}

ArcAutoProvisioningConfiguration - Configuration for servers Arc auto provisioning for a given environment

func (ArcAutoProvisioningConfiguration) MarshalJSON added in v0.14.0

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

MarshalJSON implements the json.Marshaller interface for type ArcAutoProvisioningConfiguration.

func (*ArcAutoProvisioningConfiguration) UnmarshalJSON added in v0.14.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ArcAutoProvisioningConfiguration.

type ArcAutoProvisioningGcp added in v0.14.0

type ArcAutoProvisioningGcp struct {
	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

ArcAutoProvisioningGcp - The ARC autoprovisioning configuration for an GCP environment

func (ArcAutoProvisioningGcp) MarshalJSON added in v0.14.0

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

MarshalJSON implements the json.Marshaller interface for type ArcAutoProvisioningGcp.

func (*ArcAutoProvisioningGcp) UnmarshalJSON added in v0.14.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ArcAutoProvisioningGcp.

type AscLocation

type AscLocation struct {
	// An empty set of properties
	Properties any

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY
	Value []*AscLocation
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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
}

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

	// READ-ONLY; Collection of security assessments in this page
	Value []*AssessmentResponse
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// REQUIRED; Secret to authenticate the partner and verify it created the assessment - write only
	Secret *string

	// Name of the product of the partner that created the assessment
	ProductName *string
}

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

	// REQUIRED; User friendly display name of the assessment
	DisplayName *string

	// REQUIRED; The severity level of the assessment
	Severity   *Severity
	Categories []*Categories

	// Human readable description of the assessment
	Description *string

	// The implementation effort required to remediate this assessment
	ImplementationEffort *ImplementationEffort

	// Describes the partner that created the assessment
	PartnerData *AssessmentMetadataPartnerData

	// True if this assessment is in preview release status
	Preview *bool

	// Human readable description of what you should do to mitigate this security issue
	RemediationDescription *string
	Threats                []*Threats

	// The user impact of the assessment
	UserImpact *UserImpact

	// READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on
	PolicyDefinitionID *string
}

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

	// REQUIRED; User friendly display name of the assessment
	DisplayName *string

	// REQUIRED; The severity level of the assessment
	Severity   *Severity
	Categories []*Categories

	// Human readable description of the assessment
	Description *string

	// The implementation effort required to remediate this assessment
	ImplementationEffort *ImplementationEffort

	// Describes the partner that created the assessment
	PartnerData            *AssessmentMetadataPartnerData
	PlannedDeprecationDate *string

	// True if this assessment is in preview release status
	Preview      *bool
	PublishDates *AssessmentMetadataPropertiesResponsePublishDates

	// Human readable description of what you should do to mitigate this security issue
	RemediationDescription *string
	Tactics                []*Tactics
	Techniques             []*Techniques
	Threats                []*Threats

	// The user impact of the assessment
	UserImpact *UserImpact

	// READ-ONLY; Azure resource ID of the policy definition that turns this assessment calculation on
	PolicyDefinitionID *string
}

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
	GA     *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY
	Value []*AssessmentMetadataResponse
}

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

	// REQUIRED; secret to authenticate the partner - write only
	Secret *string
}

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

	// REQUIRED; The result of the assessment
	Status *AssessmentStatus

	// Additional data regarding the assessment
	AdditionalData map[string]*string

	// Describes properties of an assessment metadata.
	Metadata *AssessmentMetadataProperties

	// Data regarding 3rd party partner integration
	PartnersData *AssessmentPartnerData

	// READ-ONLY; User friendly display name of the assessment
	DisplayName *string

	// READ-ONLY; Links relevant to the assessment
	Links *AssessmentLinks
}

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

	// Additional data regarding the assessment
	AdditionalData map[string]*string

	// Describes properties of an assessment metadata.
	Metadata *AssessmentMetadataProperties

	// Data regarding 3rd party partner integration
	PartnersData *AssessmentPartnerData

	// READ-ONLY; User friendly display name of the assessment
	DisplayName *string

	// READ-ONLY; Links relevant to the assessment
	Links *AssessmentLinks
}

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

	// REQUIRED; The result of the assessment
	Status *AssessmentStatusResponse

	// Additional data regarding the assessment
	AdditionalData map[string]*string

	// Describes properties of an assessment metadata.
	Metadata *AssessmentMetadataProperties

	// Data regarding 3rd party partner integration
	PartnersData *AssessmentPartnerData

	// READ-ONLY; User friendly display name of the assessment
	DisplayName *string

	// READ-ONLY; Links relevant to the assessment
	Links *AssessmentLinks
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// Programmatic code for the cause of the assessment status
	Cause *string

	// Human readable description of the assessment status
	Description *string
}

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

	// Programmatic code for the cause of the assessment status
	Cause *string

	// Human readable description of the assessment status
	Description *string

	// READ-ONLY; The time that the assessment was created and first evaluated. Returned as UTC time in ISO 8601 format
	FirstEvaluationDate *time.Time

	// READ-ONLY; The time that the status of the assessment last changed. Returned as UTC time in ISO 8601 format
	StatusChangeDate *time.Time
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssessmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssessmentResponse = armsecurity.AssessmentResponse{
	// 	Name: to.Ptr("8bb8be0a-6010-4789-812f-e4d661c4ed0e"),
	// 	Type: to.Ptr("Microsoft.Security/assessments"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/8bb8be0a-6010-4789-812f-e4d661c4ed0e"),
	// 	Properties: &armsecurity.AssessmentPropertiesResponse{
	// 		DisplayName: to.Ptr("Install internal agent on VM"),
	// 		ResourceDetails: &armsecurity.AzureResourceDetails{
	// 			Source: to.Ptr(armsecurity.SourceAzure),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/8bb8be0a-6010-4789-812f-e4d661c4ed0e"),
	// 		},
	// 		Status: &armsecurity.AssessmentStatusResponse{
	// 			Code: to.Ptr(armsecurity.AssessmentStatusCodeHealthy),
	// 		},
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAssessmentsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssessmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssessmentResponse = armsecurity.AssessmentResponse{
	// 	Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	Type: to.Ptr("Microsoft.Security/assessments"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	Properties: &armsecurity.AssessmentPropertiesResponse{
	// 		AdditionalData: map[string]*string{
	// 			"linkedWorkspaceId": to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myLaWorkspace"),
	// 		},
	// 		DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
	// 		ResourceDetails: &armsecurity.AzureResourceDetails{
	// 			Source: to.Ptr(armsecurity.SourceAzure),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"),
	// 		},
	// 		Status: &armsecurity.AssessmentStatusResponse{
	// 			Description: to.Ptr("The effective policy for the assessment was evaluated to off - use Microsoft.Authorization/policyAssignments to turn this assessment on"),
	// 			Cause: to.Ptr("OffByPolicy"),
	// 			Code: to.Ptr(armsecurity.AssessmentStatusCodeNotApplicable),
	// 			FirstEvaluationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
	// 			StatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

Example (GetSecurityRecommendationTaskFromSecurityDataLocationWithExpandParameter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssessmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssessmentResponse = armsecurity.AssessmentResponse{
	// 	Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	Type: to.Ptr("Microsoft.Security/assessments"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	Properties: &armsecurity.AssessmentPropertiesResponse{
	// 		AdditionalData: map[string]*string{
	// 			"linkedWorkspaceId": to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myLaWorkspace"),
	// 		},
	// 		DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
	// 		Links: &armsecurity.AssessmentLinks{
	// 			AzurePortalURI: to.Ptr("https://www.portal.azure.com/?fea#blade/Microsoft_Azure_Security/RecommendationsBlade/assessmentKey/21300918-b2e3-0346-785f-c77ff57d243b"),
	// 		},
	// 		ResourceDetails: &armsecurity.AzureResourceDetails{
	// 			Source: to.Ptr(armsecurity.SourceAzure),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"),
	// 		},
	// 		Status: &armsecurity.AssessmentStatusResponse{
	// 			Description: to.Ptr("The effective policy for the assessment was evaluated to off - use Microsoft.Authorization/policyAssignments to turn this assessment on"),
	// 			Cause: to.Ptr("OffByPolicy"),
	// 			Code: to.Ptr(armsecurity.AssessmentStatusCodeNotApplicable),
	// 			FirstEvaluationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
	// 			StatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
	// 		},
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssessmentsClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssessmentList = armsecurity.AssessmentList{
		// 	Value: []*armsecurity.AssessmentResponse{
		// 		{
		// 			Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			Type: to.Ptr("Microsoft.Security/assessments"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			Properties: &armsecurity.AssessmentPropertiesResponse{
		// 				DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
		// 				ResourceDetails: &armsecurity.AzureResourceDetails{
		// 					Source: to.Ptr(armsecurity.SourceAzure),
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1"),
		// 				},
		// 				Status: &armsecurity.AssessmentStatusResponse{
		// 					Code: to.Ptr(armsecurity.AssessmentStatusCodeHealthy),
		// 					FirstEvaluationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
		// 					StatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			Type: to.Ptr("Microsoft.Security/assessments"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			Properties: &armsecurity.AssessmentPropertiesResponse{
		// 				AdditionalData: map[string]*string{
		// 					"linkedWorkspaceId": to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myLaWorkspace"),
		// 				},
		// 				DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
		// 				ResourceDetails: &armsecurity.AzureResourceDetails{
		// 					Source: to.Ptr(armsecurity.SourceAzure),
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"),
		// 				},
		// 				Status: &armsecurity.AssessmentStatusResponse{
		// 					Description: to.Ptr("The effective policy for the assessment was evaluated to off - use Microsoft.Authorization/policyAssignments to turn this assessment on"),
		// 					Cause: to.Ptr("OffByPolicy"),
		// 					Code: to.Ptr(armsecurity.AssessmentStatusCodeNotApplicable),
		// 					FirstEvaluationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
		// 					StatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-12T09:07:18.675Z"); return t}()),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Security assessment on a resource - response format
	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 {
	// Security assessment on a resource - response format
	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.NewListPager method.

type AssessmentsClientListResponse added in v0.3.0

type AssessmentsClientListResponse struct {
	// Page of a security assessments list
	AssessmentList
}

AssessmentsClientListResponse contains the response from method AssessmentsClient.NewListPager.

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssessmentsMetadataClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssessmentMetadataResponse = armsecurity.AssessmentMetadataResponse{
	// 	Name: to.Ptr("ca039e75-a276-4175-aebc-bcd41e4b14b7"),
	// 	Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
	// 	ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ca039e75-a276-4175-aebc-bcd41e4b14b7"),
	// 	Properties: &armsecurity.AssessmentMetadataPropertiesResponse{
	// 		Description: to.Ptr("Assessment that my organization created to view our security assessment in Azure Security Center"),
	// 		AssessmentType: to.Ptr(armsecurity.AssessmentTypeCustomerManaged),
	// 		Categories: []*armsecurity.Categories{
	// 			to.Ptr(armsecurity.CategoriesCompute)},
	// 			DisplayName: to.Ptr("My organization security assessment"),
	// 			ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
	// 			RemediationDescription: to.Ptr("Fix it with these remediation instructions"),
	// 			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),
	// 			},
	// 		}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAssessmentsMetadataClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssessmentsMetadataClient().Get(ctx, "21300918-b2e3-0346-785f-c77ff57d243b", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssessmentMetadataResponse = armsecurity.AssessmentMetadataResponse{
	// 	Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
	// 	ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	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.AssessmentTypeBuiltIn),
	// 		Categories: []*armsecurity.Categories{
	// 			to.Ptr(armsecurity.CategoriesCompute)},
	// 			DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
	// 			ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/26a828e1-e88f-464e-bbb3-c134a282b9de"),
	// 			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),
	// 				PlannedDeprecationDate: to.Ptr("03/2022"),
	// 				PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
	// 					GA: to.Ptr("06/01/2021"),
	// 					Public: to.Ptr("06/01/2021"),
	// 				},
	// 				Tactics: []*armsecurity.Tactics{
	// 					to.Ptr(armsecurity.TacticsCredentialAccess),
	// 					to.Ptr(armsecurity.TacticsPersistence),
	// 					to.Ptr(armsecurity.TacticsExecution),
	// 					to.Ptr(armsecurity.TacticsDefenseEvasion),
	// 					to.Ptr(armsecurity.TacticsCollection),
	// 					to.Ptr(armsecurity.TacticsDiscovery),
	// 					to.Ptr(armsecurity.TacticsPrivilegeEscalation)},
	// 					Techniques: []*armsecurity.Techniques{
	// 						to.Ptr(armsecurity.TechniquesObfuscatedFilesOrInformation),
	// 						to.Ptr(armsecurity.TechniquesIngressToolTransfer),
	// 						to.Ptr(armsecurity.TechniquesPhishing),
	// 						to.Ptr(armsecurity.TechniquesUserExecution)},
	// 					},
	// 				}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssessmentsMetadataClient().GetInSubscription(ctx, "21300918-b2e3-0346-785f-c77ff57d243b", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssessmentMetadataResponse = armsecurity.AssessmentMetadataResponse{
	// 	Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
	// 	ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/21300918-b2e3-0346-785f-c77ff57d243b"),
	// 	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.AssessmentTypeBuiltIn),
	// 		Categories: []*armsecurity.Categories{
	// 			to.Ptr(armsecurity.CategoriesCompute)},
	// 			DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
	// 			ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
	// 			PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/26a828e1-e88f-464e-bbb3-c134a282b9de"),
	// 			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),
	// 				PlannedDeprecationDate: to.Ptr("03/2022"),
	// 				PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
	// 					GA: to.Ptr("06/01/2021"),
	// 					Public: to.Ptr("06/01/2021"),
	// 				},
	// 				Tactics: []*armsecurity.Tactics{
	// 					to.Ptr(armsecurity.TacticsCredentialAccess),
	// 					to.Ptr(armsecurity.TacticsPersistence),
	// 					to.Ptr(armsecurity.TacticsExecution),
	// 					to.Ptr(armsecurity.TacticsDefenseEvasion),
	// 					to.Ptr(armsecurity.TacticsCollection),
	// 					to.Ptr(armsecurity.TacticsDiscovery),
	// 					to.Ptr(armsecurity.TacticsPrivilegeEscalation)},
	// 					Techniques: []*armsecurity.Techniques{
	// 						to.Ptr(armsecurity.TechniquesObfuscatedFilesOrInformation),
	// 						to.Ptr(armsecurity.TechniquesIngressToolTransfer),
	// 						to.Ptr(armsecurity.TechniquesPhishing),
	// 						to.Ptr(armsecurity.TechniquesUserExecution)},
	// 					},
	// 				}
}
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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssessmentsMetadataClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssessmentMetadataResponseList = armsecurity.AssessmentMetadataResponseList{
		// 	Value: []*armsecurity.AssessmentMetadataResponse{
		// 		{
		// 			Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			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.AssessmentTypeBuiltIn),
		// 				Categories: []*armsecurity.Categories{
		// 					to.Ptr(armsecurity.CategoriesCompute)},
		// 					DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
		// 					ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
		// 					PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/26a828e1-e88f-464e-bbb3-c134a282b9de"),
		// 					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),
		// 						PlannedDeprecationDate: to.Ptr("03/2022"),
		// 						PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
		// 							GA: to.Ptr("06/01/2021"),
		// 							Public: to.Ptr("06/01/2021"),
		// 						},
		// 						Tactics: []*armsecurity.Tactics{
		// 							to.Ptr(armsecurity.TacticsCredentialAccess),
		// 							to.Ptr(armsecurity.TacticsPersistence),
		// 							to.Ptr(armsecurity.TacticsExecution),
		// 							to.Ptr(armsecurity.TacticsDefenseEvasion),
		// 							to.Ptr(armsecurity.TacticsCollection),
		// 							to.Ptr(armsecurity.TacticsDiscovery),
		// 							to.Ptr(armsecurity.TacticsPrivilegeEscalation)},
		// 							Techniques: []*armsecurity.Techniques{
		// 								to.Ptr(armsecurity.TechniquesObfuscatedFilesOrInformation),
		// 								to.Ptr(armsecurity.TechniquesIngressToolTransfer),
		// 								to.Ptr(armsecurity.TechniquesPhishing),
		// 								to.Ptr(armsecurity.TechniquesUserExecution)},
		// 							},
		// 						},
		// 						{
		// 							Name: to.Ptr("bc303248-3d14-44c2-96a0-55f5c326b5fe"),
		// 							Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
		// 							ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bc303248-3d14-44c2-96a0-55f5c326b5fe"),
		// 							Properties: &armsecurity.AssessmentMetadataPropertiesResponse{
		// 								Description: to.Ptr("Open remote management ports expose your VM to a high level of risk from internet-based attacks that attempt to brute force credentials to gain admin access to the machine."),
		// 								AssessmentType: to.Ptr(armsecurity.AssessmentTypeCustomPolicy),
		// 								Categories: []*armsecurity.Categories{
		// 									to.Ptr(armsecurity.CategoriesNetworking)},
		// 									DisplayName: to.Ptr("Close management ports on your virtual machines"),
		// 									ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
		// 									PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/22730e10-96f6-4aac-ad84-9383d35b5917"),
		// 									Preview: to.Ptr(true),
		// 									RemediationDescription: to.Ptr("We recommend that you edit the inbound rules of the below virtual machines to restrict access to specific source ranges.<br>To restrict the access to your virtual machines: 1. Click on a VM from the list below 2. At the 'Networking' blade, click on each of the rules that allow management ports (e.g. RDP-3389, WINRM-5985, SSH-22) 3. Change the 'Action' property to 'Deny' 4. Click 'Save'"),
		// 									Severity: to.Ptr(armsecurity.SeverityMedium),
		// 									Threats: []*armsecurity.Threats{
		// 										to.Ptr(armsecurity.ThreatsDataExfiltration),
		// 										to.Ptr(armsecurity.ThreatsDataSpillage),
		// 										to.Ptr(armsecurity.ThreatsMaliciousInsider)},
		// 										UserImpact: to.Ptr(armsecurity.UserImpactHigh),
		// 										PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
		// 											GA: to.Ptr("06/01/2021"),
		// 											Public: to.Ptr("06/01/2021"),
		// 										},
		// 									},
		// 							}},
		// 						}
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssessmentsMetadataClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssessmentMetadataResponseList = armsecurity.AssessmentMetadataResponseList{
		// 	Value: []*armsecurity.AssessmentMetadataResponse{
		// 		{
		// 			Name: to.Ptr("21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/21300918-b2e3-0346-785f-c77ff57d243b"),
		// 			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.AssessmentTypeBuiltIn),
		// 				Categories: []*armsecurity.Categories{
		// 					to.Ptr(armsecurity.CategoriesCompute)},
		// 					DisplayName: to.Ptr("Install endpoint protection solution on virtual machine scale sets"),
		// 					ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
		// 					PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/26a828e1-e88f-464e-bbb3-c134a282b9de"),
		// 					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),
		// 						PlannedDeprecationDate: to.Ptr("03/2022"),
		// 						PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
		// 							GA: to.Ptr("06/01/2021"),
		// 							Public: to.Ptr("06/01/2021"),
		// 						},
		// 						Tactics: []*armsecurity.Tactics{
		// 							to.Ptr(armsecurity.TacticsCredentialAccess),
		// 							to.Ptr(armsecurity.TacticsPersistence),
		// 							to.Ptr(armsecurity.TacticsExecution),
		// 							to.Ptr(armsecurity.TacticsDefenseEvasion),
		// 							to.Ptr(armsecurity.TacticsCollection),
		// 							to.Ptr(armsecurity.TacticsDiscovery),
		// 							to.Ptr(armsecurity.TacticsPrivilegeEscalation)},
		// 							Techniques: []*armsecurity.Techniques{
		// 								to.Ptr(armsecurity.TechniquesObfuscatedFilesOrInformation),
		// 								to.Ptr(armsecurity.TechniquesIngressToolTransfer),
		// 								to.Ptr(armsecurity.TechniquesPhishing),
		// 								to.Ptr(armsecurity.TechniquesUserExecution)},
		// 							},
		// 						},
		// 						{
		// 							Name: to.Ptr("bc303248-3d14-44c2-96a0-55f5c326b5fe"),
		// 							Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
		// 							ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bc303248-3d14-44c2-96a0-55f5c326b5fe"),
		// 							Properties: &armsecurity.AssessmentMetadataPropertiesResponse{
		// 								Description: to.Ptr("Open remote management ports expose your VM to a high level of risk from internet-based attacks that attempt to brute force credentials to gain admin access to the machine."),
		// 								AssessmentType: to.Ptr(armsecurity.AssessmentTypeCustomPolicy),
		// 								Categories: []*armsecurity.Categories{
		// 									to.Ptr(armsecurity.CategoriesNetworking)},
		// 									DisplayName: to.Ptr("Close management ports on your virtual machines"),
		// 									ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
		// 									PolicyDefinitionID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/22730e10-96f6-4aac-ad84-9383d35b5917"),
		// 									Preview: to.Ptr(true),
		// 									RemediationDescription: to.Ptr("We recommend that you edit the inbound rules of the below virtual machines to restrict access to specific source ranges.<br>To restrict the access to your virtual machines: 1. Click on a VM from the list below 2. At the 'Networking' blade, click on each of the rules that allow management ports (e.g. RDP-3389, WINRM-5985, SSH-22) 3. Change the 'Action' property to 'Deny' 4. Click 'Save'"),
		// 									Severity: to.Ptr(armsecurity.SeverityMedium),
		// 									Threats: []*armsecurity.Threats{
		// 										to.Ptr(armsecurity.ThreatsDataExfiltration),
		// 										to.Ptr(armsecurity.ThreatsDataSpillage),
		// 										to.Ptr(armsecurity.ThreatsMaliciousInsider)},
		// 										UserImpact: to.Ptr(armsecurity.UserImpactHigh),
		// 										PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
		// 											GA: to.Ptr("06/01/2021"),
		// 											Public: to.Ptr("06/01/2021"),
		// 										},
		// 									},
		// 								},
		// 								{
		// 									Name: to.Ptr("ca039e75-a276-4175-aebc-bcd41e4b14b7"),
		// 									Type: to.Ptr("Microsoft.Security/assessmentMetadata"),
		// 									ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ca039e75-a276-4175-aebc-bcd41e4b14b7"),
		// 									Properties: &armsecurity.AssessmentMetadataPropertiesResponse{
		// 										Description: to.Ptr("Assessment that my organization created to view our security assessment in Azure Security Center"),
		// 										AssessmentType: to.Ptr(armsecurity.AssessmentTypeCustomerManaged),
		// 										Categories: []*armsecurity.Categories{
		// 											to.Ptr(armsecurity.CategoriesCompute)},
		// 											DisplayName: to.Ptr("My organization security assessment"),
		// 											ImplementationEffort: to.Ptr(armsecurity.ImplementationEffortLow),
		// 											RemediationDescription: to.Ptr("Fix it with these remediation instructions"),
		// 											Severity: to.Ptr(armsecurity.SeverityMedium),
		// 											Threats: []*armsecurity.Threats{
		// 											},
		// 											UserImpact: to.Ptr(armsecurity.UserImpactLow),
		// 											PublishDates: &armsecurity.AssessmentMetadataPropertiesResponsePublishDates{
		// 												GA: to.Ptr("06/01/2021"),
		// 												Public: to.Ptr("06/01/2021"),
		// 											},
		// 										},
		// 								}},
		// 							}
	}
}
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 {
	// Security assessment metadata response
	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 {
	// Security assessment metadata response
	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 {
	// Security assessment metadata response
	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.NewListBySubscriptionPager method.

type AssessmentsMetadataClientListBySubscriptionResponse added in v0.3.0

type AssessmentsMetadataClientListBySubscriptionResponse struct {
	// List of security assessment metadata
	AssessmentMetadataResponseList
}

AssessmentsMetadataClientListBySubscriptionResponse contains the response from method AssessmentsMetadataClient.NewListBySubscriptionPager.

type AssessmentsMetadataClientListOptions added in v0.3.0

type AssessmentsMetadataClientListOptions struct {
}

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

type AssessmentsMetadataClientListResponse added in v0.3.0

type AssessmentsMetadataClientListResponse struct {
	// List of security assessment metadata
	AssessmentMetadataResponseList
}

AssessmentsMetadataClientListResponse contains the response from method AssessmentsMetadataClient.NewListPager.

type AtaExternalSecuritySolution

type AtaExternalSecuritySolution struct {
	// REQUIRED; The kind of the external solution
	Kind *ExternalSecuritySolutionKind

	// The external security solution properties for ATA solutions
	Properties *AtaSolutionProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

func (*AtaExternalSecuritySolution) GetExternalSecuritySolution added in v0.12.0

func (a *AtaExternalSecuritySolution) GetExternalSecuritySolution() *ExternalSecuritySolution

GetExternalSecuritySolution implements the ExternalSecuritySolutionClassification interface for type AtaExternalSecuritySolution.

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]any
	DeviceType           *string
	DeviceVendor         *string
	LastEventReceived    *string

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace
}

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

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty
}

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 Authorization added in v0.13.0

type Authorization struct {
	// Gets or sets one-time OAuth code to exchange for refresh and access tokens.
	// Only used during PUT/PATCH operations. The secret is cleared during GET.
	Code *string
}

Authorization payload.

func (Authorization) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type Authorization.

func (*Authorization) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Authorization.

type AutoDiscovery added in v0.13.0

type AutoDiscovery string

AutoDiscovery - AutoDiscovery states.

const (
	AutoDiscoveryDisabled      AutoDiscovery = "Disabled"
	AutoDiscoveryEnabled       AutoDiscovery = "Enabled"
	AutoDiscoveryNotApplicable AutoDiscovery = "NotApplicable"
)

func PossibleAutoDiscoveryValues added in v0.13.0

func PossibleAutoDiscoveryValues() []AutoDiscovery

PossibleAutoDiscoveryValues returns the possible values for the AutoDiscovery 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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutoProvisioningSettingsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AutoProvisioningSetting = 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),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutoProvisioningSettingsClient().Get(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AutoProvisioningSetting = 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),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutoProvisioningSettingsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AutoProvisioningSettingList = armsecurity.AutoProvisioningSettingList{
		// 	Value: []*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),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Auto provisioning setting
	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 {
	// Auto provisioning setting
	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.NewListPager method.

type AutoProvisioningSettingsClientListResponse added in v0.3.0

type AutoProvisioningSettingsClientListResponse struct {
	// List of all the auto provisioning settings response
	AutoProvisioningSettingList
}

AutoProvisioningSettingsClientListResponse contains the response from method AutoProvisioningSettingsClient.NewListPager.

type Automation

type Automation struct {
	// Entity tag is used for comparing two or more entities from the same requested resource.
	Etag *string

	// Kind of the resource
	Kind *string

	// Location where the resource is stored
	Location *string

	// Security automation data
	Properties *AutomationProperties

	// A list of key value pairs that describe the resource.
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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
}

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

	// The target Event Hub connection string (it will not be included in any response).
	ConnectionString *string

	// The target Event Hub Azure Resource ID.
	EventHubResourceID *string

	// Indicates whether the trusted service is enabled or not.
	IsTrustedServiceEnabled *bool

	// READ-ONLY; The target Event Hub SAS policy name.
	SasPolicyName *string
}

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

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

	// The Logic App trigger URI endpoint (it will not be included in any response).
	URI *string
}

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

	// The fully qualified Log Analytics Workspace Azure Resource ID.
	WorkspaceResourceID *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// The security automation description.
	Description *string

	// Indicates whether the security automation is enabled.
	IsEnabled *bool

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

	// A collection of the source event types which evaluate the security automation set of rules.
	Sources []*AutomationSource
}

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
}

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

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

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

	// A set of rules which evaluate upon event interception. A logical disjunction is applied between defined rule sets (logical
	// 'or').
	RuleSets []*AutomationRuleSet
}

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

	// A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType.
	Operator *Operator

	// The JPath of the entity model property that should be checked.
	PropertyJPath *string

	// The data type of the compared operands (string, integer, floating point number or a boolean [true/false]]
	PropertyType *PropertyType
}

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 AutomationUpdateModel added in v0.14.0

type AutomationUpdateModel struct {
	// Security automation data
	Properties *AutomationProperties

	// A list of key value pairs that describe the resource.
	Tags map[string]*string
}

AutomationUpdateModel - The update model of security automation resource.

func (AutomationUpdateModel) MarshalJSON added in v0.14.0

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

MarshalJSON implements the json.Marshaller interface for type AutomationUpdateModel.

func (*AutomationUpdateModel) UnmarshalJSON added in v0.14.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AutomationUpdateModel.

type AutomationValidationStatus

type AutomationValidationStatus struct {
	// Indicates whether the model is valid or not.
	IsValid *bool

	// The validation message.
	Message *string
}

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 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutomationsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Automation = armsecurity.Automation{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("new etag value"),
	// 	Name: to.Ptr("exampleAutomation"),
	// 	Type: to.Ptr("Microsoft.Security/automations"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
	// 	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"),
	// 		}},
	// 		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{
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

Example (CreateOrUpdateASecurityAutomationForAllHighSeverityAssessments)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutomationsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Automation = armsecurity.Automation{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("new etag value"),
	// 	Name: to.Ptr("exampleAutomation"),
	// 	Type: to.Ptr("Microsoft.Security/automations"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
	// 	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"),
	// 		}},
	// 		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),
	// 						}},
	// 				}},
	// 		}},
	// 	},
	// }
}
Output:

Example (DisableOrEnableASecurityAutomation)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutomationsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Automation = armsecurity.Automation{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("new etag value"),
	// 	Name: to.Ptr("exampleAutomation"),
	// 	Type: to.Ptr("Microsoft.Security/automations"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
	// 	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"),
	// 		}},
	// 		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),
	// 						}},
	// 				}},
	// 		}},
	// 	},
	// }
}
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 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAutomationsClient().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 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutomationsClient().Get(ctx, "exampleResourceGroup", "exampleAutomation", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Automation = armsecurity.Automation{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("etag value"),
	// 	Name: to.Ptr("exampleAutomation"),
	// 	Type: to.Ptr("Microsoft.Security/automations"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
	// 	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"),
	// 		}},
	// 		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),
	// 						}},
	// 				}},
	// 		}},
	// 	},
	// }
}
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 2023-12-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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutomationsClient().NewListByResourceGroupPager("exampleResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AutomationList = armsecurity.AutomationList{
		// 	Value: []*armsecurity.Automation{
		// 		{
		// 			Location: to.Ptr("Central US"),
		// 			Etag: to.Ptr("etag value"),
		// 			Name: to.Ptr("exampleAutomation"),
		// 			Type: to.Ptr("Microsoft.Security/automations"),
		// 			ID: to.Ptr("/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
		// 			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"),
		// 				}},
		// 				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),
		// 								}},
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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 2023-12-01-preview

  • options - AutomationsClientListOptions contains the optional parameters for the AutomationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutomationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AutomationList = armsecurity.AutomationList{
		// 	Value: []*armsecurity.Automation{
		// 		{
		// 			Location: to.Ptr("Central US"),
		// 			Etag: to.Ptr("etag value"),
		// 			Name: to.Ptr("exampleAutomation"),
		// 			Type: to.Ptr("Microsoft.Security/automations"),
		// 			ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
		// 			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"),
		// 				}},
		// 				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),
		// 								}},
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AutomationsClient) Update added in v0.14.0

func (client *AutomationsClient) Update(ctx context.Context, resourceGroupName string, automationName string, automation AutomationUpdateModel, options *AutomationsClientUpdateOptions) (AutomationsClientUpdateResponse, error)

Update - Updates a security automation If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-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 update model of security automation resource
  • options - AutomationsClientUpdateOptions contains the optional parameters for the AutomationsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/PatchAutomation_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutomationsClient().Update(ctx, "exampleResourceGroup", "exampleAutomation", armsecurity.AutomationUpdateModel{
		Tags: map[string]*string{
			"Example": to.Ptr("exampleTag"),
		},
		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"),
				}},
			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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Automation = armsecurity.Automation{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("new etag value"),
	// 	Name: to.Ptr("exampleAutomation"),
	// 	Type: to.Ptr("Microsoft.Security/automations"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation"),
	// 	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"),
	// 		}},
	// 		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{
	// 				},
	// 		}},
	// 	},
	// }
}
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 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutomationsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AutomationValidationStatus = armsecurity.AutomationValidationStatus{
	// 	IsValid: to.Ptr(true),
	// 	Message: to.Ptr("Validation Successful"),
	// }
}
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 {
	// The security automation resource.
	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 {
	// The security automation resource.
	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.NewListByResourceGroupPager method.

type AutomationsClientListByResourceGroupResponse added in v0.3.0

type AutomationsClientListByResourceGroupResponse struct {
	// List of security automations response.
	AutomationList
}

AutomationsClientListByResourceGroupResponse contains the response from method AutomationsClient.NewListByResourceGroupPager.

type AutomationsClientListOptions added in v0.3.0

type AutomationsClientListOptions struct {
}

AutomationsClientListOptions contains the optional parameters for the AutomationsClient.NewListPager method.

type AutomationsClientListResponse added in v0.3.0

type AutomationsClientListResponse struct {
	// List of security automations response.
	AutomationList
}

AutomationsClientListResponse contains the response from method AutomationsClient.NewListPager.

type AutomationsClientUpdateOptions added in v0.14.0

type AutomationsClientUpdateOptions struct {
}

AutomationsClientUpdateOptions contains the optional parameters for the AutomationsClient.Update method.

type AutomationsClientUpdateResponse added in v0.14.0

type AutomationsClientUpdateResponse struct {
	// The security automation resource.
	Automation
}

AutomationsClientUpdateResponse contains the response from method AutomationsClient.Update.

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 {
	// The security automation model state property bag.
	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

	// REQUIRED; Assumed role ID is an identifier that you can use to create temporary security credentials.
	AwsAssumeRoleArn *string

	// REQUIRED; A unique identifier that is required when you assume a role in another account.
	AwsExternalID *string

	// READ-ONLY; The ID of the cloud account
	AccountID *string

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty
}

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

	// REQUIRED; Public key element of the AWS credential object (write only)
	AwsAccessKeyID *string

	// REQUIRED; Secret key element of the AWS credential object (write only)
	AwsSecretAccessKey *string

	// READ-ONLY; The ID of the cloud account
	AccountID *string

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty
}

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

	// The AWS account's organizational data
	OrganizationalData AwsOrganizationalDataClassification

	// list of regions to scan
	Regions []*string

	// Scan interval in hours (value should be between 1-hour to 24-hours)
	ScanInterval *int64

	// READ-ONLY; The AWS account name
	AccountName *string
}

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
}

AwsOrganizationalData - The AWS organization 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

	// If the multi cloud account is of membership type organization, list of accounts excluded from offering
	ExcludedAccountIDs []*string

	// If the multi cloud account is of membership type organization, this will be the name of the onboarding stackset
	StacksetName *string
}

AwsOrganizationalDataMaster - The AWS organization 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

	// If the multi cloud account is not of membership type organization, this will be the ID of the account's parent
	ParentHierarchyID *string
}

AwsOrganizationalDataMember - The AWS organization 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 AzureDevOpsOrg added in v0.13.0

type AzureDevOpsOrg struct {
	// Azure DevOps Organization properties.
	Properties *AzureDevOpsOrgProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AzureDevOpsOrg - Azure DevOps Organization resource.

func (AzureDevOpsOrg) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrg.

func (*AzureDevOpsOrg) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrg.

type AzureDevOpsOrgListResponse added in v0.13.0

type AzureDevOpsOrgListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsOrg
}

AzureDevOpsOrgListResponse - List of RP resources which supports pagination.

func (AzureDevOpsOrgListResponse) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrgListResponse.

func (*AzureDevOpsOrgListResponse) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrgListResponse.

type AzureDevOpsOrgProperties added in v0.13.0

type AzureDevOpsOrgProperties struct {
	// Configuration payload for PR Annotations.
	ActionableRemediation *ActionableRemediation

	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time
}

AzureDevOpsOrgProperties - Azure DevOps Organization properties.

func (AzureDevOpsOrgProperties) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrgProperties.

func (*AzureDevOpsOrgProperties) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrgProperties.

type AzureDevOpsOrganizationConfiguration added in v0.13.0

type AzureDevOpsOrganizationConfiguration struct {
	// AutoDiscovery states.
	AutoDiscovery *AutoDiscovery

	// AzureDevOps Project Inventory Configuration. Dictionary of AzureDevOps project name to desired project configuration. If
	// AutoDiscovery is Enabled, this field should be empty or null.
	ProjectConfigs map[string]*AzureDevOpsProjectConfiguration
}

AzureDevOpsOrganizationConfiguration - AzureDevOps Org Inventory Configuration.

func (AzureDevOpsOrganizationConfiguration) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrganizationConfiguration.

func (*AzureDevOpsOrganizationConfiguration) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrganizationConfiguration.

type AzureDevOpsOrgsClient added in v0.13.0

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

AzureDevOpsOrgsClient contains the methods for the AzureDevOpsOrgs group. Don't use this type directly, use NewAzureDevOpsOrgsClient() instead.

func NewAzureDevOpsOrgsClient added in v0.13.0

func NewAzureDevOpsOrgsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsOrgsClient, error)

NewAzureDevOpsOrgsClient creates a new instance of AzureDevOpsOrgsClient 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 (*AzureDevOpsOrgsClient) BeginCreateOrUpdate added in v0.13.0

func (client *AzureDevOpsOrgsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, azureDevOpsOrg AzureDevOpsOrg, options *AzureDevOpsOrgsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsOrgsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates monitored Azure DevOps organization details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • azureDevOpsOrg - The Azure DevOps organization resource payload.
  • options - AzureDevOpsOrgsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsOrgsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsOrgsClient().BeginCreateOrUpdate(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", armsecurity.AzureDevOpsOrg{
		Properties: &armsecurity.AzureDevOpsOrgProperties{
			ActionableRemediation: &armsecurity.ActionableRemediation{
				State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
			},
			OnboardingState: to.Ptr(armsecurity.OnboardingStateNotApplicable),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsOrg = armsecurity.AzureDevOpsOrg{
	// 	Name: to.Ptr("myAzDevOpsOrg"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg"),
	// 	Properties: &armsecurity.AzureDevOpsOrgProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsOrgsClient) BeginUpdate added in v0.13.0

func (client *AzureDevOpsOrgsClient) BeginUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, azureDevOpsOrg AzureDevOpsOrg, options *AzureDevOpsOrgsClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsOrgsClientUpdateResponse], error)

BeginUpdate - Updates monitored Azure DevOps organization details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • azureDevOpsOrg - The Azure DevOps organization resource payload.
  • options - AzureDevOpsOrgsClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsOrgsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsOrgsClient().BeginUpdate(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", armsecurity.AzureDevOpsOrg{
		Properties: &armsecurity.AzureDevOpsOrgProperties{
			ActionableRemediation: &armsecurity.ActionableRemediation{
				State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
			},
			OnboardingState: to.Ptr(armsecurity.OnboardingStateNotApplicable),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsOrg = armsecurity.AzureDevOpsOrg{
	// 	Name: to.Ptr("myAzDevOpsOrg"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg"),
	// 	Properties: &armsecurity.AzureDevOpsOrgProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsOrgsClient) Get added in v0.13.0

func (client *AzureDevOpsOrgsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, options *AzureDevOpsOrgsClientGetOptions) (AzureDevOpsOrgsClientGetResponse, error)

Get - Returns a monitored Azure DevOps organization resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • options - AzureDevOpsOrgsClientGetOptions contains the optional parameters for the AzureDevOpsOrgsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsOrgsClient().Get(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsOrg = armsecurity.AzureDevOpsOrg{
	// 	Name: to.Ptr("myAzDevOpsOrg"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg"),
	// 	Properties: &armsecurity.AzureDevOpsOrgProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsOrgsClient) ListAvailable added in v0.13.0

func (client *AzureDevOpsOrgsClient) ListAvailable(ctx context.Context, resourceGroupName string, securityConnectorName string, options *AzureDevOpsOrgsClientListAvailableOptions) (AzureDevOpsOrgsClientListAvailableResponse, error)

ListAvailable - Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - AzureDevOpsOrgsClientListAvailableOptions contains the optional parameters for the AzureDevOpsOrgsClient.ListAvailable method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsOrgsClient().ListAvailable(ctx, "myRg", "mySecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsOrgListResponse = armsecurity.AzureDevOpsOrgListResponse{
	// 	Value: []*armsecurity.AzureDevOpsOrg{
	// 		{
	// 			Name: to.Ptr("myAzDevOpsOrg"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg"),
	// 			Properties: &armsecurity.AzureDevOpsOrgProperties{
	// 				ActionableRemediation: &armsecurity.ActionableRemediation{
	// 					State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 				},
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("anotherOrg"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/anotherOrg"),
	// 			Properties: &armsecurity.AzureDevOpsOrgProperties{
	// 				ActionableRemediation: &armsecurity.ActionableRemediation{
	// 					State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 				},
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboardedByOtherConnector),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("notOnboardedOrg"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/notOnboardedOrg"),
	// 			Properties: &armsecurity.AzureDevOpsOrgProperties{
	// 				ActionableRemediation: &armsecurity.ActionableRemediation{
	// 					State: to.Ptr(armsecurity.ActionableRemediationStateNone),
	// 				},
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateNotOnboarded),
	// 			},
	// 	}},
	// }
}
Output:

func (*AzureDevOpsOrgsClient) NewListPager added in v0.13.0

func (client *AzureDevOpsOrgsClient) NewListPager(resourceGroupName string, securityConnectorName string, options *AzureDevOpsOrgsClientListOptions) *runtime.Pager[AzureDevOpsOrgsClientListResponse]

NewListPager - Returns a list of Azure DevOps organizations onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - AzureDevOpsOrgsClientListOptions contains the optional parameters for the AzureDevOpsOrgsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsOrgsClient().NewListPager("myRg", "mySecurityConnectorName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsOrgListResponse = armsecurity.AzureDevOpsOrgListResponse{
		// 	Value: []*armsecurity.AzureDevOpsOrg{
		// 		{
		// 			Name: to.Ptr("myAzDevOpsOrg"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg"),
		// 			Properties: &armsecurity.AzureDevOpsOrgProperties{
		// 				ActionableRemediation: &armsecurity.ActionableRemediation{
		// 					State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
		// 				},
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AzureDevOpsOrgsClientBeginCreateOrUpdateOptions added in v0.13.0

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

AzureDevOpsOrgsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsOrgsClient.BeginCreateOrUpdate method.

type AzureDevOpsOrgsClientBeginUpdateOptions added in v0.13.0

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

AzureDevOpsOrgsClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsOrgsClient.BeginUpdate method.

type AzureDevOpsOrgsClientCreateOrUpdateResponse added in v0.13.0

type AzureDevOpsOrgsClientCreateOrUpdateResponse struct {
	// Azure DevOps Organization resource.
	AzureDevOpsOrg
}

AzureDevOpsOrgsClientCreateOrUpdateResponse contains the response from method AzureDevOpsOrgsClient.BeginCreateOrUpdate.

type AzureDevOpsOrgsClientGetOptions added in v0.13.0

type AzureDevOpsOrgsClientGetOptions struct {
}

AzureDevOpsOrgsClientGetOptions contains the optional parameters for the AzureDevOpsOrgsClient.Get method.

type AzureDevOpsOrgsClientGetResponse added in v0.13.0

type AzureDevOpsOrgsClientGetResponse struct {
	// Azure DevOps Organization resource.
	AzureDevOpsOrg
}

AzureDevOpsOrgsClientGetResponse contains the response from method AzureDevOpsOrgsClient.Get.

type AzureDevOpsOrgsClientListAvailableOptions added in v0.13.0

type AzureDevOpsOrgsClientListAvailableOptions struct {
}

AzureDevOpsOrgsClientListAvailableOptions contains the optional parameters for the AzureDevOpsOrgsClient.ListAvailable method.

type AzureDevOpsOrgsClientListAvailableResponse added in v0.13.0

type AzureDevOpsOrgsClientListAvailableResponse struct {
	// List of RP resources which supports pagination.
	AzureDevOpsOrgListResponse
}

AzureDevOpsOrgsClientListAvailableResponse contains the response from method AzureDevOpsOrgsClient.ListAvailable.

type AzureDevOpsOrgsClientListOptions added in v0.13.0

type AzureDevOpsOrgsClientListOptions struct {
}

AzureDevOpsOrgsClientListOptions contains the optional parameters for the AzureDevOpsOrgsClient.NewListPager method.

type AzureDevOpsOrgsClientListResponse added in v0.13.0

type AzureDevOpsOrgsClientListResponse struct {
	// List of RP resources which supports pagination.
	AzureDevOpsOrgListResponse
}

AzureDevOpsOrgsClientListResponse contains the response from method AzureDevOpsOrgsClient.NewListPager.

type AzureDevOpsOrgsClientUpdateResponse added in v0.13.0

type AzureDevOpsOrgsClientUpdateResponse struct {
	// Azure DevOps Organization resource.
	AzureDevOpsOrg
}

AzureDevOpsOrgsClientUpdateResponse contains the response from method AzureDevOpsOrgsClient.BeginUpdate.

type AzureDevOpsProject added in v0.13.0

type AzureDevOpsProject struct {
	// Azure DevOps Project properties.
	Properties *AzureDevOpsProjectProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AzureDevOpsProject - Azure DevOps Project resource.

func (AzureDevOpsProject) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProject.

func (*AzureDevOpsProject) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProject.

type AzureDevOpsProjectConfiguration added in v0.13.0

type AzureDevOpsProjectConfiguration struct {
	// AutoDiscovery states.
	AutoDiscovery *AutoDiscovery

	// AzureDevOps Repository Inventory Configuration. Dictionary of AzureDevOps repository name to desired repository configuration.
	// If AutoDiscovery is Enabled, this field should be null or empty.
	RepositoryConfigs map[string]*BaseResourceConfiguration
}

AzureDevOpsProjectConfiguration - AzureDevOps Project Inventory Configuration.

func (AzureDevOpsProjectConfiguration) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProjectConfiguration.

func (*AzureDevOpsProjectConfiguration) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProjectConfiguration.

type AzureDevOpsProjectListResponse added in v0.13.0

type AzureDevOpsProjectListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsProject
}

AzureDevOpsProjectListResponse - List of RP resources which supports pagination.

func (AzureDevOpsProjectListResponse) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProjectListResponse.

func (*AzureDevOpsProjectListResponse) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProjectListResponse.

type AzureDevOpsProjectProperties added in v0.13.0

type AzureDevOpsProjectProperties struct {
	// Configuration payload for PR Annotations.
	ActionableRemediation *ActionableRemediation

	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// Gets or sets parent Azure DevOps Organization name.
	ParentOrgName *string

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets Azure DevOps Project id.
	ProjectID *string

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time
}

AzureDevOpsProjectProperties - Azure DevOps Project properties.

func (AzureDevOpsProjectProperties) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProjectProperties.

func (*AzureDevOpsProjectProperties) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProjectProperties.

type AzureDevOpsProjectsClient added in v0.13.0

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

AzureDevOpsProjectsClient contains the methods for the AzureDevOpsProjects group. Don't use this type directly, use NewAzureDevOpsProjectsClient() instead.

func NewAzureDevOpsProjectsClient added in v0.13.0

func NewAzureDevOpsProjectsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsProjectsClient, error)

NewAzureDevOpsProjectsClient creates a new instance of AzureDevOpsProjectsClient 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 (*AzureDevOpsProjectsClient) BeginCreateOrUpdate added in v0.13.0

func (client *AzureDevOpsProjectsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, projectName string, azureDevOpsProject AzureDevOpsProject, options *AzureDevOpsProjectsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsProjectsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a monitored Azure DevOps project resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • azureDevOpsProject - The Azure DevOps project resource payload.
  • options - AzureDevOpsProjectsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsProjectsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsProjectsClient().BeginCreateOrUpdate(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", armsecurity.AzureDevOpsProject{
		Properties: &armsecurity.AzureDevOpsProjectProperties{
			ActionableRemediation: &armsecurity.ActionableRemediation{
				State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
			},
			OnboardingState: to.Ptr(armsecurity.OnboardingStateNotApplicable),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsProject = armsecurity.AzureDevOpsProject{
	// 	Name: to.Ptr("myAzDevOpsProject"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject"),
	// 	Properties: &armsecurity.AzureDevOpsProjectProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOrgName: to.Ptr("myAzDevOpsOrg"),
	// 		ProjectID: to.Ptr("9ebbed8f-a9cc-405f-a647-b235e22179de"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsProjectsClient) BeginUpdate added in v0.13.0

func (client *AzureDevOpsProjectsClient) BeginUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, projectName string, azureDevOpsProject AzureDevOpsProject, options *AzureDevOpsProjectsClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsProjectsClientUpdateResponse], error)

BeginUpdate - Updates a monitored Azure DevOps project resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • azureDevOpsProject - The Azure DevOps project resource payload.
  • options - AzureDevOpsProjectsClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsProjectsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsProjectsClient().BeginUpdate(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", armsecurity.AzureDevOpsProject{
		Properties: &armsecurity.AzureDevOpsProjectProperties{
			ActionableRemediation: &armsecurity.ActionableRemediation{
				State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
			},
			OnboardingState: to.Ptr(armsecurity.OnboardingStateNotApplicable),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsProject = armsecurity.AzureDevOpsProject{
	// 	Name: to.Ptr("myAzDevOpsProject"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject"),
	// 	Properties: &armsecurity.AzureDevOpsProjectProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOrgName: to.Ptr("myAzDevOpsOrg"),
	// 		ProjectID: to.Ptr("9ebbed8f-a9cc-405f-a647-b235e22179de"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsProjectsClient) Get added in v0.13.0

func (client *AzureDevOpsProjectsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, projectName string, options *AzureDevOpsProjectsClientGetOptions) (AzureDevOpsProjectsClientGetResponse, error)

Get - Returns a monitored Azure DevOps project resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • options - AzureDevOpsProjectsClientGetOptions contains the optional parameters for the AzureDevOpsProjectsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsProjectsClient().Get(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsProject = armsecurity.AzureDevOpsProject{
	// 	Name: to.Ptr("myAzDevOpsProject"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject"),
	// 	Properties: &armsecurity.AzureDevOpsProjectProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOrgName: to.Ptr("myAzDevOpsOrg"),
	// 		ProjectID: to.Ptr("9ebbed8f-a9cc-405f-a647-b235e22179de"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsProjectsClient) NewListPager added in v0.13.0

func (client *AzureDevOpsProjectsClient) NewListPager(resourceGroupName string, securityConnectorName string, orgName string, options *AzureDevOpsProjectsClientListOptions) *runtime.Pager[AzureDevOpsProjectsClientListResponse]

NewListPager - Returns a list of Azure DevOps projects onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • options - AzureDevOpsProjectsClientListOptions contains the optional parameters for the AzureDevOpsProjectsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsProjectsClient().NewListPager("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsProjectListResponse = armsecurity.AzureDevOpsProjectListResponse{
		// 	Value: []*armsecurity.AzureDevOpsProject{
		// 		{
		// 			Name: to.Ptr("myAzDevOpsProject"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject"),
		// 			Properties: &armsecurity.AzureDevOpsProjectProperties{
		// 				ActionableRemediation: &armsecurity.ActionableRemediation{
		// 					State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
		// 				},
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				ParentOrgName: to.Ptr("myAzDevOpsOrg"),
		// 				ProjectID: to.Ptr("9ebbed8f-a9cc-405f-a647-b235e22179de"),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AzureDevOpsProjectsClientBeginCreateOrUpdateOptions added in v0.13.0

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

AzureDevOpsProjectsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsProjectsClient.BeginCreateOrUpdate method.

type AzureDevOpsProjectsClientBeginUpdateOptions added in v0.13.0

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

AzureDevOpsProjectsClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsProjectsClient.BeginUpdate method.

type AzureDevOpsProjectsClientCreateOrUpdateResponse added in v0.13.0

type AzureDevOpsProjectsClientCreateOrUpdateResponse struct {
	// Azure DevOps Project resource.
	AzureDevOpsProject
}

AzureDevOpsProjectsClientCreateOrUpdateResponse contains the response from method AzureDevOpsProjectsClient.BeginCreateOrUpdate.

type AzureDevOpsProjectsClientGetOptions added in v0.13.0

type AzureDevOpsProjectsClientGetOptions struct {
}

AzureDevOpsProjectsClientGetOptions contains the optional parameters for the AzureDevOpsProjectsClient.Get method.

type AzureDevOpsProjectsClientGetResponse added in v0.13.0

type AzureDevOpsProjectsClientGetResponse struct {
	// Azure DevOps Project resource.
	AzureDevOpsProject
}

AzureDevOpsProjectsClientGetResponse contains the response from method AzureDevOpsProjectsClient.Get.

type AzureDevOpsProjectsClientListOptions added in v0.13.0

type AzureDevOpsProjectsClientListOptions struct {
}

AzureDevOpsProjectsClientListOptions contains the optional parameters for the AzureDevOpsProjectsClient.NewListPager method.

type AzureDevOpsProjectsClientListResponse added in v0.13.0

type AzureDevOpsProjectsClientListResponse struct {
	// List of RP resources which supports pagination.
	AzureDevOpsProjectListResponse
}

AzureDevOpsProjectsClientListResponse contains the response from method AzureDevOpsProjectsClient.NewListPager.

type AzureDevOpsProjectsClientUpdateResponse added in v0.13.0

type AzureDevOpsProjectsClientUpdateResponse struct {
	// Azure DevOps Project resource.
	AzureDevOpsProject
}

AzureDevOpsProjectsClientUpdateResponse contains the response from method AzureDevOpsProjectsClient.BeginUpdate.

type AzureDevOpsReposClient added in v0.13.0

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

AzureDevOpsReposClient contains the methods for the AzureDevOpsRepos group. Don't use this type directly, use NewAzureDevOpsReposClient() instead.

func NewAzureDevOpsReposClient added in v0.13.0

func NewAzureDevOpsReposClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsReposClient, error)

NewAzureDevOpsReposClient creates a new instance of AzureDevOpsReposClient 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 (*AzureDevOpsReposClient) BeginCreateOrUpdate added in v0.13.0

func (client *AzureDevOpsReposClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, projectName string, repoName string, azureDevOpsRepository AzureDevOpsRepository, options *AzureDevOpsReposClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsReposClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a monitored Azure DevOps repository resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • repoName - The repository name.
  • azureDevOpsRepository - The Azure DevOps repository resource payload.
  • options - AzureDevOpsReposClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsReposClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsReposClient().BeginCreateOrUpdate(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", "myAzDevOpsRepo", armsecurity.AzureDevOpsRepository{
		Properties: &armsecurity.AzureDevOpsRepositoryProperties{
			ActionableRemediation: &armsecurity.ActionableRemediation{
				State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
			},
			OnboardingState: to.Ptr(armsecurity.OnboardingStateNotApplicable),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsRepository = armsecurity.AzureDevOpsRepository{
	// 	Name: to.Ptr("myAzDevOpsRepo"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo"),
	// 	Properties: &armsecurity.AzureDevOpsRepositoryProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOrgName: to.Ptr("myAzDevOpsOrg"),
	// 		ParentProjectName: to.Ptr("myAzDevOpsProject"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		RepoID: to.Ptr("cb64ab91-c9ba-46df-b44c-c769358bccdf"),
	// 	},
	// }
}
Output:

func (*AzureDevOpsReposClient) BeginUpdate added in v0.13.0

func (client *AzureDevOpsReposClient) BeginUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, projectName string, repoName string, azureDevOpsRepository AzureDevOpsRepository, options *AzureDevOpsReposClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsReposClientUpdateResponse], error)

BeginUpdate - Updates a monitored Azure DevOps repository resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • repoName - The repository name.
  • azureDevOpsRepository - The Azure DevOps repository resource payload.
  • options - AzureDevOpsReposClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsReposClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsReposClient().BeginUpdate(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", "myAzDevOpsRepo", armsecurity.AzureDevOpsRepository{
		Properties: &armsecurity.AzureDevOpsRepositoryProperties{
			ActionableRemediation: &armsecurity.ActionableRemediation{
				State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
			},
			OnboardingState: to.Ptr(armsecurity.OnboardingStateNotApplicable),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsRepository = armsecurity.AzureDevOpsRepository{
	// 	Name: to.Ptr("myAzDevOpsRepo"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo"),
	// 	Properties: &armsecurity.AzureDevOpsRepositoryProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOrgName: to.Ptr("myAzDevOpsOrg"),
	// 		ParentProjectName: to.Ptr("myAzDevOpsProject"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		RepoID: to.Ptr("cb64ab91-c9ba-46df-b44c-c769358bccdf"),
	// 	},
	// }
}
Output:

func (*AzureDevOpsReposClient) Get added in v0.13.0

func (client *AzureDevOpsReposClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, orgName string, projectName string, repoName string, options *AzureDevOpsReposClientGetOptions) (AzureDevOpsReposClientGetResponse, error)

Get - Returns a monitored Azure DevOps repository resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • repoName - The repository name.
  • options - AzureDevOpsReposClientGetOptions contains the optional parameters for the AzureDevOpsReposClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsReposClient().Get(ctx, "myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", "myAzDevOpsRepo", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsRepository = armsecurity.AzureDevOpsRepository{
	// 	Name: to.Ptr("myAzDevOpsRepo"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo"),
	// 	Properties: &armsecurity.AzureDevOpsRepositoryProperties{
	// 		ActionableRemediation: &armsecurity.ActionableRemediation{
	// 			State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
	// 		},
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOrgName: to.Ptr("myAzDevOpsOrg"),
	// 		ParentProjectName: to.Ptr("myAzDevOpsProject"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		RepoID: to.Ptr("cb64ab91-c9ba-46df-b44c-c769358bccdf"),
	// 	},
	// }
}
Output:

func (*AzureDevOpsReposClient) NewListPager added in v0.13.0

func (client *AzureDevOpsReposClient) NewListPager(resourceGroupName string, securityConnectorName string, orgName string, projectName string, options *AzureDevOpsReposClientListOptions) *runtime.Pager[AzureDevOpsReposClientListResponse]

NewListPager - Returns a list of Azure DevOps repositories onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • orgName - The Azure DevOps organization name.
  • projectName - The project name.
  • options - AzureDevOpsReposClientListOptions contains the optional parameters for the AzureDevOpsReposClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsReposClient().NewListPager("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsRepositoryListResponse = armsecurity.AzureDevOpsRepositoryListResponse{
		// 	Value: []*armsecurity.AzureDevOpsRepository{
		// 		{
		// 			Name: to.Ptr("myAzDevOpsRepo"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo"),
		// 			Properties: &armsecurity.AzureDevOpsRepositoryProperties{
		// 				ActionableRemediation: &armsecurity.ActionableRemediation{
		// 					State: to.Ptr(armsecurity.ActionableRemediationStateEnabled),
		// 				},
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				ParentOrgName: to.Ptr("myAzDevOpsOrg"),
		// 				ParentProjectName: to.Ptr("myAzDevOpsProject"),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 				RepoID: to.Ptr("cb64ab91-c9ba-46df-b44c-c769358bccdf"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AzureDevOpsReposClientBeginCreateOrUpdateOptions added in v0.13.0

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

AzureDevOpsReposClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsReposClient.BeginCreateOrUpdate method.

type AzureDevOpsReposClientBeginUpdateOptions added in v0.13.0

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

AzureDevOpsReposClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsReposClient.BeginUpdate method.

type AzureDevOpsReposClientCreateOrUpdateResponse added in v0.13.0

type AzureDevOpsReposClientCreateOrUpdateResponse struct {
	// Azure DevOps Repository resource.
	AzureDevOpsRepository
}

AzureDevOpsReposClientCreateOrUpdateResponse contains the response from method AzureDevOpsReposClient.BeginCreateOrUpdate.

type AzureDevOpsReposClientGetOptions added in v0.13.0

type AzureDevOpsReposClientGetOptions struct {
}

AzureDevOpsReposClientGetOptions contains the optional parameters for the AzureDevOpsReposClient.Get method.

type AzureDevOpsReposClientGetResponse added in v0.13.0

type AzureDevOpsReposClientGetResponse struct {
	// Azure DevOps Repository resource.
	AzureDevOpsRepository
}

AzureDevOpsReposClientGetResponse contains the response from method AzureDevOpsReposClient.Get.

type AzureDevOpsReposClientListOptions added in v0.13.0

type AzureDevOpsReposClientListOptions struct {
}

AzureDevOpsReposClientListOptions contains the optional parameters for the AzureDevOpsReposClient.NewListPager method.

type AzureDevOpsReposClientListResponse added in v0.13.0

type AzureDevOpsReposClientListResponse struct {
	// List of RP resources which supports pagination.
	AzureDevOpsRepositoryListResponse
}

AzureDevOpsReposClientListResponse contains the response from method AzureDevOpsReposClient.NewListPager.

type AzureDevOpsReposClientUpdateResponse added in v0.13.0

type AzureDevOpsReposClientUpdateResponse struct {
	// Azure DevOps Repository resource.
	AzureDevOpsRepository
}

AzureDevOpsReposClientUpdateResponse contains the response from method AzureDevOpsReposClient.BeginUpdate.

type AzureDevOpsRepository added in v0.13.0

type AzureDevOpsRepository struct {
	// Azure DevOps Repository properties.
	Properties *AzureDevOpsRepositoryProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AzureDevOpsRepository - Azure DevOps Repository resource.

func (AzureDevOpsRepository) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsRepository.

func (*AzureDevOpsRepository) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsRepository.

type AzureDevOpsRepositoryListResponse added in v0.13.0

type AzureDevOpsRepositoryListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsRepository
}

AzureDevOpsRepositoryListResponse - List of RP resources which supports pagination.

func (AzureDevOpsRepositoryListResponse) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsRepositoryListResponse.

func (*AzureDevOpsRepositoryListResponse) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsRepositoryListResponse.

type AzureDevOpsRepositoryProperties added in v0.13.0

type AzureDevOpsRepositoryProperties struct {
	// Configuration payload for PR Annotations.
	ActionableRemediation *ActionableRemediation

	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// Gets or sets parent Azure DevOps Organization name.
	ParentOrgName *string

	// Gets or sets parent Azure DevOps Project name.
	ParentProjectName *string

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time

	// READ-ONLY; Gets or sets Azure DevOps Repository id.
	RepoID *string

	// READ-ONLY; Gets or sets Azure DevOps Repository url.
	RepoURL *string

	// READ-ONLY; Gets or sets Azure DevOps repository visibility, whether it is public or private etc.
	Visibility *string
}

AzureDevOpsRepositoryProperties - Azure DevOps Repository properties.

func (AzureDevOpsRepositoryProperties) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureDevOpsRepositoryProperties.

func (*AzureDevOpsRepositoryProperties) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsRepositoryProperties.

type AzureDevOpsScopeEnvironmentData added in v0.8.0

type AzureDevOpsScopeEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType
}

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

	// READ-ONLY; Azure resource Id of the assessed resource
	ID *string
}

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

	// READ-ONLY; ARM resource identifier for the cloud resource being alerted on
	AzureResourceID *string
}

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
}

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 AzureServersSetting added in v0.13.0

type AzureServersSetting struct {
	// REQUIRED; The kind of the server vulnerability assessments setting.
	Kind *ServerVulnerabilityAssessmentsSettingKind

	// The vulnerability assessments setting properties on Azure servers in the defined scope.
	Properties *ServerVulnerabilityAssessmentsAzureSettingProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AzureServersSetting - A vulnerability assessments setting on Azure servers in the defined scope.

func (*AzureServersSetting) GetServerVulnerabilityAssessmentsSetting added in v0.13.0

func (a *AzureServersSetting) GetServerVulnerabilityAssessmentsSetting() *ServerVulnerabilityAssessmentsSetting

GetServerVulnerabilityAssessmentsSetting implements the ServerVulnerabilityAssessmentsSettingClassification interface for type AzureServersSetting.

func (AzureServersSetting) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type AzureServersSetting.

func (*AzureServersSetting) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureServersSetting.

type AzureTrackedResourceLocation

type AzureTrackedResourceLocation struct {
	// Location where the resource is stored
	Location *string
}

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 BaseResourceConfiguration added in v0.13.0

type BaseResourceConfiguration struct {
	// Onboarding states.
	DesiredOnboardingState *DesiredOnboardingState
}

BaseResourceConfiguration - Base Resource Inventory configuration changes.

func (BaseResourceConfiguration) MarshalJSON added in v0.13.0

func (b BaseResourceConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BaseResourceConfiguration.

func (*BaseResourceConfiguration) UnmarshalJSON added in v0.13.0

func (b *BaseResourceConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BaseResourceConfiguration.

type Baseline

type Baseline struct {
	// Expected results.
	ExpectedResults [][]*string

	// Baseline update time (UTC).
	UpdatedTime *time.Time
}

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

	// Results the are not in baseline.
	ResultsNotInBaseline [][]*string

	// Results the are in baseline.
	ResultsOnlyInBaseline [][]*string

	// The rule result status.
	Status *RuleStatus
}

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

	// The benchmark reference.
	Reference *string
}

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 BuiltInInfoType added in v0.11.0

type BuiltInInfoType struct {
	// Id of the info type
	ID *string

	// Display name of the info type
	Name *string

	// Category of the built-in info type
	Type *string
}

BuiltInInfoType - Pre-configured sensitive information type

func (BuiltInInfoType) MarshalJSON added in v0.11.0

func (b BuiltInInfoType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuiltInInfoType.

func (*BuiltInInfoType) UnmarshalJSON added in v0.11.0

func (b *BuiltInInfoType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuiltInInfoType.

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

	// READ-ONLY; CVE title
	Title *string
}

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
}

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 CategoryConfiguration added in v0.13.0

type CategoryConfiguration struct {
	// Rule categories. Code - code scanning results. Artifact scanning results. Dependencies scanning results. IaC results. Secrets
	// scanning results. Container scanning results.
	Category *RuleCategory

	// Gets or sets minimum severity level for a given category.
	MinimumSeverityLevel *string
}

CategoryConfiguration - Severity level per category configuration for PR Annotations.

func (CategoryConfiguration) MarshalJSON added in v0.13.0

func (c CategoryConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CategoryConfiguration.

func (*CategoryConfiguration) UnmarshalJSON added in v0.13.0

func (c *CategoryConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CategoryConfiguration.

type CefExternalSecuritySolution

type CefExternalSecuritySolution struct {
	// REQUIRED; The kind of the external solution
	Kind *ExternalSecuritySolutionKind

	// The external security solution properties for CEF solutions
	Properties *CefSolutionProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

CefExternalSecuritySolution - Represents a security solution which sends CEF logs to an OMS workspace

func (*CefExternalSecuritySolution) GetExternalSecuritySolution added in v0.12.0

func (c *CefExternalSecuritySolution) GetExternalSecuritySolution() *ExternalSecuritySolution

GetExternalSecuritySolution implements the ExternalSecuritySolutionClassification interface for type CefExternalSecuritySolution.

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]any
	Agent                *string
	DeviceType           *string
	DeviceVendor         *string
	Hostname             *string
	LastEventReceived    *string

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace
}

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 ClientFactory added in v0.10.0

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.10.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - Azure subscription ID
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAPICollectionsClient added in v0.13.0

func (c *ClientFactory) NewAPICollectionsClient() *APICollectionsClient

NewAPICollectionsClient creates a new instance of APICollectionsClient.

func (*ClientFactory) NewAccountConnectorsClient added in v0.10.0

func (c *ClientFactory) NewAccountConnectorsClient() *AccountConnectorsClient

NewAccountConnectorsClient creates a new instance of AccountConnectorsClient.

func (*ClientFactory) NewAdaptiveApplicationControlsClient added in v0.10.0

func (c *ClientFactory) NewAdaptiveApplicationControlsClient() *AdaptiveApplicationControlsClient

NewAdaptiveApplicationControlsClient creates a new instance of AdaptiveApplicationControlsClient.

func (*ClientFactory) NewAdaptiveNetworkHardeningsClient added in v0.10.0

func (c *ClientFactory) NewAdaptiveNetworkHardeningsClient() *AdaptiveNetworkHardeningsClient

NewAdaptiveNetworkHardeningsClient creates a new instance of AdaptiveNetworkHardeningsClient.

func (*ClientFactory) NewAdvancedThreatProtectionClient added in v0.10.0

func (c *ClientFactory) NewAdvancedThreatProtectionClient() *AdvancedThreatProtectionClient

NewAdvancedThreatProtectionClient creates a new instance of AdvancedThreatProtectionClient.

func (*ClientFactory) NewAlertsClient added in v0.10.0

func (c *ClientFactory) NewAlertsClient() *AlertsClient

NewAlertsClient creates a new instance of AlertsClient.

func (*ClientFactory) NewAlertsSuppressionRulesClient added in v0.10.0

func (c *ClientFactory) NewAlertsSuppressionRulesClient() *AlertsSuppressionRulesClient

NewAlertsSuppressionRulesClient creates a new instance of AlertsSuppressionRulesClient.

func (*ClientFactory) NewAllowedConnectionsClient added in v0.10.0

func (c *ClientFactory) NewAllowedConnectionsClient() *AllowedConnectionsClient

NewAllowedConnectionsClient creates a new instance of AllowedConnectionsClient.

func (*ClientFactory) NewApplicationClient added in v0.10.0

func (c *ClientFactory) NewApplicationClient() *ApplicationClient

NewApplicationClient creates a new instance of ApplicationClient.

func (*ClientFactory) NewApplicationsClient added in v0.10.0

func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient

NewApplicationsClient creates a new instance of ApplicationsClient.

func (*ClientFactory) NewAssessmentsClient added in v0.10.0

func (c *ClientFactory) NewAssessmentsClient() *AssessmentsClient

NewAssessmentsClient creates a new instance of AssessmentsClient.

func (*ClientFactory) NewAssessmentsMetadataClient added in v0.10.0

func (c *ClientFactory) NewAssessmentsMetadataClient() *AssessmentsMetadataClient

NewAssessmentsMetadataClient creates a new instance of AssessmentsMetadataClient.

func (*ClientFactory) NewAutoProvisioningSettingsClient added in v0.10.0

func (c *ClientFactory) NewAutoProvisioningSettingsClient() *AutoProvisioningSettingsClient

NewAutoProvisioningSettingsClient creates a new instance of AutoProvisioningSettingsClient.

func (*ClientFactory) NewAutomationsClient added in v0.10.0

func (c *ClientFactory) NewAutomationsClient() *AutomationsClient

NewAutomationsClient creates a new instance of AutomationsClient.

func (*ClientFactory) NewAzureDevOpsOrgsClient added in v0.13.0

func (c *ClientFactory) NewAzureDevOpsOrgsClient() *AzureDevOpsOrgsClient

NewAzureDevOpsOrgsClient creates a new instance of AzureDevOpsOrgsClient.

func (*ClientFactory) NewAzureDevOpsProjectsClient added in v0.13.0

func (c *ClientFactory) NewAzureDevOpsProjectsClient() *AzureDevOpsProjectsClient

NewAzureDevOpsProjectsClient creates a new instance of AzureDevOpsProjectsClient.

func (*ClientFactory) NewAzureDevOpsReposClient added in v0.13.0

func (c *ClientFactory) NewAzureDevOpsReposClient() *AzureDevOpsReposClient

NewAzureDevOpsReposClient creates a new instance of AzureDevOpsReposClient.

func (*ClientFactory) NewComplianceResultsClient added in v0.10.0

func (c *ClientFactory) NewComplianceResultsClient() *ComplianceResultsClient

NewComplianceResultsClient creates a new instance of ComplianceResultsClient.

func (*ClientFactory) NewCompliancesClient added in v0.10.0

func (c *ClientFactory) NewCompliancesClient() *CompliancesClient

NewCompliancesClient creates a new instance of CompliancesClient.

func (*ClientFactory) NewConnectorApplicationClient added in v0.10.0

func (c *ClientFactory) NewConnectorApplicationClient() *ConnectorApplicationClient

NewConnectorApplicationClient creates a new instance of ConnectorApplicationClient.

func (*ClientFactory) NewConnectorApplicationsClient added in v0.10.0

func (c *ClientFactory) NewConnectorApplicationsClient() *ConnectorApplicationsClient

NewConnectorApplicationsClient creates a new instance of ConnectorApplicationsClient.

func (*ClientFactory) NewConnectorsClient added in v0.10.0

func (c *ClientFactory) NewConnectorsClient() *ConnectorsClient

NewConnectorsClient creates a new instance of ConnectorsClient.

func (*ClientFactory) NewContactsClient added in v0.10.0

func (c *ClientFactory) NewContactsClient() *ContactsClient

NewContactsClient creates a new instance of ContactsClient.

func (*ClientFactory) NewCustomAssessmentAutomationsClient added in v0.10.0

func (c *ClientFactory) NewCustomAssessmentAutomationsClient() *CustomAssessmentAutomationsClient

NewCustomAssessmentAutomationsClient creates a new instance of CustomAssessmentAutomationsClient.

func (*ClientFactory) NewCustomEntityStoreAssignmentsClient added in v0.10.0

func (c *ClientFactory) NewCustomEntityStoreAssignmentsClient() *CustomEntityStoreAssignmentsClient

NewCustomEntityStoreAssignmentsClient creates a new instance of CustomEntityStoreAssignmentsClient.

func (*ClientFactory) NewDefenderForStorageClient added in v0.13.0

func (c *ClientFactory) NewDefenderForStorageClient() *DefenderForStorageClient

NewDefenderForStorageClient creates a new instance of DefenderForStorageClient.

func (*ClientFactory) NewDevOpsConfigurationsClient added in v0.13.0

func (c *ClientFactory) NewDevOpsConfigurationsClient() *DevOpsConfigurationsClient

NewDevOpsConfigurationsClient creates a new instance of DevOpsConfigurationsClient.

func (*ClientFactory) NewDevOpsOperationResultsClient added in v0.13.0

func (c *ClientFactory) NewDevOpsOperationResultsClient() *DevOpsOperationResultsClient

NewDevOpsOperationResultsClient creates a new instance of DevOpsOperationResultsClient.

func (*ClientFactory) NewDeviceSecurityGroupsClient added in v0.10.0

func (c *ClientFactory) NewDeviceSecurityGroupsClient() *DeviceSecurityGroupsClient

NewDeviceSecurityGroupsClient creates a new instance of DeviceSecurityGroupsClient.

func (*ClientFactory) NewDiscoveredSecuritySolutionsClient added in v0.10.0

func (c *ClientFactory) NewDiscoveredSecuritySolutionsClient() *DiscoveredSecuritySolutionsClient

NewDiscoveredSecuritySolutionsClient creates a new instance of DiscoveredSecuritySolutionsClient.

func (*ClientFactory) NewExternalSecuritySolutionsClient added in v0.10.0

func (c *ClientFactory) NewExternalSecuritySolutionsClient() *ExternalSecuritySolutionsClient

NewExternalSecuritySolutionsClient creates a new instance of ExternalSecuritySolutionsClient.

func (*ClientFactory) NewGitHubOwnersClient added in v0.13.0

func (c *ClientFactory) NewGitHubOwnersClient() *GitHubOwnersClient

NewGitHubOwnersClient creates a new instance of GitHubOwnersClient.

func (*ClientFactory) NewGitHubReposClient added in v0.13.0

func (c *ClientFactory) NewGitHubReposClient() *GitHubReposClient

NewGitHubReposClient creates a new instance of GitHubReposClient.

func (*ClientFactory) NewGitLabGroupsClient added in v0.13.0

func (c *ClientFactory) NewGitLabGroupsClient() *GitLabGroupsClient

NewGitLabGroupsClient creates a new instance of GitLabGroupsClient.

func (*ClientFactory) NewGitLabProjectsClient added in v0.13.0

func (c *ClientFactory) NewGitLabProjectsClient() *GitLabProjectsClient

NewGitLabProjectsClient creates a new instance of GitLabProjectsClient.

func (*ClientFactory) NewGitLabSubgroupsClient added in v0.13.0

func (c *ClientFactory) NewGitLabSubgroupsClient() *GitLabSubgroupsClient

NewGitLabSubgroupsClient creates a new instance of GitLabSubgroupsClient.

func (*ClientFactory) NewGovernanceAssignmentsClient added in v0.10.0

func (c *ClientFactory) NewGovernanceAssignmentsClient() *GovernanceAssignmentsClient

NewGovernanceAssignmentsClient creates a new instance of GovernanceAssignmentsClient.

func (*ClientFactory) NewGovernanceRulesClient added in v0.10.0

func (c *ClientFactory) NewGovernanceRulesClient() *GovernanceRulesClient

NewGovernanceRulesClient creates a new instance of GovernanceRulesClient.

func (*ClientFactory) NewHealthReportsClient added in v0.11.0

func (c *ClientFactory) NewHealthReportsClient() *HealthReportsClient

NewHealthReportsClient creates a new instance of HealthReportsClient.

func (*ClientFactory) NewInformationProtectionPoliciesClient added in v0.10.0

func (c *ClientFactory) NewInformationProtectionPoliciesClient() *InformationProtectionPoliciesClient

NewInformationProtectionPoliciesClient creates a new instance of InformationProtectionPoliciesClient.

func (*ClientFactory) NewIotSecuritySolutionAnalyticsClient added in v0.10.0

func (c *ClientFactory) NewIotSecuritySolutionAnalyticsClient() *IotSecuritySolutionAnalyticsClient

NewIotSecuritySolutionAnalyticsClient creates a new instance of IotSecuritySolutionAnalyticsClient.

func (*ClientFactory) NewIotSecuritySolutionClient added in v0.10.0

func (c *ClientFactory) NewIotSecuritySolutionClient() *IotSecuritySolutionClient

NewIotSecuritySolutionClient creates a new instance of IotSecuritySolutionClient.

func (*ClientFactory) NewIotSecuritySolutionsAnalyticsAggregatedAlertClient added in v0.10.0

func (c *ClientFactory) NewIotSecuritySolutionsAnalyticsAggregatedAlertClient() *IotSecuritySolutionsAnalyticsAggregatedAlertClient

NewIotSecuritySolutionsAnalyticsAggregatedAlertClient creates a new instance of IotSecuritySolutionsAnalyticsAggregatedAlertClient.

func (*ClientFactory) NewIotSecuritySolutionsAnalyticsRecommendationClient added in v0.10.0

func (c *ClientFactory) NewIotSecuritySolutionsAnalyticsRecommendationClient() *IotSecuritySolutionsAnalyticsRecommendationClient

NewIotSecuritySolutionsAnalyticsRecommendationClient creates a new instance of IotSecuritySolutionsAnalyticsRecommendationClient.

func (*ClientFactory) NewJitNetworkAccessPoliciesClient added in v0.10.0

func (c *ClientFactory) NewJitNetworkAccessPoliciesClient() *JitNetworkAccessPoliciesClient

NewJitNetworkAccessPoliciesClient creates a new instance of JitNetworkAccessPoliciesClient.

func (*ClientFactory) NewLocationsClient added in v0.10.0

func (c *ClientFactory) NewLocationsClient() *LocationsClient

NewLocationsClient creates a new instance of LocationsClient.

func (*ClientFactory) NewMdeOnboardingsClient added in v0.10.0

func (c *ClientFactory) NewMdeOnboardingsClient() *MdeOnboardingsClient

NewMdeOnboardingsClient creates a new instance of MdeOnboardingsClient.

func (*ClientFactory) NewOperationsClient added in v0.10.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewOperatorsClient added in v0.11.0

func (c *ClientFactory) NewOperatorsClient() *OperatorsClient

NewOperatorsClient creates a new instance of OperatorsClient.

func (*ClientFactory) NewPricingsClient added in v0.10.0

func (c *ClientFactory) NewPricingsClient() *PricingsClient

NewPricingsClient creates a new instance of PricingsClient.

func (*ClientFactory) NewRegulatoryComplianceAssessmentsClient added in v0.10.0

func (c *ClientFactory) NewRegulatoryComplianceAssessmentsClient() *RegulatoryComplianceAssessmentsClient

NewRegulatoryComplianceAssessmentsClient creates a new instance of RegulatoryComplianceAssessmentsClient.

func (*ClientFactory) NewRegulatoryComplianceControlsClient added in v0.10.0

func (c *ClientFactory) NewRegulatoryComplianceControlsClient() *RegulatoryComplianceControlsClient

NewRegulatoryComplianceControlsClient creates a new instance of RegulatoryComplianceControlsClient.

func (*ClientFactory) NewRegulatoryComplianceStandardsClient added in v0.10.0

func (c *ClientFactory) NewRegulatoryComplianceStandardsClient() *RegulatoryComplianceStandardsClient

NewRegulatoryComplianceStandardsClient creates a new instance of RegulatoryComplianceStandardsClient.

func (*ClientFactory) NewSQLVulnerabilityAssessmentBaselineRulesClient added in v0.10.0

func (c *ClientFactory) NewSQLVulnerabilityAssessmentBaselineRulesClient() *SQLVulnerabilityAssessmentBaselineRulesClient

NewSQLVulnerabilityAssessmentBaselineRulesClient creates a new instance of SQLVulnerabilityAssessmentBaselineRulesClient.

func (*ClientFactory) NewSQLVulnerabilityAssessmentScanResultsClient added in v0.10.0

func (c *ClientFactory) NewSQLVulnerabilityAssessmentScanResultsClient() *SQLVulnerabilityAssessmentScanResultsClient

NewSQLVulnerabilityAssessmentScanResultsClient creates a new instance of SQLVulnerabilityAssessmentScanResultsClient.

func (*ClientFactory) NewSQLVulnerabilityAssessmentScansClient added in v0.10.0

func (c *ClientFactory) NewSQLVulnerabilityAssessmentScansClient() *SQLVulnerabilityAssessmentScansClient

NewSQLVulnerabilityAssessmentScansClient creates a new instance of SQLVulnerabilityAssessmentScansClient.

func (*ClientFactory) NewSecureScoreControlDefinitionsClient added in v0.10.0

func (c *ClientFactory) NewSecureScoreControlDefinitionsClient() *SecureScoreControlDefinitionsClient

NewSecureScoreControlDefinitionsClient creates a new instance of SecureScoreControlDefinitionsClient.

func (*ClientFactory) NewSecureScoreControlsClient added in v0.10.0

func (c *ClientFactory) NewSecureScoreControlsClient() *SecureScoreControlsClient

NewSecureScoreControlsClient creates a new instance of SecureScoreControlsClient.

func (*ClientFactory) NewSecureScoresClient added in v0.10.0

func (c *ClientFactory) NewSecureScoresClient() *SecureScoresClient

NewSecureScoresClient creates a new instance of SecureScoresClient.

func (*ClientFactory) NewSensitivitySettingsClient added in v0.11.0

func (c *ClientFactory) NewSensitivitySettingsClient() *SensitivitySettingsClient

NewSensitivitySettingsClient creates a new instance of SensitivitySettingsClient.

func (*ClientFactory) NewServerVulnerabilityAssessmentClient added in v0.10.0

func (c *ClientFactory) NewServerVulnerabilityAssessmentClient() *ServerVulnerabilityAssessmentClient

NewServerVulnerabilityAssessmentClient creates a new instance of ServerVulnerabilityAssessmentClient.

func (*ClientFactory) NewServerVulnerabilityAssessmentsSettingsClient added in v0.13.0

func (c *ClientFactory) NewServerVulnerabilityAssessmentsSettingsClient() *ServerVulnerabilityAssessmentsSettingsClient

NewServerVulnerabilityAssessmentsSettingsClient creates a new instance of ServerVulnerabilityAssessmentsSettingsClient.

func (*ClientFactory) NewSettingsClient added in v0.10.0

func (c *ClientFactory) NewSettingsClient() *SettingsClient

NewSettingsClient creates a new instance of SettingsClient.

func (*ClientFactory) NewSoftwareInventoriesClient added in v0.10.0

func (c *ClientFactory) NewSoftwareInventoriesClient() *SoftwareInventoriesClient

NewSoftwareInventoriesClient creates a new instance of SoftwareInventoriesClient.

func (*ClientFactory) NewSolutionsClient added in v0.10.0

func (c *ClientFactory) NewSolutionsClient() *SolutionsClient

NewSolutionsClient creates a new instance of SolutionsClient.

func (*ClientFactory) NewSolutionsReferenceDataClient added in v0.10.0

func (c *ClientFactory) NewSolutionsReferenceDataClient() *SolutionsReferenceDataClient

NewSolutionsReferenceDataClient creates a new instance of SolutionsReferenceDataClient.

func (*ClientFactory) NewSubAssessmentsClient added in v0.10.0

func (c *ClientFactory) NewSubAssessmentsClient() *SubAssessmentsClient

NewSubAssessmentsClient creates a new instance of SubAssessmentsClient.

func (*ClientFactory) NewTasksClient added in v0.10.0

func (c *ClientFactory) NewTasksClient() *TasksClient

NewTasksClient creates a new instance of TasksClient.

func (*ClientFactory) NewTopologyClient added in v0.10.0

func (c *ClientFactory) NewTopologyClient() *TopologyClient

NewTopologyClient creates a new instance of TopologyClient.

func (*ClientFactory) NewWorkspaceSettingsClient added in v0.10.0

func (c *ClientFactory) NewWorkspaceSettingsClient() *WorkspaceSettingsClient

NewWorkspaceSettingsClient creates a new instance of WorkspaceSettingsClient.

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"
	CloudNameGitLab      CloudName = "GitLab"
	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

	// READ-ONLY; The offering description.
	Description *string
}

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, *CspmMonitorGitLabOffering, - *CspmMonitorGithubOffering, *DefenderCspmAwsOffering, *DefenderCspmGcpOffering, *DefenderFoDatabasesAwsOffering, *DefenderForContainersAwsOffering, - *DefenderForContainersGcpOffering, *DefenderForDatabasesGcpOffering, *DefenderForServersAwsOffering, *DefenderForServersGcpOffering

type Code added in v0.11.0

type Code string

Code - The operation status code.

const (
	// CodeFailed - Extension was not created/updated successfully. See operation status message for more details.
	CodeFailed Code = "Failed"
	// CodeSucceeded - Extension was created/updated successfully.
	CodeSucceeded Code = "Succeeded"
)

func PossibleCodeValues added in v0.11.0

func PossibleCodeValues() []Code

PossibleCodeValues returns the possible values for the Code const type.

type Compliance

type Compliance struct {
	// Compliance data
	Properties *ComplianceProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; The timestamp when the Compliance calculation was conducted.
	AssessmentTimestampUTCDate *time.Time

	// READ-ONLY; The resource count of the given subscription for which the Compliance calculation was conducted (needed for
	// Management Group Compliance calculation).
	ResourceCount *int32
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewComplianceResultsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "DesignateMoreThanOneOwner", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ComplianceResult = armsecurity.ComplianceResult{
	// 	Name: to.Ptr("DesignateMoreThanOneOwner"),
	// 	Type: to.Ptr("Microsoft.Security/complianceResults"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/DesignateMoreThanOneOwner"),
	// 	Properties: &armsecurity.ComplianceResultProperties{
	// 		ResourceStatus: to.Ptr(armsecurity.ResourceStatusHealthy),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewComplianceResultsClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ComplianceResultList = armsecurity.ComplianceResultList{
		// 	Value: []*armsecurity.ComplianceResult{
		// 		{
		// 			Name: to.Ptr("DesignateMoreThanOneOwner"),
		// 			Type: to.Ptr("Microsoft.Security/complianceResults"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/DesignateMoreThanOneOwner"),
		// 			Properties: &armsecurity.ComplianceResultProperties{
		// 				ResourceStatus: to.Ptr(armsecurity.ResourceStatusHealthy),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RemoveExternalAccountsWithReadPermissions"),
		// 			Type: to.Ptr("Microsoft.Security/complianceResults"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/RemoveExternalAccountsWithReadPermissions"),
		// 			Properties: &armsecurity.ComplianceResultProperties{
		// 				ResourceStatus: to.Ptr(armsecurity.ResourceStatusNotHealthy),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RemoveDeprecatedAccounts"),
		// 			Type: to.Ptr("Microsoft.Security/complianceResults"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/RemoveDeprecatedAccounts"),
		// 			Properties: &armsecurity.ComplianceResultProperties{
		// 				ResourceStatus: to.Ptr(armsecurity.ResourceStatusHealthy),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// a compliance result
	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.NewListPager method.

type ComplianceResultsClientListResponse added in v0.3.0

type ComplianceResultsClientListResponse struct {
	// List of compliance results response
	ComplianceResultList
}

ComplianceResultsClientListResponse contains the response from method ComplianceResultsClient.NewListPager.

type ComplianceSegment

type ComplianceSegment struct {
	// READ-ONLY; The size (%) of the segment.
	Percentage *float64

	// READ-ONLY; The segment type, e.g. compliant, non-compliance, insufficient coverage, N/A, etc.
	SegmentType *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCompliancesClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "2018-01-01Z", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Compliance = armsecurity.Compliance{
	// 	Name: to.Ptr("2018-01-01Z"),
	// 	Type: to.Ptr("Microsoft.Security/compliances"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/compliances/2018-01-01Z"),
	// 	Properties: &armsecurity.ComplianceProperties{
	// 		AssessmentResult: []*armsecurity.ComplianceSegment{
	// 			{
	// 				Percentage: to.Ptr[float64](77.77777777777779),
	// 				SegmentType: to.Ptr("Compliant"),
	// 		}},
	// 		AssessmentTimestampUTCDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.000Z"); return t}()),
	// 		ResourceCount: to.Ptr[int32](18),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCompliancesClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ComplianceList = armsecurity.ComplianceList{
		// 	Value: []*armsecurity.Compliance{
		// 		{
		// 			Name: to.Ptr("2018-01-01Z"),
		// 			Type: to.Ptr("Microsoft.Security/compliances"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/compliances/2018-01-01Z"),
		// 			Properties: &armsecurity.ComplianceProperties{
		// 				AssessmentResult: []*armsecurity.ComplianceSegment{
		// 					{
		// 						Percentage: to.Ptr[float64](77.77777777777779),
		// 						SegmentType: to.Ptr("Compliant"),
		// 				}},
		// 				AssessmentTimestampUTCDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.000Z"); return t}()),
		// 				ResourceCount: to.Ptr[int32](18),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2018-01-02Z"),
		// 			Type: to.Ptr("Microsoft.Security/compliances"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/compliances/2018-01-02Z"),
		// 			Properties: &armsecurity.ComplianceProperties{
		// 				AssessmentResult: []*armsecurity.ComplianceSegment{
		// 					{
		// 						Percentage: to.Ptr[float64](94.44444444444444),
		// 						SegmentType: to.Ptr("Compliant"),
		// 				}},
		// 				AssessmentTimestampUTCDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-02T00:00:00.000Z"); return t}()),
		// 				ResourceCount: to.Ptr[int32](18),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2018-01-03Z"),
		// 			Type: to.Ptr("Microsoft.Security/compliances"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/compliances/2018-01-03Z"),
		// 			Properties: &armsecurity.ComplianceProperties{
		// 				AssessmentResult: []*armsecurity.ComplianceSegment{
		// 					{
		// 						Percentage: to.Ptr[float64](100),
		// 						SegmentType: to.Ptr("Compliant"),
		// 				}},
		// 				AssessmentTimestampUTCDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-03T00:00:00.000Z"); return t}()),
		// 				ResourceCount: to.Ptr[int32](18),
		// 			},
		// 	}},
		// }
	}
}
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 of a scope
	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.NewListPager method.

type CompliancesClientListResponse added in v0.3.0

type CompliancesClientListResponse struct {
	// List of Compliance objects response
	ComplianceList
}

CompliancesClientListResponse contains the response from method CompliancesClient.NewListPager.

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

	// The governance rule Condition's Property, e.g. Severity or AssessmentKey, see examples
	Property *string

	// The governance rule Condition's Value like severity Low, High or assessments keys, see examples
	Value *string
}

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

	// READ-ONLY; The list of Azure resources that the resource has inbound allowed connection from
	InboundConnectedResources []*ConnectedResource

	// READ-ONLY; The list of Azure resources that the resource has outbound allowed connection to
	OutboundConnectedResources []*ConnectedResource
}

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

	// READ-ONLY; The allowed tcp ports
	TCPPorts *string

	// READ-ONLY; The allowed udp ports
	UDPPorts *string
}

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
}

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

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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 ConnectionToIPNotAllowed

type ConnectionToIPNotAllowed struct {
	// REQUIRED; The values to allow. The format of the values depends on the rule type.
	AllowlistValues []*string

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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

	// Kind of the resource
	Kind *string

	// Location where the resource is stored
	Location *string

	// Security connector data
	Properties *ConnectorProperties

	// A list of key value pairs that describe the resource.
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; Resource type
	Type *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConnectorApplicationClient().CreateOrUpdate(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.Application{
		Properties: &armsecurity.ApplicationProperties{
			Description: to.Ptr("An application on critical GCP recommendations"),
			ConditionSets: []any{
				map[string]any{
					"conditions": []any{
						map[string]any{
							"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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Application = armsecurity.Application{
	// 	Name: to.Ptr("1f3afdf9-d0c9-4c3d-847f-89da613e70a8"),
	// 	Type: to.Ptr("Microsoft.Security/applications"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/applications/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.ApplicationProperties{
	// 		Description: to.Ptr("An application on critical GCP recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "contains",
	// 						"property": "$.Id",
	// 						"value": "-bil-",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("GCP Admin's application"),
	// 		SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewConnectorApplicationClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConnectorApplicationClient().Get(ctx, "gcpResourceGroup", "gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Application = armsecurity.Application{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/applications"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/applications/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.ApplicationProperties{
	// 		Description: to.Ptr("An application on critical GCP recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "contains",
	// 						"property": "$.Id",
	// 						"value": "-bil-",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("GCP Admin's application"),
	// 		SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
	// 	},
	// }
}
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 {
	// Security Application over a given scope
	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 {
	// Security Application over a given scope
	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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewConnectorApplicationsClient().NewListPager("gcpResourceGroup", "gcpconnector", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ApplicationsList = armsecurity.ApplicationsList{
		// 	Value: []*armsecurity.Application{
		// 		{
		// 			Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Type: to.Ptr("Microsoft.Security/applications"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/applications/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Properties: &armsecurity.ApplicationProperties{
		// 				Description: to.Ptr("An application on critical GCP recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "contains",
		// 								"property": "$.Id",
		// 								"value": "-bil-",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Admin's GCP application"),
		// 				SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Type: to.Ptr("Microsoft.Security/applications"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/applications/4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Properties: &armsecurity.ApplicationProperties{
		// 				Description: to.Ptr("An application on critical GCP recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "contains",
		// 								"property": "$.Id",
		// 								"value": "-prod-",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("GCP Admin's application"),
		// 				SourceResourceType: to.Ptr(armsecurity.ApplicationSourceResourceTypeAssessments),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ConnectorApplicationsClientListOptions added in v0.8.0

type ConnectorApplicationsClientListOptions struct {
}

ConnectorApplicationsClientListOptions contains the optional parameters for the ConnectorApplicationsClient.NewListPager method.

type ConnectorApplicationsClientListResponse added in v0.8.0

type ConnectorApplicationsClientListResponse struct {
	// Page of a security applications list
	ApplicationsList
}

ConnectorApplicationsClientListResponse contains the response from method ConnectorApplicationsClient.NewListPager.

type ConnectorProperties added in v0.3.0

type ConnectorProperties struct {
	// The security connector environment data.
	EnvironmentData EnvironmentDataClassification

	// The multi cloud resource's cloud name.
	EnvironmentName *CloudName

	// The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector).
	HierarchyIdentifier *string

	// A collection of offerings for the security connector.
	Offerings []CloudOfferingClassification

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

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// Settings for hybrid compute management. These settings are relevant only for Arc autoProvision (Hybrid Compute).
	HybridComputeSettings *HybridComputeSettingsProperties
}

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 2024-03-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2024-03-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConnectorsClient().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),
				ScanInterval:    to.Ptr[int64](4),
			},
			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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Connector = armsecurity.Connector{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr(""),
	// 	Kind: to.Ptr(""),
	// 	Name: to.Ptr("exampleSecurityConnectorName"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorName"),
	// 	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"),
	// 				},
	// 		}},
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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 2024-03-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2024-03-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewConnectorsClient().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 2024-03-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2024-03-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConnectorsClient().Get(ctx, "exampleResourceGroup", "exampleSecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Connector = armsecurity.Connector{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("etag value"),
	// 	Kind: to.Ptr(""),
	// 	Name: to.Ptr("exampleSecurityConnectorName"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorName"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armsecurity.ConnectorProperties{
	// 		EnvironmentData: &armsecurity.AwsEnvironmentData{
	// 			EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
	// 			ScanInterval: to.Ptr[int64](4),
	// 		},
	// 		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"),
	// 				},
	// 		}},
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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 2024-03-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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2024-03-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewConnectorsClient().NewListByResourceGroupPager("exampleResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ConnectorsList = armsecurity.ConnectorsList{
		// 	Value: []*armsecurity.Connector{
		// 		{
		// 			Location: to.Ptr("Central US"),
		// 			Etag: to.Ptr("etag value"),
		// 			Kind: to.Ptr(""),
		// 			Name: to.Ptr("exampleSecurityConnectorAws"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors"),
		// 			ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorAws"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecurity.ConnectorProperties{
		// 				EnvironmentData: &armsecurity.AwsEnvironmentData{
		// 					EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
		// 					ScanInterval: to.Ptr[int64](4),
		// 				},
		// 				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"),
		// 						},
		// 				}},
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("Central US"),
		// 			Etag: to.Ptr("etag value"),
		// 			Kind: to.Ptr(""),
		// 			Name: to.Ptr("exampleSecurityConnectorAwsOrganization"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors"),
		// 			ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorAwsOrganization"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecurity.ConnectorProperties{
		// 				EnvironmentData: &armsecurity.AwsEnvironmentData{
		// 					EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
		// 					OrganizationalData: &armsecurity.AwsOrganizationalDataMaster{
		// 						OrganizationMembershipType: to.Ptr(armsecurity.OrganizationMembershipTypeOrganization),
		// 						ExcludedAccountIDs: []*string{
		// 							to.Ptr("excludedAccountIdExample")},
		// 							StacksetName: to.Ptr("myStackSetName"),
		// 						},
		// 						ScanInterval: to.Ptr[int64](4),
		// 					},
		// 					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"),
		// 							},
		// 					}},
		// 				},
		// 				SystemData: &armsecurity.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					CreatedBy: to.Ptr("user@contoso.com"),
		// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				},
		// 			},
		// 			{
		// 				Location: to.Ptr("Central US"),
		// 				Etag: to.Ptr("etag value"),
		// 				Kind: to.Ptr(""),
		// 				Name: to.Ptr("exampleSecurityConnectorGcp"),
		// 				Type: to.Ptr("Microsoft.Security/securityConnectors"),
		// 				ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorGcp"),
		// 				Tags: map[string]*string{
		// 				},
		// 				Properties: &armsecurity.ConnectorProperties{
		// 					EnvironmentData: &armsecurity.GcpProjectEnvironmentData{
		// 						EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeGcpProject),
		// 						ProjectDetails: &armsecurity.GcpProjectDetails{
		// 							ProjectID: to.Ptr("My-0GCP-Project"),
		// 							ProjectNumber: to.Ptr("exampleHierarchyId"),
		// 							WorkloadIdentityPoolID: to.Ptr("My-workload-identity-federation-pool-id"),
		// 						},
		// 					},
		// 					EnvironmentName: to.Ptr(armsecurity.CloudNameGCP),
		// 					HierarchyIdentifier: to.Ptr("exampleHierarchyId"),
		// 					Offerings: []armsecurity.CloudOfferingClassification{
		// 						&armsecurity.CspmMonitorGcpOffering{
		// 							OfferingType: to.Ptr(armsecurity.OfferingTypeCspmMonitorGcp),
		// 							NativeCloudConnection: &armsecurity.CspmMonitorGcpOfferingNativeCloudConnection{
		// 								ServiceAccountEmailAddress: to.Ptr("capm@projectName.com"),
		// 								WorkloadIdentityProviderID: to.Ptr("My workload identity provider Id"),
		// 							},
		// 					}},
		// 				},
		// 				SystemData: &armsecurity.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					CreatedBy: to.Ptr("user@contoso.com"),
		// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				},
		// 		}},
		// 	}
	}
}
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 2024-03-01-preview

  • options - ConnectorsClientListOptions contains the optional parameters for the ConnectorsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2024-03-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewConnectorsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ConnectorsList = armsecurity.ConnectorsList{
		// 	Value: []*armsecurity.Connector{
		// 		{
		// 			Location: to.Ptr("Central US"),
		// 			Etag: to.Ptr("etag value"),
		// 			Kind: to.Ptr(""),
		// 			Name: to.Ptr("exampleSecurityConnectorAws"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors"),
		// 			ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup1/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorAws"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecurity.ConnectorProperties{
		// 				EnvironmentData: &armsecurity.AwsEnvironmentData{
		// 					EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
		// 					ScanInterval: to.Ptr[int64](4),
		// 				},
		// 				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"),
		// 						},
		// 				}},
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("Central US"),
		// 			Etag: to.Ptr("etag value"),
		// 			Kind: to.Ptr(""),
		// 			Name: to.Ptr("exampleSecurityConnectorAwsOrganization"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors"),
		// 			ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup2/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorAwsOrganization"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecurity.ConnectorProperties{
		// 				EnvironmentData: &armsecurity.AwsEnvironmentData{
		// 					EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeAwsAccount),
		// 					OrganizationalData: &armsecurity.AwsOrganizationalDataMaster{
		// 						OrganizationMembershipType: to.Ptr(armsecurity.OrganizationMembershipTypeOrganization),
		// 						ExcludedAccountIDs: []*string{
		// 							to.Ptr("excludedAccountIdExample")},
		// 							StacksetName: to.Ptr("myStackSetName"),
		// 						},
		// 						ScanInterval: to.Ptr[int64](4),
		// 					},
		// 					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"),
		// 							},
		// 					}},
		// 				},
		// 				SystemData: &armsecurity.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					CreatedBy: to.Ptr("user@contoso.com"),
		// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				},
		// 			},
		// 			{
		// 				Location: to.Ptr("centralus"),
		// 				Etag: to.Ptr("etag value"),
		// 				Kind: to.Ptr(""),
		// 				Name: to.Ptr("githubTest"),
		// 				Type: to.Ptr("Microsoft.Security/securityconnectors"),
		// 				ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup3/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorGithub"),
		// 				Tags: map[string]*string{
		// 				},
		// 				Properties: &armsecurity.ConnectorProperties{
		// 					EnvironmentData: &armsecurity.GithubScopeEnvironmentData{
		// 						EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeGithubScope),
		// 					},
		// 					EnvironmentName: to.Ptr(armsecurity.CloudNameGithub),
		// 					HierarchyIdentifier: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup3/providers/Microsoft.SecurityDevops/githubConnectors/exampleGithubConnector"),
		// 					Offerings: []armsecurity.CloudOfferingClassification{
		// 						&armsecurity.CspmMonitorGithubOffering{
		// 							OfferingType: to.Ptr(armsecurity.OfferingTypeCspmMonitorGithub),
		// 					}},
		// 				},
		// 				SystemData: &armsecurity.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					CreatedBy: to.Ptr("user@contoso.com"),
		// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				},
		// 			},
		// 			{
		// 				Location: to.Ptr("centralus"),
		// 				Etag: to.Ptr("etag value"),
		// 				Kind: to.Ptr(""),
		// 				Name: to.Ptr("AzureDevOpsTest"),
		// 				Type: to.Ptr("Microsoft.Security/securityconnectors"),
		// 				ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup3/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorAzureDevOpsConnectors"),
		// 				Tags: map[string]*string{
		// 				},
		// 				Properties: &armsecurity.ConnectorProperties{
		// 					EnvironmentData: &armsecurity.GithubScopeEnvironmentData{
		// 						EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeGithubScope),
		// 					},
		// 					EnvironmentName: to.Ptr(armsecurity.CloudNameGithub),
		// 					HierarchyIdentifier: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup3/providers/Microsoft.SecurityDevops/azureDevOpsConnectors/exampleAzureDevOpsConnector"),
		// 					Offerings: []armsecurity.CloudOfferingClassification{
		// 						&armsecurity.CspmMonitorGithubOffering{
		// 							OfferingType: to.Ptr(armsecurity.OfferingTypeCspmMonitorGithub),
		// 					}},
		// 				},
		// 				SystemData: &armsecurity.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					CreatedBy: to.Ptr("user@contoso.com"),
		// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				},
		// 			},
		// 			{
		// 				Location: to.Ptr("Central US"),
		// 				Etag: to.Ptr("etag value"),
		// 				Kind: to.Ptr(""),
		// 				Name: to.Ptr("exampleSecurityConnectorGcp"),
		// 				Type: to.Ptr("Microsoft.Security/securityConnectors"),
		// 				ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup3/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorGcp"),
		// 				Tags: map[string]*string{
		// 				},
		// 				Properties: &armsecurity.ConnectorProperties{
		// 					EnvironmentData: &armsecurity.GcpProjectEnvironmentData{
		// 						EnvironmentType: to.Ptr(armsecurity.EnvironmentTypeGcpProject),
		// 						ProjectDetails: &armsecurity.GcpProjectDetails{
		// 							ProjectID: to.Ptr("My-0GCP-Project"),
		// 							ProjectNumber: to.Ptr("exampleHierarchyId"),
		// 							WorkloadIdentityPoolID: to.Ptr("6c78da41157548d3b1d8b3c72effdf8c"),
		// 						},
		// 					},
		// 					EnvironmentName: to.Ptr(armsecurity.CloudNameGCP),
		// 					HierarchyIdentifier: to.Ptr("exampleHierarchyId"),
		// 					Offerings: []armsecurity.CloudOfferingClassification{
		// 						&armsecurity.CspmMonitorGcpOffering{
		// 							OfferingType: to.Ptr(armsecurity.OfferingTypeCspmMonitorGcp),
		// 							NativeCloudConnection: &armsecurity.CspmMonitorGcpOfferingNativeCloudConnection{
		// 								ServiceAccountEmailAddress: to.Ptr("capm@projectName.com"),
		// 								WorkloadIdentityProviderID: to.Ptr("My workload identity provider Id"),
		// 							},
		// 					}},
		// 				},
		// 				SystemData: &armsecurity.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					CreatedBy: to.Ptr("user@contoso.com"),
		// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-15T13:47:50.328Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user@contoso.com"),
		// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				},
		// 		}},
		// 	}
	}
}
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 2024-03-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2024-03-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConnectorsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Connector = armsecurity.Connector{
	// 	Location: to.Ptr("Central US"),
	// 	Etag: to.Ptr("etag value"),
	// 	Kind: to.Ptr(""),
	// 	Name: to.Ptr("exampleSecurityConnectorName"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors"),
	// 	ID: to.Ptr("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/securityConnectors/exampleSecurityConnectorName"),
	// 	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"),
	// 				},
	// 		}},
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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 {
	// The security connector resource.
	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 {
	// The security connector resource.
	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.NewListByResourceGroupPager method.

type ConnectorsClientListByResourceGroupResponse added in v0.3.0

type ConnectorsClientListByResourceGroupResponse struct {
	// List of security connectors response.
	ConnectorsList
}

ConnectorsClientListByResourceGroupResponse contains the response from method ConnectorsClient.NewListByResourceGroupPager.

type ConnectorsClientListOptions added in v0.3.0

type ConnectorsClientListOptions struct {
}

ConnectorsClientListOptions contains the optional parameters for the ConnectorsClient.NewListPager method.

type ConnectorsClientListResponse added in v0.3.0

type ConnectorsClientListResponse struct {
	// List of security connectors response.
	ConnectorsList
}

ConnectorsClientListResponse contains the response from method ConnectorsClient.NewListPager.

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 {
	// The security connector resource.
	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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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 {
	// REQUIRED; List of security contacts
	Value []*Contact

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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 {
	// List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in
	// this security contact.
	Emails *string

	// Indicates whether the security contact is enabled.
	IsEnabled *bool

	// Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the
	// subscription.
	NotificationsByRole *ContactPropertiesNotificationsByRole

	// A collection of sources types which evaluate the email notification.
	NotificationsSources []NotificationsSourceClassification

	// The security contact's phone number
	Phone *string
}

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 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 []*SecurityContactRole

	// Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the
	// subscription.
	State *State
}

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 SecurityContactName, 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 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewContactsClient().Create(ctx, armsecurity.SecurityContactNameDefault, armsecurity.Contact{
		Properties: &armsecurity.ContactProperties{
			Emails:    to.Ptr("john@contoso.com;jane@contoso.com"),
			IsEnabled: to.Ptr(true),
			NotificationsByRole: &armsecurity.ContactPropertiesNotificationsByRole{
				Roles: []*armsecurity.SecurityContactRole{
					to.Ptr(armsecurity.SecurityContactRoleOwner)},
				State: to.Ptr(armsecurity.State("On")),
			},
			NotificationsSources: []armsecurity.NotificationsSourceClassification{
				&armsecurity.NotificationsSourceAttackPath{
					SourceType:       to.Ptr(armsecurity.SourceTypeAttackPath),
					MinimalRiskLevel: to.Ptr(armsecurity.MinimalRiskLevelCritical),
				},
				&armsecurity.NotificationsSourceAlert{
					SourceType:      to.Ptr(armsecurity.SourceTypeAlert),
					MinimalSeverity: to.Ptr(armsecurity.MinimalSeverityMedium),
				}},
			Phone: to.Ptr("(214)275-4038"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Contact = armsecurity.Contact{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityContact"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityContacts/default"),
	// 	Properties: &armsecurity.ContactProperties{
	// 		Emails: to.Ptr("john@microsoft.com;jane@microsoft.com"),
	// 		IsEnabled: to.Ptr(true),
	// 		NotificationsByRole: &armsecurity.ContactPropertiesNotificationsByRole{
	// 			Roles: []*armsecurity.SecurityContactRole{
	// 				to.Ptr(armsecurity.SecurityContactRoleOwner)},
	// 				State: to.Ptr(armsecurity.State("On")),
	// 			},
	// 			NotificationsSources: []armsecurity.NotificationsSourceClassification{
	// 				&armsecurity.NotificationsSourceAttackPath{
	// 					SourceType: to.Ptr(armsecurity.SourceTypeAttackPath),
	// 					MinimalRiskLevel: to.Ptr(armsecurity.MinimalRiskLevelCritical),
	// 				},
	// 				&armsecurity.NotificationsSourceAlert{
	// 					SourceType: to.Ptr(armsecurity.SourceTypeAlert),
	// 					MinimalSeverity: to.Ptr(armsecurity.MinimalSeverityMedium),
	// 			}},
	// 			Phone: to.Ptr("(214)275-4038"),
	// 		},
	// 	}
}
Output:

func (*ContactsClient) Delete added in v0.3.0

Delete - Delete security contact configurations for the subscription If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewContactsClient().Delete(ctx, armsecurity.SecurityContactNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ContactsClient) Get added in v0.3.0

Get - Get Default Security contact configurations for the subscription If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewContactsClient().Get(ctx, armsecurity.SecurityContactNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Contact = armsecurity.Contact{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityContacts"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityContacts/default"),
	// 	Properties: &armsecurity.ContactProperties{
	// 		Emails: to.Ptr("john@contoso.com;jane@contoso.com"),
	// 		IsEnabled: to.Ptr(true),
	// 		NotificationsByRole: &armsecurity.ContactPropertiesNotificationsByRole{
	// 			Roles: []*armsecurity.SecurityContactRole{
	// 				to.Ptr(armsecurity.SecurityContactRoleOwner)},
	// 				State: to.Ptr(armsecurity.State("On")),
	// 			},
	// 			NotificationsSources: []armsecurity.NotificationsSourceClassification{
	// 				&armsecurity.NotificationsSourceAttackPath{
	// 					SourceType: to.Ptr(armsecurity.SourceTypeAttackPath),
	// 					MinimalRiskLevel: to.Ptr(armsecurity.MinimalRiskLevelCritical),
	// 				},
	// 				&armsecurity.NotificationsSourceAlert{
	// 					SourceType: to.Ptr(armsecurity.SourceTypeAlert),
	// 					MinimalSeverity: to.Ptr(armsecurity.MinimalSeverityMedium),
	// 			}},
	// 			Phone: to.Ptr("(214)275-4038"),
	// 		},
	// 	}
}
Output:

func (*ContactsClient) NewListPager added in v0.6.0

NewListPager - List all security contact configurations for the subscription

Generated from API version 2023-12-01-preview

  • options - ContactsClientListOptions contains the optional parameters for the ContactsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-12-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewContactsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ContactList = armsecurity.ContactList{
		// 	Value: []*armsecurity.Contact{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/securityContact"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityContact/default"),
		// 			Properties: &armsecurity.ContactProperties{
		// 				Emails: to.Ptr("john@contoso.com;Jane@contoso.com"),
		// 				IsEnabled: to.Ptr(true),
		// 				NotificationsByRole: &armsecurity.ContactPropertiesNotificationsByRole{
		// 					Roles: []*armsecurity.SecurityContactRole{
		// 						to.Ptr(armsecurity.SecurityContactRoleOwner),
		// 						to.Ptr(armsecurity.SecurityContactRole("Admin"))},
		// 						State: to.Ptr(armsecurity.State("On")),
		// 					},
		// 					NotificationsSources: []armsecurity.NotificationsSourceClassification{
		// 						&armsecurity.NotificationsSourceAttackPath{
		// 							SourceType: to.Ptr(armsecurity.SourceTypeAttackPath),
		// 							MinimalRiskLevel: to.Ptr(armsecurity.MinimalRiskLevelCritical),
		// 						},
		// 						&armsecurity.NotificationsSourceAlert{
		// 							SourceType: to.Ptr(armsecurity.SourceTypeAlert),
		// 							MinimalSeverity: to.Ptr(armsecurity.MinimalSeverityMedium),
		// 					}},
		// 					Phone: to.Ptr("(214)275-4038"),
		// 				},
		// 		}},
		// 	}
	}
}
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 details and configurations for notifications coming from Microsoft Defender for Cloud.
	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 details and configurations for notifications coming from Microsoft Defender for Cloud.
	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.NewListPager method.

type ContactsClientListResponse added in v0.3.0

type ContactsClientListResponse struct {
	// List of security contacts response
	ContactList
}

ContactsClientListResponse contains the response from method ContactsClient.NewListPager.

type ContainerRegistryVulnerabilityProperties

type ContainerRegistryVulnerabilityProperties struct {
	// REQUIRED; Sub-assessment resource type
	AssessedResourceType *AssessedResourceType

	// READ-ONLY; List of CVEs
	Cve []*CVE

	// READ-ONLY; Dictionary from cvss version to cvss details object
	Cvss map[string]*CVSS

	// READ-ONLY; Digest of the vulnerable image
	ImageDigest *string

	// READ-ONLY; Indicates whether a patch is available or not
	Patchable *bool

	// READ-ONLY; Published time
	PublishedTime *time.Time

	// READ-ONLY; Name of the repository which the vulnerable image belongs to
	RepositoryName *string

	// READ-ONLY; Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered, Vulnerability
	Type *string

	// READ-ONLY
	VendorReferences []*VendorReference
}

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

	// The native cloud connection configuration
	NativeCloudConnection *CspmMonitorAwsOfferingNativeCloudConnection

	// READ-ONLY; The offering description.
	Description *string
}

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
}

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

	// READ-ONLY; The offering description.
	Description *string
}

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

	// The native cloud connection configuration
	NativeCloudConnection *CspmMonitorGcpOfferingNativeCloudConnection

	// READ-ONLY; The offering description.
	Description *string
}

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

	// The GCP workload identity provider id for the offering
	WorkloadIdentityProviderID *string
}

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 CspmMonitorGitLabOffering added in v0.11.0

type CspmMonitorGitLabOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// READ-ONLY; The offering description.
	Description *string
}

CspmMonitorGitLabOffering - The CSPM (Cloud security posture management) monitoring for gitlab offering

func (*CspmMonitorGitLabOffering) GetCloudOffering added in v0.11.0

func (c *CspmMonitorGitLabOffering) GetCloudOffering() *CloudOffering

GetCloudOffering implements the CloudOfferingClassification interface for type CspmMonitorGitLabOffering.

func (CspmMonitorGitLabOffering) MarshalJSON added in v0.11.0

func (c CspmMonitorGitLabOffering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CspmMonitorGitLabOffering.

func (*CspmMonitorGitLabOffering) UnmarshalJSON added in v0.11.0

func (c *CspmMonitorGitLabOffering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CspmMonitorGitLabOffering.

type CspmMonitorGithubOffering added in v0.8.0

type CspmMonitorGithubOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// READ-ONLY; The offering description.
	Description *string
}

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

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; Resource type
	Type *string
}

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

	// GZip encoded KQL query representing the assessment automation results required.
	CompressedQuery *string

	// The description to relate to the assessments generated by this assessment automation.
	Description *string

	// The display name of the assessments generated by this assessment automation.
	DisplayName *string

	// The remediation description to relate to the assessments generated by this assessment automation.
	RemediationDescription *string

	// The severity to relate to the assessments generated by this assessment automation.
	Severity *SeverityEnum

	// Relevant cloud for the custom assessment automation.
	SupportedCloud *SupportedCloudEnum
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// The description to relate to the assessments generated by this assessment automation.
	Description *string

	// The display name of the assessments generated by this assessment automation.
	DisplayName *string

	// The remediation description to relate to the assessments generated by this assessment automation.
	RemediationDescription *string

	// The severity to relate to the assessments generated by this assessment automation.
	Severity *SeverityEnum

	// Relevant cloud for the custom assessment automation.
	SupportedCloud *SupportedCloudEnum
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomAssessmentAutomationsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomAssessmentAutomation = armsecurity.CustomAssessmentAutomation{
	// 	Name: to.Ptr("33e7cc6e-a139-4723-a0e5-76993aee0771"),
	// 	Type: to.Ptr("Microsoft.Security/customAssessmentAutomations"),
	// 	ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/33e7cc6e-a139-4723-a0e5-76993aee0771"),
	// 	Properties: &armsecurity.CustomAssessmentAutomationProperties{
	// 		Description: to.Ptr("organization passwords policy"),
	// 		AssessmentKey: to.Ptr("d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb"),
	// 		CompressedQuery: to.Ptr("DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA="),
	// 		DisplayName: to.Ptr("Password Policy"),
	// 		RemediationDescription: to.Ptr("Change password policy to..."),
	// 		Severity: to.Ptr(armsecurity.SeverityEnumMedium),
	// 		SupportedCloud: to.Ptr(armsecurity.SupportedCloudEnumAWS),
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCustomAssessmentAutomationsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomAssessmentAutomationsClient().Get(ctx, "TestResourceGroup", "MyCustomAssessmentAutomation", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomAssessmentAutomation = armsecurity.CustomAssessmentAutomation{
	// 	Name: to.Ptr("MyCustomAssessmentAutomation"),
	// 	Type: to.Ptr("Microsoft.Security/customAssessmentAutomations"),
	// 	ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation"),
	// 	Properties: &armsecurity.CustomAssessmentAutomationProperties{
	// 		Description: to.Ptr("organization passwords policy"),
	// 		AssessmentKey: to.Ptr("d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb"),
	// 		CompressedQuery: to.Ptr("DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA="),
	// 		DisplayName: to.Ptr("Password Policy"),
	// 		RemediationDescription: to.Ptr("Change password policy to..."),
	// 		Severity: to.Ptr(armsecurity.SeverityEnumLow),
	// 		SupportedCloud: to.Ptr(armsecurity.SupportedCloudEnumAWS),
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomAssessmentAutomationsClient().NewListByResourceGroupPager("TestResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomAssessmentAutomationsListResult = armsecurity.CustomAssessmentAutomationsListResult{
		// 	Value: []*armsecurity.CustomAssessmentAutomation{
		// 		{
		// 			Name: to.Ptr("MyCustomAssessmentAutomation1"),
		// 			Type: to.Ptr("Microsoft.Security/customAssessmentAutomations"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation1"),
		// 			Properties: &armsecurity.CustomAssessmentAutomationProperties{
		// 				Description: to.Ptr("organization passwords policy"),
		// 				AssessmentKey: to.Ptr("d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb"),
		// 				CompressedQuery: to.Ptr("DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA="),
		// 				DisplayName: to.Ptr("Password Policy"),
		// 				RemediationDescription: to.Ptr("Change password policy to..."),
		// 				Severity: to.Ptr(armsecurity.SeverityEnumMedium),
		// 				SupportedCloud: to.Ptr(armsecurity.SupportedCloudEnumAWS),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("MyCustomAssessmentAutomation2"),
		// 			Type: to.Ptr("Microsoft.Security/customAssessmentAutomations"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation2"),
		// 			Properties: &armsecurity.CustomAssessmentAutomationProperties{
		// 				Description: to.Ptr("organization passwords policy"),
		// 				AssessmentKey: to.Ptr("fc1dbcd0-502c-4eab-9312-4014cfc8ea56"),
		// 				CompressedQuery: to.Ptr("DQAKAEkAYQBtAF8AUABhAHMAcwB3AG8AcgBkAFAAbwBsAGkAYwB5ACAADQAKAHwAIABlAHgAdABlAG4AZAAgAEgAZQBhAGwAdABoAFMAdABhAHQAdQBzACAAPQAgAGkAZgBmACgAdABvAGkAbgB0ACgAUgBlAGMAbwByAGQALgBNAGkAbgBpAG0AdQBtAFAAYQBzAHMAdwBvAHIAZABMAGUAbgBnAHQAaAApACAAPAAgADgALAAgACcAVQBOAEgARQBBAEwAVABIAFkAJwAsACAAJwBIAEUAQQBMAFQASABZACcAKQANAAoA"),
		// 				DisplayName: to.Ptr("Password Policy"),
		// 				RemediationDescription: to.Ptr("Change password policy to..."),
		// 				Severity: to.Ptr(armsecurity.SeverityEnumLow),
		// 				SupportedCloud: to.Ptr(armsecurity.SupportedCloudEnumAWS),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:01:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:01:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 	}},
		// }
	}
}
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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomAssessmentAutomationsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomAssessmentAutomationsListResult = armsecurity.CustomAssessmentAutomationsListResult{
		// 	Value: []*armsecurity.CustomAssessmentAutomation{
		// 		{
		// 			Name: to.Ptr("MyCustomAssessmentAutomation1"),
		// 			Type: to.Ptr("Microsoft.Security/customAssessmentAutomations"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation1"),
		// 			Properties: &armsecurity.CustomAssessmentAutomationProperties{
		// 				Description: to.Ptr("organization passwords policy"),
		// 				AssessmentKey: to.Ptr("d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb"),
		// 				CompressedQuery: to.Ptr("DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA="),
		// 				DisplayName: to.Ptr("Password Policy"),
		// 				RemediationDescription: to.Ptr("Change password policy to..."),
		// 				Severity: to.Ptr(armsecurity.SeverityEnumMedium),
		// 				SupportedCloud: to.Ptr(armsecurity.SupportedCloudEnumAWS),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("MyCustomAssessmentAutomation2"),
		// 			Type: to.Ptr("Microsoft.Security/customAssessmentAutomations"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation2"),
		// 			Properties: &armsecurity.CustomAssessmentAutomationProperties{
		// 				Description: to.Ptr("organization passwords policy"),
		// 				AssessmentKey: to.Ptr("fc1dbcd0-502c-4eab-9312-4014cfc8ea56"),
		// 				CompressedQuery: to.Ptr("Q29tcHV0ZV9OZXR3b3JrCnwgZXh0ZW5kIEhlYWx0aFN0YXR1cyA9ICdVTkhFQUxUSFkn"),
		// 				DisplayName: to.Ptr("Password Policy"),
		// 				RemediationDescription: to.Ptr("Change password policy to..."),
		// 				Severity: to.Ptr(armsecurity.SeverityEnumLow),
		// 				SupportedCloud: to.Ptr(armsecurity.SupportedCloudEnumGCP),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:01:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:01:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Custom Assessment Automation
	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 {
	// Custom Assessment Automation
	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.NewListByResourceGroupPager method.

type CustomAssessmentAutomationsClientListByResourceGroupResponse added in v0.3.0

type CustomAssessmentAutomationsClientListByResourceGroupResponse struct {
	// A list of Custom Assessment Automations
	CustomAssessmentAutomationsListResult
}

CustomAssessmentAutomationsClientListByResourceGroupResponse contains the response from method CustomAssessmentAutomationsClient.NewListByResourceGroupPager.

type CustomAssessmentAutomationsClientListBySubscriptionOptions added in v0.3.0

type CustomAssessmentAutomationsClientListBySubscriptionOptions struct {
}

CustomAssessmentAutomationsClientListBySubscriptionOptions contains the optional parameters for the CustomAssessmentAutomationsClient.NewListBySubscriptionPager method.

type CustomAssessmentAutomationsClientListBySubscriptionResponse added in v0.3.0

type CustomAssessmentAutomationsClientListBySubscriptionResponse struct {
	// A list of Custom Assessment Automations
	CustomAssessmentAutomationsListResult
}

CustomAssessmentAutomationsClientListBySubscriptionResponse contains the response from method CustomAssessmentAutomationsClient.NewListBySubscriptionPager.

type CustomAssessmentAutomationsListResult

type CustomAssessmentAutomationsListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// READ-ONLY; Collection of Custom Assessment Automations
	Value []*CustomAssessmentAutomation
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; Resource type
	Type *string
}

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

	// The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]
	Principal *string
}

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
}

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
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomEntityStoreAssignmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomEntityStoreAssignment = armsecurity.CustomEntityStoreAssignment{
	// 	Name: to.Ptr("33e7cc6e-a139-4723-a0e5-76993aee0771"),
	// 	Type: to.Ptr("Microsoft.Security/customEntityStoreAssignments"),
	// 	ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771"),
	// 	Properties: &armsecurity.CustomEntityStoreAssignmentProperties{
	// 		EntityStoreDatabaseLink: to.Ptr("https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA="),
	// 		Principal: to.Ptr("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCustomEntityStoreAssignmentsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomEntityStoreAssignmentsClient().Get(ctx, "TestResourceGroup", "33e7cc6e-a139-4723-a0e5-76993aee0771", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomEntityStoreAssignment = armsecurity.CustomEntityStoreAssignment{
	// 	Name: to.Ptr("33e7cc6e-a139-4723-a0e5-76993aee0771"),
	// 	Type: to.Ptr("Microsoft.Security/customEntityStoreAssignments"),
	// 	ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771"),
	// 	Properties: &armsecurity.CustomEntityStoreAssignmentProperties{
	// 		EntityStoreDatabaseLink: to.Ptr("https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA="),
	// 		Principal: to.Ptr("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 	},
	// 	SystemData: &armsecurity.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		CreatedBy: to.Ptr("user@contoso.com"),
	// 		CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("user@contoso.com"),
	// 		LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 	},
	// }
}
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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomEntityStoreAssignmentsClient().NewListByResourceGroupPager("TestResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomEntityStoreAssignmentsListResult = armsecurity.CustomEntityStoreAssignmentsListResult{
		// 	Value: []*armsecurity.CustomEntityStoreAssignment{
		// 		{
		// 			Name: to.Ptr("33e7cc6e-a139-4723-a0e5-76993aee0771"),
		// 			Type: to.Ptr("Microsoft.Security/customEntityStoreAssignments"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771"),
		// 			Properties: &armsecurity.CustomEntityStoreAssignmentProperties{
		// 				EntityStoreDatabaseLink: to.Ptr("https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA="),
		// 				Principal: to.Ptr("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47"),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("a400695c-4728-d5cc-8e19-4b5a76f209df"),
		// 			Type: to.Ptr("Microsoft.Security/customEntityStoreAssignments"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/a400695c-4728-d5cc-8e19-4b5a76f209df"),
		// 			Properties: &armsecurity.CustomEntityStoreAssignmentProperties{
		// 				EntityStoreDatabaseLink: to.Ptr("https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwvIz8lMrgzKz0nlqlFIrShJzUtR8Cz2SE3MKcmoVLBVUE9LzClOVQcA1IFnficAAAA="),
		// 				Principal: to.Ptr("aaduser=f6e2564c-f34a-9b61-416c-5e5e7e521118;72f988bf-86f1-41af-91ab-2d7cd011db47"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomEntityStoreAssignmentsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomEntityStoreAssignmentsListResult = armsecurity.CustomEntityStoreAssignmentsListResult{
		// 	Value: []*armsecurity.CustomEntityStoreAssignment{
		// 		{
		// 			Name: to.Ptr("33e7cc6e-a139-4723-a0e5-76993aee0771"),
		// 			Type: to.Ptr("Microsoft.Security/customEntityStoreAssignments"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771"),
		// 			Properties: &armsecurity.CustomEntityStoreAssignmentProperties{
		// 				EntityStoreDatabaseLink: to.Ptr("https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA="),
		// 				Principal: to.Ptr("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47"),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("a400695c-4728-d5cc-8e19-4b5a76f209df"),
		// 			Type: to.Ptr("Microsoft.Security/customEntityStoreAssignments"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/a400695c-4728-d5cc-8e19-4b5a76f209df"),
		// 			Properties: &armsecurity.CustomEntityStoreAssignmentProperties{
		// 				EntityStoreDatabaseLink: to.Ptr("https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwvIz8lMrgzKz0nlqlFIrShJzUtR8Cz2SE3MKcmoVLBVUE9LzClOVQcA1IFnficAAAA="),
		// 				Principal: to.Ptr("aaduser=f6e2564c-f34a-9b61-416c-5e5e7e521118;72f988bf-86f1-41af-91ab-2d7cd011db47"),
		// 			},
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:01:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-31T13:01:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Custom entity store assignment
	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 {
	// Custom entity store assignment
	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.NewListByResourceGroupPager method.

type CustomEntityStoreAssignmentsClientListByResourceGroupResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientListByResourceGroupResponse struct {
	// A list of custom entity store assignments
	CustomEntityStoreAssignmentsListResult
}

CustomEntityStoreAssignmentsClientListByResourceGroupResponse contains the response from method CustomEntityStoreAssignmentsClient.NewListByResourceGroupPager.

type CustomEntityStoreAssignmentsClientListBySubscriptionOptions added in v0.3.0

type CustomEntityStoreAssignmentsClientListBySubscriptionOptions struct {
}

CustomEntityStoreAssignmentsClientListBySubscriptionOptions contains the optional parameters for the CustomEntityStoreAssignmentsClient.NewListBySubscriptionPager method.

type CustomEntityStoreAssignmentsClientListBySubscriptionResponse added in v0.3.0

type CustomEntityStoreAssignmentsClientListBySubscriptionResponse struct {
	// A list of custom entity store assignments
	CustomEntityStoreAssignmentsListResult
}

CustomEntityStoreAssignmentsClientListBySubscriptionResponse contains the response from method CustomEntityStoreAssignmentsClient.NewListBySubscriptionPager.

type CustomEntityStoreAssignmentsListResult

type CustomEntityStoreAssignmentsListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// READ-ONLY; Collection of custom entity store assignments
	Value []*CustomEntityStoreAssignment
}

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
}

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

	// Data export setting data
	Properties *DataExportSettingProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// Defenders CSPM Permissions Management offering configurations
	Ciem *DefenderCspmAwsOfferingCiem

	// The Microsoft Defender Data Sensitivity discovery configuration
	DataSensitivityDiscovery *DefenderCspmAwsOfferingDataSensitivityDiscovery

	// The databases DSPM configuration
	DatabasesDspm *DefenderCspmAwsOfferingDatabasesDspm

	// The Microsoft Defender container agentless discovery K8s configuration
	MdcContainersAgentlessDiscoveryK8S *DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S

	// The Microsoft Defender container image assessment configuration
	MdcContainersImageAssessment *DefenderCspmAwsOfferingMdcContainersImageAssessment

	// The Microsoft Defender for CSPM offering VM scanning configuration
	VMScanners *DefenderCspmAwsOfferingVMScanners

	// READ-ONLY; The offering description.
	Description *string
}

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 DefenderCspmAwsOfferingCiem added in v0.13.0

type DefenderCspmAwsOfferingCiem struct {
	// Defender CSPM Permissions Management discovery configuration
	CiemDiscovery *DefenderCspmAwsOfferingCiemDiscovery

	// AWS Defender CSPM Permissions Management OIDC (open id connect) connection configurations
	CiemOidc *DefenderCspmAwsOfferingCiemOidc
}

DefenderCspmAwsOfferingCiem - Defenders CSPM Permissions Management offering configurations

func (DefenderCspmAwsOfferingCiem) MarshalJSON added in v0.13.0

func (d DefenderCspmAwsOfferingCiem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingCiem.

func (*DefenderCspmAwsOfferingCiem) UnmarshalJSON added in v0.13.0

func (d *DefenderCspmAwsOfferingCiem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingCiem.

type DefenderCspmAwsOfferingCiemDiscovery added in v0.13.0

type DefenderCspmAwsOfferingCiemDiscovery struct {
	// The cloud role ARN in AWS for Permissions Management discovery
	CloudRoleArn *string
}

DefenderCspmAwsOfferingCiemDiscovery - Defender CSPM Permissions Management discovery configuration

func (DefenderCspmAwsOfferingCiemDiscovery) MarshalJSON added in v0.13.0

func (d DefenderCspmAwsOfferingCiemDiscovery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingCiemDiscovery.

func (*DefenderCspmAwsOfferingCiemDiscovery) UnmarshalJSON added in v0.13.0

func (d *DefenderCspmAwsOfferingCiemDiscovery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingCiemDiscovery.

type DefenderCspmAwsOfferingCiemOidc added in v0.13.0

type DefenderCspmAwsOfferingCiemOidc struct {
	// the azure active directory app name used of authenticating against AWS
	AzureActiveDirectoryAppName *string

	// The cloud role ARN in AWS for Permissions Management used for oidc connection
	CloudRoleArn *string
}

DefenderCspmAwsOfferingCiemOidc - AWS Defender CSPM Permissions Management OIDC (open id connect) connection configurations

func (DefenderCspmAwsOfferingCiemOidc) MarshalJSON added in v0.13.0

func (d DefenderCspmAwsOfferingCiemOidc) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingCiemOidc.

func (*DefenderCspmAwsOfferingCiemOidc) UnmarshalJSON added in v0.13.0

func (d *DefenderCspmAwsOfferingCiemOidc) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingCiemOidc.

type DefenderCspmAwsOfferingDataSensitivityDiscovery added in v0.11.0

type DefenderCspmAwsOfferingDataSensitivityDiscovery struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is Microsoft Defender Data Sensitivity discovery enabled
	Enabled *bool
}

DefenderCspmAwsOfferingDataSensitivityDiscovery - The Microsoft Defender Data Sensitivity discovery configuration

func (DefenderCspmAwsOfferingDataSensitivityDiscovery) MarshalJSON added in v0.11.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingDataSensitivityDiscovery.

func (*DefenderCspmAwsOfferingDataSensitivityDiscovery) UnmarshalJSON added in v0.11.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingDataSensitivityDiscovery.

type DefenderCspmAwsOfferingDatabasesDspm added in v0.11.0

type DefenderCspmAwsOfferingDatabasesDspm struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is databases DSPM protection enabled
	Enabled *bool
}

DefenderCspmAwsOfferingDatabasesDspm - The databases DSPM configuration

func (DefenderCspmAwsOfferingDatabasesDspm) MarshalJSON added in v0.11.0

func (d DefenderCspmAwsOfferingDatabasesDspm) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingDatabasesDspm.

func (*DefenderCspmAwsOfferingDatabasesDspm) UnmarshalJSON added in v0.11.0

func (d *DefenderCspmAwsOfferingDatabasesDspm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingDatabasesDspm.

type DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S added in v0.13.0

type DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is Microsoft Defender container agentless discovery K8s enabled
	Enabled *bool
}

DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S - The Microsoft Defender container agentless discovery K8s configuration

func (DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.

func (*DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.

type DefenderCspmAwsOfferingMdcContainersImageAssessment added in v0.13.0

type DefenderCspmAwsOfferingMdcContainersImageAssessment struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is Microsoft Defender container image assessment enabled
	Enabled *bool
}

DefenderCspmAwsOfferingMdcContainersImageAssessment - The Microsoft Defender container image assessment configuration

func (DefenderCspmAwsOfferingMdcContainersImageAssessment) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmAwsOfferingMdcContainersImageAssessment.

func (*DefenderCspmAwsOfferingMdcContainersImageAssessment) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmAwsOfferingMdcContainersImageAssessment.

type DefenderCspmAwsOfferingVMScanners added in v0.9.0

type DefenderCspmAwsOfferingVMScanners struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

DefenderCspmAwsOfferingVMScanners - The Microsoft Defender for CSPM offering 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 DefenderCspmGcpOffering added in v0.9.0

type DefenderCspmGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// GCP Defenders CSPM Permissions Management OIDC (Open ID connect) connection configurations
	CiemDiscovery *DefenderCspmGcpOfferingCiemDiscovery

	// The Microsoft Defender Data Sensitivity discovery configuration
	DataSensitivityDiscovery *DefenderCspmGcpOfferingDataSensitivityDiscovery

	// The Microsoft Defender Container agentless discovery configuration
	MdcContainersAgentlessDiscoveryK8S *DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S

	// The Microsoft Defender Container image assessment configuration
	MdcContainersImageAssessment *DefenderCspmGcpOfferingMdcContainersImageAssessment

	// The Microsoft Defender for CSPM VM scanning configuration
	VMScanners *DefenderCspmGcpOfferingVMScanners

	// READ-ONLY; The offering description.
	Description *string
}

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 DefenderCspmGcpOfferingCiemDiscovery added in v0.13.0

type DefenderCspmGcpOfferingCiemDiscovery struct {
	// the azure active directory app name used of authenticating against GCP workload identity federation
	AzureActiveDirectoryAppName *string

	// The service account email address in GCP for Permissions Management offering
	ServiceAccountEmailAddress *string

	// The GCP workload identity provider id for Permissions Management offering
	WorkloadIdentityProviderID *string
}

DefenderCspmGcpOfferingCiemDiscovery - GCP Defenders CSPM Permissions Management OIDC (Open ID connect) connection configurations

func (DefenderCspmGcpOfferingCiemDiscovery) MarshalJSON added in v0.13.0

func (d DefenderCspmGcpOfferingCiemDiscovery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmGcpOfferingCiemDiscovery.

func (*DefenderCspmGcpOfferingCiemDiscovery) UnmarshalJSON added in v0.13.0

func (d *DefenderCspmGcpOfferingCiemDiscovery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmGcpOfferingCiemDiscovery.

type DefenderCspmGcpOfferingDataSensitivityDiscovery added in v0.13.0

type DefenderCspmGcpOfferingDataSensitivityDiscovery struct {
	// Is Microsoft Defender Data Sensitivity discovery enabled
	Enabled *bool

	// The service account email address in GCP for this feature
	ServiceAccountEmailAddress *string

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string
}

DefenderCspmGcpOfferingDataSensitivityDiscovery - The Microsoft Defender Data Sensitivity discovery configuration

func (DefenderCspmGcpOfferingDataSensitivityDiscovery) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmGcpOfferingDataSensitivityDiscovery.

func (*DefenderCspmGcpOfferingDataSensitivityDiscovery) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmGcpOfferingDataSensitivityDiscovery.

type DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S added in v0.13.0

type DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S struct {
	// Is Microsoft Defender container agentless discovery enabled
	Enabled *bool

	// The service account email address in GCP for this feature
	ServiceAccountEmailAddress *string

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string
}

DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S - The Microsoft Defender Container agentless discovery configuration

func (DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.

func (*DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.

type DefenderCspmGcpOfferingMdcContainersImageAssessment added in v0.13.0

type DefenderCspmGcpOfferingMdcContainersImageAssessment struct {
	// Is Microsoft Defender container image assessment enabled
	Enabled *bool

	// The service account email address in GCP for this feature
	ServiceAccountEmailAddress *string

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string
}

DefenderCspmGcpOfferingMdcContainersImageAssessment - The Microsoft Defender Container image assessment configuration

func (DefenderCspmGcpOfferingMdcContainersImageAssessment) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderCspmGcpOfferingMdcContainersImageAssessment.

func (*DefenderCspmGcpOfferingMdcContainersImageAssessment) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmGcpOfferingMdcContainersImageAssessment.

type DefenderCspmGcpOfferingVMScanners added in v0.13.0

type DefenderCspmGcpOfferingVMScanners struct {
	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

DefenderCspmGcpOfferingVMScanners - The Microsoft Defender for CSPM VM scanning configuration

func (DefenderCspmGcpOfferingVMScanners) MarshalJSON added in v0.13.0

func (d DefenderCspmGcpOfferingVMScanners) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderCspmGcpOfferingVMScanners.

func (*DefenderCspmGcpOfferingVMScanners) UnmarshalJSON added in v0.13.0

func (d *DefenderCspmGcpOfferingVMScanners) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderCspmGcpOfferingVMScanners.

type DefenderFoDatabasesAwsOffering added in v0.8.0

type DefenderFoDatabasesAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderFoDatabasesAwsOfferingArcAutoProvisioning

	// The databases data security posture management (DSPM) configuration
	DatabasesDspm *DefenderFoDatabasesAwsOfferingDatabasesDspm

	// The RDS configuration
	Rds *DefenderFoDatabasesAwsOfferingRds

	// READ-ONLY; The offering description.
	Description *string
}

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

	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

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 DefenderFoDatabasesAwsOfferingDatabasesDspm added in v0.11.0

type DefenderFoDatabasesAwsOfferingDatabasesDspm struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is databases data security posture management (DSPM) protection enabled
	Enabled *bool
}

DefenderFoDatabasesAwsOfferingDatabasesDspm - The databases data security posture management (DSPM) configuration

func (DefenderFoDatabasesAwsOfferingDatabasesDspm) MarshalJSON added in v0.11.0

MarshalJSON implements the json.Marshaller interface for type DefenderFoDatabasesAwsOfferingDatabasesDspm.

func (*DefenderFoDatabasesAwsOfferingDatabasesDspm) UnmarshalJSON added in v0.11.0

func (d *DefenderFoDatabasesAwsOfferingDatabasesDspm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderFoDatabasesAwsOfferingDatabasesDspm.

type DefenderFoDatabasesAwsOfferingRds added in v0.9.0

type DefenderFoDatabasesAwsOfferingRds struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is RDS protection enabled
	Enabled *bool
}

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

	// The cloudwatch to kinesis connection configuration
	CloudWatchToKinesis *DefenderForContainersAwsOfferingCloudWatchToKinesis

	// The externalId used by the data reader to prevent the confused deputy attack
	DataCollectionExternalID *string

	// Is audit logs data collection enabled
	EnableAuditLogsAutoProvisioning *bool

	// Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled
	EnableDefenderAgentAutoProvisioning *bool

	// Is Policy Kubernetes agent auto provisioning enabled
	EnablePolicyAgentAutoProvisioning *bool

	// The kinesis to s3 connection configuration
	KinesisToS3 *DefenderForContainersAwsOfferingKinesisToS3

	// The retention time in days of kube audit logs set on the CloudWatch log group
	KubeAuditRetentionTime *int64

	// The kubernetes data collection connection configuration
	KubernetesDataCollection *DefenderForContainersAwsOfferingKubernetesDataCollection

	// The kubernetes service connection configuration
	KubernetesService *DefenderForContainersAwsOfferingKubernetesService

	// The Microsoft Defender container agentless discovery K8s configuration
	MdcContainersAgentlessDiscoveryK8S *DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S

	// The Microsoft Defender container image assessment configuration
	MdcContainersImageAssessment *DefenderForContainersAwsOfferingMdcContainersImageAssessment

	// The Microsoft Defender for Container K8s VM host scanning configuration
	VMScanners *DefenderForContainersAwsOfferingVMScanners

	// READ-ONLY; The offering description.
	Description *string
}

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
}

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

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 DefenderForContainersAwsOfferingKubernetesDataCollection added in v0.14.0

type DefenderForContainersAwsOfferingKubernetesDataCollection struct {
	// The cloud role ARN in AWS for this feature used for reading data
	CloudRoleArn *string
}

DefenderForContainersAwsOfferingKubernetesDataCollection - The kubernetes data collection connection configuration

func (DefenderForContainersAwsOfferingKubernetesDataCollection) MarshalJSON added in v0.14.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingKubernetesDataCollection.

func (*DefenderForContainersAwsOfferingKubernetesDataCollection) UnmarshalJSON added in v0.14.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingKubernetesDataCollection.

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
}

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 DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S added in v0.13.0

type DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is Microsoft Defender container agentless discovery K8s enabled
	Enabled *bool
}

DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S - The Microsoft Defender container agentless discovery K8s configuration

func (DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.

func (*DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.

type DefenderForContainersAwsOfferingMdcContainersImageAssessment added in v0.13.0

type DefenderForContainersAwsOfferingMdcContainersImageAssessment struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Is Microsoft Defender container image assessment enabled
	Enabled *bool
}

DefenderForContainersAwsOfferingMdcContainersImageAssessment - The Microsoft Defender container image assessment configuration

func (DefenderForContainersAwsOfferingMdcContainersImageAssessment) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingMdcContainersImageAssessment.

func (*DefenderForContainersAwsOfferingMdcContainersImageAssessment) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingMdcContainersImageAssessment.

type DefenderForContainersAwsOfferingVMScanners added in v0.14.0

type DefenderForContainersAwsOfferingVMScanners struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

DefenderForContainersAwsOfferingVMScanners - The Microsoft Defender for Container K8s VM host scanning configuration

func (DefenderForContainersAwsOfferingVMScanners) MarshalJSON added in v0.14.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersAwsOfferingVMScanners.

func (*DefenderForContainersAwsOfferingVMScanners) UnmarshalJSON added in v0.14.0

func (d *DefenderForContainersAwsOfferingVMScanners) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersAwsOfferingVMScanners.

type DefenderForContainersGcpOffering added in v0.8.0

type DefenderForContainersGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// The native cloud connection configuration
	DataPipelineNativeCloudConnection *DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection

	// Is audit logs data collection enabled
	EnableAuditLogsAutoProvisioning *bool

	// Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled
	EnableDefenderAgentAutoProvisioning *bool

	// Is Policy Kubernetes agent auto provisioning enabled
	EnablePolicyAgentAutoProvisioning *bool

	// The Microsoft Defender Container agentless discovery configuration
	MdcContainersAgentlessDiscoveryK8S *DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S

	// The Microsoft Defender Container image assessment configuration
	MdcContainersImageAssessment *DefenderForContainersGcpOfferingMdcContainersImageAssessment

	// The native cloud connection configuration
	NativeCloudConnection *DefenderForContainersGcpOfferingNativeCloudConnection

	// The Microsoft Defender for Container K8s VM host scanning configuration
	VMScanners *DefenderForContainersGcpOfferingVMScanners

	// READ-ONLY; The offering description.
	Description *string
}

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

	// The data collection GCP workload identity provider id for this offering
	WorkloadIdentityProviderID *string
}

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 DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S added in v0.13.0

type DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S struct {
	// Is Microsoft Defender container agentless discovery enabled
	Enabled *bool

	// The service account email address in GCP for this feature
	ServiceAccountEmailAddress *string

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string
}

DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S - The Microsoft Defender Container agentless discovery configuration

func (DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.

func (*DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.

type DefenderForContainersGcpOfferingMdcContainersImageAssessment added in v0.13.0

type DefenderForContainersGcpOfferingMdcContainersImageAssessment struct {
	// Is Microsoft Defender container image assessment enabled
	Enabled *bool

	// The service account email address in GCP for this feature
	ServiceAccountEmailAddress *string

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string
}

DefenderForContainersGcpOfferingMdcContainersImageAssessment - The Microsoft Defender Container image assessment configuration

func (DefenderForContainersGcpOfferingMdcContainersImageAssessment) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersGcpOfferingMdcContainersImageAssessment.

func (*DefenderForContainersGcpOfferingMdcContainersImageAssessment) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersGcpOfferingMdcContainersImageAssessment.

type DefenderForContainersGcpOfferingNativeCloudConnection added in v0.8.0

type DefenderForContainersGcpOfferingNativeCloudConnection struct {
	// The service account email address in GCP for this offering
	ServiceAccountEmailAddress *string

	// The GCP workload identity provider id for this offering
	WorkloadIdentityProviderID *string
}

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 DefenderForContainersGcpOfferingVMScanners added in v0.14.0

type DefenderForContainersGcpOfferingVMScanners struct {
	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

DefenderForContainersGcpOfferingVMScanners - The Microsoft Defender for Container K8s VM host scanning configuration

func (DefenderForContainersGcpOfferingVMScanners) MarshalJSON added in v0.14.0

MarshalJSON implements the json.Marshaller interface for type DefenderForContainersGcpOfferingVMScanners.

func (*DefenderForContainersGcpOfferingVMScanners) UnmarshalJSON added in v0.14.0

func (d *DefenderForContainersGcpOfferingVMScanners) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForContainersGcpOfferingVMScanners.

type DefenderForDatabasesGcpOffering added in v0.8.0

type DefenderForDatabasesGcpOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderForDatabasesGcpOfferingArcAutoProvisioning

	// The native cloud connection configuration
	DefenderForDatabasesArcAutoProvisioning *DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning

	// READ-ONLY; The offering description.
	Description *string
}

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 {
	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

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

	// The GCP workload identity provider id for this offering
	WorkloadIdentityProviderID *string
}

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 DefenderForServersAwsOffering added in v0.2.0

type DefenderForServersAwsOffering struct {
	// REQUIRED; The type of the security offering.
	OfferingType *OfferingType

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderForServersAwsOfferingArcAutoProvisioning

	// The Defender for servers connection configuration
	DefenderForServers *DefenderForServersAwsOfferingDefenderForServers

	// The Microsoft Defender for Endpoint autoprovisioning configuration
	MdeAutoProvisioning *DefenderForServersAwsOfferingMdeAutoProvisioning

	// configuration for the servers offering subPlan
	SubPlan *DefenderForServersAwsOfferingSubPlan

	// The Microsoft Defender for Server VM scanning configuration
	VMScanners *DefenderForServersAwsOfferingVMScanners

	// The Vulnerability Assessment autoprovisioning configuration
	VaAutoProvisioning *DefenderForServersAwsOfferingVaAutoProvisioning

	// READ-ONLY; The offering description.
	Description *string
}

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

	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

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
}

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 any

	// Is Microsoft Defender for Endpoint auto provisioning enabled
	Enabled *bool
}

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
}

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 {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

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 DefenderForServersAwsOfferingVaAutoProvisioning added in v0.8.0

type DefenderForServersAwsOfferingVaAutoProvisioning struct {
	// configuration for Vulnerability Assessment autoprovisioning
	Configuration *DefenderForServersAwsOfferingVaAutoProvisioningConfiguration

	// Is Vulnerability Assessment auto provisioning enabled
	Enabled *bool
}

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
}

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

	// The ARC autoprovisioning configuration
	ArcAutoProvisioning *DefenderForServersGcpOfferingArcAutoProvisioning

	// The Defender for servers connection configuration
	DefenderForServers *DefenderForServersGcpOfferingDefenderForServers

	// The Microsoft Defender for Endpoint autoprovisioning configuration
	MdeAutoProvisioning *DefenderForServersGcpOfferingMdeAutoProvisioning

	// configuration for the servers offering subPlan
	SubPlan *DefenderForServersGcpOfferingSubPlan

	// The Microsoft Defender for Server VM scanning configuration
	VMScanners *DefenderForServersGcpOfferingVMScanners

	// The Vulnerability Assessment autoprovisioning configuration
	VaAutoProvisioning *DefenderForServersGcpOfferingVaAutoProvisioning

	// READ-ONLY; The offering description.
	Description *string
}

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 {
	// Configuration for servers Arc auto provisioning for a given environment
	Configuration *ArcAutoProvisioningConfiguration

	// Is arc auto provisioning enabled
	Enabled *bool
}

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

	// The workload identity provider id in GCP for this feature
	WorkloadIdentityProviderID *string
}

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 any

	// Is Microsoft Defender for Endpoint auto provisioning enabled
	Enabled *bool
}

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
}

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 DefenderForServersGcpOfferingVMScanners added in v0.11.0

type DefenderForServersGcpOfferingVMScanners struct {
	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

DefenderForServersGcpOfferingVMScanners - The Microsoft Defender for Server VM scanning configuration

func (DefenderForServersGcpOfferingVMScanners) MarshalJSON added in v0.11.0

func (d DefenderForServersGcpOfferingVMScanners) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForServersGcpOfferingVMScanners.

func (*DefenderForServersGcpOfferingVMScanners) UnmarshalJSON added in v0.11.0

func (d *DefenderForServersGcpOfferingVMScanners) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForServersGcpOfferingVMScanners.

type DefenderForServersGcpOfferingVaAutoProvisioning added in v0.8.0

type DefenderForServersGcpOfferingVaAutoProvisioning struct {
	// configuration for Vulnerability Assessment autoprovisioning
	Configuration *DefenderForServersGcpOfferingVaAutoProvisioningConfiguration

	// Is Vulnerability Assessment auto provisioning enabled
	Enabled *bool
}

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
}

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 DefenderForStorageClient added in v0.13.0

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

DefenderForStorageClient contains the methods for the DefenderForStorage group. Don't use this type directly, use NewDefenderForStorageClient() instead.

func NewDefenderForStorageClient added in v0.13.0

func NewDefenderForStorageClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DefenderForStorageClient, error)

NewDefenderForStorageClient creates a new instance of DefenderForStorageClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DefenderForStorageClient) Create added in v0.13.0

Create - Creates or updates the Defender for Storage settings on a specified storage account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-01-preview

  • resourceID - The identifier of the resource.
  • settingName - Defender for Storage setting name.
  • defenderForStorageSetting - Defender for Storage Settings
  • options - DefenderForStorageClientCreateOptions contains the optional parameters for the DefenderForStorageClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-12-01-preview/examples/DefenderForStorage/PutDefenderForStorageSettings_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDefenderForStorageClient().Create(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", armsecurity.SettingNameCurrent, armsecurity.DefenderForStorageSetting{
		Properties: &armsecurity.DefenderForStorageSettingProperties{
			IsEnabled: to.Ptr(true),
			MalwareScanning: &armsecurity.MalwareScanningProperties{
				OnUpload: &armsecurity.OnUploadProperties{
					CapGBPerMonth: to.Ptr[int32](-1),
					IsEnabled:     to.Ptr(true),
				},
				ScanResultsEventGridTopicResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"),
			},
			OverrideSubscriptionLevelSettings: to.Ptr(true),
			SensitiveDataDiscovery: &armsecurity.SensitiveDataDiscoveryProperties{
				IsEnabled: to.Ptr(true),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DefenderForStorageSetting = armsecurity.DefenderForStorageSetting{
	// 	Name: to.Ptr("current"),
	// 	Type: to.Ptr("Microsoft.Security/defenderForStorageSettings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount/providers/Microsoft.Security/defenderForStorageSettings/current"),
	// 	Properties: &armsecurity.DefenderForStorageSettingProperties{
	// 		IsEnabled: to.Ptr(true),
	// 		MalwareScanning: &armsecurity.MalwareScanningProperties{
	// 			OnUpload: &armsecurity.OnUploadProperties{
	// 				CapGBPerMonth: to.Ptr[int32](-1),
	// 				IsEnabled: to.Ptr(true),
	// 			},
	// 			OperationStatus: &armsecurity.OperationStatus{
	// 				Code: to.Ptr("Succeeded"),
	// 			},
	// 			ScanResultsEventGridTopicResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"),
	// 		},
	// 		OverrideSubscriptionLevelSettings: to.Ptr(true),
	// 		SensitiveDataDiscovery: &armsecurity.SensitiveDataDiscoveryProperties{
	// 			IsEnabled: to.Ptr(true),
	// 			OperationStatus: &armsecurity.OperationStatus{
	// 				Code: to.Ptr("Succeeded"),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*DefenderForStorageClient) Get added in v0.13.0

Get - Gets the Defender for Storage settings for the specified storage account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-01-preview

  • resourceID - The identifier of the resource.
  • settingName - Defender for Storage setting name.
  • options - DefenderForStorageClientGetOptions contains the optional parameters for the DefenderForStorageClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-12-01-preview/examples/DefenderForStorage/GetDefenderForStorageSettings_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDefenderForStorageClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", armsecurity.SettingNameCurrent, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DefenderForStorageSetting = armsecurity.DefenderForStorageSetting{
	// 	Name: to.Ptr("current"),
	// 	Type: to.Ptr("Microsoft.Security/defenderForStorageSettings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount/providers/Microsoft.Security/defenderForStorageSettings/current"),
	// 	Properties: &armsecurity.DefenderForStorageSettingProperties{
	// 		IsEnabled: to.Ptr(true),
	// 		MalwareScanning: &armsecurity.MalwareScanningProperties{
	// 			OnUpload: &armsecurity.OnUploadProperties{
	// 				CapGBPerMonth: to.Ptr[int32](-1),
	// 				IsEnabled: to.Ptr(true),
	// 			},
	// 			ScanResultsEventGridTopicResourceID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"),
	// 		},
	// 		OverrideSubscriptionLevelSettings: to.Ptr(true),
	// 		SensitiveDataDiscovery: &armsecurity.SensitiveDataDiscoveryProperties{
	// 			IsEnabled: to.Ptr(false),
	// 		},
	// 	},
	// }
}
Output:

type DefenderForStorageClientCreateOptions added in v0.13.0

type DefenderForStorageClientCreateOptions struct {
}

DefenderForStorageClientCreateOptions contains the optional parameters for the DefenderForStorageClient.Create method.

type DefenderForStorageClientCreateResponse added in v0.13.0

type DefenderForStorageClientCreateResponse struct {
	// The Defender for Storage resource.
	DefenderForStorageSetting
}

DefenderForStorageClientCreateResponse contains the response from method DefenderForStorageClient.Create.

type DefenderForStorageClientGetOptions added in v0.13.0

type DefenderForStorageClientGetOptions struct {
}

DefenderForStorageClientGetOptions contains the optional parameters for the DefenderForStorageClient.Get method.

type DefenderForStorageClientGetResponse added in v0.13.0

type DefenderForStorageClientGetResponse struct {
	// The Defender for Storage resource.
	DefenderForStorageSetting
}

DefenderForStorageClientGetResponse contains the response from method DefenderForStorageClient.Get.

type DefenderForStorageSetting added in v0.13.0

type DefenderForStorageSetting struct {
	// Defender for Storage resource properties.
	Properties *DefenderForStorageSettingProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

DefenderForStorageSetting - The Defender for Storage resource.

func (DefenderForStorageSetting) MarshalJSON added in v0.13.0

func (d DefenderForStorageSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForStorageSetting.

func (*DefenderForStorageSetting) UnmarshalJSON added in v0.13.0

func (d *DefenderForStorageSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForStorageSetting.

type DefenderForStorageSettingProperties added in v0.13.0

type DefenderForStorageSettingProperties struct {
	// Indicates whether Defender for Storage is enabled on this storage account.
	IsEnabled *bool

	// Properties of Malware Scanning.
	MalwareScanning *MalwareScanningProperties

	// Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
	OverrideSubscriptionLevelSettings *bool

	// Properties of Sensitive Data Discovery.
	SensitiveDataDiscovery *SensitiveDataDiscoveryProperties
}

DefenderForStorageSettingProperties - Defender for Storage resource properties.

func (DefenderForStorageSettingProperties) MarshalJSON added in v0.13.0

func (d DefenderForStorageSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefenderForStorageSettingProperties.

func (*DefenderForStorageSettingProperties) UnmarshalJSON added in v0.13.0

func (d *DefenderForStorageSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefenderForStorageSettingProperties.

type DenylistCustomAlertRule

type DenylistCustomAlertRule struct {
	// REQUIRED; The values to deny. The format of the values depends on the rule type.
	DenylistValues []*string

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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 DesiredOnboardingState added in v0.13.0

type DesiredOnboardingState string

DesiredOnboardingState - Onboarding states.

const (
	DesiredOnboardingStateDisabled DesiredOnboardingState = "Disabled"
	DesiredOnboardingStateEnabled  DesiredOnboardingState = "Enabled"
)

func PossibleDesiredOnboardingStateValues added in v0.13.0

func PossibleDesiredOnboardingStateValues() []DesiredOnboardingState

PossibleDesiredOnboardingStateValues returns the possible values for the DesiredOnboardingState const type.

type DevOpsConfiguration added in v0.13.0

type DevOpsConfiguration struct {
	// DevOps Configuration properties.
	Properties *DevOpsConfigurationProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DevOpsConfiguration - DevOps Configuration resource.

func (DevOpsConfiguration) MarshalJSON added in v0.13.0

func (d DevOpsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DevOpsConfiguration.

func (*DevOpsConfiguration) UnmarshalJSON added in v0.13.0

func (d *DevOpsConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevOpsConfiguration.

type DevOpsConfigurationListResponse added in v0.13.0

type DevOpsConfigurationListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*DevOpsConfiguration
}

DevOpsConfigurationListResponse - List of RP resources which supports pagination.

func (DevOpsConfigurationListResponse) MarshalJSON added in v0.13.0

func (d DevOpsConfigurationListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DevOpsConfigurationListResponse.

func (*DevOpsConfigurationListResponse) UnmarshalJSON added in v0.13.0

func (d *DevOpsConfigurationListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevOpsConfigurationListResponse.

type DevOpsConfigurationProperties added in v0.13.0

type DevOpsConfigurationProperties struct {
	// Authorization payload.
	Authorization *Authorization

	// AutoDiscovery states.
	AutoDiscovery *AutoDiscovery

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// List of top-level inventory to select when AutoDiscovery is disabled. This field is ignored when AutoDiscovery is enabled.
	TopLevelInventoryList []*string

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time
}

DevOpsConfigurationProperties - DevOps Configuration properties.

func (DevOpsConfigurationProperties) MarshalJSON added in v0.13.0

func (d DevOpsConfigurationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DevOpsConfigurationProperties.

func (*DevOpsConfigurationProperties) UnmarshalJSON added in v0.13.0

func (d *DevOpsConfigurationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevOpsConfigurationProperties.

type DevOpsConfigurationsClient added in v0.13.0

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

DevOpsConfigurationsClient contains the methods for the DevOpsConfigurations group. Don't use this type directly, use NewDevOpsConfigurationsClient() instead.

func NewDevOpsConfigurationsClient added in v0.13.0

func NewDevOpsConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevOpsConfigurationsClient, error)

NewDevOpsConfigurationsClient creates a new instance of DevOpsConfigurationsClient 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 (*DevOpsConfigurationsClient) BeginCreateOrUpdate added in v0.13.0

func (client *DevOpsConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, devOpsConfiguration DevOpsConfiguration, options *DevOpsConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevOpsConfigurationsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a DevOps Configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • devOpsConfiguration - The DevOps configuration resource payload.
  • options - DevOpsConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevOpsConfigurationsClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevOpsConfigurationsClient().BeginCreateOrUpdate(ctx, "myRg", "mySecurityConnectorName", armsecurity.DevOpsConfiguration{
		Properties: &armsecurity.DevOpsConfigurationProperties{
			Authorization: &armsecurity.Authorization{
				Code: to.Ptr("00000000000000000000"),
			},
			AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryEnabled),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DevOpsConfiguration = armsecurity.DevOpsConfiguration{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default"),
	// 	Properties: &armsecurity.DevOpsConfigurationProperties{
	// 		AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryEnabled),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevOpsConfigurationsClient().BeginCreateOrUpdate(ctx, "myRg", "mySecurityConnectorName", armsecurity.DevOpsConfiguration{
		Properties: &armsecurity.DevOpsConfigurationProperties{
			Authorization: &armsecurity.Authorization{
				Code: to.Ptr("00000000000000000000"),
			},
			AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryDisabled),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DevOpsConfiguration = armsecurity.DevOpsConfiguration{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default"),
	// 	Properties: &armsecurity.DevOpsConfigurationProperties{
	// 		AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryDisabled),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (CreateOrUpdateDevOpsConfigurationsOnboardSelected)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevOpsConfigurationsClient().BeginCreateOrUpdate(ctx, "myRg", "mySecurityConnectorName", armsecurity.DevOpsConfiguration{
		Properties: &armsecurity.DevOpsConfigurationProperties{
			Authorization: &armsecurity.Authorization{
				Code: to.Ptr("00000000000000000000"),
			},
			AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryDisabled),
			TopLevelInventoryList: []*string{
				to.Ptr("org1"),
				to.Ptr("org2")},
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DevOpsConfiguration = armsecurity.DevOpsConfiguration{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default"),
	// 	Properties: &armsecurity.DevOpsConfigurationProperties{
	// 		AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryDisabled),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		TopLevelInventoryList: []*string{
	// 			to.Ptr("org1"),
	// 			to.Ptr("org2")},
	// 		},
	// 	}
}
Output:

func (*DevOpsConfigurationsClient) BeginDelete added in v0.13.0

BeginDelete - Deletes a DevOps Connector. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - DevOpsConfigurationsClientBeginDeleteOptions contains the optional parameters for the DevOpsConfigurationsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevOpsConfigurationsClient().BeginDelete(ctx, "myRg", "mySecurityConnectorName", 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 (*DevOpsConfigurationsClient) BeginUpdate added in v0.13.0

func (client *DevOpsConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, securityConnectorName string, devOpsConfiguration DevOpsConfiguration, options *DevOpsConfigurationsClientBeginUpdateOptions) (*runtime.Poller[DevOpsConfigurationsClientUpdateResponse], error)

BeginUpdate - Updates a DevOps Configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • devOpsConfiguration - The DevOps configuration resource payload.
  • options - DevOpsConfigurationsClientBeginUpdateOptions contains the optional parameters for the DevOpsConfigurationsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevOpsConfigurationsClient().BeginUpdate(ctx, "myRg", "mySecurityConnectorName", armsecurity.DevOpsConfiguration{
		Properties: &armsecurity.DevOpsConfigurationProperties{
			AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryEnabled),
		},
	}, 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DevOpsConfiguration = armsecurity.DevOpsConfiguration{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default"),
	// 	Properties: &armsecurity.DevOpsConfigurationProperties{
	// 		AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryEnabled),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*DevOpsConfigurationsClient) Get added in v0.13.0

func (client *DevOpsConfigurationsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, options *DevOpsConfigurationsClientGetOptions) (DevOpsConfigurationsClientGetResponse, error)

Get - Gets a DevOps Configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - DevOpsConfigurationsClientGetOptions contains the optional parameters for the DevOpsConfigurationsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDevOpsConfigurationsClient().Get(ctx, "myRg", "mySecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DevOpsConfiguration = armsecurity.DevOpsConfiguration{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default"),
	// 	Properties: &armsecurity.DevOpsConfigurationProperties{
	// 		AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryEnabled),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*DevOpsConfigurationsClient) NewListPager added in v0.13.0

func (client *DevOpsConfigurationsClient) NewListPager(resourceGroupName string, securityConnectorName string, options *DevOpsConfigurationsClientListOptions) *runtime.Pager[DevOpsConfigurationsClientListResponse]

NewListPager - List DevOps Configurations.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - DevOpsConfigurationsClientListOptions contains the optional parameters for the DevOpsConfigurationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListDevOpsConfigurations_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDevOpsConfigurationsClient().NewListPager("myRg", "mySecurityConnectorName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DevOpsConfigurationListResponse = armsecurity.DevOpsConfigurationListResponse{
		// 	Value: []*armsecurity.DevOpsConfiguration{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default"),
		// 			Properties: &armsecurity.DevOpsConfigurationProperties{
		// 				AutoDiscovery: to.Ptr(armsecurity.AutoDiscoveryEnabled),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type DevOpsConfigurationsClientBeginCreateOrUpdateOptions added in v0.13.0

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

DevOpsConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevOpsConfigurationsClient.BeginCreateOrUpdate method.

type DevOpsConfigurationsClientBeginDeleteOptions added in v0.13.0

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

DevOpsConfigurationsClientBeginDeleteOptions contains the optional parameters for the DevOpsConfigurationsClient.BeginDelete method.

type DevOpsConfigurationsClientBeginUpdateOptions added in v0.13.0

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

DevOpsConfigurationsClientBeginUpdateOptions contains the optional parameters for the DevOpsConfigurationsClient.BeginUpdate method.

type DevOpsConfigurationsClientCreateOrUpdateResponse added in v0.13.0

type DevOpsConfigurationsClientCreateOrUpdateResponse struct {
	// DevOps Configuration resource.
	DevOpsConfiguration
}

DevOpsConfigurationsClientCreateOrUpdateResponse contains the response from method DevOpsConfigurationsClient.BeginCreateOrUpdate.

type DevOpsConfigurationsClientDeleteResponse added in v0.13.0

type DevOpsConfigurationsClientDeleteResponse struct {
}

DevOpsConfigurationsClientDeleteResponse contains the response from method DevOpsConfigurationsClient.BeginDelete.

type DevOpsConfigurationsClientGetOptions added in v0.13.0

type DevOpsConfigurationsClientGetOptions struct {
}

DevOpsConfigurationsClientGetOptions contains the optional parameters for the DevOpsConfigurationsClient.Get method.

type DevOpsConfigurationsClientGetResponse added in v0.13.0

type DevOpsConfigurationsClientGetResponse struct {
	// DevOps Configuration resource.
	DevOpsConfiguration
}

DevOpsConfigurationsClientGetResponse contains the response from method DevOpsConfigurationsClient.Get.

type DevOpsConfigurationsClientListOptions added in v0.13.0

type DevOpsConfigurationsClientListOptions struct {
}

DevOpsConfigurationsClientListOptions contains the optional parameters for the DevOpsConfigurationsClient.NewListPager method.

type DevOpsConfigurationsClientListResponse added in v0.13.0

type DevOpsConfigurationsClientListResponse struct {
	// List of RP resources which supports pagination.
	DevOpsConfigurationListResponse
}

DevOpsConfigurationsClientListResponse contains the response from method DevOpsConfigurationsClient.NewListPager.

type DevOpsConfigurationsClientUpdateResponse added in v0.13.0

type DevOpsConfigurationsClientUpdateResponse struct {
	// DevOps Configuration resource.
	DevOpsConfiguration
}

DevOpsConfigurationsClientUpdateResponse contains the response from method DevOpsConfigurationsClient.BeginUpdate.

type DevOpsOperationResultsClient added in v0.13.0

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

DevOpsOperationResultsClient contains the methods for the DevOpsOperationResults group. Don't use this type directly, use NewDevOpsOperationResultsClient() instead.

func NewDevOpsOperationResultsClient added in v0.13.0

func NewDevOpsOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevOpsOperationResultsClient, error)

NewDevOpsOperationResultsClient creates a new instance of DevOpsOperationResultsClient 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 (*DevOpsOperationResultsClient) Get added in v0.13.0

func (client *DevOpsOperationResultsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, operationResultID string, options *DevOpsOperationResultsClientGetOptions) (DevOpsOperationResultsClientGetResponse, error)

Get - Get devops long running operation result. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • operationResultID - The operation result Id.
  • options - DevOpsOperationResultsClientGetOptions contains the optional parameters for the DevOpsOperationResultsClient.Get method.
Example (GetDevOpsOperationResultsFailed)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDevOpsOperationResultsClient().Get(ctx, "myRg", "mySecurityConnectorName", "8d4caace-e7b3-4b3e-af99-73f76829ebcf", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationStatusResult = armsecurity.OperationStatusResult{
	// 	Name: to.Ptr("8d4caace-e7b3-4b3e-af99-73f76829ebcf"),
	// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-21T03:25:15.000Z"); return t}()),
	// 	Error: &armsecurity.ErrorDetailAutoGenerated{
	// 		Code: to.Ptr("TokenExchangeFailed"),
	// 		Message: to.Ptr("AzureDevOps OAuth token exchange failed"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/8d4caace-e7b3-4b3e-af99-73f76829ebcf?api-version=2023-09-01-preview"),
	// 	PercentComplete: to.Ptr[float32](100),
	// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-21T03:23:15.000Z"); return t}()),
	// 	Status: to.Ptr("Failed"),
	// }
}
Output:

Example (GetDevOpsOperationResultsSucceeded)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDevOpsOperationResultsClient().Get(ctx, "myRg", "mySecurityConnectorName", "4e826cf1-5c36-4808-a7d2-fb4f5170978b", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationStatusResult = armsecurity.OperationStatusResult{
	// 	Name: to.Ptr("4e826cf1-5c36-4808-a7d2-fb4f5170978b"),
	// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-21T03:25:15.000Z"); return t}()),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2023-09-01-preview"),
	// 	PercentComplete: to.Ptr[float32](100),
	// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-21T03:23:15.000Z"); return t}()),
	// 	Status: to.Ptr("Succeeded"),
	// }
}
Output:

type DevOpsOperationResultsClientGetOptions added in v0.13.0

type DevOpsOperationResultsClientGetOptions struct {
}

DevOpsOperationResultsClientGetOptions contains the optional parameters for the DevOpsOperationResultsClient.Get method.

type DevOpsOperationResultsClientGetResponse added in v0.13.0

type DevOpsOperationResultsClientGetResponse struct {
	// The current status of an async operation.
	OperationStatusResult
}

DevOpsOperationResultsClientGetResponse contains the response from method DevOpsOperationResultsClient.Get.

type DevOpsProvisioningState added in v0.13.0

type DevOpsProvisioningState string

DevOpsProvisioningState - The provisioning state of the resource. Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion successful. DeletionFailure - Deletion failure.

const (
	DevOpsProvisioningStateCanceled        DevOpsProvisioningState = "Canceled"
	DevOpsProvisioningStateDeletionFailure DevOpsProvisioningState = "DeletionFailure"
	DevOpsProvisioningStateDeletionSuccess DevOpsProvisioningState = "DeletionSuccess"
	DevOpsProvisioningStateFailed          DevOpsProvisioningState = "Failed"
	DevOpsProvisioningStatePending         DevOpsProvisioningState = "Pending"
	DevOpsProvisioningStatePendingDeletion DevOpsProvisioningState = "PendingDeletion"
	DevOpsProvisioningStateSucceeded       DevOpsProvisioningState = "Succeeded"
)

func PossibleDevOpsProvisioningStateValues added in v0.13.0

func PossibleDevOpsProvisioningStateValues() []DevOpsProvisioningState

PossibleDevOpsProvisioningStateValues returns the possible values for the DevOpsProvisioningState const type.

type DeviceSecurityGroup

type DeviceSecurityGroup struct {
	// Device Security group data
	Properties *DeviceSecurityGroupProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// The deny-list custom alert rules.
	DenylistRules []*DenylistCustomAlertRule

	// The list of custom alert threshold rules.
	ThresholdRules []ThresholdCustomAlertRuleClassification

	// The list of custom alert time-window rules.
	TimeWindowRules []TimeWindowCustomAlertRuleClassification
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeviceSecurityGroupsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DeviceSecurityGroup = armsecurity.DeviceSecurityGroup{
	// 	Name: to.Ptr("samplesecuritygroup"),
	// 	Type: to.Ptr("Microsoft.Security/deviceSecurityGroups"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub/providers/Microsoft.Security/deviceSecurityGroups/samplesecuritygroup"),
	// 	Properties: &armsecurity.DeviceSecurityGroupProperties{
	// 		AllowlistRules: []armsecurity.AllowlistCustomAlertRuleClassification{
	// 			&armsecurity.ConnectionToIPNotAllowed{
	// 				Description: to.Ptr("Get an alert when an outbound connection is created between your device and an ip that isn't allowed"),
	// 				DisplayName: to.Ptr("Outbound connection to an ip that isn't allowed"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("ConnectionToIpNotAllowed"),
	// 				AllowlistValues: []*string{
	// 				},
	// 			},
	// 			&armsecurity.LocalUserNotAllowed{
	// 				Description: to.Ptr("Get an alert when a local user that isn't allowed logins to the device"),
	// 				DisplayName: to.Ptr("Login by a local user that isn't allowed"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("LocalUserNotAllowed"),
	// 				AllowlistValues: []*string{
	// 				},
	// 			},
	// 			&armsecurity.ProcessNotAllowed{
	// 				Description: to.Ptr("Get an alert when a process that isn't allowed is executed"),
	// 				DisplayName: to.Ptr("Execution of a process that isn't allowed"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("ProcessNotAllowed"),
	// 				AllowlistValues: []*string{
	// 				},
	// 		}},
	// 		DenylistRules: []*armsecurity.DenylistCustomAlertRule{
	// 		},
	// 		ThresholdRules: []armsecurity.ThresholdCustomAlertRuleClassification{
	// 		},
	// 		TimeWindowRules: []armsecurity.TimeWindowCustomAlertRuleClassification{
	// 			&armsecurity.ActiveConnectionsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of active connections of a device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of active connections is not in allowed range"),
	// 				IsEnabled: to.Ptr(true),
	// 				RuleType: to.Ptr("ActiveConnectionsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](30),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT05M"),
	// 			},
	// 			&armsecurity.AmqpC2DMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (AMQP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of cloud to device messages (AMQP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("AmqpC2DMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.MqttC2DMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (MQTT protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of cloud to device messages (MQTT protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("MqttC2DMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.HTTPC2DMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (HTTP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of cloud to device messages (HTTP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("HttpC2DMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.AmqpC2DRejectedMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (AMQP protocol) that were rejected by the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of rejected cloud to device messages (AMQP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("AmqpC2DRejectedMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.MqttC2DRejectedMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (MQTT protocol) that were rejected by the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of rejected cloud to device messages (MQTT protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("MqttC2DRejectedMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.HTTPC2DRejectedMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (HTTP protocol) that were rejected by the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of rejected cloud to device messages (HTTP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("HttpC2DRejectedMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.AmqpD2CMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device to cloud messages (AMQP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device to cloud messages (AMQP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("AmqpD2CMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.MqttD2CMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device to cloud messages (MQTT protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device to cloud messages (MQTT protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("MqttD2CMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.HTTPD2CMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device to cloud messages (HTTP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device to cloud messages (HTTP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("HttpD2CMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.DirectMethodInvokesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of direct method invokes in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of direct method invokes is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("DirectMethodInvokesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.FailedLocalLoginsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of failed local logins on the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of failed local logins is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("FailedLocalLoginsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.FileUploadsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of file uploads from the device to the cloud in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of file uploads is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("FileUploadsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.QueuePurgesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device queue purges in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device queue purges is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("QueuePurgesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.TwinUpdatesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of twin updates (by the device or the service) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of twin updates is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("TwinUpdatesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.UnauthorizedOperationsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number unauthorized operations in the time window is not in the allowed range. Unauthorized operations are operations that affect the device (or done by it) that fail because of an unauthorized error"),
	// 				DisplayName: to.Ptr("Number of unauthorized operations is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("UnauthorizedOperationsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 		}},
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDeviceSecurityGroupsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeviceSecurityGroupsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DeviceSecurityGroup = armsecurity.DeviceSecurityGroup{
	// 	Name: to.Ptr("samplesecuritygroup"),
	// 	Type: to.Ptr("Microsoft.Security/deviceSecurityGroups"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub/providers/Microsoft.Security/deviceSecurityGroups/samplesecuritygroup"),
	// 	Properties: &armsecurity.DeviceSecurityGroupProperties{
	// 		AllowlistRules: []armsecurity.AllowlistCustomAlertRuleClassification{
	// 			&armsecurity.ConnectionToIPNotAllowed{
	// 				Description: to.Ptr("Get an alert when an outbound connection is created between your device and an ip that isn't allowed"),
	// 				DisplayName: to.Ptr("Outbound connection to an ip that isn't allowed"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("ConnectionToIpNotAllowed"),
	// 				ValueType: to.Ptr(armsecurity.ValueTypeIPCidr),
	// 				AllowlistValues: []*string{
	// 				},
	// 			},
	// 			&armsecurity.LocalUserNotAllowed{
	// 				Description: to.Ptr("Get an alert when a local user that isn't allowed logins to the device"),
	// 				DisplayName: to.Ptr("Login by a local user that isn't allowed"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("LocalUserNotAllowed"),
	// 				ValueType: to.Ptr(armsecurity.ValueTypeString),
	// 				AllowlistValues: []*string{
	// 				},
	// 			},
	// 			&armsecurity.ProcessNotAllowed{
	// 				Description: to.Ptr("Get an alert when a process that isn't allowed is executed"),
	// 				DisplayName: to.Ptr("Execution of a process that isn't allowed"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("ProcessNotAllowed"),
	// 				ValueType: to.Ptr(armsecurity.ValueTypeString),
	// 				AllowlistValues: []*string{
	// 				},
	// 		}},
	// 		DenylistRules: []*armsecurity.DenylistCustomAlertRule{
	// 		},
	// 		ThresholdRules: []armsecurity.ThresholdCustomAlertRuleClassification{
	// 		},
	// 		TimeWindowRules: []armsecurity.TimeWindowCustomAlertRuleClassification{
	// 			&armsecurity.ActiveConnectionsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of active connections of a device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of active connections is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("ActiveConnectionsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.AmqpC2DMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (AMQP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of cloud to device messages (AMQP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("AmqpC2DMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.MqttC2DMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (MQTT protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of cloud to device messages (MQTT protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("MqttC2DMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.HTTPC2DMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (HTTP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of cloud to device messages (HTTP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("HttpC2DMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.AmqpC2DRejectedMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (AMQP protocol) that were rejected by the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of rejected cloud to device messages (AMQP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("AmqpC2DRejectedMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.MqttC2DRejectedMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (MQTT protocol) that were rejected by the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of rejected cloud to device messages (MQTT protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("MqttC2DRejectedMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.HTTPC2DRejectedMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of cloud to device messages (HTTP protocol) that were rejected by the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of rejected cloud to device messages (HTTP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("HttpC2DRejectedMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.AmqpD2CMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device to cloud messages (AMQP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device to cloud messages (AMQP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("AmqpD2CMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.MqttD2CMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device to cloud messages (MQTT protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device to cloud messages (MQTT protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("MqttD2CMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.HTTPD2CMessagesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device to cloud messages (HTTP protocol) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device to cloud messages (HTTP protocol) is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("HttpD2CMessagesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.DirectMethodInvokesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of direct method invokes in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of direct method invokes is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("DirectMethodInvokesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.FailedLocalLoginsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of failed local logins on the device in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of failed local logins is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("FailedLocalLoginsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.FileUploadsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of file uploads from the device to the cloud in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of file uploads is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("FileUploadsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.QueuePurgesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of device queue purges in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of device queue purges is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("QueuePurgesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.TwinUpdatesNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number of twin updates (by the device or the service) in the time window is not in the allowed range"),
	// 				DisplayName: to.Ptr("Number of twin updates is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("TwinUpdatesNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 			},
	// 			&armsecurity.UnauthorizedOperationsNotInAllowedRange{
	// 				Description: to.Ptr("Get an alert when the number unauthorized operations in the time window is not in the allowed range. Unauthorized operations are operations that affect the device (or done by it) that fail because of an unauthorized error"),
	// 				DisplayName: to.Ptr("Number of unauthorized operations is not in allowed range"),
	// 				IsEnabled: to.Ptr(false),
	// 				RuleType: to.Ptr("UnauthorizedOperationsNotInAllowedRange"),
	// 				MaxThreshold: to.Ptr[int32](0),
	// 				MinThreshold: to.Ptr[int32](0),
	// 				TimeWindowSize: to.Ptr("PT15M"),
	// 		}},
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDeviceSecurityGroupsClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DeviceSecurityGroupList = armsecurity.DeviceSecurityGroupList{
		// 	Value: []*armsecurity.DeviceSecurityGroup{
		// 		{
		// 			Name: to.Ptr("samplesecuritygroup"),
		// 			Type: to.Ptr("Microsoft.Security/deviceSecurityGroups"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub/providers/Microsoft.Security/deviceSecurityGroups/samplesecuritygroup"),
		// 			Properties: &armsecurity.DeviceSecurityGroupProperties{
		// 				AllowlistRules: []armsecurity.AllowlistCustomAlertRuleClassification{
		// 					&armsecurity.ConnectionToIPNotAllowed{
		// 						Description: to.Ptr("Get an alert when an outbound connection is created between your device and an ip that isn't allowed"),
		// 						DisplayName: to.Ptr("Outbound connection to an ip that isn't allowed"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("ConnectionToIpNotAllowed"),
		// 						ValueType: to.Ptr(armsecurity.ValueTypeIPCidr),
		// 						AllowlistValues: []*string{
		// 						},
		// 					},
		// 					&armsecurity.LocalUserNotAllowed{
		// 						Description: to.Ptr("Get an alert when a local user that isn't allowed logins to the device"),
		// 						DisplayName: to.Ptr("Login by a local user that isn't allowed"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("LocalUserNotAllowed"),
		// 						ValueType: to.Ptr(armsecurity.ValueTypeString),
		// 						AllowlistValues: []*string{
		// 						},
		// 					},
		// 					&armsecurity.ProcessNotAllowed{
		// 						Description: to.Ptr("Get an alert when a process that isn't allowed is executed"),
		// 						DisplayName: to.Ptr("Execution of a process that isn't allowed"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("ProcessNotAllowed"),
		// 						ValueType: to.Ptr(armsecurity.ValueTypeString),
		// 						AllowlistValues: []*string{
		// 						},
		// 				}},
		// 				DenylistRules: []*armsecurity.DenylistCustomAlertRule{
		// 				},
		// 				ThresholdRules: []armsecurity.ThresholdCustomAlertRuleClassification{
		// 				},
		// 				TimeWindowRules: []armsecurity.TimeWindowCustomAlertRuleClassification{
		// 					&armsecurity.ActiveConnectionsNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of active connections of a device in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of active connections is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("ActiveConnectionsNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.AmqpC2DMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of cloud to device messages (AMQP protocol) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of cloud to device messages (AMQP protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("AmqpC2DMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.MqttC2DMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of cloud to device messages (MQTT protocol) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of cloud to device messages (MQTT protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("MqttC2DMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.HTTPC2DMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of cloud to device messages (HTTP protocol) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of cloud to device messages (HTTP protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("HttpC2DMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.AmqpC2DRejectedMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of cloud to device messages (AMQP protocol) that were rejected by the device in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of rejected cloud to device messages (AMQP protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("AmqpC2DRejectedMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.MqttC2DRejectedMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of cloud to device messages (MQTT protocol) that were rejected by the device in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of rejected cloud to device messages (MQTT protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("MqttC2DRejectedMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.HTTPC2DRejectedMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of cloud to device messages (HTTP protocol) that were rejected by the device in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of rejected cloud to device messages (HTTP protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("HttpC2DRejectedMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.AmqpD2CMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of device to cloud messages (AMQP protocol) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of device to cloud messages (AMQP protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("AmqpD2CMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.MqttD2CMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of device to cloud messages (MQTT protocol) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of device to cloud messages (MQTT protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("MqttD2CMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.HTTPD2CMessagesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of device to cloud messages (HTTP protocol) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of device to cloud messages (HTTP protocol) is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("HttpD2CMessagesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.DirectMethodInvokesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of direct method invokes in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of direct method invokes is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("DirectMethodInvokesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.FailedLocalLoginsNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of failed local logins on the device in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of failed local logins is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("FailedLocalLoginsNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.FileUploadsNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of file uploads from the device to the cloud in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of file uploads is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("FileUploadsNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.QueuePurgesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of device queue purges in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of device queue purges is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("QueuePurgesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.TwinUpdatesNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number of twin updates (by the device or the service) in the time window is not in the allowed range"),
		// 						DisplayName: to.Ptr("Number of twin updates is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("TwinUpdatesNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 					},
		// 					&armsecurity.UnauthorizedOperationsNotInAllowedRange{
		// 						Description: to.Ptr("Get an alert when the number unauthorized operations in the time window is not in the allowed range. Unauthorized operations are operations that affect the device (or done by it) that fail because of an unauthorized error"),
		// 						DisplayName: to.Ptr("Number of unauthorized operations is not in allowed range"),
		// 						IsEnabled: to.Ptr(false),
		// 						RuleType: to.Ptr("UnauthorizedOperationsNotInAllowedRange"),
		// 						MaxThreshold: to.Ptr[int32](0),
		// 						MinThreshold: to.Ptr[int32](0),
		// 						TimeWindowSize: to.Ptr("PT15M"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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 {
	// The device security group resource
	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 {
	// The device security group resource
	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.NewListPager method.

type DeviceSecurityGroupsClientListResponse added in v0.3.0

type DeviceSecurityGroupsClientListResponse struct {
	// List of device security groups
	DeviceSecurityGroupList
}

DeviceSecurityGroupsClientListResponse contains the response from method DeviceSecurityGroupsClient.NewListPager.

type DirectMethodInvokesNotInAllowedRange

type DirectMethodInvokesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// REQUIRED; The security solutions' image publisher
	Publisher *string

	// REQUIRED; The security solutions' image sku
	SKU *string

	// REQUIRED; The security family of the discovered solution
	SecurityFamily *SecurityFamily
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDiscoveredSecuritySolutionsClient().Get(ctx, "myRg2", "centralus", "paloalto7", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DiscoveredSecuritySolution = armsecurity.DiscoveredSecuritySolution{
	// 	Location: to.Ptr("eastus2"),
	// 	Name: to.Ptr("paloalto7"),
	// 	Type: to.Ptr("Microsoft.Security/locations/discoveredSecuritySolutions"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/centralus/discoveredSecuritySolutions/paloalto7"),
	// 	Properties: &armsecurity.DiscoveredSecuritySolutionProperties{
	// 		Offer: to.Ptr("vmseries1"),
	// 		Publisher: to.Ptr("paloaltonetworks"),
	// 		SecurityFamily: to.Ptr(armsecurity.SecurityFamilyNgfw),
	// 		SKU: to.Ptr("byol"),
	// 	},
	// }
}
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.NewListByHomeRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDiscoveredSecuritySolutionsClient().NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DiscoveredSecuritySolutionList = armsecurity.DiscoveredSecuritySolutionList{
		// 	Value: []*armsecurity.DiscoveredSecuritySolution{
		// 		{
		// 			Location: to.Ptr("eastus"),
		// 			Name: to.Ptr("CP"),
		// 			Type: to.Ptr("Microsoft.Security/locations/discoveredSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/centralus/discoveredSecuritySolutions/CP"),
		// 			Properties: &armsecurity.DiscoveredSecuritySolutionProperties{
		// 				Offer: to.Ptr("cisco-asav"),
		// 				Publisher: to.Ptr("cisco"),
		// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyNgfw),
		// 				SKU: to.Ptr("asav-azure-byol"),
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("eastus2"),
		// 			Name: to.Ptr("paloalto7"),
		// 			Type: to.Ptr("Microsoft.Security/locations/discoveredSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/centralus/discoveredSecuritySolutions/paloalto7"),
		// 			Properties: &armsecurity.DiscoveredSecuritySolutionProperties{
		// 				Offer: to.Ptr("vmseries1"),
		// 				Publisher: to.Ptr("paloaltonetworks"),
		// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyNgfw),
		// 				SKU: to.Ptr("byol"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDiscoveredSecuritySolutionsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DiscoveredSecuritySolutionList = armsecurity.DiscoveredSecuritySolutionList{
		// 	Value: []*armsecurity.DiscoveredSecuritySolution{
		// 		{
		// 			Location: to.Ptr("eastus"),
		// 			Name: to.Ptr("CP"),
		// 			Type: to.Ptr("Microsoft.Security/locations/discoveredSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/centralus/discoveredSecuritySolutions/CP"),
		// 			Properties: &armsecurity.DiscoveredSecuritySolutionProperties{
		// 				Offer: to.Ptr("cisco-asav"),
		// 				Publisher: to.Ptr("cisco"),
		// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyNgfw),
		// 				SKU: to.Ptr("asav-azure-byol"),
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("eastus2"),
		// 			Name: to.Ptr("paloalto7"),
		// 			Type: to.Ptr("Microsoft.Security/locations/discoveredSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/centralus/discoveredSecuritySolutions/paloalto7"),
		// 			Properties: &armsecurity.DiscoveredSecuritySolutionProperties{
		// 				Offer: to.Ptr("vmseries1"),
		// 				Publisher: to.Ptr("paloaltonetworks"),
		// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyNgfw),
		// 				SKU: to.Ptr("byol"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListByHomeRegionPager method.

type DiscoveredSecuritySolutionsClientListByHomeRegionResponse added in v0.3.0

type DiscoveredSecuritySolutionsClientListByHomeRegionResponse struct {
	DiscoveredSecuritySolutionList
}

DiscoveredSecuritySolutionsClientListByHomeRegionResponse contains the response from method DiscoveredSecuritySolutionsClient.NewListByHomeRegionPager.

type DiscoveredSecuritySolutionsClientListOptions added in v0.3.0

type DiscoveredSecuritySolutionsClientListOptions struct {
}

DiscoveredSecuritySolutionsClientListOptions contains the optional parameters for the DiscoveredSecuritySolutionsClient.NewListPager method.

type DiscoveredSecuritySolutionsClientListResponse added in v0.3.0

type DiscoveredSecuritySolutionsClientListResponse struct {
	DiscoveredSecuritySolutionList
}

DiscoveredSecuritySolutionsClientListResponse contains the response from method DiscoveredSecuritySolutionsClient.NewListPager.

type ETag

type ETag struct {
	// Entity tag is used for comparing two or more entities from the same requested resource.
	Etag *string
}

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

	// The Network Security Groups effective on the network interface
	NetworkSecurityGroups []*string
}

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 Enforce added in v0.13.0

type Enforce string

Enforce - If set to "False", it allows the descendants of this scope to override the pricing configuration set on this scope (allows setting inherited="False"). If set to "True", it prevents overrides and forces this pricing configuration on all the descendants of this scope. This field is only available for subscription-level pricing.

const (
	// EnforceFalse - Allows the descendants of this scope to override the pricing configuration set on this scope (allows setting
	// inherited="False")
	EnforceFalse Enforce = "False"
	// EnforceTrue - Prevents overrides and forces the current scope's pricing configuration to all descendants
	EnforceTrue Enforce = "True"
)

func PossibleEnforceValues added in v0.13.0

func PossibleEnforceValues() []Enforce

PossibleEnforceValues returns the possible values for the Enforce 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
}

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, - *GitlabScopeEnvironmentData

type EnvironmentDetails added in v0.11.0

type EnvironmentDetails struct {
	// The hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the hierarchyId id)
	EnvironmentHierarchyID *string

	// The native resource id of the resource (in case of Azure - the resource Id, in case of MC - the native resource id)
	NativeResourceID *string

	// The organizational hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the organizational
	// hierarchyId id)
	OrganizationalHierarchyID *string

	// The subscription Id
	SubscriptionID *string

	// The tenant Id
	TenantID *string
}

EnvironmentDetails - The environment details of the resource

func (EnvironmentDetails) MarshalJSON added in v0.11.0

func (e EnvironmentDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EnvironmentDetails.

func (*EnvironmentDetails) UnmarshalJSON added in v0.11.0

func (e *EnvironmentDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentDetails.

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"
	EnvironmentTypeGitlabScope      EnvironmentType = "GitlabScope"
)

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 any

	// READ-ONLY; The additional info type.
	Type *string
}

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 ErrorDetail added in v0.11.0

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON added in v0.11.0

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v0.11.0

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorDetailAutoGenerated added in v0.11.0

type ErrorDetailAutoGenerated struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetailAutoGenerated

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetailAutoGenerated - The error detail.

func (ErrorDetailAutoGenerated) MarshalJSON added in v0.11.0

func (e ErrorDetailAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetailAutoGenerated.

func (*ErrorDetailAutoGenerated) UnmarshalJSON added in v0.11.0

func (e *ErrorDetailAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetailAutoGenerated.

type ErrorResponse added in v0.11.0

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON added in v0.11.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v0.11.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ErrorResponseAutoGenerated added in v0.11.0

type ErrorResponseAutoGenerated struct {
	// The error object.
	Error *ErrorDetailAutoGenerated
}

ErrorResponseAutoGenerated - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponseAutoGenerated) MarshalJSON added in v0.11.0

func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated.

func (*ErrorResponseAutoGenerated) UnmarshalJSON added in v0.11.0

func (e *ErrorResponseAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseAutoGenerated.

type EventSource

type EventSource string

EventSource - A valid event source type.

const (
	EventSourceAlerts                                 EventSource = "Alerts"
	EventSourceAssessments                            EventSource = "Assessments"
	EventSourceAssessmentsSnapshot                    EventSource = "AssessmentsSnapshot"
	EventSourceAttackPaths                            EventSource = "AttackPaths"
	EventSourceAttackPathsSnapshot                    EventSource = "AttackPathsSnapshot"
	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
}

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 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 Extension added in v0.11.0

type Extension struct {
	// REQUIRED; Indicates whether the extension is enabled.
	IsEnabled *IsEnabled

	// REQUIRED; The extension name. Supported values are:
	// AgentlessDiscoveryForKubernetes - API-based discovery of information about Kubernetes cluster architecture, workload objects,
	// and setup. Required for Kubernetes inventory, identity and network
	// exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. Available for CloudPosture
	// plan.
	// OnUploadMalwareScanning - Limits the GB to be scanned per month for each storage account within the subscription. Once
	// this limit reached on a given storage account, Blobs won't be scanned during
	// current calendar month. Available for StorageAccounts plan.
	// SensitiveDataDiscovery - Sensitive data discovery identifies Blob storage container with sensitive data such as credentials,
	// credit cards, and more, to help prioritize and investigate security events.
	// Available for StorageAccounts and CloudPosture plans.
	// ContainerRegistriesVulnerabilityAssessments - Provides vulnerability management for images stored in your container registries.
	// Available for CloudPosture and Containers plans.
	Name *string

	// Property values associated with the extension.
	AdditionalExtensionProperties map[string]any

	// READ-ONLY; Optional. A status describing the success/failure of the extension's enablement/disablement operation.
	OperationStatus *OperationStatusAutoGenerated
}

Extension - A plan's extension properties

func (Extension) MarshalJSON added in v0.11.0

func (e Extension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Extension.

func (*Extension) UnmarshalJSON added in v0.11.0

func (e *Extension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Extension.

type ExternalSecuritySolution

type ExternalSecuritySolution struct {
	// REQUIRED; The kind of the external solution
	Kind *ExternalSecuritySolutionKind

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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) GetExternalSecuritySolution added in v0.12.0

func (e *ExternalSecuritySolution) GetExternalSecuritySolution() *ExternalSecuritySolution

GetExternalSecuritySolution implements the ExternalSecuritySolutionClassification interface for type ExternalSecuritySolution.

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 ExternalSecuritySolutionClassification added in v0.12.0

type ExternalSecuritySolutionClassification interface {
	// GetExternalSecuritySolution returns the ExternalSecuritySolution content of the underlying type.
	GetExternalSecuritySolution() *ExternalSecuritySolution
}

ExternalSecuritySolutionClassification provides polymorphic access to related types. Call the interface's GetExternalSecuritySolution() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AADExternalSecuritySolution, *AtaExternalSecuritySolution, *CefExternalSecuritySolution, *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 ExternalSecuritySolutionList

type ExternalSecuritySolutionList struct {
	Value []ExternalSecuritySolutionClassification

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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]any
	DeviceType           *string
	DeviceVendor         *string

	// Represents an OMS workspace to which the solution is connected
	Workspace *ConnectedWorkspace
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewExternalSecuritySolutionsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armsecurity.ExternalSecuritySolutionsClientGetResponse{
	// 	                            ExternalSecuritySolutionClassification: &armsecurity.AADExternalSecuritySolution{
	// 		Location: to.Ptr("eastus"),
	// 		Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
	// 		Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
	// 		ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-eus/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
	// 		Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
	// 		Properties: &armsecurity.AADSolutionProperties{
	// 			DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
	// 			DeviceVendor: to.Ptr("Microsoft"),
	// 			Workspace: &armsecurity.ConnectedWorkspace{
	// 				ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-eus/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
	// 			},
	// 			AdditionalProperties: map[string]any{
	// 				"connectivityState": "Discovered",
	// 			},
	// 		},
	// 	},
	// 	                        }
}
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.NewListByHomeRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewExternalSecuritySolutionsClient().NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ExternalSecuritySolutionList = armsecurity.ExternalSecuritySolutionList{
		// 	Value: []armsecurity.ExternalSecuritySolutionClassification{
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("eastus"),
		// 			Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-eus/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-eus/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 		},
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("westeurope"),
		// 			Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-weu"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-weu"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-weu"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 		},
		// 		&armsecurity.CefExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("cef_omsprd_barracudanetworks_waf_barracuda"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/cef_omsprd_barracudanetworks_waf_barracuda"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindCEF),
		// 			Properties: &armsecurity.CefSolutionProperties{
		// 				DeviceType: to.Ptr("WAF"),
		// 				DeviceVendor: to.Ptr("barracudanetworks"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				Hostname: to.Ptr("barracuda"),
		// 				LastEventReceived: to.Ptr("2018-05-09T10:30:11.523Z"),
		// 			},
		// 		},
		// 		&armsecurity.CefExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("cef_omsprd_virtualhoneypot_Microsoft_demovm20"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/cef_omsprd_virtualhoneypot_Microsoft_demovm20"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindCEF),
		// 			Properties: &armsecurity.CefSolutionProperties{
		// 				DeviceType: to.Ptr("Microsoft"),
		// 				DeviceVendor: to.Ptr("virtualHoneypot"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				Hostname: to.Ptr("demovm20"),
		// 				LastEventReceived: to.Ptr("2018-05-08T15:42:22.57Z"),
		// 			},
		// 		},
		// 		&armsecurity.CefExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("cef_omsprd_virtualhoneypot_Microsoft_demovm10"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/cef_omsprd_virtualhoneypot_Microsoft_demovm10"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindCEF),
		// 			Properties: &armsecurity.CefSolutionProperties{
		// 				DeviceType: to.Ptr("Microsoft"),
		// 				DeviceVendor: to.Ptr("virtualHoneypot"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				Hostname: to.Ptr("demovm10"),
		// 				LastEventReceived: to.Ptr("2018-05-08T10:38:53.423Z"),
		// 			},
		// 		},
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("aad_omsprd"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_omsprd"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 		},
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("japaneast"),
		// 			Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-ejp"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-ejp/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-ejp"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-ejp/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-ejp"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewExternalSecuritySolutionsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ExternalSecuritySolutionList = armsecurity.ExternalSecuritySolutionList{
		// 	Value: []armsecurity.ExternalSecuritySolutionClassification{
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("eastus"),
		// 			Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-eus/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-eus/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 		},
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("westeurope"),
		// 			Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-weu"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-weu"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-weu"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 		},
		// 		&armsecurity.CefExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("cef_omsprd_barracudanetworks_waf_barracuda"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/cef_omsprd_barracudanetworks_waf_barracuda"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindCEF),
		// 			Properties: &armsecurity.CefSolutionProperties{
		// 				DeviceType: to.Ptr("WAF"),
		// 				DeviceVendor: to.Ptr("barracudanetworks"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				Hostname: to.Ptr("barracuda"),
		// 				LastEventReceived: to.Ptr("2018-05-09T10:30:11.523Z"),
		// 			},
		// 		},
		// 		&armsecurity.CefExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("cef_omsprd_virtualhoneypot_Microsoft_demovm20"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/cef_omsprd_virtualhoneypot_Microsoft_demovm20"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindCEF),
		// 			Properties: &armsecurity.CefSolutionProperties{
		// 				DeviceType: to.Ptr("Microsoft"),
		// 				DeviceVendor: to.Ptr("virtualHoneypot"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				Hostname: to.Ptr("demovm20"),
		// 				LastEventReceived: to.Ptr("2018-05-08T15:42:22.57Z"),
		// 			},
		// 		},
		// 		&armsecurity.CefExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("cef_omsprd_virtualhoneypot_Microsoft_demovm10"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/cef_omsprd_virtualhoneypot_Microsoft_demovm10"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindCEF),
		// 			Properties: &armsecurity.CefSolutionProperties{
		// 				DeviceType: to.Ptr("Microsoft"),
		// 				DeviceVendor: to.Ptr("virtualHoneypot"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				Hostname: to.Ptr("demovm10"),
		// 				LastEventReceived: to.Ptr("2018-05-08T10:38:53.423Z"),
		// 			},
		// 		},
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("westcentralus"),
		// 			Name: to.Ptr("aad_omsprd"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/unificationprod/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_omsprd"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/unificationprod/providers/Microsoft.OperationalInsights/workspaces/omsprd"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 		},
		// 		&armsecurity.AADExternalSecuritySolution{
		// 			Location: to.Ptr("japaneast"),
		// 			Name: to.Ptr("aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-ejp"),
		// 			Type: to.Ptr("Microsoft.Security/locations/externalSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/defaultresourcegroup-ejp/providers/Microsoft.Security/locations/centralus/externalSecuritySolutions/aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-ejp"),
		// 			Kind: to.Ptr(armsecurity.ExternalSecuritySolutionKindAAD),
		// 			Properties: &armsecurity.AADSolutionProperties{
		// 				DeviceType: to.Ptr("Azure Active Directory Identity Protection"),
		// 				DeviceVendor: to.Ptr("Microsoft"),
		// 				Workspace: &armsecurity.ConnectedWorkspace{
		// 					ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/defaultresourcegroup-ejp/providers/Microsoft.OperationalInsights/workspaces/defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-ejp"),
		// 				},
		// 				AdditionalProperties: map[string]any{
		// 					"connectivityState": "Discovered",
		// 				},
		// 			},
		// 	}},
		// }
	}
}
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 {
	// 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.
	ExternalSecuritySolutionClassification
}

ExternalSecuritySolutionsClientGetResponse contains the response from method ExternalSecuritySolutionsClient.Get.

func (*ExternalSecuritySolutionsClientGetResponse) UnmarshalJSON added in v0.12.0

func (e *ExternalSecuritySolutionsClientGetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalSecuritySolutionsClientGetResponse.

type ExternalSecuritySolutionsClientListByHomeRegionOptions added in v0.3.0

type ExternalSecuritySolutionsClientListByHomeRegionOptions struct {
}

ExternalSecuritySolutionsClientListByHomeRegionOptions contains the optional parameters for the ExternalSecuritySolutionsClient.NewListByHomeRegionPager method.

type ExternalSecuritySolutionsClientListByHomeRegionResponse added in v0.3.0

type ExternalSecuritySolutionsClientListByHomeRegionResponse struct {
	ExternalSecuritySolutionList
}

ExternalSecuritySolutionsClientListByHomeRegionResponse contains the response from method ExternalSecuritySolutionsClient.NewListByHomeRegionPager.

type ExternalSecuritySolutionsClientListOptions added in v0.3.0

type ExternalSecuritySolutionsClientListOptions struct {
}

ExternalSecuritySolutionsClientListOptions contains the optional parameters for the ExternalSecuritySolutionsClient.NewListPager method.

type ExternalSecuritySolutionsClientListResponse added in v0.3.0

type ExternalSecuritySolutionsClientListResponse struct {
	ExternalSecuritySolutionList
}

ExternalSecuritySolutionsClientListResponse contains the response from method ExternalSecuritySolutionsClient.NewListPager.

type FailedLocalLoginsNotInAllowedRange

type FailedLocalLoginsNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; Auth URI field of the API key (write only)
	AuthURI *string

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

	// REQUIRED; Client email field of the API key (write only)
	ClientEmail *string

	// REQUIRED; Client ID field of the API key (write only)
	ClientID *string

	// REQUIRED; Client x509 certificate URL field of the API key (write only)
	ClientX509CertURL *string

	// REQUIRED; The organization ID of the GCP cloud account
	OrganizationID *string

	// REQUIRED; Private key field of the API key (write only)
	PrivateKey *string

	// REQUIRED; Private key ID field of the API key (write only)
	PrivateKeyID *string

	// REQUIRED; Project ID field of the API key (write only)
	ProjectID *string

	// REQUIRED; Token URI field of the API key (write only)
	TokenURI *string

	// REQUIRED; Type field of the API key (write only)
	Type *string

	// READ-ONLY; State of the multi-cloud connector
	AuthenticationProvisioningState *AuthenticationProvisioningState

	// READ-ONLY; The permissions detected in the cloud account.
	GrantedPermissions []*PermissionProperty
}

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
}

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

	// The GCP management project number from organizational onboarding
	ManagementProjectNumber *string

	// If the multi cloud account is not of membership type organization, this will be the ID of the project's parent
	ParentHierarchyID *string
}

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

	// If the multi cloud account is of membership type organization, list of accounts excluded from offering
	ExcludedProjectNumbers []*string

	// The service account email address which represents the organization level permissions container.
	ServiceAccountEmailAddress *string

	// The GCP workload identity provider id which represents the permissions required to auto provision security connectors
	WorkloadIdentityProviderID *string

	// READ-ONLY; GCP organization name
	OrganizationName *string
}

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

	// The unique GCP Project number
	ProjectNumber *string

	// READ-ONLY; GCP project name
	ProjectName *string

	// READ-ONLY; The GCP workload identity federation pool id
	WorkloadIdentityPoolID *string
}

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

	// The Gcp project's organizational data
	OrganizationalData GcpOrganizationalDataClassification

	// The Gcp project's details
	ProjectDetails *GcpProjectDetails

	// Scan interval in hours (value should be between 1-hour to 24-hours)
	ScanInterval *int64
}

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 GetSensitivitySettingsListResponse added in v0.11.0

type GetSensitivitySettingsListResponse struct {
	Value []*GetSensitivitySettingsResponse
}

GetSensitivitySettingsListResponse - A list with a single sensitivity settings resource

func (GetSensitivitySettingsListResponse) MarshalJSON added in v0.11.0

func (g GetSensitivitySettingsListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetSensitivitySettingsListResponse.

func (*GetSensitivitySettingsListResponse) UnmarshalJSON added in v0.11.0

func (g *GetSensitivitySettingsListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetSensitivitySettingsListResponse.

type GetSensitivitySettingsResponse added in v0.11.0

type GetSensitivitySettingsResponse struct {
	// The sensitivity settings properties
	Properties *GetSensitivitySettingsResponseProperties

	// READ-ONLY; The ID of the sensitivity settings
	ID *string

	// READ-ONLY; The name of the sensitivity settings
	Name *string

	// READ-ONLY; The type of the sensitivity settings
	Type *string
}

GetSensitivitySettingsResponse - Data sensitivity settings for sensitive data discovery

func (GetSensitivitySettingsResponse) MarshalJSON added in v0.11.0

func (g GetSensitivitySettingsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetSensitivitySettingsResponse.

func (*GetSensitivitySettingsResponse) UnmarshalJSON added in v0.11.0

func (g *GetSensitivitySettingsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetSensitivitySettingsResponse.

type GetSensitivitySettingsResponseProperties added in v0.11.0

type GetSensitivitySettingsResponseProperties struct {
	// Microsoft information protection built-in and custom information types, labels, and integration status.
	MipInformation *GetSensitivitySettingsResponsePropertiesMipInformation

	// List of selected sensitive info types' IDs.
	SensitiveInfoTypesIDs []*string

	// The id of the sensitivity threshold label. Any label at or above this rank will be considered sensitive.
	SensitivityThresholdLabelID *string

	// The order of the sensitivity threshold label. Any label at or above this order will be considered sensitive. If set to
	// -1, sensitivity by labels is turned off
	SensitivityThresholdLabelOrder *float32
}

GetSensitivitySettingsResponseProperties - The sensitivity settings properties

func (GetSensitivitySettingsResponseProperties) MarshalJSON added in v0.11.0

MarshalJSON implements the json.Marshaller interface for type GetSensitivitySettingsResponseProperties.

func (*GetSensitivitySettingsResponseProperties) UnmarshalJSON added in v0.11.0

func (g *GetSensitivitySettingsResponseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetSensitivitySettingsResponseProperties.

type GetSensitivitySettingsResponsePropertiesMipInformation added in v0.11.0

type GetSensitivitySettingsResponsePropertiesMipInformation struct {
	// List of pre-configured sensitive information types
	BuiltInInfoTypes []*BuiltInInfoType

	// List of custom user-defined information types
	CustomInfoTypes []*InfoType

	// List of Microsoft information protection sensitivity labels
	Labels []*Label

	// Microsoft information protection integration status
	MipIntegrationStatus *MipIntegrationStatus
}

GetSensitivitySettingsResponsePropertiesMipInformation - Microsoft information protection built-in and custom information types, labels, and integration status.

func (GetSensitivitySettingsResponsePropertiesMipInformation) MarshalJSON added in v0.11.0

MarshalJSON implements the json.Marshaller interface for type GetSensitivitySettingsResponsePropertiesMipInformation.

func (*GetSensitivitySettingsResponsePropertiesMipInformation) UnmarshalJSON added in v0.11.0

UnmarshalJSON implements the json.Unmarshaller interface for type GetSensitivitySettingsResponsePropertiesMipInformation.

type GitHubOwner added in v0.13.0

type GitHubOwner struct {
	// GitHub Owner properties.
	Properties *GitHubOwnerProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GitHubOwner - GitHub Owner resource.

func (GitHubOwner) MarshalJSON added in v0.13.0

func (g GitHubOwner) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubOwner.

func (*GitHubOwner) UnmarshalJSON added in v0.13.0

func (g *GitHubOwner) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwner.

type GitHubOwnerConfiguration added in v0.13.0

type GitHubOwnerConfiguration struct {
	// AutoDiscovery states.
	AutoDiscovery *AutoDiscovery

	// GitHub Repository Inventory Configuration. Dictionary of GitHub repository name to desired repository configuration. If
	// AutoDiscovery is Enabled, this field should be null or empty.
	RepositoryConfigs map[string]*BaseResourceConfiguration
}

GitHubOwnerConfiguration - GitHub Owner Inventory Configuration.

func (GitHubOwnerConfiguration) MarshalJSON added in v0.13.0

func (g GitHubOwnerConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubOwnerConfiguration.

func (*GitHubOwnerConfiguration) UnmarshalJSON added in v0.13.0

func (g *GitHubOwnerConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwnerConfiguration.

type GitHubOwnerListResponse added in v0.13.0

type GitHubOwnerListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitHubOwner
}

GitHubOwnerListResponse - List of RP resources which supports pagination.

func (GitHubOwnerListResponse) MarshalJSON added in v0.13.0

func (g GitHubOwnerListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubOwnerListResponse.

func (*GitHubOwnerListResponse) UnmarshalJSON added in v0.13.0

func (g *GitHubOwnerListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwnerListResponse.

type GitHubOwnerProperties added in v0.13.0

type GitHubOwnerProperties struct {
	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets internal GitHub id.
	GitHubInternalID *string

	// READ-ONLY; Gets or sets GitHub Owner url.
	OwnerURL *string

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time
}

GitHubOwnerProperties - GitHub Owner properties.

func (GitHubOwnerProperties) MarshalJSON added in v0.13.0

func (g GitHubOwnerProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubOwnerProperties.

func (*GitHubOwnerProperties) UnmarshalJSON added in v0.13.0

func (g *GitHubOwnerProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwnerProperties.

type GitHubOwnersClient added in v0.13.0

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

GitHubOwnersClient contains the methods for the GitHubOwners group. Don't use this type directly, use NewGitHubOwnersClient() instead.

func NewGitHubOwnersClient added in v0.13.0

func NewGitHubOwnersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitHubOwnersClient, error)

NewGitHubOwnersClient creates a new instance of GitHubOwnersClient 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 (*GitHubOwnersClient) Get added in v0.13.0

func (client *GitHubOwnersClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, ownerName string, options *GitHubOwnersClientGetOptions) (GitHubOwnersClientGetResponse, error)

Get - Returns a monitored GitHub owner. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • ownerName - The GitHub owner name.
  • options - GitHubOwnersClientGetOptions contains the optional parameters for the GitHubOwnersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubOwnersClient().Get(ctx, "myRg", "mySecurityConnectorName", "myGitHubOwner", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubOwner = armsecurity.GitHubOwner{
	// 	Name: to.Ptr("myGitHubOwner"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner"),
	// 	Properties: &armsecurity.GitHubOwnerProperties{
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		OwnerURL: to.Ptr("https://github.com/myGitHubOwner"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*GitHubOwnersClient) ListAvailable added in v0.13.0

func (client *GitHubOwnersClient) ListAvailable(ctx context.Context, resourceGroupName string, securityConnectorName string, options *GitHubOwnersClientListAvailableOptions) (GitHubOwnersClientListAvailableResponse, error)

ListAvailable - Returns a list of all GitHub owners accessible by the user token consumed by the connector. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - GitHubOwnersClientListAvailableOptions contains the optional parameters for the GitHubOwnersClient.ListAvailable method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubOwnersClient().ListAvailable(ctx, "myRg", "mySecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubOwnerListResponse = armsecurity.GitHubOwnerListResponse{
	// 	Value: []*armsecurity.GitHubOwner{
	// 		{
	// 			Name: to.Ptr("myGitHubOwner"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner"),
	// 			Properties: &armsecurity.GitHubOwnerProperties{
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 				OwnerURL: to.Ptr("https://github.com/myGitHubOwner"),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("anotherGitHubOwner"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/anotherGitHubOwner"),
	// 			Properties: &armsecurity.GitHubOwnerProperties{
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboardedByOtherConnector),
	// 				OwnerURL: to.Ptr("https://github.com/anotherGitHubOwner"),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("notOnboardedOwner"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/notOnboardedOwner"),
	// 			Properties: &armsecurity.GitHubOwnerProperties{
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateNotOnboarded),
	// 				OwnerURL: to.Ptr("https://github.com/notOnboardedOwner"),
	// 			},
	// 	}},
	// }
}
Output:

func (*GitHubOwnersClient) NewListPager added in v0.13.0

func (client *GitHubOwnersClient) NewListPager(resourceGroupName string, securityConnectorName string, options *GitHubOwnersClientListOptions) *runtime.Pager[GitHubOwnersClientListResponse]

NewListPager - Returns a list of GitHub owners onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - GitHubOwnersClientListOptions contains the optional parameters for the GitHubOwnersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitHubOwners_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubOwnersClient().NewListPager("myRg", "mySecurityConnectorName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubOwnerListResponse = armsecurity.GitHubOwnerListResponse{
		// 	Value: []*armsecurity.GitHubOwner{
		// 		{
		// 			Name: to.Ptr("myGitHubOwner"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner"),
		// 			Properties: &armsecurity.GitHubOwnerProperties{
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				OwnerURL: to.Ptr("https://github.com/myGitHubOwner"),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GitHubOwnersClientGetOptions added in v0.13.0

type GitHubOwnersClientGetOptions struct {
}

GitHubOwnersClientGetOptions contains the optional parameters for the GitHubOwnersClient.Get method.

type GitHubOwnersClientGetResponse added in v0.13.0

type GitHubOwnersClientGetResponse struct {
	// GitHub Owner resource.
	GitHubOwner
}

GitHubOwnersClientGetResponse contains the response from method GitHubOwnersClient.Get.

type GitHubOwnersClientListAvailableOptions added in v0.13.0

type GitHubOwnersClientListAvailableOptions struct {
}

GitHubOwnersClientListAvailableOptions contains the optional parameters for the GitHubOwnersClient.ListAvailable method.

type GitHubOwnersClientListAvailableResponse added in v0.13.0

type GitHubOwnersClientListAvailableResponse struct {
	// List of RP resources which supports pagination.
	GitHubOwnerListResponse
}

GitHubOwnersClientListAvailableResponse contains the response from method GitHubOwnersClient.ListAvailable.

type GitHubOwnersClientListOptions added in v0.13.0

type GitHubOwnersClientListOptions struct {
}

GitHubOwnersClientListOptions contains the optional parameters for the GitHubOwnersClient.NewListPager method.

type GitHubOwnersClientListResponse added in v0.13.0

type GitHubOwnersClientListResponse struct {
	// List of RP resources which supports pagination.
	GitHubOwnerListResponse
}

GitHubOwnersClientListResponse contains the response from method GitHubOwnersClient.NewListPager.

type GitHubReposClient added in v0.13.0

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

GitHubReposClient contains the methods for the GitHubRepos group. Don't use this type directly, use NewGitHubReposClient() instead.

func NewGitHubReposClient added in v0.13.0

func NewGitHubReposClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitHubReposClient, error)

NewGitHubReposClient creates a new instance of GitHubReposClient 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 (*GitHubReposClient) Get added in v0.13.0

func (client *GitHubReposClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, ownerName string, repoName string, options *GitHubReposClientGetOptions) (GitHubReposClientGetResponse, error)

Get - Returns a monitored GitHub repository. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • ownerName - The GitHub owner name.
  • repoName - The repository name.
  • options - GitHubReposClientGetOptions contains the optional parameters for the GitHubReposClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubReposClient().Get(ctx, "myRg", "mySecurityConnectorName", "myGitHubOwner", "myGitHubRepo", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubRepository = armsecurity.GitHubRepository{
	// 	Name: to.Ptr("myGitHubRepo"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners/repos"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner/repos/myGitHubRepo"),
	// 	Properties: &armsecurity.GitHubRepositoryProperties{
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ParentOwnerName: to.Ptr("myGitHubOwner"),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		RepoFullName: to.Ptr("myGitHubOwner/myGitHubRepo"),
	// 		RepoName: to.Ptr("myGitHubRepo"),
	// 		RepoURL: to.Ptr("https://github.com/myGitHubOwner/myGitHubRepo"),
	// 	},
	// }
}
Output:

func (*GitHubReposClient) NewListPager added in v0.13.0

func (client *GitHubReposClient) NewListPager(resourceGroupName string, securityConnectorName string, ownerName string, options *GitHubReposClientListOptions) *runtime.Pager[GitHubReposClientListResponse]

NewListPager - Returns a list of GitHub repositories onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • ownerName - The GitHub owner name.
  • options - GitHubReposClientListOptions contains the optional parameters for the GitHubReposClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitHubRepos_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubReposClient().NewListPager("myRg", "mySecurityConnectorName", "myGitHubOwner", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubRepositoryListResponse = armsecurity.GitHubRepositoryListResponse{
		// 	Value: []*armsecurity.GitHubRepository{
		// 		{
		// 			Name: to.Ptr("myGitHubRepo"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitHubOwners/repos"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner/repos/myGitHubRepo"),
		// 			Properties: &armsecurity.GitHubRepositoryProperties{
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				ParentOwnerName: to.Ptr("myGitHubOwner"),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 				RepoFullName: to.Ptr("myGitHubOwner/myGitHubRepo"),
		// 				RepoName: to.Ptr("myGitHubRepo"),
		// 				RepoURL: to.Ptr("https://github.com/myGitHubOwner/myGitHubRepo"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GitHubReposClientGetOptions added in v0.13.0

type GitHubReposClientGetOptions struct {
}

GitHubReposClientGetOptions contains the optional parameters for the GitHubReposClient.Get method.

type GitHubReposClientGetResponse added in v0.13.0

type GitHubReposClientGetResponse struct {
	// GitHub Repository resource.
	GitHubRepository
}

GitHubReposClientGetResponse contains the response from method GitHubReposClient.Get.

type GitHubReposClientListOptions added in v0.13.0

type GitHubReposClientListOptions struct {
}

GitHubReposClientListOptions contains the optional parameters for the GitHubReposClient.NewListPager method.

type GitHubReposClientListResponse added in v0.13.0

type GitHubReposClientListResponse struct {
	// List of RP resources which supports pagination.
	GitHubRepositoryListResponse
}

GitHubReposClientListResponse contains the response from method GitHubReposClient.NewListPager.

type GitHubRepository added in v0.13.0

type GitHubRepository struct {
	// GitHub Repository properties.
	Properties *GitHubRepositoryProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GitHubRepository - GitHub Repository resource.

func (GitHubRepository) MarshalJSON added in v0.13.0

func (g GitHubRepository) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubRepository.

func (*GitHubRepository) UnmarshalJSON added in v0.13.0

func (g *GitHubRepository) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubRepository.

type GitHubRepositoryListResponse added in v0.13.0

type GitHubRepositoryListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitHubRepository
}

GitHubRepositoryListResponse - List of RP resources which supports pagination.

func (GitHubRepositoryListResponse) MarshalJSON added in v0.13.0

func (g GitHubRepositoryListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubRepositoryListResponse.

func (*GitHubRepositoryListResponse) UnmarshalJSON added in v0.13.0

func (g *GitHubRepositoryListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubRepositoryListResponse.

type GitHubRepositoryProperties added in v0.13.0

type GitHubRepositoryProperties struct {
	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// Gets or sets parent GitHub Owner name.
	ParentOwnerName *string

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time

	// READ-ONLY; Gets or sets GitHub Full Name. Repository name, prefixed with Owner name. Eg: "my-org/new-repo-1".
	RepoFullName *string

	// READ-ONLY; Gets or sets GitHub Repository id.
	// This is a numeric id defined by Github. Eg: "123456".
	RepoID *string

	// READ-ONLY; Gets or sets GitHub Repository name. Eg: "new-repo-1".
	RepoName *string

	// READ-ONLY; Gets or sets GitHub Repository url.
	RepoURL *string
}

GitHubRepositoryProperties - GitHub Repository properties.

func (GitHubRepositoryProperties) MarshalJSON added in v0.13.0

func (g GitHubRepositoryProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitHubRepositoryProperties.

func (*GitHubRepositoryProperties) UnmarshalJSON added in v0.13.0

func (g *GitHubRepositoryProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitHubRepositoryProperties.

type GitLabGroup added in v0.13.0

type GitLabGroup struct {
	// GitLab Group properties.
	Properties *GitLabGroupProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GitLabGroup - GitLab Group resource.

func (GitLabGroup) MarshalJSON added in v0.13.0

func (g GitLabGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabGroup.

func (*GitLabGroup) UnmarshalJSON added in v0.13.0

func (g *GitLabGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabGroup.

type GitLabGroupConfiguration added in v0.13.0

type GitLabGroupConfiguration struct {
	// AutoDiscovery states.
	AutoDiscovery *AutoDiscovery

	// GitLab Project Inventory Configuration. Dictionary of GitLab fully-qualified project name to desired project configuration.
	// If AutoDiscovery is Enabled, this field should be null or empty.
	ProjectConfigs map[string]*BaseResourceConfiguration
}

GitLabGroupConfiguration - GitLab Group Inventory Configuration.

func (GitLabGroupConfiguration) MarshalJSON added in v0.13.0

func (g GitLabGroupConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabGroupConfiguration.

func (*GitLabGroupConfiguration) UnmarshalJSON added in v0.13.0

func (g *GitLabGroupConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabGroupConfiguration.

type GitLabGroupListResponse added in v0.13.0

type GitLabGroupListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitLabGroup
}

GitLabGroupListResponse - List of RP resources which supports pagination.

func (GitLabGroupListResponse) MarshalJSON added in v0.13.0

func (g GitLabGroupListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabGroupListResponse.

func (*GitLabGroupListResponse) UnmarshalJSON added in v0.13.0

func (g *GitLabGroupListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabGroupListResponse.

type GitLabGroupProperties added in v0.13.0

type GitLabGroupProperties struct {
	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets the human readable fully-qualified name of the Group object.
	// This contains the entire namespace hierarchy as seen on GitLab UI where namespaces are separated by the '/' character.
	FullyQualifiedFriendlyName *string

	// READ-ONLY; Gets or sets the fully-qualified name of the Group object.
	// This contains the entire namespace hierarchy where namespaces are separated by the '$' character.
	FullyQualifiedName *string

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time

	// READ-ONLY; Gets or sets the url of the GitLab Group.
	URL *string
}

GitLabGroupProperties - GitLab Group properties.

func (GitLabGroupProperties) MarshalJSON added in v0.13.0

func (g GitLabGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabGroupProperties.

func (*GitLabGroupProperties) UnmarshalJSON added in v0.13.0

func (g *GitLabGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabGroupProperties.

type GitLabGroupsClient added in v0.13.0

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

GitLabGroupsClient contains the methods for the GitLabGroups group. Don't use this type directly, use NewGitLabGroupsClient() instead.

func NewGitLabGroupsClient added in v0.13.0

func NewGitLabGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitLabGroupsClient, error)

NewGitLabGroupsClient creates a new instance of GitLabGroupsClient 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 (*GitLabGroupsClient) Get added in v0.13.0

func (client *GitLabGroupsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, groupFQName string, options *GitLabGroupsClientGetOptions) (GitLabGroupsClientGetResponse, error)

Get - Returns a monitored GitLab Group resource for a given fully-qualified name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • groupFQName - The GitLab group fully-qualified name.
  • options - GitLabGroupsClientGetOptions contains the optional parameters for the GitLabGroupsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitLabGroupsClient().Get(ctx, "myRg", "mySecurityConnectorName", "myGitLabGroup$mySubGroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitLabGroup = armsecurity.GitLabGroup{
	// 	Name: to.Ptr("myGitLabGroup$mySubGroup"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup"),
	// 	Properties: &armsecurity.GitLabGroupProperties{
	// 		FullyQualifiedName: to.Ptr("myGitLabGroup$mySubGroup"),
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		URL: to.Ptr("https://gitlab.example.com/myGitLabGroup/mySubGroup"),
	// 	},
	// }
}
Output:

func (*GitLabGroupsClient) ListAvailable added in v0.13.0

func (client *GitLabGroupsClient) ListAvailable(ctx context.Context, resourceGroupName string, securityConnectorName string, options *GitLabGroupsClientListAvailableOptions) (GitLabGroupsClientListAvailableResponse, error)

ListAvailable - Returns a list of all GitLab groups accessible by the user token consumed by the connector. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - GitLabGroupsClientListAvailableOptions contains the optional parameters for the GitLabGroupsClient.ListAvailable method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitLabGroupsClient().ListAvailable(ctx, "myRg", "mySecurityConnectorName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitLabGroupListResponse = armsecurity.GitLabGroupListResponse{
	// 	Value: []*armsecurity.GitLabGroup{
	// 		{
	// 			Name: to.Ptr("myGitLabGroup$mySubGroup"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup"),
	// 			Properties: &armsecurity.GitLabGroupProperties{
	// 				FullyQualifiedName: to.Ptr("myGitLabGroup$mySubGroup"),
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 				URL: to.Ptr("https://gitlab.example.com/myGitLabGroup/mySubGroup"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("myGitLabGroup"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup"),
	// 			Properties: &armsecurity.GitLabGroupProperties{
	// 				FullyQualifiedName: to.Ptr("myGitLabGroup"),
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboardedByOtherConnector),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 				URL: to.Ptr("https://gitlab.example.com/myGitLabGroup"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("anotherGitLabGroup"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/anotherGitLabGroup"),
	// 			Properties: &armsecurity.GitLabGroupProperties{
	// 				FullyQualifiedName: to.Ptr("anotherGitLabGroup"),
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateNotOnboarded),
	// 				URL: to.Ptr("https://gitlab.example.com/anotherGitLabGroup"),
	// 			},
	// 	}},
	// }
}
Output:

func (*GitLabGroupsClient) NewListPager added in v0.13.0

func (client *GitLabGroupsClient) NewListPager(resourceGroupName string, securityConnectorName string, options *GitLabGroupsClientListOptions) *runtime.Pager[GitLabGroupsClientListResponse]

NewListPager - Returns a list of GitLab groups onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • options - GitLabGroupsClientListOptions contains the optional parameters for the GitLabGroupsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitLabGroups_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitLabGroupsClient().NewListPager("myRg", "mySecurityConnectorName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitLabGroupListResponse = armsecurity.GitLabGroupListResponse{
		// 	Value: []*armsecurity.GitLabGroup{
		// 		{
		// 			Name: to.Ptr("myGitLabGroup$mySubGroup"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup"),
		// 			Properties: &armsecurity.GitLabGroupProperties{
		// 				FullyQualifiedName: to.Ptr("myGitLabGroup$mySubGroup"),
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 				URL: to.Ptr("https://gitlab.example.com/myGitLabGroup/mySubGroup"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GitLabGroupsClientGetOptions added in v0.13.0

type GitLabGroupsClientGetOptions struct {
}

GitLabGroupsClientGetOptions contains the optional parameters for the GitLabGroupsClient.Get method.

type GitLabGroupsClientGetResponse added in v0.13.0

type GitLabGroupsClientGetResponse struct {
	// GitLab Group resource.
	GitLabGroup
}

GitLabGroupsClientGetResponse contains the response from method GitLabGroupsClient.Get.

type GitLabGroupsClientListAvailableOptions added in v0.13.0

type GitLabGroupsClientListAvailableOptions struct {
}

GitLabGroupsClientListAvailableOptions contains the optional parameters for the GitLabGroupsClient.ListAvailable method.

type GitLabGroupsClientListAvailableResponse added in v0.13.0

type GitLabGroupsClientListAvailableResponse struct {
	// List of RP resources which supports pagination.
	GitLabGroupListResponse
}

GitLabGroupsClientListAvailableResponse contains the response from method GitLabGroupsClient.ListAvailable.

type GitLabGroupsClientListOptions added in v0.13.0

type GitLabGroupsClientListOptions struct {
}

GitLabGroupsClientListOptions contains the optional parameters for the GitLabGroupsClient.NewListPager method.

type GitLabGroupsClientListResponse added in v0.13.0

type GitLabGroupsClientListResponse struct {
	// List of RP resources which supports pagination.
	GitLabGroupListResponse
}

GitLabGroupsClientListResponse contains the response from method GitLabGroupsClient.NewListPager.

type GitLabProject added in v0.13.0

type GitLabProject struct {
	// GitLab Project properties.
	Properties *GitLabProjectProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GitLabProject - GitLab Project resource.

func (GitLabProject) MarshalJSON added in v0.13.0

func (g GitLabProject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabProject.

func (*GitLabProject) UnmarshalJSON added in v0.13.0

func (g *GitLabProject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabProject.

type GitLabProjectListResponse added in v0.13.0

type GitLabProjectListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitLabProject
}

GitLabProjectListResponse - List of RP resources which supports pagination.

func (GitLabProjectListResponse) MarshalJSON added in v0.13.0

func (g GitLabProjectListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabProjectListResponse.

func (*GitLabProjectListResponse) UnmarshalJSON added in v0.13.0

func (g *GitLabProjectListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabProjectListResponse.

type GitLabProjectProperties added in v0.13.0

type GitLabProjectProperties struct {
	// Details about resource onboarding status across all connectors.
	// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level
	// resources. Onboarded - this resource has already been onboarded by the
	// specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding
	// state is not applicable to the current endpoint.
	OnboardingState *OnboardingState

	// The provisioning state of the resource.
	// Pending - Provisioning pending. Failed - Provisioning failed. Succeeded - Successful provisioning. Canceled - Provisioning
	// canceled. PendingDeletion - Deletion pending. DeletionSuccess - Deletion
	// successful. DeletionFailure - Deletion failure.
	ProvisioningState *DevOpsProvisioningState

	// READ-ONLY; Gets or sets the human readable fully-qualified name of the Project object.
	// This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated by the '/' character.
	FullyQualifiedFriendlyName *string

	// READ-ONLY; Gets or sets the fully-qualified name of the project object.
	// This contains the entire hierarchy where entities are separated by the '$' character.
	FullyQualifiedName *string

	// READ-ONLY; Gets or sets the fully-qualified name of the project's parent group object.
	// This contains the entire hierarchy where namespaces are separated by the '$' character.
	FullyQualifiedParentGroupName *string

	// READ-ONLY; Gets or sets resource status message.
	ProvisioningStatusMessage *string

	// READ-ONLY; Gets or sets time when resource was last checked.
	ProvisioningStatusUpdateTimeUTC *time.Time

	// READ-ONLY; Gets or sets the url of the GitLab Project.
	URL *string
}

GitLabProjectProperties - GitLab Project properties.

func (GitLabProjectProperties) MarshalJSON added in v0.13.0

func (g GitLabProjectProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitLabProjectProperties.

func (*GitLabProjectProperties) UnmarshalJSON added in v0.13.0

func (g *GitLabProjectProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitLabProjectProperties.

type GitLabProjectsClient added in v0.13.0

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

GitLabProjectsClient contains the methods for the GitLabProjects group. Don't use this type directly, use NewGitLabProjectsClient() instead.

func NewGitLabProjectsClient added in v0.13.0

func NewGitLabProjectsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitLabProjectsClient, error)

NewGitLabProjectsClient creates a new instance of GitLabProjectsClient 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 (*GitLabProjectsClient) Get added in v0.13.0

func (client *GitLabProjectsClient) Get(ctx context.Context, resourceGroupName string, securityConnectorName string, groupFQName string, projectName string, options *GitLabProjectsClientGetOptions) (GitLabProjectsClientGetResponse, error)

Get - Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • groupFQName - The GitLab group fully-qualified name.
  • projectName - The project name.
  • options - GitLabProjectsClientGetOptions contains the optional parameters for the GitLabProjectsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitLabProjectsClient().Get(ctx, "myRg", "mySecurityConnectorName", "myGitLabGroup$mySubGroup", "myGitLabProject", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitLabProject = armsecurity.GitLabProject{
	// 	Name: to.Ptr("myGitLabProject"),
	// 	Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups/projects"),
	// 	ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup/projects/myGitLabProject"),
	// 	Properties: &armsecurity.GitLabProjectProperties{
	// 		FullyQualifiedName: to.Ptr("myGitLabGroup$mySubGroup$myGitLabProject"),
	// 		FullyQualifiedParentGroupName: to.Ptr("myGitLabGroup$mySubGroup"),
	// 		OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 		ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 		URL: to.Ptr("https://gitlab.example.com/myGitLabGroup/mySubGroup/myGitLabProject"),
	// 	},
	// }
}
Output:

func (*GitLabProjectsClient) NewListPager added in v0.13.0

func (client *GitLabProjectsClient) NewListPager(resourceGroupName string, securityConnectorName string, groupFQName string, options *GitLabProjectsClientListOptions) *runtime.Pager[GitLabProjectsClientListResponse]

NewListPager - Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • groupFQName - The GitLab group fully-qualified name.
  • options - GitLabProjectsClientListOptions contains the optional parameters for the GitLabProjectsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitLabProjects_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitLabProjectsClient().NewListPager("myRg", "mySecurityConnectorName", "myGitLabGroup$mySubGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitLabProjectListResponse = armsecurity.GitLabProjectListResponse{
		// 	Value: []*armsecurity.GitLabProject{
		// 		{
		// 			Name: to.Ptr("myGitLabProject"),
		// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups/projects"),
		// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup/projects/myGitLabProject"),
		// 			Properties: &armsecurity.GitLabProjectProperties{
		// 				FullyQualifiedName: to.Ptr("myGitLabGroup$mySubGroup$myGitLabProject"),
		// 				FullyQualifiedParentGroupName: to.Ptr("myGitLabGroup$mySubGroup"),
		// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
		// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
		// 				URL: to.Ptr("https://gitlab.example.com/myGitLabGroup/mySubGroup/myGitLabProject"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GitLabProjectsClientGetOptions added in v0.13.0

type GitLabProjectsClientGetOptions struct {
}

GitLabProjectsClientGetOptions contains the optional parameters for the GitLabProjectsClient.Get method.

type GitLabProjectsClientGetResponse added in v0.13.0

type GitLabProjectsClientGetResponse struct {
	// GitLab Project resource.
	GitLabProject
}

GitLabProjectsClientGetResponse contains the response from method GitLabProjectsClient.Get.

type GitLabProjectsClientListOptions added in v0.13.0

type GitLabProjectsClientListOptions struct {
}

GitLabProjectsClientListOptions contains the optional parameters for the GitLabProjectsClient.NewListPager method.

type GitLabProjectsClientListResponse added in v0.13.0

type GitLabProjectsClientListResponse struct {
	// List of RP resources which supports pagination.
	GitLabProjectListResponse
}

GitLabProjectsClientListResponse contains the response from method GitLabProjectsClient.NewListPager.

type GitLabSubgroupsClient added in v0.13.0

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

GitLabSubgroupsClient contains the methods for the GitLabSubgroups group. Don't use this type directly, use NewGitLabSubgroupsClient() instead.

func NewGitLabSubgroupsClient added in v0.13.0

func NewGitLabSubgroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitLabSubgroupsClient, error)

NewGitLabSubgroupsClient creates a new instance of GitLabSubgroupsClient 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 (*GitLabSubgroupsClient) List added in v0.13.0

func (client *GitLabSubgroupsClient) List(ctx context.Context, resourceGroupName string, securityConnectorName string, groupFQName string, options *GitLabSubgroupsClientListOptions) (GitLabSubgroupsClientListResponse, error)

List - Gets nested subgroups of given GitLab Group which are onboarded to the connector. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-09-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • securityConnectorName - The security connector name.
  • groupFQName - The GitLab group fully-qualified name.
  • options - GitLabSubgroupsClientListOptions contains the optional parameters for the GitLabSubgroupsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitLabSubgroupsClient().List(ctx, "myRg", "mySecurityConnectorName", "myGitLabGroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitLabGroupListResponse = armsecurity.GitLabGroupListResponse{
	// 	Value: []*armsecurity.GitLabGroup{
	// 		{
	// 			Name: to.Ptr("myGitLabGroup$mySubGroup"),
	// 			Type: to.Ptr("Microsoft.Security/securityConnectors/devops/gitLabGroups"),
	// 			ID: to.Ptr("/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup"),
	// 			Properties: &armsecurity.GitLabGroupProperties{
	// 				FullyQualifiedName: to.Ptr("myGitLabGroup$mySubGroup"),
	// 				OnboardingState: to.Ptr(armsecurity.OnboardingStateOnboarded),
	// 				ProvisioningState: to.Ptr(armsecurity.DevOpsProvisioningStateSucceeded),
	// 				URL: to.Ptr("https://gitlab.example.com/myGitLabGroup/mySubGroup"),
	// 			},
	// 	}},
	// }
}
Output:

type GitLabSubgroupsClientListOptions added in v0.13.0

type GitLabSubgroupsClientListOptions struct {
}

GitLabSubgroupsClientListOptions contains the optional parameters for the GitLabSubgroupsClient.List method.

type GitLabSubgroupsClientListResponse added in v0.13.0

type GitLabSubgroupsClientListResponse struct {
	// List of RP resources which supports pagination.
	GitLabGroupListResponse
}

GitLabSubgroupsClientListResponse contains the response from method GitLabSubgroupsClient.List.

type GithubScopeEnvironmentData added in v0.8.0

type GithubScopeEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType
}

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 GitlabScopeEnvironmentData added in v0.11.0

type GitlabScopeEnvironmentData struct {
	// REQUIRED; The type of the environment data.
	EnvironmentType *EnvironmentType
}

GitlabScopeEnvironmentData - The GitLab scope connector's environment data

func (*GitlabScopeEnvironmentData) GetEnvironmentData added in v0.11.0

func (g *GitlabScopeEnvironmentData) GetEnvironmentData() *EnvironmentData

GetEnvironmentData implements the EnvironmentDataClassification interface for type GitlabScopeEnvironmentData.

func (GitlabScopeEnvironmentData) MarshalJSON added in v0.11.0

func (g GitlabScopeEnvironmentData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitlabScopeEnvironmentData.

func (*GitlabScopeEnvironmentData) UnmarshalJSON added in v0.11.0

func (g *GitlabScopeEnvironmentData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitlabScopeEnvironmentData.

type GovernanceAssignment added in v0.8.0

type GovernanceAssignment struct {
	// The properties of a governance assignment
	Properties *GovernanceAssignmentProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

GovernanceAssignment - Governance assignment 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 governance assignment - for example: https://snow.com
	TicketLink *string

	// Ticket number associated with this governance assignment
	TicketNumber *int32

	// The ticket status associated with this governance assignment - for example: Active
	TicketStatus *string
}

GovernanceAssignmentAdditionalData - Describe the additional data of governance assignment - 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

	// The additional data for the governance assignment - e.g. links to ticket (optional), see example
	AdditionalData *GovernanceAssignmentAdditionalData

	// The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
	GovernanceEmailNotification *GovernanceEmailNotification

	// Defines whether there is a grace period on the governance assignment
	IsGracePeriod *bool

	// The Owner for the governance assignment - e.g. user@contoso.com - see example
	Owner *string

	// The ETA (estimated time of arrival) for remediation (optional), see example
	RemediationEta *RemediationEta
}

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 updates a governance assignment on the given subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance assignments. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • assessmentName - The Assessment Key - A unique key for the assessment type
  • assignmentKey - The governance assignment key - the assessment key of the required governance assignment
  • governanceAssignment - Governance assignment 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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceAssignmentsClient().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.000Z"); return t }()),
			RemediationEta: &armsecurity.RemediationEta{
				Eta:           to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T13:00:00.000Z"); return t }()),
				Justification: to.Ptr("Justification of ETA"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceAssignment = armsecurity.GovernanceAssignment{
	// 	Name: to.Ptr("6634ff9f-127b-4bf2-8e6e-b1737f5e789c"),
	// 	Type: to.Ptr("Microsoft.Security/assessments/governanceAssignments"),
	// 	ID: to.Ptr("/subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012/providers/Microsoft.Security/assessments/6b9421dd-5555-2251-9b3d-2be58e2f82cd/governanceAssignments/6634ff9f-127b-4bf2-8e6e-b1737f5e789c"),
	// 	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.000Z"); return t}()),
	// 		RemediationEta: &armsecurity.RemediationEta{
	// 			Eta: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T13:00:00.000Z"); return t}()),
	// 			Justification: to.Ptr("Justification of ETA"),
	// 		},
	// 	},
	// }
}
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 - The scope of the Governance assignments. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • assessmentName - The Assessment Key - A unique key for the assessment type
  • assignmentKey - The 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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewGovernanceAssignmentsClient().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 - The scope of the Governance assignments. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • assessmentName - The Assessment Key - A unique key for the assessment type
  • assignmentKey - The 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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceAssignmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceAssignment = armsecurity.GovernanceAssignment{
	// 	Name: to.Ptr("6634ff9f-127b-4bf2-8e6e-b1737f5e789c"),
	// 	Type: to.Ptr("Microsoft.Security/assessments/governanceAssignments"),
	// 	ID: to.Ptr("/subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012/providers/Microsoft.Security/assessments/6b9421dd-5555-2251-9b3d-2be58e2f82cd/governanceAssignments/6634ff9f-127b-4bf2-8e6e-b1737f5e789c"),
	// 	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.000Z"); return t}()),
	// 		RemediationEta: &armsecurity.RemediationEta{
	// 			Eta: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T13:00:00.000Z"); return t}()),
	// 			Justification: to.Ptr("Justification of ETA"),
	// 		},
	// 	},
	// }
}
Output:

func (*GovernanceAssignmentsClient) NewListPager added in v0.8.0

NewListPager - Get governance assignments on all of your resources inside a scope

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance assignments. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • assessmentName - The Assessment Key - A unique key for the assessment type
  • options - GovernanceAssignmentsClientListOptions contains the optional parameters for the GovernanceAssignmentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGovernanceAssignmentsClient().NewListPager("subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd", "6b9421dd-5555-2251-9b3d-2be58e2f82cd", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GovernanceAssignmentsList = armsecurity.GovernanceAssignmentsList{
		// 	Value: []*armsecurity.GovernanceAssignment{
		// 		{
		// 			Name: to.Ptr("6634ff9f-127b-4bf2-8e6e-b1737f5e789c"),
		// 			Type: to.Ptr("Microsoft.Security/assessments/governanceAssignments"),
		// 			ID: to.Ptr("/subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012/providers/Microsoft.Security/assessments/6b9421dd-5555-2251-9b3d-2be58e2f82cd/governanceAssignments/6634ff9f-127b-4bf2-8e6e-b1737f5e789c"),
		// 			Properties: &armsecurity.GovernanceAssignmentProperties{
		// 				AdditionalData: &armsecurity.GovernanceAssignmentAdditionalData{
		// 					TicketLink: to.Ptr("https://snow.com"),
		// 					TicketNumber: to.Ptr[int32](123123),
		// 					TicketStatus: to.Ptr("Active"),
		// 				},
		// 				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.000Z"); return t}()),
		// 				RemediationEta: &armsecurity.RemediationEta{
		// 					Eta: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T13:00:00.000Z"); return t}()),
		// 					Justification: to.Ptr("Justification of ETA"),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("41fb92a5-43dc-4c00-a969-469c16cef7a7"),
		// 			Type: to.Ptr("Microsoft.Security/assessments/governanceAssignments"),
		// 			ID: to.Ptr("/subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2011/providers/Microsoft.Security/assessments/6b9421dd-5555-2251-9b3d-2be58e2f82cd/governanceAssignments/41fb92a5-43dc-4c00-a969-469c16cef7a7"),
		// 			Properties: &armsecurity.GovernanceAssignmentProperties{
		// 				AdditionalData: &armsecurity.GovernanceAssignmentAdditionalData{
		// 					TicketLink: to.Ptr("https://snow.com"),
		// 					TicketNumber: to.Ptr[int32](653424),
		// 					TicketStatus: to.Ptr("Active"),
		// 				},
		// 				IsGracePeriod: to.Ptr(true),
		// 				Owner: to.Ptr("user2@contoso.com"),
		// 				RemediationDueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-07T13:00:00.000Z"); return t}()),
		// 				RemediationEta: &armsecurity.RemediationEta{
		// 					Eta: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T13:00:00.000Z"); return t}()),
		// 					Justification: to.Ptr("Justification of ETA"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Governance assignment over a given scope
	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 {
	// Governance assignment over a given scope
	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.NewListPager method.

type GovernanceAssignmentsClientListResponse added in v0.8.0

type GovernanceAssignmentsClientListResponse struct {
	// Page of a governance assignments list
	GovernanceAssignmentsList
}

GovernanceAssignmentsClientListResponse contains the response from method GovernanceAssignmentsClient.NewListPager.

type GovernanceAssignmentsList added in v0.8.0

type GovernanceAssignmentsList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string

	// READ-ONLY; Collection of governance assignments in this page
	Value []*GovernanceAssignment
}

GovernanceAssignmentsList - Page of a 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

	// Exclude owner from weekly email notification.
	DisableOwnerEmailNotification *bool
}

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 governance rule
	Properties *GovernanceRuleProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

GovernanceRule - Governance rule 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 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

	// Defines whether owner email notifications are disabled
	DisableOwnerEmailNotification *bool
}

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

	// READ-ONLY; Collection of governance rules in this page
	Value []*GovernanceRule
}

GovernanceRuleList - Page of a governance rules 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 GovernanceRuleMetadata added in v0.11.0

type GovernanceRuleMetadata struct {
	// READ-ONLY; Governance rule Created by object id (GUID)
	CreatedBy *string

	// READ-ONLY; Governance rule creation date
	CreatedOn *time.Time

	// READ-ONLY; Governance rule last updated by object id (GUID)
	UpdatedBy *string

	// READ-ONLY; Governance rule last update date
	UpdatedOn *time.Time
}

GovernanceRuleMetadata - The governance rule metadata

func (GovernanceRuleMetadata) MarshalJSON added in v0.11.0

func (g GovernanceRuleMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GovernanceRuleMetadata.

func (*GovernanceRuleMetadata) UnmarshalJSON added in v0.11.0

func (g *GovernanceRuleMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GovernanceRuleMetadata.

type GovernanceRuleOwnerSource added in v0.8.0

type GovernanceRuleOwnerSource struct {
	// The owner type for the governance rule owner source
	Type *GovernanceRuleOwnerSourceType

	// The source value e.g. tag key like owner name or email address
	Value *string
}

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 []any

	// REQUIRED; Display name of the governance rule
	DisplayName *string

	// REQUIRED; The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
	OwnerSource *GovernanceRuleOwnerSource

	// REQUIRED; The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will
	// not be allowed
	RulePriority *int32

	// REQUIRED; The rule type of the governance rule, defines the source of the rule e.g. Integrated
	RuleType *GovernanceRuleType

	// REQUIRED; The governance rule source, what the rule affects, e.g. Assessments
	SourceResourceType *GovernanceRuleSourceResourceType

	// Description of the governance rule
	Description *string

	// Excluded scopes, filter out the descendants of the scope (on management scopes)
	ExcludedScopes []*string

	// The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
	GovernanceEmailNotification *GovernanceRuleEmailNotification

	// Defines whether the rule is management scope rule (master connector as a single scope or management scope)
	IncludeMemberScopes *bool

	// Defines whether the rule is active/inactive
	IsDisabled *bool

	// Defines whether there is a grace period on the governance rule
	IsGracePeriod *bool

	// The governance rule metadata
	Metadata *GovernanceRuleMetadata

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

	// READ-ONLY; The tenantId (GUID)
	TenantID *string
}

GovernanceRuleProperties - Describes properties of an governance rule

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(credential azcore.TokenCredential, options *arm.ClientOptions) (*GovernanceRulesClient, error)

NewGovernanceRulesClient creates a new instance of GovernanceRulesClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GovernanceRulesClient) BeginDelete added in v0.11.0

BeginDelete - Delete a Governance rule over a given scope If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • ruleID - The governance rule key - unique key for the standard governance rule (GUID)
  • options - GovernanceRulesClientBeginDeleteOptions contains the optional parameters for the GovernanceRulesClient.BeginDelete method.
Example (DeleteAGovernanceRuleOverManagementGroupScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/DeleteManagementGroupGovernanceRule_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGovernanceRulesClient().BeginDelete(ctx, "providers/Microsoft.Management/managementGroups/contoso", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", 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:

Example (DeleteAGovernanceRuleOverSecurityConnectorScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGovernanceRulesClient().BeginDelete(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", 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:

Example (DeleteAGovernanceRuleOverSubscriptionScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGovernanceRulesClient().BeginDelete(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", 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) BeginExecute added in v0.11.0

BeginExecute - Execute a governance rule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • ruleID - The governance rule key - unique key for the standard governance rule (GUID)
  • options - GovernanceRulesClientBeginExecuteOptions contains the optional parameters for the GovernanceRulesClient.BeginExecute method.
Example (ExecuteGovernanceRuleOverManagementGroupScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PostManagementGroupGovernanceRule_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGovernanceRulesClient().BeginExecute(ctx, "providers/Microsoft.Management/managementGroups/contoso", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", &armsecurity.GovernanceRulesClientBeginExecuteOptions{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:

Example (ExecuteGovernanceRuleOverSecurityConnectorScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGovernanceRulesClient().BeginExecute(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", &armsecurity.GovernanceRulesClientBeginExecuteOptions{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:

Example (ExecuteGovernanceRuleOverSubscriptionScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGovernanceRulesClient().BeginExecute(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", &armsecurity.GovernanceRulesClientBeginExecuteOptions{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 updates a governance rule over a given scope If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • ruleID - The governance rule key - unique key for the standard governance rule (GUID)
  • governanceRule - Governance rule over a given scope
  • options - GovernanceRulesClientCreateOrUpdateOptions contains the optional parameters for the GovernanceRulesClient.CreateOrUpdate method.
Example (CreateOrUpdateGovernanceRuleOverManagementGroupScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PutManagementGroupGovernanceRule_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().CreateOrUpdate(ctx, "providers/Microsoft.Management/managementGroups/contoso", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.GovernanceRule{
		Properties: &armsecurity.GovernanceRuleProperties{
			Description: to.Ptr("A rule for a management group"),
			ConditionSets: []any{
				map[string]any{
					"conditions": []any{
						map[string]any{
							"operator": "In",
							"property": "$.AssessmentKey",
							"value":    "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
						},
					},
				}},
			DisplayName: to.Ptr("Management group rule"),
			ExcludedScopes: []*string{
				to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")},
			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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceRule = armsecurity.GovernanceRule{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/governanceRules"),
	// 	ID: to.Ptr("providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.GovernanceRuleProperties{
	// 		Description: to.Ptr("A rule for a management group"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "In",
	// 						"property": "$.AssessmentKey",
	// 						"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("Management group rule"),
	// 		ExcludedScopes: []*string{
	// 			to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")},
	// 			GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
	// 				DisableManagerEmailNotification: to.Ptr(true),
	// 				DisableOwnerEmailNotification: to.Ptr(false),
	// 			},
	// 			IncludeMemberScopes: to.Ptr(false),
	// 			IsDisabled: to.Ptr(false),
	// 			IsGracePeriod: to.Ptr(true),
	// 			Metadata: &armsecurity.GovernanceRuleMetadata{
	// 				CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 				CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 				UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 				UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 			},
	// 			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),
	// 			TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
	// 		},
	// 	}
}
Output:

Example (CreateOrUpdateGovernanceRuleOverSecurityConnectorScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().CreateOrUpdate(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.GovernanceRule{
		Properties: &armsecurity.GovernanceRuleProperties{
			Description: to.Ptr("A rule on critical GCP recommendations"),
			ConditionSets: []any{
				map[string]any{
					"conditions": []any{
						map[string]any{
							"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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceRule = armsecurity.GovernanceRule{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/governanceRules"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.GovernanceRuleProperties{
	// 		Description: to.Ptr("A rule on critical GCP recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "In",
	// 						"property": "$.AssessmentKey",
	// 						"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("GCP Admin's rule"),
	// 		ExcludedScopes: []*string{
	// 		},
	// 		GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
	// 			DisableManagerEmailNotification: to.Ptr(true),
	// 			DisableOwnerEmailNotification: to.Ptr(false),
	// 		},
	// 		IncludeMemberScopes: to.Ptr(false),
	// 		IsDisabled: to.Ptr(false),
	// 		IsGracePeriod: to.Ptr(true),
	// 		Metadata: &armsecurity.GovernanceRuleMetadata{
	// 			CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 			UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 		},
	// 		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),
	// 		TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
	// 	},
	// }
}
Output:

Example (CreateOrUpdateGovernanceRuleOverSubscriptionScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().CreateOrUpdate(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", armsecurity.GovernanceRule{
		Properties: &armsecurity.GovernanceRuleProperties{
			Description: to.Ptr("A rule for critical recommendations"),
			ConditionSets: []any{
				map[string]any{
					"conditions": []any{
						map[string]any{
							"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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceRule = armsecurity.GovernanceRule{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/governanceRules"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.GovernanceRuleProperties{
	// 		Description: to.Ptr("A rule for critical recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "In",
	// 						"property": "$.AssessmentKey",
	// 						"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("Admin's rule"),
	// 		ExcludedScopes: []*string{
	// 		},
	// 		GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
	// 			DisableManagerEmailNotification: to.Ptr(false),
	// 			DisableOwnerEmailNotification: to.Ptr(false),
	// 		},
	// 		IncludeMemberScopes: to.Ptr(false),
	// 		IsDisabled: to.Ptr(false),
	// 		IsGracePeriod: to.Ptr(true),
	// 		Metadata: &armsecurity.GovernanceRuleMetadata{
	// 			CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 			UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 		},
	// 		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),
	// 		TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
	// 	},
	// }
}
Output:

func (*GovernanceRulesClient) Get added in v0.8.0

Get - Get a specific governance rule for the requested scope by ruleId If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • ruleID - The governance rule key - unique key for the standard governance rule (GUID)
  • options - GovernanceRulesClientGetOptions contains the optional parameters for the GovernanceRulesClient.Get method.
Example (GetAGovernanceRuleOverManagementGroupScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRule_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().Get(ctx, "providers/Microsoft.Management/managementGroups/contoso", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceRule = armsecurity.GovernanceRule{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/governanceRules"),
	// 	ID: to.Ptr("providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.GovernanceRuleProperties{
	// 		Description: to.Ptr("A rule for a management group"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "In",
	// 						"property": "$.AssessmentKey",
	// 						"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("Management group rule"),
	// 		ExcludedScopes: []*string{
	// 			to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")},
	// 			GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
	// 				DisableManagerEmailNotification: to.Ptr(false),
	// 				DisableOwnerEmailNotification: to.Ptr(false),
	// 			},
	// 			IncludeMemberScopes: to.Ptr(false),
	// 			IsDisabled: to.Ptr(false),
	// 			IsGracePeriod: to.Ptr(true),
	// 			Metadata: &armsecurity.GovernanceRuleMetadata{
	// 				CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 				CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 				UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 				UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 			},
	// 			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),
	// 			TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
	// 		},
	// 	}
}
Output:

Example (GetAGovernanceRuleOverSecurityConnectorScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceRule = armsecurity.GovernanceRule{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/governanceRules"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.GovernanceRuleProperties{
	// 		Description: to.Ptr("A rule on critical GCP recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "In",
	// 						"property": "$.AssessmentKey",
	// 						"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("GCP Admin's rule"),
	// 		ExcludedScopes: []*string{
	// 		},
	// 		GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
	// 			DisableManagerEmailNotification: to.Ptr(false),
	// 			DisableOwnerEmailNotification: to.Ptr(false),
	// 		},
	// 		IncludeMemberScopes: to.Ptr(false),
	// 		IsDisabled: to.Ptr(false),
	// 		IsGracePeriod: to.Ptr(true),
	// 		Metadata: &armsecurity.GovernanceRuleMetadata{
	// 			CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 			UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 		},
	// 		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),
	// 		TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
	// 	},
	// }
}
Output:

Example (GetAGovernanceRuleOverSubscriptionScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GovernanceRule = armsecurity.GovernanceRule{
	// 	Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Type: to.Ptr("Microsoft.Security/governanceRules"),
	// 	ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
	// 	Properties: &armsecurity.GovernanceRuleProperties{
	// 		Description: to.Ptr("A rule for critical recommendations"),
	// 		ConditionSets: []any{
	// 			map[string]any{
	// 				"conditions":[]any{
	// 					map[string]any{
	// 						"operator": "In",
	// 						"property": "$.AssessmentKey",
	// 						"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
	// 					},
	// 				},
	// 		}},
	// 		DisplayName: to.Ptr("Admin's rule"),
	// 		ExcludedScopes: []*string{
	// 		},
	// 		GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
	// 			DisableManagerEmailNotification: to.Ptr(false),
	// 			DisableOwnerEmailNotification: to.Ptr(false),
	// 		},
	// 		IncludeMemberScopes: to.Ptr(false),
	// 		IsDisabled: to.Ptr(false),
	// 		IsGracePeriod: to.Ptr(true),
	// 		Metadata: &armsecurity.GovernanceRuleMetadata{
	// 			CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 			UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
	// 			UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
	// 		},
	// 		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),
	// 		TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
	// 	},
	// }
}
Output:

func (*GovernanceRulesClient) NewListPager added in v0.11.0

NewListPager - Get a list of all relevant governance rules over a scope

Generated from API version 2022-01-01-preview

  • scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • options - GovernanceRulesClientListOptions contains the optional parameters for the GovernanceRulesClient.NewListPager method.
Example (ListGovernanceRulesByManagementGroupScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListByManagementGroupGovernanceRules_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGovernanceRulesClient().NewListPager("providers/Microsoft.Management/managementGroups/contoso", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GovernanceRuleList = armsecurity.GovernanceRuleList{
		// 	Value: []*armsecurity.GovernanceRule{
		// 		{
		// 			Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Type: to.Ptr("Microsoft.Security/governanceRules"),
		// 			ID: to.Ptr("providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Properties: &armsecurity.GovernanceRuleProperties{
		// 				Description: to.Ptr("A rule for a management group"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "In",
		// 								"property": "$.AssessmentKey",
		// 								"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Management group rule"),
		// 				GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
		// 					DisableManagerEmailNotification: to.Ptr(false),
		// 					DisableOwnerEmailNotification: to.Ptr(false),
		// 				},
		// 				IsDisabled: to.Ptr(false),
		// 				IsGracePeriod: to.Ptr(true),
		// 				Metadata: &armsecurity.GovernanceRuleMetadata{
		// 					CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 					UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 				},
		// 				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](100),
		// 				RuleType: to.Ptr(armsecurity.GovernanceRuleTypeIntegrated),
		// 				SourceResourceType: to.Ptr(armsecurity.GovernanceRuleSourceResourceTypeAssessments),
		// 				TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Type: to.Ptr("Microsoft.Security/governanceRules"),
		// 			ID: to.Ptr("providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Properties: &armsecurity.GovernanceRuleProperties{
		// 				Description: to.Ptr("A rule for a management group"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "Equals",
		// 								"property": "$.Metadata.Severity",
		// 								"value": "Low",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Management group rule 2"),
		// 				ExcludedScopes: []*string{
		// 					to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")},
		// 					GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
		// 						DisableManagerEmailNotification: to.Ptr(false),
		// 						DisableOwnerEmailNotification: to.Ptr(false),
		// 					},
		// 					IncludeMemberScopes: to.Ptr(false),
		// 					IsDisabled: to.Ptr(false),
		// 					IsGracePeriod: to.Ptr(true),
		// 					Metadata: &armsecurity.GovernanceRuleMetadata{
		// 						CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 						CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 						UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 						UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 					},
		// 					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),
		// 					TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (ListGovernanceRulesBySecurityConnectorScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGovernanceRulesClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GovernanceRuleList = armsecurity.GovernanceRuleList{
		// 	Value: []*armsecurity.GovernanceRule{
		// 		{
		// 			Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Type: to.Ptr("Microsoft.Security/governanceRules"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Properties: &armsecurity.GovernanceRuleProperties{
		// 				Description: to.Ptr("A rule on critical GCP recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "In",
		// 								"property": "$.AssessmentKey",
		// 								"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Admin's GCP rule"),
		// 				ExcludedScopes: []*string{
		// 				},
		// 				GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
		// 					DisableManagerEmailNotification: to.Ptr(false),
		// 					DisableOwnerEmailNotification: to.Ptr(false),
		// 				},
		// 				IncludeMemberScopes: to.Ptr(false),
		// 				IsDisabled: to.Ptr(false),
		// 				IsGracePeriod: to.Ptr(true),
		// 				Metadata: &armsecurity.GovernanceRuleMetadata{
		// 					CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 					UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 				},
		// 				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](100),
		// 				RuleType: to.Ptr(armsecurity.GovernanceRuleTypeIntegrated),
		// 				SourceResourceType: to.Ptr(armsecurity.GovernanceRuleSourceResourceTypeAssessments),
		// 				TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Type: to.Ptr("Microsoft.Security/governanceRules"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/governanceRules/4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Properties: &armsecurity.GovernanceRuleProperties{
		// 				Description: to.Ptr("A rule on critical GCP recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "Equals",
		// 								"property": "$.Metadata.Severity",
		// 								"value": "Low",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("GCP Admin's rule"),
		// 				ExcludedScopes: []*string{
		// 				},
		// 				GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
		// 					DisableManagerEmailNotification: to.Ptr(false),
		// 					DisableOwnerEmailNotification: to.Ptr(false),
		// 				},
		// 				IncludeMemberScopes: to.Ptr(false),
		// 				IsDisabled: to.Ptr(false),
		// 				IsGracePeriod: to.Ptr(true),
		// 				Metadata: &armsecurity.GovernanceRuleMetadata{
		// 					CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 					UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 				},
		// 				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),
		// 				TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListGovernanceRulesBySubscriptionScope)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGovernanceRulesClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GovernanceRuleList = armsecurity.GovernanceRuleList{
		// 	Value: []*armsecurity.GovernanceRule{
		// 		{
		// 			Name: to.Ptr("ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Type: to.Ptr("Microsoft.Security/governanceRules"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8"),
		// 			Properties: &armsecurity.GovernanceRuleProperties{
		// 				Description: to.Ptr("A rule for critical recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "In",
		// 								"property": "$.AssessmentKey",
		// 								"value": "[\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\", \"fe83f80b-073d-4ccf-93d9-6797eb870201\"]",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Admin's rule"),
		// 				ExcludedScopes: []*string{
		// 				},
		// 				GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
		// 					DisableManagerEmailNotification: to.Ptr(false),
		// 					DisableOwnerEmailNotification: to.Ptr(false),
		// 				},
		// 				IncludeMemberScopes: to.Ptr(false),
		// 				IsDisabled: to.Ptr(false),
		// 				IsGracePeriod: to.Ptr(true),
		// 				Metadata: &armsecurity.GovernanceRuleMetadata{
		// 					CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 					UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 				},
		// 				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](100),
		// 				RuleType: to.Ptr(armsecurity.GovernanceRuleTypeIntegrated),
		// 				SourceResourceType: to.Ptr(armsecurity.GovernanceRuleSourceResourceTypeAssessments),
		// 				TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Type: to.Ptr("Microsoft.Security/governanceRules"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/governanceRules/4106f43c-6d82-4fc8-a92c-dcfe50799d1d"),
		// 			Properties: &armsecurity.GovernanceRuleProperties{
		// 				Description: to.Ptr("A rule for critical recommendations"),
		// 				ConditionSets: []any{
		// 					map[string]any{
		// 						"conditions":[]any{
		// 							map[string]any{
		// 								"operator": "Equals",
		// 								"property": "$.Metadata.Severity",
		// 								"value": "Low",
		// 							},
		// 						},
		// 				}},
		// 				DisplayName: to.Ptr("Admin's rule"),
		// 				ExcludedScopes: []*string{
		// 				},
		// 				GovernanceEmailNotification: &armsecurity.GovernanceRuleEmailNotification{
		// 					DisableManagerEmailNotification: to.Ptr(true),
		// 					DisableOwnerEmailNotification: to.Ptr(true),
		// 				},
		// 				IncludeMemberScopes: to.Ptr(false),
		// 				IsDisabled: to.Ptr(false),
		// 				IsGracePeriod: to.Ptr(true),
		// 				Metadata: &armsecurity.GovernanceRuleMetadata{
		// 					CreatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 					UpdatedBy: to.Ptr("c23b5354-ff0a-4b2a-9f92-6f144effd936"),
		// 					UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-10T08:31:26.799Z"); return t}()),
		// 				},
		// 				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),
		// 				TenantID: to.Ptr("f0b6d37b-e4bc-4719-9291-c066c3194f23"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*GovernanceRulesClient) OperationResults added in v0.11.0

OperationResults - Get governance rules long run operation result 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

  • scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
  • ruleID - The governance rule key - unique key for the standard governance rule (GUID)
  • operationID - The governance rule long running operation unique key
  • options - GovernanceRulesClientOperationResultsOptions contains the optional parameters for the GovernanceRulesClient.OperationResults method.
Example (GetGovernanceRulesLongRunOperationResultOverManagementGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().OperationResults(ctx, "providers/Microsoft.Management/managementGroups/contoso", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationResultAutoGenerated = armsecurity.OperationResultAutoGenerated{
	// 	Status: to.Ptr(armsecurity.OperationResultSucceeded),
	// }
}
Output:

Example (GetGovernanceRulesLongRunOperationResultOverSecurityConnector)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().OperationResults(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationResultAutoGenerated = armsecurity.OperationResultAutoGenerated{
	// 	Status: to.Ptr(armsecurity.OperationResultSucceeded),
	// }
}
Output:

Example (GetGovernanceRulesLongRunOperationResultOverSubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGovernanceRulesClient().OperationResults(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationResultAutoGenerated = armsecurity.OperationResultAutoGenerated{
	// 	Status: to.Ptr(armsecurity.OperationResultSucceeded),
	// }
}
Output:

type GovernanceRulesClientBeginDeleteOptions added in v0.11.0

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

GovernanceRulesClientBeginDeleteOptions contains the optional parameters for the GovernanceRulesClient.BeginDelete method.

type GovernanceRulesClientBeginExecuteOptions added in v0.11.0

type GovernanceRulesClientBeginExecuteOptions struct {
	// Execute governance rule over a given scope
	ExecuteGovernanceRuleParams *ExecuteGovernanceRuleParams

	// Resumes the LRO from the provided token.
	ResumeToken string
}

GovernanceRulesClientBeginExecuteOptions contains the optional parameters for the GovernanceRulesClient.BeginExecute 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 {
	// Governance rule over a given scope
	GovernanceRule
}

GovernanceRulesClientCreateOrUpdateResponse contains the response from method GovernanceRulesClient.CreateOrUpdate.

type GovernanceRulesClientDeleteResponse added in v0.8.0

type GovernanceRulesClientDeleteResponse struct {
}

GovernanceRulesClientDeleteResponse contains the response from method GovernanceRulesClient.BeginDelete.

type GovernanceRulesClientExecuteResponse added in v0.11.0

type GovernanceRulesClientExecuteResponse struct {
}

GovernanceRulesClientExecuteResponse contains the response from method GovernanceRulesClient.BeginExecute.

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 {
	// Governance rule over a given scope
	GovernanceRule
}

GovernanceRulesClientGetResponse contains the response from method GovernanceRulesClient.Get.

type GovernanceRulesClientListOptions added in v0.11.0

type GovernanceRulesClientListOptions struct {
}

GovernanceRulesClientListOptions contains the optional parameters for the GovernanceRulesClient.NewListPager method.

type GovernanceRulesClientListResponse added in v0.11.0

type GovernanceRulesClientListResponse struct {
	// Page of a governance rules list
	GovernanceRuleList
}

GovernanceRulesClientListResponse contains the response from method GovernanceRulesClient.NewListPager.

type GovernanceRulesClientOperationResultsOptions added in v0.11.0

type GovernanceRulesClientOperationResultsOptions struct {
}

GovernanceRulesClientOperationResultsOptions contains the optional parameters for the GovernanceRulesClient.OperationResults method.

type GovernanceRulesClientOperationResultsResponse added in v0.11.0

type GovernanceRulesClientOperationResultsResponse struct {
	// Long run operation status of governance rule over a given scope
	OperationResultAutoGenerated

	// Location contains the information returned from the location header response.
	Location *string
}

GovernanceRulesClientOperationResultsResponse contains the response from method GovernanceRulesClient.OperationResults.

type HTTPC2DMessagesNotInAllowedRange

type HTTPC2DMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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 HealthDataClassification added in v0.11.0

type HealthDataClassification struct {
	// The component describes the name of the agent/service that scans the issue
	Component *string

	// The scenario describes the health scenario issue of the component
	Scenario *string

	// The resource scope of the health report
	Scope *string
}

HealthDataClassification - The classification of the health report

func (HealthDataClassification) MarshalJSON added in v0.11.0

func (h HealthDataClassification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthDataClassification.

func (*HealthDataClassification) UnmarshalJSON added in v0.11.0

func (h *HealthDataClassification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthDataClassification.

type HealthReport added in v0.11.0

type HealthReport struct {
	// Properties of a health report
	Properties *HealthReportProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

HealthReport - The health report resource

func (HealthReport) MarshalJSON added in v0.11.0

func (h HealthReport) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthReport.

func (*HealthReport) UnmarshalJSON added in v0.11.0

func (h *HealthReport) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthReport.

type HealthReportProperties added in v0.11.0

type HealthReportProperties struct {
	// The affected defenders plans by unhealthy report
	AffectedDefendersPlans []*string

	// The affected defenders sub plans by unhealthy report
	AffectedDefendersSubPlans []*string

	// The environment details of the resource
	EnvironmentDetails *EnvironmentDetails

	// The classification of the health report
	HealthDataClassification *HealthDataClassification

	// A collection of the issues in the report
	Issues []*Issue

	// The resource details of the health report
	ResourceDetails *ResourceDetailsAutoGenerated

	// The status of the health report
	Status *StatusAutoGenerated

	// READ-ONLY; Additional data for the given health report, this field can include more details on the resource and the health
	// scenario.
	ReportAdditionalData map[string]*string
}

HealthReportProperties - Describes properties of the health report

func (HealthReportProperties) MarshalJSON added in v0.11.0

func (h HealthReportProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthReportProperties.

func (*HealthReportProperties) UnmarshalJSON added in v0.11.0

func (h *HealthReportProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthReportProperties.

type HealthReportsClient added in v0.11.0

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

HealthReportsClient contains the methods for the HealthReports group. Don't use this type directly, use NewHealthReportsClient() instead.

func NewHealthReportsClient added in v0.11.0

func NewHealthReportsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*HealthReportsClient, error)

NewHealthReportsClient creates a new instance of HealthReportsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*HealthReportsClient) Get added in v0.13.0

func (client *HealthReportsClient) Get(ctx context.Context, resourceID string, healthReportName string, options *HealthReportsClientGetOptions) (HealthReportsClientGetResponse, error)

Get - Get health report of resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01-preview

  • resourceID - The identifier of the resource.
  • healthReportName - The health report Key - Unique key for the health report type
  • options - HealthReportsClientGetOptions contains the optional parameters for the HealthReportsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-05-01-preview/examples/HealthReports/GetHealthReports_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHealthReportsClient().Get(ctx, "subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/E2E-IBB0WX/providers/Microsoft.Security/securityconnectors/AwsConnectorAllOfferings", "909c629a-bf39-4521-8e4f-10b443a0bc02", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.HealthReport = armsecurity.HealthReport{
	// 	Name: to.Ptr("909c629a-bf39-4521-8e4f-10b443a0bc02"),
	// 	Type: to.Ptr("Microsoft.Security/healthReports"),
	// 	ID: to.Ptr("/subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/E2E-IBB0WX/providers/Microsoft.Security/securityconnectors/AwsConnectorAllOfferings/providers/Microsoft.Security/healthReports/909c629a-bf39-4521-8e4f-10b443a0bc02"),
	// 	Properties: &armsecurity.HealthReportProperties{
	// 		AffectedDefendersPlans: []*string{
	// 		},
	// 		EnvironmentDetails: &armsecurity.EnvironmentDetails{
	// 			EnvironmentHierarchyID: to.Ptr("a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2"),
	// 			NativeResourceID: to.Ptr("arn:aws:iam::827098768879"),
	// 			OrganizationalHierarchyID: to.Ptr("e81b978c-11be-449f-a392-42c0ed96bb91"),
	// 			SubscriptionID: to.Ptr("a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2"),
	// 			TenantID: to.Ptr("a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2"),
	// 		},
	// 		HealthDataClassification: &armsecurity.HealthDataClassification{
	// 			Component: to.Ptr("Connectivity"),
	// 			Scope: to.Ptr("Connectors"),
	// 		},
	// 		Issues: []*armsecurity.Issue{
	// 			{
	// 				IssueAdditionalData: map[string]*string{
	// 					"StacksetName": to.Ptr("ProdStackSet"),
	// 				},
	// 				IssueDescription: to.Ptr("A problem was identified with the AWS CloudFormation StackSet. The StackSet is used to create stacks across multiple accounts. To grant Defender for Cloud access to your member accounts, there is a need to run the StackSet on the member accounts."),
	// 				IssueKey: to.Ptr("414af15d-207e-4c63-b8eb-624d1b652e45"),
	// 				IssueName: to.Ptr("AWS CloudFormation StackSet name invalid or does not exist"),
	// 				RemediationScript: to.Ptr(""),
	// 				RemediationSteps: to.Ptr("Validate that the StackSet name in AWS matches the name provided in the onboarding set up: StackSet name can be found in AWS Management Console  -> CloudFormation -> StackSets -> StackSet name In case the names do not match, update the StackSet name to match the StackSet name provided in the onboarding set up.  In case the StackSet does not exist, re-run the CloudFormation template only for StackSet. Navigate to CloudFormation 'StackSets' in AWS Management Console -> Click 'Create StackSet' -> Choose 'Upload a template file', `Choose file` and select the downloaded template. Make sure to enter the exact StackSet name as it was provided in the onboarding set up. Download template link "),
	// 				SecurityValues: []*string{
	// 					to.Ptr("Connectivity to AWS member accounts")},
	// 			}},
	// 			ResourceDetails: &armsecurity.ResourceDetailsAutoGenerated{
	// 				ConnectorID: to.Ptr("bb7ad9cc-26b6-48ec-a5b4-23fc23be2733"),
	// 				ID: to.Ptr("/subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/E2E-IBB0WX/providers/Microsoft.Security/securityconnectors/AwsConnectorAllOfferings"),
	// 				Source: to.Ptr(armsecurity.Source("Aws")),
	// 			},
	// 			Status: &armsecurity.StatusAutoGenerated{
	// 				Code: to.Ptr(armsecurity.StatusNameNotHealthy),
	// 				FirstEvaluationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T09:07:18.675Z"); return t}()),
	// 				LastScannedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-25T09:02:20.134Z"); return t}()),
	// 				StatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T09:07:18.675Z"); return t}()),
	// 			},
	// 		},
	// 	}
}
Output:

func (*HealthReportsClient) NewListPager added in v0.11.0

NewListPager - Get a list of all health reports inside a scope. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'

Generated from API version 2023-05-01-preview

  • scope - The scope at which the operation is performed.
  • options - HealthReportsClientListOptions contains the optional parameters for the HealthReportsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-05-01-preview/examples/HealthReports/ListHealthReports_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHealthReportsClient().NewListPager("subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.HealthReportsList = armsecurity.HealthReportsList{
		// 	Value: []*armsecurity.HealthReport{
		// 		{
		// 			Name: to.Ptr("2351eaac-f8e6-43d8-87c0-a7e2c3d197c0"),
		// 			Type: to.Ptr("Microsoft.Security/healthReports"),
		// 			ID: to.Ptr("/subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/ascdemorg/providers/microsoft.compute/virtualmachines/vm3/providers/Microsoft.Security/healthReports/2351eaac-f8e6-43d8-87c0-a7e2c3d197c0"),
		// 			Properties: &armsecurity.HealthReportProperties{
		// 				AffectedDefendersPlans: []*string{
		// 					to.Ptr("DefenderForServers")},
		// 					EnvironmentDetails: &armsecurity.EnvironmentDetails{
		// 						EnvironmentHierarchyID: to.Ptr("a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2"),
		// 						NativeResourceID: to.Ptr("/subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/ascdemorg/providers/microsoft.compute/virtualmachines/vm3"),
		// 						OrganizationalHierarchyID: to.Ptr("200d73cf-ba70-4b93-8fa2-25e05e6aa1f6"),
		// 						SubscriptionID: to.Ptr("a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2"),
		// 						TenantID: to.Ptr("200d73cf-ba70-4b93-8fa2-25e05e6aa1f6"),
		// 					},
		// 					HealthDataClassification: &armsecurity.HealthDataClassification{
		// 						Component: to.Ptr("MDE"),
		// 						Scenario: to.Ptr("Reporting"),
		// 						Scope: to.Ptr("VirtualMachines"),
		// 					},
		// 					Issues: []*armsecurity.Issue{
		// 					},
		// 					ResourceDetails: &armsecurity.ResourceDetailsAutoGenerated{
		// 						ID: to.Ptr("/subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/ascdemorg/providers/microsoft.compute/virtualmachines/vm3"),
		// 						Source: to.Ptr(armsecurity.SourceAzure),
		// 					},
		// 					Status: &armsecurity.StatusAutoGenerated{
		// 						Code: to.Ptr(armsecurity.StatusNameHealthy),
		// 						FirstEvaluationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T09:07:18.675Z"); return t}()),
		// 						LastScannedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-25T09:02:20.134Z"); return t}()),
		// 						StatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T09:07:18.675Z"); return t}()),
		// 					},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type HealthReportsClientGetOptions added in v0.13.0

type HealthReportsClientGetOptions struct {
}

HealthReportsClientGetOptions contains the optional parameters for the HealthReportsClient.Get method.

type HealthReportsClientGetResponse added in v0.13.0

type HealthReportsClientGetResponse struct {
	// The health report resource
	HealthReport
}

HealthReportsClientGetResponse contains the response from method HealthReportsClient.Get.

type HealthReportsClientListOptions added in v0.11.0

type HealthReportsClientListOptions struct {
}

HealthReportsClientListOptions contains the optional parameters for the HealthReportsClient.NewListPager method.

type HealthReportsClientListResponse added in v0.11.0

type HealthReportsClientListResponse struct {
	// Page of health reports list
	HealthReportsList
}

HealthReportsClientListResponse contains the response from method HealthReportsClient.NewListPager.

type HealthReportsList added in v0.11.0

type HealthReportsList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string

	// READ-ONLY; Collection of health reports in this page
	Value []*HealthReport
}

HealthReportsList - Page of health reports list

func (HealthReportsList) MarshalJSON added in v0.11.0

func (h HealthReportsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthReportsList.

func (*HealthReportsList) UnmarshalJSON added in v0.11.0

func (h *HealthReportsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthReportsList.

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

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

	// The location where the metadata of machines will be stored
	Region *string

	// The name of the resource group where Arc (Hybrid Compute) connectors are connected.
	ResourceGroupName *string

	// An object to access resources that are secured by an Azure AD tenant.
	ServicePrincipal *ServicePrincipalProperties

	// READ-ONLY; State of the service principal and its secret
	HybridComputeProvisioningState *HybridComputeProvisioningState
}

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 Identity added in v0.11.0

type Identity struct {
	// The identity type.
	Type *string

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

Identity for the resource.

func (Identity) MarshalJSON added in v0.11.0

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v0.11.0

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

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 InfoType added in v0.11.0

type InfoType struct {
	// Description of the info type
	Description *string

	// Id of the info type
	ID *string

	// Display name of the info type
	Name *string
}

InfoType - Custom user-defined information type

func (InfoType) MarshalJSON added in v0.11.0

func (i InfoType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InfoType.

func (*InfoType) UnmarshalJSON added in v0.11.0

func (i *InfoType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InfoType.

type InformationProtectionKeyword

type InformationProtectionKeyword struct {
	// Indicates whether the keyword can be applied on numeric types or not.
	CanBeNumeric *bool

	// Indicates whether the keyword is custom or not.
	Custom *bool

	// Indicates whether the keyword is excluded or not.
	Excluded *bool

	// The keyword pattern.
	Pattern *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInformationProtectionPoliciesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.InformationProtectionPolicy = armsecurity.InformationProtectionPolicy{
	// 	Name: to.Ptr("custom"),
	// 	Type: to.Ptr("Microsoft.Security/informationProtectionPolicies"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e/providers/Microsoft.Security/informationProtectionPolicies/custom"),
	// 	Properties: &armsecurity.InformationProtectionPolicyProperties{
	// 		InformationTypes: map[string]*armsecurity.InformationType{
	// 			"3bf35491-99b8-41f2-86d5-c1200a7df658": &armsecurity.InformationType{
	// 				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": &armsecurity.InformationType{
	// 				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": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("Public"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](100),
	// 			},
	// 			"575739d2-3d53-4df0-9042-4c7772d5c7b1": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("Confidential"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](300),
	// 			},
	// 			"7aa516c7-5a53-4857-bc6e-6808c6acd542": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("General"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](200),
	// 			},
	// 		},
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInformationProtectionPoliciesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.InformationProtectionPolicy = armsecurity.InformationProtectionPolicy{
	// 	Name: to.Ptr("custom"),
	// 	Type: to.Ptr("Microsoft.Security/informationProtectionPolicies"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e/providers/Microsoft.Security/informationProtectionPolicies/custom"),
	// 	Properties: &armsecurity.InformationProtectionPolicyProperties{
	// 		InformationTypes: map[string]*armsecurity.InformationType{
	// 			"3bf35491-99b8-41f2-86d5-c1200a7df658": &armsecurity.InformationType{
	// 				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": &armsecurity.InformationType{
	// 				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": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("Public"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](100),
	// 			},
	// 			"575739d2-3d53-4df0-9042-4c7772d5c7b1": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("Confidential"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](300),
	// 			},
	// 			"7aa516c7-5a53-4857-bc6e-6808c6acd542": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("General"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](200),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

Example (GetTheEffectiveInformationProtectionPolicyForAManagementGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInformationProtectionPoliciesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.InformationProtectionPolicy = armsecurity.InformationProtectionPolicy{
	// 	Name: to.Ptr("effective"),
	// 	Type: to.Ptr("Microsoft.Security/informationProtectionPolicies"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e/providers/Microsoft.Security/informationProtectionPolicies/effective"),
	// 	Properties: &armsecurity.InformationProtectionPolicyProperties{
	// 		InformationTypes: map[string]*armsecurity.InformationType{
	// 			"3bf35491-99b8-41f2-86d5-c1200a7df658": &armsecurity.InformationType{
	// 				Custom: to.Ptr(true),
	// 				DisplayName: to.Ptr("Custom"),
	// 				Enabled: to.Ptr(true),
	// 				Keywords: []*armsecurity.InformationProtectionKeyword{
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(true),
	// 						Pattern: to.Ptr("%networking%"),
	// 				}},
	// 				Order: to.Ptr[int32](1400),
	// 				RecommendedLabelID: to.Ptr("7aa516c7-5a53-4857-bc6e-6808c6acd542"),
	// 			},
	// 			"5856f35c-8e08-4d08-9bf7-87a146150569": &armsecurity.InformationType{
	// 				Custom: to.Ptr(false),
	// 				DisplayName: to.Ptr("Contact Info"),
	// 				Enabled: to.Ptr(true),
	// 				Keywords: []*armsecurity.InformationProtectionKeyword{
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%email%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%e-mail%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%addr%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(true),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%street%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%city%"),
	// 				}},
	// 				Order: to.Ptr[int32](200),
	// 				RecommendedLabelID: to.Ptr("575739d2-3d53-4df0-9042-4c7772d5c7b1"),
	// 			},
	// 			"7fb9419d-2473-4ad8-8e11-b25cc8cf6a07": &armsecurity.InformationType{
	// 				Custom: to.Ptr(false),
	// 				DisplayName: to.Ptr("Networking"),
	// 				Enabled: to.Ptr(true),
	// 				Keywords: []*armsecurity.InformationProtectionKeyword{
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%ip%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("ip%address%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(false),
	// 						Custom: to.Ptr(false),
	// 						Pattern: to.Ptr("%mac%address%"),
	// 					},
	// 					{
	// 						CanBeNumeric: to.Ptr(true),
	// 						Custom: to.Ptr(true),
	// 						Excluded: 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": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("Public"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](100),
	// 			},
	// 			"575739d2-3d53-4df0-9042-4c7772d5c7b1": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("Confidential"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](300),
	// 			},
	// 			"7aa516c7-5a53-4857-bc6e-6808c6acd542": &armsecurity.SensitivityLabel{
	// 				DisplayName: to.Ptr("General"),
	// 				Enabled: to.Ptr(true),
	// 				Order: to.Ptr[int32](200),
	// 			},
	// 		},
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInformationProtectionPoliciesClient().NewListPager("providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.InformationProtectionPolicyList = armsecurity.InformationProtectionPolicyList{
		// 	Value: []*armsecurity.InformationProtectionPolicy{
		// 		{
		// 			Name: to.Ptr("effective"),
		// 			Type: to.Ptr("Microsoft.Security/informationProtectionPolicies"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e/providers/Microsoft.Security/informationProtectionPolicies/effective"),
		// 			Properties: &armsecurity.InformationProtectionPolicyProperties{
		// 				InformationTypes: map[string]*armsecurity.InformationType{
		// 					"3bf35491-99b8-41f2-86d5-c1200a7df658": &armsecurity.InformationType{
		// 						Custom: to.Ptr(true),
		// 						DisplayName: to.Ptr("Custom"),
		// 						Enabled: to.Ptr(true),
		// 						Keywords: []*armsecurity.InformationProtectionKeyword{
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(true),
		// 								Pattern: to.Ptr("%networking%"),
		// 						}},
		// 						Order: to.Ptr[int32](1400),
		// 						RecommendedLabelID: to.Ptr("7aa516c7-5a53-4857-bc6e-6808c6acd542"),
		// 					},
		// 					"5856f35c-8e08-4d08-9bf7-87a146150569": &armsecurity.InformationType{
		// 						Custom: to.Ptr(false),
		// 						DisplayName: to.Ptr("Contact Info"),
		// 						Enabled: to.Ptr(true),
		// 						Keywords: []*armsecurity.InformationProtectionKeyword{
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%email%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%e-mail%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%addr%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(true),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%street%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%city%"),
		// 						}},
		// 						Order: to.Ptr[int32](200),
		// 						RecommendedLabelID: to.Ptr("575739d2-3d53-4df0-9042-4c7772d5c7b1"),
		// 					},
		// 					"7fb9419d-2473-4ad8-8e11-b25cc8cf6a07": &armsecurity.InformationType{
		// 						Custom: to.Ptr(false),
		// 						DisplayName: to.Ptr("Networking"),
		// 						Enabled: to.Ptr(true),
		// 						Keywords: []*armsecurity.InformationProtectionKeyword{
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%ip%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("ip%address%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(false),
		// 								Custom: to.Ptr(false),
		// 								Pattern: to.Ptr("%mac%address%"),
		// 							},
		// 							{
		// 								CanBeNumeric: to.Ptr(true),
		// 								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": &armsecurity.SensitivityLabel{
		// 						DisplayName: to.Ptr("Public"),
		// 						Enabled: to.Ptr(true),
		// 						Order: to.Ptr[int32](100),
		// 					},
		// 					"575739d2-3d53-4df0-9042-4c7772d5c7b1": &armsecurity.SensitivityLabel{
		// 						DisplayName: to.Ptr("Confidential"),
		// 						Enabled: to.Ptr(true),
		// 						Order: to.Ptr[int32](300),
		// 					},
		// 					"7aa516c7-5a53-4857-bc6e-6808c6acd542": &armsecurity.SensitivityLabel{
		// 						DisplayName: to.Ptr("General"),
		// 						Enabled: to.Ptr(true),
		// 						Order: to.Ptr[int32](200),
		// 					},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("custom"),
		// 			Type: to.Ptr("Microsoft.Security/informationProtectionPolicies"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e/providers/Microsoft.Security/informationProtectionPolicies/custom"),
		// 			Properties: &armsecurity.InformationProtectionPolicyProperties{
		// 				InformationTypes: map[string]*armsecurity.InformationType{
		// 					"3bf35491-99b8-41f2-86d5-c1200a7df658": &armsecurity.InformationType{
		// 						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": &armsecurity.InformationType{
		// 						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": &armsecurity.SensitivityLabel{
		// 						DisplayName: to.Ptr("Public"),
		// 						Enabled: to.Ptr(true),
		// 						Order: to.Ptr[int32](100),
		// 					},
		// 					"575739d2-3d53-4df0-9042-4c7772d5c7b1": &armsecurity.SensitivityLabel{
		// 						DisplayName: to.Ptr("Confidential"),
		// 						Enabled: to.Ptr(true),
		// 						Order: to.Ptr[int32](300),
		// 					},
		// 					"7aa516c7-5a53-4857-bc6e-6808c6acd542": &armsecurity.SensitivityLabel{
		// 						DisplayName: to.Ptr("General"),
		// 						Enabled: to.Ptr(true),
		// 						Order: to.Ptr[int32](200),
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Information protection policy.
	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 {
	// Information protection policy.
	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.NewListPager method.

type InformationProtectionPoliciesClientListResponse added in v0.3.0

type InformationProtectionPoliciesClientListResponse struct {
	// Information protection policies response.
	InformationProtectionPolicyList
}

InformationProtectionPoliciesClientListResponse contains the response from method InformationProtectionPoliciesClient.NewListPager.

type InformationProtectionPolicy

type InformationProtectionPolicy struct {
	// Information protection policy data
	Properties *InformationProtectionPolicyProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// Dictionary of sensitivity labels.
	Labels map[string]*SensitivityLabel

	// READ-ONLY; Describes the last UTC time the policy was modified.
	LastModifiedUTC *time.Time

	// READ-ONLY; Describes the version of the policy.
	Version *string
}

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

	// The description of the information type.
	Description *string

	// The name of the information type.
	DisplayName *string

	// Indicates whether the information type is enabled or not.
	Enabled *bool

	// The information type keywords.
	Keywords []*InformationProtectionKeyword

	// The order of the information type.
	Order *int32

	// The recommended label id to be associated with this information type.
	RecommendedLabelID *string
}

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 InheritFromParentState added in v0.13.0

type InheritFromParentState string

InheritFromParentState - Update Settings. Enabled - Resource should inherit configurations from parent. Disabled - Resource should not inherit configurations from parent.

const (
	InheritFromParentStateDisabled InheritFromParentState = "Disabled"
	InheritFromParentStateEnabled  InheritFromParentState = "Enabled"
)

func PossibleInheritFromParentStateValues added in v0.13.0

func PossibleInheritFromParentStateValues() []InheritFromParentState

PossibleInheritFromParentStateValues returns the possible values for the InheritFromParentState const type.

type Inherited added in v0.13.0

type Inherited string

Inherited - "inherited" = "True" indicates that the current scope inherits its pricing configuration from its parent. The ID of the parent scope that provides the inherited configuration is displayed in the "inheritedFrom" field. On the other hand, "inherited" = "False" indicates that the current scope has its own pricing configuration explicitly set, and does not inherit from its parent. This field is read only and available only for resource-level pricing.

const (
	// InheritedFalse - Indicates that the current scope sets its own pricing configuration and does not inherit it from its parent
	InheritedFalse Inherited = "False"
	// InheritedTrue - Indicates that the current scope is inheriting its pricing configuration from its parent
	InheritedTrue Inherited = "True"
)

func PossibleInheritedValues added in v0.13.0

func PossibleInheritedValues() []Inherited

PossibleInheritedValues returns the possible values for the Inherited const type.

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

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; When there is too much alert data for one page, use this URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; Date of detection.
	AggregatedDateUTC *time.Time

	// READ-ONLY; Display name of the alert type.
	AlertDisplayName *string

	// READ-ONLY; Name of the alert type.
	AlertType *string

	// READ-ONLY; Number of alerts occurrences within the aggregated time window.
	Count *int64

	// READ-ONLY; Description of the suspected vulnerability and meaning.
	Description *string

	// READ-ONLY; Azure resource ID of the resource that received the alerts.
	EffectedResourceType *string

	// READ-ONLY; Log analytics query for getting the list of affected devices/alerts.
	LogAnalyticsQuery *string

	// READ-ONLY; Recommended steps for remediation.
	RemediationSteps *string

	// READ-ONLY; Assessed alert severity.
	ReportedSeverity *ReportedSeverity

	// READ-ONLY; The type of the alerted resource (Azure, Non-Azure).
	SystemSource *string

	// READ-ONLY; 10 devices with the highest number of occurrences of this alert type, on this day.
	TopDevicesList []*IoTSecurityAggregatedAlertPropertiesTopDevicesListItem

	// READ-ONLY; Name of the organization that raised the alert.
	VendorName *string
}

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

	// READ-ONLY; Name of the device.
	DeviceID *string

	// READ-ONLY; Most recent time this alert was raised for this device, on this day.
	LastOccurrence *string
}

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

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; When there is too much alert data for one page, use this URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; Description of the suspected vulnerability and meaning.
	Description *string

	// READ-ONLY; Name of the organization that made the recommendation.
	DetectedBy *string

	// READ-ONLY; Number of healthy devices within the IoT Security solution.
	HealthyDevices *int64

	// READ-ONLY; Log analytics query for getting the list of affected devices/alerts.
	LogAnalyticsQuery *string

	// READ-ONLY; Display name of the recommendation type.
	RecommendationDisplayName *string

	// READ-ONLY; Recommendation-type GUID.
	RecommendationTypeID *string

	// READ-ONLY; Recommended steps for remediation
	RemediationSteps *string

	// READ-ONLY; Assessed recommendation severity.
	ReportedSeverity *ReportedSeverity

	// READ-ONLY; Number of unhealthy devices within the IoT Security solution.
	UnhealthyDeviceCount *int64
}

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

	// READ-ONLY; Device identifier.
	DeviceID *string
}

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

	// READ-ONLY; Number of alerts raised for this alert type.
	AlertsCount *int64

	// READ-ONLY; Assessed Alert severity.
	ReportedSeverity *ReportedSeverity
}

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

	// READ-ONLY; Display name of the recommendation.
	RecommendationDisplayName *string

	// READ-ONLY; Assessed recommendation severity.
	ReportedSeverity *ReportedSeverity
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; When there is too much alert data for one page, use this URI to fetch the next page.
	NextLink *string
}

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

	// List of the 3 most prevalent device recommendations.
	MostPrevalentDeviceRecommendations []*IoTSecurityDeviceRecommendation

	// List of the 3 devices with the most alerts.
	TopAlertedDevices []*IoTSecurityAlertedDevice

	// READ-ONLY; List of device metrics by the aggregation date.
	DevicesMetrics []*IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem

	// READ-ONLY; Security analytics of your IoT Security solution.
	Metrics *IoTSeverityMetrics

	// READ-ONLY; Number of unhealthy devices within your IoT Security solution.
	UnhealthyDeviceCount *int64
}

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

	// Device alert count by severity.
	DevicesMetrics *IoTSeverityMetrics
}

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

	// Security Solution data
	Properties *IoTSecuritySolutionProperties

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; Resource type
	Type *string
}

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

	// REQUIRED; IoT Hub resource IDs
	IotHubs []*string

	// List of additional workspaces
	AdditionalWorkspaces []*AdditionalWorkspacesProperties

	// Disabled data sources. Disabling these data sources compromises the system.
	DisabledDataSources []*DataSource

	// List of additional options for exporting to workspace data.
	Export []*ExportData

	// List of the configuration status for each recommendation type.
	RecommendationsConfiguration []*RecommendationConfigurationProperties

	// Status of the IoT Security solution.
	Status *SecuritySolutionStatus

	// Unmasked IP address logging status
	UnmaskedIPLoggingStatus *UnmaskedIPLoggingStatus

	// Properties of the IoT Security solution's user defined resources.
	UserDefinedResources *UserDefinedResourcesProperties

	// Workspace resource ID
	Workspace *string

	// READ-ONLY; List of resources that were automatically discovered as relevant to the security solution.
	AutoDiscoveredResources []*string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// Count of low severity alerts/recommendations.
	Low *int64

	// Count of medium severity alerts/recommendations.
	Medium *int64
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionAnalyticsClient().Get(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecuritySolutionAnalyticsModel = armsecurity.IoTSecuritySolutionAnalyticsModel{
	// 	Name: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
	// 	Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
	// 	Properties: &armsecurity.IoTSecuritySolutionAnalyticsModelProperties{
	// 		DevicesMetrics: []*armsecurity.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem{
	// 			{
	// 				Date: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-02-01T00:00:00.000Z"); return t}()),
	// 				DevicesMetrics: &armsecurity.IoTSeverityMetrics{
	// 					High: to.Ptr[int64](3),
	// 					Low: to.Ptr[int64](70),
	// 					Medium: to.Ptr[int64](15),
	// 				},
	// 			},
	// 			{
	// 				Date: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-02-02T00:00:00.000Z"); return t}()),
	// 				DevicesMetrics: &armsecurity.IoTSeverityMetrics{
	// 					High: to.Ptr[int64](3),
	// 					Low: to.Ptr[int64](65),
	// 					Medium: to.Ptr[int64](45),
	// 				},
	// 		}},
	// 		Metrics: &armsecurity.IoTSeverityMetrics{
	// 			High: to.Ptr[int64](5),
	// 			Low: to.Ptr[int64](102),
	// 			Medium: to.Ptr[int64](200),
	// 		},
	// 		MostPrevalentDeviceAlerts: []*armsecurity.IoTSecurityDeviceAlert{
	// 			{
	// 				AlertDisplayName: to.Ptr("Custom Alert - number of device to cloud messages in AMQP protocol is not in the allowed range"),
	// 				AlertsCount: to.Ptr[int64](200),
	// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 			},
	// 			{
	// 				AlertDisplayName: to.Ptr("Custom Alert - execution of a process that is not allowed"),
	// 				AlertsCount: to.Ptr[int64](170),
	// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityMedium),
	// 			},
	// 			{
	// 				AlertDisplayName: to.Ptr("Successful Bruteforce"),
	// 				AlertsCount: to.Ptr[int64](150),
	// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 		}},
	// 		MostPrevalentDeviceRecommendations: []*armsecurity.IoTSecurityDeviceRecommendation{
	// 			{
	// 				DevicesCount: to.Ptr[int64](200),
	// 				RecommendationDisplayName: to.Ptr("Install the Azure Security of Things Agent"),
	// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 			},
	// 			{
	// 				DevicesCount: to.Ptr[int64](170),
	// 				RecommendationDisplayName: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
	// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 			},
	// 			{
	// 				DevicesCount: to.Ptr[int64](150),
	// 				RecommendationDisplayName: to.Ptr("Same Authentication Credentials used by multiple devices"),
	// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityMedium),
	// 		}},
	// 		TopAlertedDevices: []*armsecurity.IoTSecurityAlertedDevice{
	// 			{
	// 				AlertsCount: to.Ptr[int64](200),
	// 				DeviceID: to.Ptr("id1"),
	// 			},
	// 			{
	// 				AlertsCount: to.Ptr[int64](170),
	// 				DeviceID: to.Ptr("id2"),
	// 			},
	// 			{
	// 				AlertsCount: to.Ptr[int64](150),
	// 				DeviceID: to.Ptr("id3"),
	// 		}},
	// 		UnhealthyDeviceCount: to.Ptr[int64](1200),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionAnalyticsClient().List(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecuritySolutionAnalyticsModelList = armsecurity.IoTSecuritySolutionAnalyticsModelList{
	// 	Value: []*armsecurity.IoTSecuritySolutionAnalyticsModel{
	// 		{
	// 			Name: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
	// 			Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
	// 			Properties: &armsecurity.IoTSecuritySolutionAnalyticsModelProperties{
	// 				DevicesMetrics: []*armsecurity.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem{
	// 					{
	// 						Date: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-02-01T00:00:00.000Z"); return t}()),
	// 						DevicesMetrics: &armsecurity.IoTSeverityMetrics{
	// 							High: to.Ptr[int64](3),
	// 							Low: to.Ptr[int64](70),
	// 							Medium: to.Ptr[int64](15),
	// 						},
	// 					},
	// 					{
	// 						Date: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-02-02T00:00:00.000Z"); return t}()),
	// 						DevicesMetrics: &armsecurity.IoTSeverityMetrics{
	// 							High: to.Ptr[int64](3),
	// 							Low: to.Ptr[int64](65),
	// 							Medium: to.Ptr[int64](45),
	// 						},
	// 				}},
	// 				Metrics: &armsecurity.IoTSeverityMetrics{
	// 					High: to.Ptr[int64](5),
	// 					Low: to.Ptr[int64](102),
	// 					Medium: to.Ptr[int64](200),
	// 				},
	// 				MostPrevalentDeviceAlerts: []*armsecurity.IoTSecurityDeviceAlert{
	// 					{
	// 						AlertDisplayName: to.Ptr("Custom Alert - number of device to cloud messages in AMQP protocol is not in the allowed range"),
	// 						AlertsCount: to.Ptr[int64](200),
	// 						ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 					},
	// 					{
	// 						AlertDisplayName: to.Ptr("Custom Alert - execution of a process that is not allowed"),
	// 						AlertsCount: to.Ptr[int64](170),
	// 						ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityMedium),
	// 					},
	// 					{
	// 						AlertDisplayName: to.Ptr("Successful Bruteforce"),
	// 						AlertsCount: to.Ptr[int64](150),
	// 						ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 				}},
	// 				MostPrevalentDeviceRecommendations: []*armsecurity.IoTSecurityDeviceRecommendation{
	// 					{
	// 						DevicesCount: to.Ptr[int64](200),
	// 						RecommendationDisplayName: to.Ptr("Install the Azure Security of Things Agent"),
	// 						ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 					},
	// 					{
	// 						DevicesCount: to.Ptr[int64](170),
	// 						RecommendationDisplayName: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
	// 						ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 					},
	// 					{
	// 						DevicesCount: to.Ptr[int64](150),
	// 						RecommendationDisplayName: to.Ptr("Same Authentication Credentials used by multiple devices"),
	// 						ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityMedium),
	// 				}},
	// 				TopAlertedDevices: []*armsecurity.IoTSecurityAlertedDevice{
	// 					{
	// 						AlertsCount: to.Ptr[int64](200),
	// 						DeviceID: to.Ptr("id1"),
	// 					},
	// 					{
	// 						AlertsCount: to.Ptr[int64](170),
	// 						DeviceID: to.Ptr("id2"),
	// 					},
	// 					{
	// 						AlertsCount: to.Ptr[int64](150),
	// 						DeviceID: to.Ptr("id3"),
	// 				}},
	// 				UnhealthyDeviceCount: to.Ptr[int64](1200),
	// 			},
	// 	}},
	// }
}
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 {
	// Security analytics of your IoT Security solution
	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 {
	// List of Security analytics of your IoT Security solution
	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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecuritySolutionModel = armsecurity.IoTSecuritySolutionModel{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/Locations/eastus/IoTSecuritySolutions/default"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Location: to.Ptr("East Us"),
	// 	Properties: &armsecurity.IoTSecuritySolutionProperties{
	// 		AutoDiscoveredResources: []*string{
	// 			to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
	// 			to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
	// 			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{
	// 					{
	// 						Name: to.Ptr("Service Principal Not Used with ACR"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Agent sending underutilized messages"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
	// 					},
	// 					{
	// 						Name: to.Ptr("Operating system (OS) baseline validation failure"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Edge Hub memory can be optimized"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("No Logging Configured for Edge Module"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Install the Azure Security of Things Agent"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Default IP Filter Policy should be Deny"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("IP Filter rule includes large IP range"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Open Ports On Device"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Permissive firewall rule in the input chain was found"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Permissive firewall rule in the output chain was found"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("TLS cipher suite upgrade"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 				}},
	// 				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"),
	// 				},
	// 				SystemData: &armsecurity.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
	// 					CreatedBy: to.Ptr("string"),
	// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("string"),
	// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 				},
	// 			}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewIotSecuritySolutionClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionClient().Get(ctx, "MyGroup", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecuritySolutionModel = armsecurity.IoTSecuritySolutionModel{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Location: to.Ptr("East Us"),
	// 	Properties: &armsecurity.IoTSecuritySolutionProperties{
	// 		AutoDiscoveredResources: []*string{
	// 			to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
	// 			to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
	// 			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{
	// 					{
	// 						Name: to.Ptr("Service Principal Not Used with ACR"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Agent sending underutilized messages"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
	// 					},
	// 					{
	// 						Name: to.Ptr("Operating system (OS) baseline validation failure"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Edge Hub memory can be optimized"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("No Logging Configured for Edge Module"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Install the Azure Security of Things Agent"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Default IP Filter Policy should be Deny"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("IP Filter rule includes large IP range"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Open Ports On Device"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Permissive firewall rule in the input chain was found"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Permissive firewall rule in the output chain was found"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
	// 					},
	// 					{
	// 						Name: to.Ptr("TLS cipher suite upgrade"),
	// 						RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
	// 						Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 				}},
	// 				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"),
	// 				},
	// 				SystemData: &armsecurity.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
	// 					CreatedBy: to.Ptr("string"),
	// 					CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("string"),
	// 					LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 				},
	// 			}
}
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.NewListByResourceGroupPager method.
Example (ListIoTSecuritySolutionsByResourceGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIotSecuritySolutionClient().NewListByResourceGroupPager("MyGroup", &armsecurity.IotSecuritySolutionClientListByResourceGroupOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.IoTSecuritySolutionsList = armsecurity.IoTSecuritySolutionsList{
		// 	Value: []*armsecurity.IoTSecuritySolutionModel{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Location: to.Ptr("East Us"),
		// 			Properties: &armsecurity.IoTSecuritySolutionProperties{
		// 				AutoDiscoveredResources: []*string{
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
		// 					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{
		// 							{
		// 								Name: to.Ptr("Service Principal Not Used with ACR"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Agent sending underutilized messages"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
		// 							},
		// 							{
		// 								Name: to.Ptr("Operating system (OS) baseline validation failure"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Edge Hub memory can be optimized"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("No Logging Configured for Edge Module"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Install the Azure Security of Things Agent"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Default IP Filter Policy should be Deny"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("IP Filter rule includes large IP range"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Open Ports On Device"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Permissive firewall rule in the input chain was found"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Permissive firewall rule in the output chain was found"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("TLS cipher suite upgrade"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 						}},
		// 						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"),
		// 						},
		// 						SystemData: &armsecurity.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 							CreatedBy: to.Ptr("string"),
		// 							CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("string"),
		// 							LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 						},
		// 				}},
		// 			}
	}
}
Output:

Example (ListIoTSecuritySolutionsByResourceGroupAndIoTHub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIotSecuritySolutionClient().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() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.IoTSecuritySolutionsList = armsecurity.IoTSecuritySolutionsList{
		// 	Value: []*armsecurity.IoTSecuritySolutionModel{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyRg/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Location: to.Ptr("East Us"),
		// 			Properties: &armsecurity.IoTSecuritySolutionProperties{
		// 				AutoDiscoveredResources: []*string{
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
		// 					DisabledDataSources: []*armsecurity.DataSource{
		// 					},
		// 					DisplayName: to.Ptr("Solution Default"),
		// 					Export: []*armsecurity.ExportData{
		// 						to.Ptr(armsecurity.ExportDataRawEvents)},
		// 						IotHubs: []*string{
		// 							to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
		// 							RecommendationsConfiguration: []*armsecurity.RecommendationConfigurationProperties{
		// 								{
		// 									Name: to.Ptr("Service Principal Not Used with ACR"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Agent sending underutilized messages"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
		// 								},
		// 								{
		// 									Name: to.Ptr("Operating system (OS) baseline validation failure"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Edge Hub memory can be optimized"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("No Logging Configured for Edge Module"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Install the Azure Security of Things Agent"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Default IP Filter Policy should be Deny"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("IP Filter rule includes large IP range"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Open Ports On Device"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Permissive firewall rule in the input chain was found"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Permissive firewall rule in the output chain was found"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("TLS cipher suite upgrade"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							}},
		// 							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"),
		// 							},
		// 							SystemData: &armsecurity.SystemData{
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 								CreatedBy: to.Ptr("string"),
		// 								CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("string"),
		// 								LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 							},
		// 					}},
		// 				}
	}
}
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.NewListBySubscriptionPager method.
Example (ListIoTSecuritySolutionsByIoTHub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIotSecuritySolutionClient().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() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.IoTSecuritySolutionsList = armsecurity.IoTSecuritySolutionsList{
		// 	Value: []*armsecurity.IoTSecuritySolutionModel{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Location: to.Ptr("East Us"),
		// 			Properties: &armsecurity.IoTSecuritySolutionProperties{
		// 				AutoDiscoveredResources: []*string{
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
		// 					DisabledDataSources: []*armsecurity.DataSource{
		// 					},
		// 					DisplayName: to.Ptr("Solution Default"),
		// 					Export: []*armsecurity.ExportData{
		// 						to.Ptr(armsecurity.ExportDataRawEvents)},
		// 						IotHubs: []*string{
		// 							to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
		// 							RecommendationsConfiguration: []*armsecurity.RecommendationConfigurationProperties{
		// 								{
		// 									Name: to.Ptr("Service Principal Not Used with ACR"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Agent sending underutilized messages"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
		// 								},
		// 								{
		// 									Name: to.Ptr("Operating system (OS) baseline validation failure"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Edge Hub memory can be optimized"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("No Logging Configured for Edge Module"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Install the Azure Security of Things Agent"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Default IP Filter Policy should be Deny"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("IP Filter rule includes large IP range"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Open Ports On Device"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Permissive firewall rule in the input chain was found"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Permissive firewall rule in the output chain was found"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 								},
		// 								{
		// 									Name: to.Ptr("TLS cipher suite upgrade"),
		// 									RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
		// 									Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							}},
		// 							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"),
		// 							},
		// 							SystemData: &armsecurity.SystemData{
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 								CreatedBy: to.Ptr("string"),
		// 								CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("string"),
		// 								LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

Example (ListIoTSecuritySolutionsBySubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIotSecuritySolutionClient().NewListBySubscriptionPager(&armsecurity.IotSecuritySolutionClientListBySubscriptionOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.IoTSecuritySolutionsList = armsecurity.IoTSecuritySolutionsList{
		// 	Value: []*armsecurity.IoTSecuritySolutionModel{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Location: to.Ptr("East Us"),
		// 			Properties: &armsecurity.IoTSecuritySolutionProperties{
		// 				AutoDiscoveredResources: []*string{
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
		// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
		// 					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{
		// 							{
		// 								Name: to.Ptr("Service Principal Not Used with ACR"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Agent sending underutilized messages"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
		// 							},
		// 							{
		// 								Name: to.Ptr("Operating system (OS) baseline validation failure"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Edge Hub memory can be optimized"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("No Logging Configured for Edge Module"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Install the Azure Security of Things Agent"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Default IP Filter Policy should be Deny"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("IP Filter rule includes large IP range"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Open Ports On Device"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Permissive firewall rule in the input chain was found"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Permissive firewall rule in the output chain was found"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 							},
		// 							{
		// 								Name: to.Ptr("TLS cipher suite upgrade"),
		// 								RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
		// 								Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 						}},
		// 						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"),
		// 						},
		// 						SystemData: &armsecurity.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 							CreatedBy: to.Ptr("string"),
		// 							CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("string"),
		// 							LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("sec-solution"),
		// 						Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
		// 						ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SecondGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/sec-solution"),
		// 						Tags: map[string]*string{
		// 						},
		// 						Location: to.Ptr("East Us"),
		// 						Properties: &armsecurity.IoTSecuritySolutionProperties{
		// 							AutoDiscoveredResources: []*string{
		// 								to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
		// 								to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/IotHubSecond")},
		// 								DisabledDataSources: []*armsecurity.DataSource{
		// 								},
		// 								DisplayName: to.Ptr("Second Solution"),
		// 								Export: []*armsecurity.ExportData{
		// 									to.Ptr(armsecurity.ExportDataRawEvents)},
		// 									IotHubs: []*string{
		// 										to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/IotHubSecond")},
		// 										RecommendationsConfiguration: []*armsecurity.RecommendationConfigurationProperties{
		// 											{
		// 												Name: to.Ptr("Service Principal Not Used with ACR"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Agent sending underutilized messages"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
		// 											},
		// 											{
		// 												Name: to.Ptr("Operating system (OS) baseline validation failure"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Edge Hub memory can be optimized"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("No Logging Configured for Edge Module"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Install the Azure Security of Things Agent"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Default IP Filter Policy should be Deny"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("IP Filter rule includes large IP range"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Open Ports On Device"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Permissive firewall rule in the input chain was found"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Permissive firewall rule in the output chain was found"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
		// 											},
		// 											{
		// 												Name: to.Ptr("TLS cipher suite upgrade"),
		// 												RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
		// 												Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
		// 										}},
		// 										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"),
		// 										},
		// 										SystemData: &armsecurity.SystemData{
		// 											CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 											CreatedBy: to.Ptr("string"),
		// 											CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 											LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
		// 											LastModifiedBy: to.Ptr("string"),
		// 											LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 										},
		// 								}},
		// 							}
	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecuritySolutionModel = armsecurity.IoTSecuritySolutionModel{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/IoTSecuritySolutions"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/Locations/eastus/IoTSecuritySolutions/default"),
	// 	Tags: map[string]*string{
	// 		"foo": to.Ptr("bar"),
	// 	},
	// 	Location: to.Ptr("East Us"),
	// 	Properties: &armsecurity.IoTSecuritySolutionProperties{
	// 		AutoDiscoveredResources: []*string{
	// 			to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735"),
	// 			to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
	// 			DisabledDataSources: []*armsecurity.DataSource{
	// 			},
	// 			DisplayName: to.Ptr("Solution Default"),
	// 			Export: []*armsecurity.ExportData{
	// 				to.Ptr(armsecurity.ExportDataRawEvents)},
	// 				IotHubs: []*string{
	// 					to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")},
	// 					RecommendationsConfiguration: []*armsecurity.RecommendationConfigurationProperties{
	// 						{
	// 							Name: to.Ptr("Service Principal Not Used with ACR"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAcrauthentication),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Agent sending underutilized messages"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTAgentSendsUnutilizedMessages),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatus("TurnedOn")),
	// 						},
	// 						{
	// 							Name: to.Ptr("Operating system (OS) baseline validation failure"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTBaseline),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Edge Hub memory can be optimized"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeHubMemOptimize),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("No Logging Configured for Edge Module"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTEdgeLoggingOptions),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Module Settings Inconsistent in SecurityGroup"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInconsistentModuleSettings),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Install the Azure Security of Things Agent"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTInstallAgent),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Default IP Filter Policy should be Deny"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterDenyAll),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("IP Filter rule includes large IP range"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTIpfilterPermissiveRule),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Open Ports On Device"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTOpenPorts),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Permissive firewall policy in one of the chains was found"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveFirewallPolicy),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Permissive firewall rule in the input chain was found"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveInputFirewallRules),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Permissive firewall rule in the output chain was found"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPermissiveOutputFirewallRules),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("High level permissions configured in Edge model twin for Edge module"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTPrivilegedDockerOptions),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("Same Authentication Credentials used by multiple devices"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTSharedCredentials),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusDisabled),
	// 						},
	// 						{
	// 							Name: to.Ptr("TLS cipher suite upgrade"),
	// 							RecommendationType: to.Ptr(armsecurity.RecommendationTypeIoTVulnerableTLSCipherSuite),
	// 							Status: to.Ptr(armsecurity.RecommendationConfigStatusEnabled),
	// 					}},
	// 					Status: to.Ptr(armsecurity.SecuritySolutionStatusEnabled),
	// 					UnmaskedIPLoggingStatus: to.Ptr(armsecurity.UnmaskedIPLoggingStatusEnabled),
	// 					UserDefinedResources: &armsecurity.UserDefinedResourcesProperties{
	// 						Query: to.Ptr("where type != \"microsoft.devices/iothubs\" | where name contains \"v2\""),
	// 						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"),
	// 					},
	// 					SystemData: &armsecurity.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
	// 						CreatedBy: to.Ptr("string"),
	// 						CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.092Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("string"),
	// 						LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 					},
	// 				}
}
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 {
	// IoT Security solution configuration and resource information.
	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 {
	// IoT Security solution configuration and resource information.
	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.NewListByResourceGroupPager method.

type IotSecuritySolutionClientListByResourceGroupResponse added in v0.3.0

type IotSecuritySolutionClientListByResourceGroupResponse struct {
	// List of IoT Security solutions.
	IoTSecuritySolutionsList
}

IotSecuritySolutionClientListByResourceGroupResponse contains the response from method IotSecuritySolutionClient.NewListByResourceGroupPager.

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.NewListBySubscriptionPager method.

type IotSecuritySolutionClientListBySubscriptionResponse added in v0.3.0

type IotSecuritySolutionClientListBySubscriptionResponse struct {
	// List of IoT Security solutions.
	IoTSecuritySolutionsList
}

IotSecuritySolutionClientListBySubscriptionResponse contains the response from method IotSecuritySolutionClient.NewListBySubscriptionPager.

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 {
	// IoT Security solution configuration and resource information.
	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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewIotSecuritySolutionsAnalyticsAggregatedAlertClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionsAnalyticsAggregatedAlertClient().Get(ctx, "MyGroup", "default", "IoT_Bruteforce_Fail/2019-02-02", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecurityAggregatedAlert = armsecurity.IoTSecurityAggregatedAlert{
	// 	Name: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_Bruteforce_Fail/2019-02-02"),
	// 	Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedAlerts"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_Bruteforce_Fail/2019-02-02"),
	// 	Properties: &armsecurity.IoTSecurityAggregatedAlertProperties{
	// 		Description: to.Ptr("Multiple unsuccsseful login attempts identified. A Bruteforce attack on the device failed."),
	// 		ActionTaken: to.Ptr("Detected"),
	// 		AggregatedDateUTC: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2019-02-02"); return t}()),
	// 		AlertDisplayName: to.Ptr("Failed Bruteforce"),
	// 		AlertType: to.Ptr("IoT_Bruteforce_Fail"),
	// 		Count: to.Ptr[int64](50),
	// 		EffectedResourceType: to.Ptr("IoT Device"),
	// 		LogAnalyticsQuery: to.Ptr("SecurityAlert | where tolower(ResourceId) == tolower('/subscriptions/b77ec8a9-04ed-48d2-a87a-e5887b978ba6/resourceGroups/IoT-Solution-DemoEnv/providers/Microsoft.Devices/IotHubs/rtogm-hub') and tolower(AlertName) == tolower('Custom Alert - number of device to cloud messages in MQTT protocol is not in the allowed range') | extend DeviceId=parse_json(ExtendedProperties)['DeviceId'] | project DeviceId, TimeGenerated, DisplayName, AlertSeverity, Description, RemediationSteps, ExtendedProperties"),
	// 		RemediationSteps: to.Ptr(""),
	// 		ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 		SystemSource: to.Ptr("Devices"),
	// 		TopDevicesList: []*armsecurity.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem{
	// 			{
	// 				AlertsCount: to.Ptr[int64](100),
	// 				DeviceID: to.Ptr("testDevice1"),
	// 				LastOccurrence: to.Ptr("10:42"),
	// 			},
	// 			{
	// 				AlertsCount: to.Ptr[int64](80),
	// 				DeviceID: to.Ptr("testDevice2"),
	// 				LastOccurrence: to.Ptr("15:42"),
	// 		}},
	// 		VendorName: to.Ptr("Microsoft"),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIotSecuritySolutionsAnalyticsAggregatedAlertClient().NewListPager("MyGroup", "default", &armsecurity.IotSecuritySolutionsAnalyticsAggregatedAlertClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.IoTSecurityAggregatedAlertList = armsecurity.IoTSecurityAggregatedAlertList{
		// 	Value: []*armsecurity.IoTSecurityAggregatedAlert{
		// 		{
		// 			Name: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_Bruteforce_Fail/2019-02-02"),
		// 			Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedAlerts"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_Bruteforce_Fail/2019-02-02"),
		// 			Properties: &armsecurity.IoTSecurityAggregatedAlertProperties{
		// 				Description: to.Ptr("Multiple unsuccsseful login attempts identified. A Bruteforce attack on the device failed."),
		// 				ActionTaken: to.Ptr("Detected"),
		// 				AggregatedDateUTC: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2019-02-02"); return t}()),
		// 				AlertDisplayName: to.Ptr("Failed Bruteforce"),
		// 				AlertType: to.Ptr("IoT_Bruteforce_Fail"),
		// 				Count: to.Ptr[int64](50),
		// 				EffectedResourceType: to.Ptr("IoT Device"),
		// 				LogAnalyticsQuery: to.Ptr("SecurityAlert | where tolower(ResourceId) == tolower('/subscriptions/b77ec8a9-04ed-48d2-a87a-e5887b978ba6/resourceGroups/IoT-Solution-DemoEnv/providers/Microsoft.Devices/IotHubs/rtogm-hub') and tolower(AlertName) == tolower('Custom Alert - number of device to cloud messages in MQTT protocol is not in the allowed range') | extend DeviceId=parse_json(ExtendedProperties)['DeviceId'] | project DeviceId, TimeGenerated, DisplayName, AlertSeverity, Description, RemediationSteps, ExtendedProperties"),
		// 				RemediationSteps: to.Ptr(""),
		// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
		// 				SystemSource: to.Ptr("Devices"),
		// 				TopDevicesList: []*armsecurity.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem{
		// 					{
		// 						AlertsCount: to.Ptr[int64](45),
		// 						DeviceID: to.Ptr("testDevice1"),
		// 						LastOccurrence: to.Ptr("10:42"),
		// 					},
		// 					{
		// 						AlertsCount: to.Ptr[int64](30),
		// 						DeviceID: to.Ptr("testDevice2"),
		// 						LastOccurrence: to.Ptr("15:42"),
		// 				}},
		// 				VendorName: to.Ptr("Microsoft"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_Bruteforce_Success/2019-02-02"),
		// 			Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedAlerts"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_Bruteforce_Success/2019-02-02"),
		// 			Properties: &armsecurity.IoTSecurityAggregatedAlertProperties{
		// 				Description: to.Ptr("Multiple unsuccsseful login attempts identified followed by a succssful login. A Bruteforce attack on the device was Successfule"),
		// 				ActionTaken: to.Ptr("Detected"),
		// 				AggregatedDateUTC: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2019-02-02"); return t}()),
		// 				AlertDisplayName: to.Ptr("Successful Bruteforce"),
		// 				AlertType: to.Ptr("IoT_Bruteforce_Success"),
		// 				Count: to.Ptr[int64](600000),
		// 				EffectedResourceType: to.Ptr("IoT Device"),
		// 				LogAnalyticsQuery: to.Ptr("SecurityAlert | where tolower(ResourceId) == tolower('/subscriptions/b77ec8a9-04ed-48d2-a87a-e5887b978ba6/resourceGroups/IoT-Solution-DemoEnv/providers/Microsoft.Devices/IotHubs/rtogm-hub') and tolower(AlertName) == tolower('Custom Alert - number of device to cloud messages in MQTT protocol is not in the allowed range') | extend DeviceId=parse_json(ExtendedProperties)['DeviceId'] | project DeviceId, TimeGenerated, DisplayName, AlertSeverity, Description, RemediationSteps, ExtendedProperties"),
		// 				RemediationSteps: to.Ptr(""),
		// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
		// 				SystemSource: to.Ptr("Devices"),
		// 				TopDevicesList: []*armsecurity.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem{
		// 					{
		// 						AlertsCount: to.Ptr[int64](12321),
		// 						DeviceID: to.Ptr("testDevice1"),
		// 						LastOccurrence: to.Ptr("10:42"),
		// 					},
		// 					{
		// 						AlertsCount: to.Ptr[int64](455),
		// 						DeviceID: to.Ptr("testDevice2"),
		// 						LastOccurrence: to.Ptr("15:42"),
		// 				}},
		// 				VendorName: to.Ptr("Microsoft"),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Security Solution Aggregated Alert information
	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.NewListPager method.

type IotSecuritySolutionsAnalyticsAggregatedAlertClientListResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsAggregatedAlertClientListResponse struct {
	// List of IoT Security solution aggregated alert data.
	IoTSecurityAggregatedAlertList
}

IotSecuritySolutionsAnalyticsAggregatedAlertClientListResponse contains the response from method IotSecuritySolutionsAnalyticsAggregatedAlertClient.NewListPager.

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIotSecuritySolutionsAnalyticsRecommendationClient().Get(ctx, "IoTEdgeResources", "default", "OpenPortsOnDevice", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.IoTSecurityAggregatedRecommendation = armsecurity.IoTSecurityAggregatedRecommendation{
	// 	Name: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice"),
	// 	Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedRecommendations"),
	// 	ID: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice"),
	// 	Properties: &armsecurity.IoTSecurityAggregatedRecommendationProperties{
	// 		Description: to.Ptr("An allowed firewall policy was found in main firewall Chains (INPUT/OUTPUT). The policy should Deny all traffic by default define rules to allow necessary communication to/from the device"),
	// 		DetectedBy: to.Ptr("Microsoft"),
	// 		HealthyDevices: to.Ptr[int64](10000),
	// 		LogAnalyticsQuery: to.Ptr("SecurityRecommendation | where tolower(AssessedResourceId) == tolower('/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Devices/IotHubs/t-ofdadu-hub') and tolower(RecommendationName) == tolower('OpenPortsOnDevice')"),
	// 		RecommendationDisplayName: to.Ptr("Permissive firewall policy in one of the chains was found"),
	// 		RecommendationName: to.Ptr("OpenPortsOnDevice"),
	// 		RecommendationTypeID: to.Ptr("{20ff7fc3-e762-44dd-bd96-b71116dcdc23}"),
	// 		RemediationSteps: to.Ptr(""),
	// 		ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
	// 		UnhealthyDeviceCount: to.Ptr[int64](200),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIotSecuritySolutionsAnalyticsRecommendationClient().NewListPager("IoTEdgeResources", "default", &armsecurity.IotSecuritySolutionsAnalyticsRecommendationClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.IoTSecurityAggregatedRecommendationList = armsecurity.IoTSecurityAggregatedRecommendationList{
		// 	Value: []*armsecurity.IoTSecurityAggregatedRecommendation{
		// 		{
		// 			Name: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice"),
		// 			Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedRecommendations"),
		// 			ID: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice"),
		// 			Properties: &armsecurity.IoTSecurityAggregatedRecommendationProperties{
		// 				Description: to.Ptr("An allowed firewall policy was found in main firewall Chains (INPUT/OUTPUT). The policy should Deny all traffic by default define rules to allow necessary communication to/from the device"),
		// 				DetectedBy: to.Ptr("Microsoft"),
		// 				HealthyDevices: to.Ptr[int64](10000),
		// 				LogAnalyticsQuery: to.Ptr("SecurityRecommendation | where tolower(AssessedResourceId) == tolower('/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Devices/IotHubs/t-ofdadu-hub') and tolower(RecommendationName) == tolower('OpenPortsOnDevice')"),
		// 				RecommendationDisplayName: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 				RecommendationName: to.Ptr("OpenPortsOnDevice"),
		// 				RecommendationTypeID: to.Ptr("{20ff7fc3-e762-44dd-bd96-b71116dcdc23}"),
		// 				RemediationSteps: to.Ptr(""),
		// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
		// 				UnhealthyDeviceCount: to.Ptr[int64](200),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_InstallAgent"),
		// 			Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedRecommendations"),
		// 			ID: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/TooLargeIPRange"),
		// 			Properties: &armsecurity.IoTSecurityAggregatedRecommendationProperties{
		// 				Description: to.Ptr("An allow IP filter rule source IP range is too large. Overly permissive rules can expose your IoT hub to malicious actors."),
		// 				DetectedBy: to.Ptr("Microsoft"),
		// 				HealthyDevices: to.Ptr[int64](130000),
		// 				LogAnalyticsQuery: to.Ptr("SecurityRecommendation | where tolower(AssessedResourceId) == tolower('/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Devices/IotHubs/t-ofdadu-hub') and tolower(RecommendationName) == tolower('TooLargeIPRange')"),
		// 				RecommendationDisplayName: to.Ptr("Permissive firewall policy in one of the chains was found"),
		// 				RecommendationName: to.Ptr("TooLargeIPRange"),
		// 				RecommendationTypeID: to.Ptr("{20ff7fc3-e762-44dd-bd96-b71116dcdc23}"),
		// 				RemediationSteps: to.Ptr(""),
		// 				ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityHigh),
		// 				UnhealthyDeviceCount: to.Ptr[int64](1),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// IoT Security solution recommendation information.
	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.NewListPager method.

type IotSecuritySolutionsAnalyticsRecommendationClientListResponse added in v0.3.0

type IotSecuritySolutionsAnalyticsRecommendationClientListResponse struct {
	// List of IoT Security solution aggregated recommendations.
	IoTSecurityAggregatedRecommendationList
}

IotSecuritySolutionsAnalyticsRecommendationClientListResponse contains the response from method IotSecuritySolutionsAnalyticsRecommendationClient.NewListPager.

type IsEnabled added in v0.11.0

type IsEnabled string

IsEnabled - Indicates whether the extension is enabled.

const (
	// IsEnabledFalse - Indicates the extension is disabled
	IsEnabledFalse IsEnabled = "False"
	// IsEnabledTrue - Indicates the extension is enabled
	IsEnabledTrue IsEnabled = "True"
)

func PossibleIsEnabledValues added in v0.11.0

func PossibleIsEnabledValues() []IsEnabled

PossibleIsEnabledValues returns the possible values for the IsEnabled const type.

type Issue added in v0.11.0

type Issue struct {
	// REQUIRED; The unique issue key
	IssueKey *string

	// Additional data for the given issue. The additional data depends on the issue type
	IssueAdditionalData map[string]*string

	// The issue description
	IssueDescription *string

	// The issue name
	IssueName *string

	// The remediation script to solve this issue
	RemediationScript *string

	// Human readable description of what you should do to mitigate this health issue
	RemediationSteps *string

	// The affected security values that MDC offers that will be affected by the issue, for example: recommendations, alerts,
	// etc
	SecurityValues []*string
}

Issue - The issue that caused the resource to by unhealthy

func (Issue) MarshalJSON added in v0.11.0

func (i Issue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Issue.

func (*Issue) UnmarshalJSON added in v0.11.0

func (i *Issue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Issue.

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJitNetworkAccessPoliciesClient().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.569Z"); 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.569Z"); 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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JitNetworkAccessPolicy = 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.569Z"); 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.569Z"); 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),
	// 				}},
	// 		}},
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewJitNetworkAccessPoliciesClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJitNetworkAccessPoliciesClient().Get(ctx, "myRg1", "westeurope", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JitNetworkAccessPolicy = 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{
	// 			{
	// 				Justification: to.Ptr("testing a new version of the product"),
	// 				Requestor: to.Ptr("barbara@contoso.com"),
	// 				StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T08:06:45.569Z"); 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.569Z"); 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),
	// 				}},
	// 		}},
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewJitNetworkAccessPoliciesClient().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.NewListByRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJitNetworkAccessPoliciesClient().NewListByRegionPager("westeurope", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JitNetworkAccessPoliciesList = armsecurity.JitNetworkAccessPoliciesList{
		// 	Value: []*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{
		// 					{
		// 						Justification: to.Ptr("testing a new version of the product"),
		// 						Requestor: to.Ptr("barbara@contoso.com"),
		// 						StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T08:06:45.569Z"); 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.569Z"); 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),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListByResourceGroupAndRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJitNetworkAccessPoliciesClient().NewListByResourceGroupAndRegionPager("myRg1", "westeurope", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JitNetworkAccessPoliciesList = armsecurity.JitNetworkAccessPoliciesList{
		// 	Value: []*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{
		// 					{
		// 						Justification: to.Ptr("testing a new version of the product"),
		// 						Requestor: to.Ptr("barbara@contoso.com"),
		// 						StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T08:06:45.569Z"); 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.569Z"); 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),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJitNetworkAccessPoliciesClient().NewListByResourceGroupPager("myRg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JitNetworkAccessPoliciesList = armsecurity.JitNetworkAccessPoliciesList{
		// 	Value: []*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{
		// 					{
		// 						Justification: to.Ptr("testing a new version of the product"),
		// 						Requestor: to.Ptr("barbara@contoso.com"),
		// 						StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T08:06:45.569Z"); 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.569Z"); 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),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJitNetworkAccessPoliciesClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JitNetworkAccessPoliciesList = armsecurity.JitNetworkAccessPoliciesList{
		// 	Value: []*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{
		// 					{
		// 						Justification: to.Ptr("testing a new version of the product"),
		// 						Requestor: to.Ptr("barbara@contoso.com"),
		// 						StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-17T08:06:45.569Z"); 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.569Z"); 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),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListByRegionPager method.

type JitNetworkAccessPoliciesClientListByRegionResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListByRegionResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListByRegionResponse contains the response from method JitNetworkAccessPoliciesClient.NewListByRegionPager.

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions struct {
}

JitNetworkAccessPoliciesClientListByResourceGroupAndRegionOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.NewListByResourceGroupAndRegionPager method.

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupAndRegionResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListByResourceGroupAndRegionResponse contains the response from method JitNetworkAccessPoliciesClient.NewListByResourceGroupAndRegionPager.

type JitNetworkAccessPoliciesClientListByResourceGroupOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupOptions struct {
}

JitNetworkAccessPoliciesClientListByResourceGroupOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.NewListByResourceGroupPager method.

type JitNetworkAccessPoliciesClientListByResourceGroupResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListByResourceGroupResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListByResourceGroupResponse contains the response from method JitNetworkAccessPoliciesClient.NewListByResourceGroupPager.

type JitNetworkAccessPoliciesClientListOptions added in v0.3.0

type JitNetworkAccessPoliciesClientListOptions struct {
}

JitNetworkAccessPoliciesClientListOptions contains the optional parameters for the JitNetworkAccessPoliciesClient.NewListPager method.

type JitNetworkAccessPoliciesClientListResponse added in v0.3.0

type JitNetworkAccessPoliciesClientListResponse struct {
	JitNetworkAccessPoliciesList
}

JitNetworkAccessPoliciesClientListResponse contains the response from method JitNetworkAccessPoliciesClient.NewListPager.

type JitNetworkAccessPoliciesList

type JitNetworkAccessPoliciesList struct {
	Value []*JitNetworkAccessPolicy

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// Kind of the resource
	Kind *string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// REQUIRED
	Number *int32

	// Source of the allowed traffic. If omitted, the request will be for the source IP address of the initiate request.
	AllowedSourceAddressPrefix *string
}

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

	// The justification for making the initiate request
	Justification *string
}

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

	// REQUIRED; The ports to open for the resource with the id
	Ports []*JitNetworkAccessPolicyInitiatePort
}

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
	Requests        []*JitNetworkAccessRequest

	// READ-ONLY; Gets the provisioning state of the Just-in-Time policy.
	ProvisioningState *string
}

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

	// REQUIRED; Port configurations for the virtual machine
	Ports []*JitNetworkAccessPortRule

	// Public IP address of the Azure Firewall that is linked to this policy, if applicable
	PublicIPAddress *string
}

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

	// REQUIRED
	Number *int32

	// REQUIRED
	Protocol *Protocol

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

	// Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
	AllowedSourceAddressPrefixes []*string
}

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

	// REQUIRED; The start time of the request in UTC
	StartTimeUTC *time.Time

	// REQUIRED
	VirtualMachines []*JitNetworkAccessRequestVirtualMachine

	// The justification for making the initiate request
	Justification *string
}

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

	// REQUIRED
	Number *int32

	// REQUIRED; The status of the port
	Status *Status

	// REQUIRED; A description of why the status has its value
	StatusReason *StatusReason

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

	// Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
	AllowedSourceAddressPrefixes []*string

	// The port which is mapped to this port's number in the Azure Firewall, if applicable
	MappedPort *int32
}

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

	// REQUIRED; The ports that were opened for the virtual machine
	Ports []*JitNetworkAccessRequestPort
}

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
}

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 Label added in v0.11.0

type Label struct {
	// The ID of the label
	ID *string

	// The display name of the label
	Name *string

	// Labels are ordered by sensitivity level. The higher the order of the label, the more sensitive it is.
	Order *float32
}

Label - Microsoft information protection sensitivity label

func (Label) MarshalJSON added in v0.11.0

func (l Label) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Label.

func (*Label) UnmarshalJSON added in v0.11.0

func (l *Label) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Label.

type ListCustomAlertRule

type ListCustomAlertRule struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLocationsClient().Get(ctx, "centralus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AscLocation = armsecurity.AscLocation{
	// 	Name: to.Ptr("centralus"),
	// 	Type: to.Ptr("Microsoft.Security/locations"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus"),
	// 	Properties: map[string]any{
	// 		"homeRegionName": "centralus",
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewLocationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AscLocationList = armsecurity.AscLocationList{
		// 	Value: []*armsecurity.AscLocation{
		// 		{
		// 			Name: to.Ptr("centralus"),
		// 			Type: to.Ptr("Microsoft.Security/locations"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/centralus"),
		// 			Properties: map[string]any{
		// 				"homeRegionName": "centralus",
		// 			},
		// 	}},
		// }
	}
}
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 {
	// The ASC location of the subscription is in the "name" field
	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.NewListPager method.

type LocationsClientListResponse added in v0.3.0

type LocationsClientListResponse struct {
	// List of locations where ASC saves your data
	AscLocationList
}

LocationsClientListResponse contains the response from method LocationsClient.NewListPager.

type LogAnalyticsIdentifier

type LogAnalyticsIdentifier struct {
	// REQUIRED; There can be multiple identifiers of different type per alert, this field specify the identifier type.
	Type *ResourceIdentifierType

	// READ-ONLY; (optional) The LogAnalytics agent id reporting the event that this alert is based on.
	AgentID *string

	// READ-ONLY; The LogAnalytics workspace id that stores this alert.
	WorkspaceID *string

	// READ-ONLY; The azure resource group for the LogAnalytics workspace storing this alert
	WorkspaceResourceGroup *string

	// READ-ONLY; The azure subscription id for the LogAnalytics workspace storing this alert.
	WorkspaceSubscriptionID *string
}

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 MalwareScanningProperties added in v0.13.0

type MalwareScanningProperties struct {
	// Properties of On Upload malware scanning.
	OnUpload *OnUploadProperties

	// Optional. Resource id of an Event Grid Topic to send scan results to.
	ScanResultsEventGridTopicResourceID *string

	// READ-ONLY; Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
	OperationStatus *OperationStatus
}

MalwareScanningProperties - Properties of Malware Scanning.

func (MalwareScanningProperties) MarshalJSON added in v0.13.0

func (m MalwareScanningProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MalwareScanningProperties.

func (*MalwareScanningProperties) UnmarshalJSON added in v0.13.0

func (m *MalwareScanningProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MalwareScanningProperties.

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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
}

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

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

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMdeOnboardingsClient().Get(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MdeOnboardingData = armsecurity.MdeOnboardingData{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/mdeOnboardings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/mdeOnboardings/default"),
	// 	Properties: &armsecurity.MdeOnboardingDataProperties{
	// 		OnboardingPackageLinux: []byte("QGVjaG8gb2ZmCgplY2hvLiA+TlVMIDI+JjEKZWNobyBTdGFydGluZyBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIG9uYm9hcmRpbmcgcHJvY2Vzcy4uLiA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCgpzZXQgZXJyb3JDb2RlPTAKc2V0IGxhc3RFcnJvcj0wCnNldCAidHJvdWJsZXNob290SW5mbz1Gb3IgbW9yZSBpbmZvcm1hdGlvbiwgdmlzaXQ6IGh0dHBzOi8vZ28ubWljcm9zb2Z0LmNvbS9md2xpbmsvcC8/bGlua2lkPTgyMjgwNyIKc2V0ICJlcnJvckRlc2NyaXB0aW9uPSIKCmVjaG8gVGVzdGluZyBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXMgPk5VTCAyPiYxCgpuZXQgc2Vzc2lvbiA+TlVMIDI+JjEKaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKCUBlY2hvIFNjcmlwdCBpcyBydW5uaW5nIHdpdGggaW5zdWZmaWNpZW50IHByaXZpbGVnZXMuIFBsZWFzZSBydW4gd2l0aCBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXM+ICVUTVAlXHNlbnNlVG1wLnR4dAoJc2V0IGVycm9yQ29kZT02NQogc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKCUdPVE8gRVJST1IKKQoKZWNobyBTY3JpcHQgaXMgcnVubmluZyB3aXRoIHN1ZmZpY2llbnQgcHJpdmlsZWdlcyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCmVjaG8gUGVyZm9ybWluZyBvbmJvYXJkaW5nIG9wZXJhdGlvbnMgPk5VTCAyPiYxCmVjaG8uID5OVUwgMj4mMQoKSUYgWyVQUk9DRVNTT1JfQVJDSElURVc2NDMyJV0gRVFVIFtdICgKICBzZXQgcG93ZXJzaGVsbFBhdGg9JXdpbmRpciVcU3lzdGVtMzJcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopIEVMU0UgKAogIHNldCBwb3dlcnNoZWxsUGF0aD0ld2luZGlyJVxTeXNOYXRpdmVcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopCgpzZXQgc2RiaW49MDEwMDA0ODA0NDAwMDAwMDU0MDAwMDAwMDAwMDAwMDAxNDAwMDAwMDAyMDAzMDAwMDIwMDAwMDAwMDAwMTQwMEZGMEYxMjAwMDEwMTAwMDAwMDAwMDAwNTEyMDAwMDAwMDAwMDE0MDBFMTA0MTIwMDAxMDEwMDAwMDAwMDAwMDUwQjAwMDAwMDAxMDIwMDAwMDAwMDAwMDUyMDAwMDAwMDIwMDIwMDAwMDEwMjAwMDAwMDAwMDAwNTIwMDAwMDAwMjAwMjAwMDAgPk5VTCAyPiYxCnJlZyBhZGQgSEtMTVxTWVNURU1cQ3VycmVudENvbnRyb2xTZXRcQ29udHJvbFxXTUlcU2VjdXJpdHkgL3YgMTRmODEzOGUtM2I2MS01ODBiLTU0NGItMjYwOTM3OGFlNDYwIC90IFJFR19CSU5BUlkgL2QgJXNkYmluJSAvZiA+TlVMIDI+JjEKcmVnIGFkZCBIS0xNXFNZU1RFTVxDdXJyZW50Q29udHJvbFNldFxDb250cm9sXFdNSVxTZWN1cml0eSAvdiBjYjJmZjcyZC1kNGU0LTU4NWQtMzNmOS1mM2EzOTVjNDBiZTcgL3QgUkVHX0JJTkFSWSAvZCAlc2RiaW4lIC9mID5OVUwgMj4mMQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93c1xEYXRhQ29sbGVjdGlvbiIgL3YgRGlzYWJsZUVudGVycHJpc2VBdXRoUHJveHkgL3QgUkVHX0RXT1JEIC9mIC9kIDEgPk5VTCAyPiYxCgolcG93ZXJzaGVsbFBhdGglIC1FeGVjdXRpb25Qb2xpY3kgQnlwYXNzIC1Ob1Byb2ZpbGUgLUNvbW1hbmQgIkFkZC1UeXBlICcgdXNpbmcgU3lzdGVtOyB1c2luZyBTeXN0ZW0uSU87IHVzaW5nIFN5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlczsgdXNpbmcgTWljcm9zb2Z0LldpbjMyLlNhZmVIYW5kbGVzOyB1c2luZyBTeXN0ZW0uQ29tcG9uZW50TW9kZWw7IHB1YmxpYyBzdGF0aWMgY2xhc3MgRWxhbXsgW0RsbEltcG9ydChcIktlcm5lbDMyXCIsIENoYXJTZXQ9Q2hhclNldC5BdXRvLCBTZXRMYXN0RXJyb3I9dHJ1ZSldIHB1YmxpYyBzdGF0aWMgZXh0ZXJuIGJvb2wgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8oU2FmZUZpbGVIYW5kbGUgaGFuZGxlKTsgcHVibGljIHN0YXRpYyB2b2lkIEluc3RhbGxXZEJvb3Qoc3RyaW5nIHBhdGgpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQWJvdXQgdG8gY2FsbCBjcmVhdGUgZmlsZSBvbiB7MH1cIiwgcGF0aCk7IHZhciBzdHJlYW0gPSBGaWxlLk9wZW4ocGF0aCwgRmlsZU1vZGUuT3BlbiwgRmlsZUFjY2Vzcy5SZWFkLCBGaWxlU2hhcmUuUmVhZCk7IHZhciBoYW5kbGUgPSBzdHJlYW0uU2FmZUZpbGVIYW5kbGU7IENvbnNvbGUuT3V0LldyaXRlTGluZShcIkFib3V0IHRvIGNhbGwgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8gb24gaGFuZGxlIHswfVwiLCBoYW5kbGUuRGFuZ2Vyb3VzR2V0SGFuZGxlKCkpOyBpZiAoIUluc3RhbGxFTEFNQ2VydGlmaWNhdGVJbmZvKGhhbmRsZSkpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQ2FsbCBmYWlsZWQuXCIpOyB0aHJvdyBuZXcgV2luMzJFeGNlcHRpb24oTWFyc2hhbC5HZXRMYXN0V2luMzJFcnJvcigpKTsgfSBDb25zb2xlLk91dC5Xcml0ZUxpbmUoXCJDYWxsIHN1Y2Nlc3NmdWwuXCIpOyB9IH0gJzsgJGRyaXZlclBhdGggPSAkZW52OlN5c3RlbVJvb3QgKyAnXFN5c3RlbTMyXERyaXZlcnNcV2RCb290LnN5cyc7IFtFbGFtXTo6SW5zdGFsbFdkQm9vdCgkZHJpdmVyUGF0aCkgIiA+TlVMIDI+JjEKClJFRyBxdWVyeSAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgNjk2QzFGQTEtNDAzMC00RkE0LTg3MTMtRkFGOUIyRUE3QzBBIC9yZWc6NjQgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgKCAgCiAgICBSRUcgZGVsZXRlICJIS0xNXFNPRlRXQVJFXFBvbGljaWVzXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIiAvdiA2OTZDMUZBMS00MDMwLTRGQTQtODcxMy1GQUY5QjJFQTdDMEEgL2YgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQogICAgaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKICAgICAgICBzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIGRlbGV0ZSBwcmV2aW91cyBvZmZib2FyZGluZyBpbmZvcm1hdGlvbiBmcm9tIHJlZ2lzdHJ5LiIKICAgICAgICBzZXQgZXJyb3JDb2RlPTUKICAgICAgICBzZXQgbGFzdEVycm9yPSVFUlJPUkxFVkVMJQogICAgICAgIEdPVE8gRVJST1IKICAgICkKKQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgT25ib2FyZGluZ0luZm8gL3QgUkVHX1NaIC9mIC9kICJ7XCJib2R5XCI6XCJ7XFxcInByZXZpb3VzT3JnSWRzXFxcIjpbXSxcXFwib3JnSWRcXFwiOlxcXCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMGRlYWRcXFwiLFxcXCJnZW9Mb2NhdGlvblVybFxcXCI6XFxcImh0dHBzOi8vc2V2aWxsZWNsb3VkZ2F0ZXdheS1zdGcubWljcm9zb2Z0LmNvbS9cXFwiLFxcXCJkYXRhY2VudGVyXFxcIjpcXFwiRWFzdFVzMlxcXCIsXFxcInZvcnRleEdlb0xvY2F0aW9uXFxcIjpcXFwiU2FuZGJveFxcXCIsXFxcInZlcnNpb25cXFwiOlxcXCIxLjNcXFwifVwiLFwic2lnXCI6XCJKc0dGR2o3UCtIL1cvUEExcW9LTml3RXROZkU4YkhGblhxeks1SDhsQ09wc0RnRGNWTWpoT3BmQTZJTTJ3RFZadk5kWGhvZ0dEQ1FDWjNYdFJCbHRkcGFWc3pZNGtINVpHVkdnRUQxVE80ZCtCTjk2VDFSa3pOZ2NjZ2ZCWDNNQUw1bllUWXdiMGlUQUtFMGIxb3BmQmZrMzJQN3Q3b3A5dkhPeXZNMW5qdlZybVdWWWVSNk4rZFFrLzM4UDNUY2V3b2FkRmFUb3pidjBZK3dZOHgrbFcxeWN6bk1KMitQWTlxRHpabXoybE1rd0FlaDJwRTI4VW5MT0lhNjg0Y3U5RitHUlAveGhhR3dQWmpoc1JCSW51cHV5U1E2Y09YdE9kSERCQlRaZzVKSEhHMDBkNk9tUk5ONmxBelJWeFJURUVmaFFUVnN0U1poKzNMSjJTMGhmZGc9PVwiLFwic2hhMjU2c2lnXCI6XCJsVGI4ZittdkFveDRCckxPS0lqejFnTTNrRHREbG9wL21uNmZodmVEWjMvblVqb1lhNk81V2p4R0x2Z3lqZ0RtdThETkdPNUtqWWlxTVZ6Z0QzcHdqOVYwOXVOeUdYNGJUaXN0d1BnQTFLbGMrMUFLcmtWQTRGWGlQTHlST2tXdlhLM2dydFFJWU9nYjdSRlh6dzhnQlB5YlV0Z0FWbmNaMVFpdTAzblFLdGh5MFU3aXBlZUxaVE9oYVlhN001cTJxUTcya1BaSTZWUWlqSE42NVg3UTEvcm5rdUlSUkFmUEErZElIeE4wN0tpSlY2MGZsbDFZUUtOUlpSYUhKeGQ1UDd0RmdaaytEZE5mNVNXcHVaSTZTZE9MdExDN3VnbmdnK0krU2pUeUtvcVFKZElkWGRRaE5JK3I3WEM1L1M0ZlhnRVNtWmZKTUYxL0JtVlVFZUJDZlE9PVwiLFwiY2VydFwiOlwiTUlJRjVqQ0NBODZnQXdJQkFnSVRNd0FBQVkwdmh1VTl6R2x5b1FBQUFBQUJqVEFOQmdrcWhraUc5dzBCQVFzRkFEQitNUXN3Q1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1YyRnphR2x1WjNSdmJqRVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVNnd0pnWURWUVFERXg5TmFXTnliM052Wm5RZ1UyVmpkWEpsSUZObGNuWmxjaUJEUVNBeU1ERXhNQjRYRFRJd01EZ3dOakl3TlRBMU9Gb1hEVEl4TURnd05qSXdOVEExT0Zvd2dZb3hDekFKQmdOVkJBWVRBbFZUTVFzd0NRWURWUVFJRXdKWFFURVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVI0d0hBWURWUVFMRXhWTmFXTnliM052Wm5RZ1EyOXljRzl5WVhScGIyNHhIREFhQmdOVkJBTVRFMU5sZG1sc2JHVXVWMmx1Wkc5M2N5NWpiMjB3Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRRENmcWtCcmV1Um1qdm90bDFFdURQWVplaVc1dUVERmV6MXhsYmh6cjVaa1BjSUJYT3RIMVZWRjRaUmVrdTFpK3ZMbTNON2xkVGl4c2RSZW0yU09iVkFGb1dDbjZ2cEYwL1ZYcWpmUTJHbyt2dk9UU1Q0Si9pQWxocXhialVVbkRyWFpXYUMvS2xtU0lYMjlHUng5bG1pT0IrWVBhRzlOTEE1U3F3emNad2hjTThzS3F0VDhHaWQ3Q3JFNGs1WldES0gyL1dPVTVsQ01iZTY2MWtrbWxKZDB2TlBDTXpyMUgzVmNmRG1qVVo4Q25WQzBFODlhVVA3VHhhME1uS0FzVFArQkpCNXJMenhkVlJRbGRNbmhHVXNXRU0ydUNOWXFOdWc4QWYrTGp3RytySXZrSVR3NVlDMUZDZy9qVHBvdHJnSFhmSGRqaURqa0F3ZWY1TlVkTmx0QWdNQkFBR2pnZ0ZPTUlJQlNqQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdIUVlEVlIwT0JCWUVGT0U1NVFoeno5bEhuWTl2aDVTWmtyMTdjbEtzTUI0R0ExVWRFUVFYTUJXQ0UxTmxkbWxzYkdVdVYybHVaRzkzY3k1amIyMHdId1lEVlIwakJCZ3dGb0FVTmxhSlpVbkxXNXN2UEt4Q0ZsQk5rYmt6MTVFd1V3WURWUjBmQkV3d1NqQklvRWFnUklaQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFXOXdjeTlqY213dlRXbGpVMlZqVTJWeVEwRXlNREV4WHpJd01URXRNVEF0TVRndVkzSnNNR0FHQ0NzR0FRVUZCd0VCQkZRd1VqQlFCZ2dyQmdFRkJRY3dBb1pFYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVc5d2N5OWpaWEowY3k5TmFXTlRaV05UWlhKRFFUSXdNVEZmTWpBeE1TMHhNQzB4T0M1amNuUXdEQVlEVlIwVEFRSC9CQUl3QURBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQWdFQVp3ZGxhWjg4U3BURFdUUjc5NWRHV2N0dUxUWmc2UDBqYmh4Q0dhOXBnb3AzSXZ1Qi9QYzJXT2Ruc1ZCYUpUZG5WN3NvcFZHa3V4Vjc1eWk2Q0NQM2sxNG0xQ1FhNk01cmNodmJuVEY0TFdjWld4U1g4Z0hjRWhObFdYV3hxU3FKMzNnSHVGNEc5SCs3VDM3UlNMb2Jqb1MyeVRhc21SRWtCNTI4b1gwWVU0cVpjeVdyK0xEMVovQk10dEhMUlZUZUtHdnpMaVpCNmhqWURybW9qUUxKZXZwSEdoTVdOTU9oR2RLd2pOS0crZGhVRHV6dTdsVXgwZzdhaUR3c1l4NzFTaU9ucDJWOSt5UEhET2R5OXlBRUNPb0N3bUprbW5qLzlDMmVNMDFDQjFZMUxTWHNiQUJtQVd3Si9iczhRNnhTWlJtSnkyRXJSQ3VTakl0MUQydzRTUFVMRFNNVTdIaDk3TWJpQVJDV25TMVRRMGg5azZFWVVmbW1ZaFNHQ0p3MXFlekFqZ2FmTngyYWcrRDhzRFFkQzRjVHhUSTk5aGthUm1DakFmeW1qcVdscUx5V0pCUmdvaXdTd21MVDFUbzRJNUVjZHFoQ1FNdEpoRVVRR2dpenk2ZUE2RlhtNHhmeExua08xSkNKSGJUejlqL2c4OW5zZ0hVN2V4SDVnZHhZQ0FDMGJkUlZLN1YrVlBDcExnLy9SemtlNm9mc1Y3WkxyQUpvN0EyQTZka0dVL09XeGhpVjJiY0VlUEpmSWsrVjM3UHp3c25yZ1JFV2RpM1pic3dBOU5aTTVzZGVSMFlFRm11bit0b2JCRGMzMlRidlVyTUpTb2tjcG9XNnRZczlkR0tUcE1GV01EZ09UeEZjSHljbHZrMjRVQVV2dXk2WVcvSVN2VlY4a3BRPVwiLFwiY2hhaW5cIjpbXCJNSUlHMkRDQ0JNQ2dBd0lCQWdJS1lUKzNHQUFBQUFBQUJEQU5CZ2txaGtpRzl3MEJBUXNGQURDQmlERUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV5TURBR0ExVUVBeE1wVFdsamNtOXpiMlowSUZKdmIzUWdRMlZ5ZEdsbWFXTmhkR1VnUVhWMGFHOXlhWFI1SURJd01URXdIaGNOTVRFeE1ERTRNakkxTlRFNVdoY05Nall4TURFNE1qTXdOVEU1V2pCK01Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LVjJGemFHbHVaM1J2YmpFUU1BNEdBMVVFQnhNSFVtVmtiVzl1WkRFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU2d3SmdZRFZRUURFeDlOYVdOeWIzTnZablFnVTJWamRYSmxJRk5sY25abGNpQkRRU0F5TURFeE1JSUNJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBZzhBTUlJQ0NnS0NBZ0VBMEF2QXBLZ1pnZUkyNWVLcTVmT3lGVmgxdnJUbFNmSGdoUG03RFdUdmhjR0JWYmp6NS9GdFFGVTl6b3RxMFlTVDlYVjhXNlRVZEJES012TWowNjd1ejU0RVdNTFpSOHZSZkFCQlNIRWJBV2NYR0svRy9uTURmdVR2UTV6dkFYRXFINEVtUTNlWVZGZHpuVlVyOEo2T2ZRWU9yQnRVOHliMytDTUlJb3VlQmgwM09QMXkwc3JsWThHYVduMnliYk5TcVc3cHJyWDhpemI1bnZyMkhGZ2JsMWFsRWVXM1V0dTc2ZkJVdjdUL0xHeTRYU2JPb0FyWDM1UHRmOTJzOFN4ekd0a1pOMVc2M1NKNGpxSFVtd240QnlJeGNiQ1VydUN3NXlaRVY1Q0JseFhPWWV4bDRrdnhoVklXTXZpMWVLcCt6VTNzZ3lHa3FKdSttbW9FNEtNY3pWWVliUDFyTDBJKzRqZnljcXZRZUhOeWU5N3NBRmpsSVRDakNEcVo3NS9EOTNvV2xtVzF3NEd2OURsd1NhLzJxZlpxQURqNXRBZ1o0Qm8xcFZaMklsOXE4bW11UHExWVJrMjRWUGFKUVVRZWNyRzhFaWRUMHNIL3NzMVFtQjYxOUx1MndvSTUyYXdiOGpzbmhHcXd4aVlMMXpvUTU3UGJmTk5XckZOTUMvbzdNVGQwMkZrcitRQjVHUVo3L1J3ZFF0UkJEUzhGRHRWclNTUC96ODM0ZW9MUDJqd3QzK2pZRWdRWXVoNklkN2lZSHhBSHU4Z0ZmZ3NKdjJ2ZDQwNWJzUG5IaEtZN3lreWZXMklwOThlaXFKV0ljQ3psd1Q4OFVpTlBRSnJETVlXREw3OHA4UjFRanlHV0I4N3Y4b0RDUkgyYll1OHZ3M2VKcTBWTlV6NENlZE1DQXdFQUFhT0NBVXN3Z2dGSE1CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1CMEdBMVVkRGdRV0JCUTJWb2xsU2N0Ym15ODhyRUlXVUUyUnVUUFhrVEFaQmdrckJnRUVBWUkzRkFJRURCNEtBRk1BZFFCaUFFTUFRVEFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZkJnTlZIU01FR0RBV2dCUnlMVG9DTVpCRHVSUUZUdUhxcDhjeDBTT0pOREJhQmdOVkhSOEVVekJSTUUrZ1RhQkxoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwTDJOeWJDOXdjbTlrZFdOMGN5OU5hV05TYjI5RFpYSkJkWFF5TURFeFh6SXdNVEZmTUROZk1qSXVZM0pzTUY0R0NDc0dBUVVGQndFQkJGSXdVREJPQmdnckJnRUZCUWN3QW9aQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFTOWpaWEowY3k5TmFXTlNiMjlEWlhKQmRYUXlNREV4WHpJd01URmZNRE5mTWpJdVkzSjBNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUNBUUJCeUdIQjlWdWVQcEV4OGJER3Z3a0J0SjIya0hUWENkdW1MZzJmeU9kMk5FYXZCMkNKVElHelBOWDBFalYxd25PbDlVMkVqTXVrWGErL2t2WVhDRmRDbFhKbEJYWjVyZTdSdXJndVZLTlJCNnhvNnlFTTR5V0J3czBxOHNQL3o4SzlTUmlheC9DRXhma1V2R3VWNVpidnMwTFNVOVZLb0JMRXJoSjJVd2xXRHAzMzA2WkppRkR5aWl5WElLSytUbmp2QldXM1M2RVdpTjR4eHdoQ0pIeWtlNTZkdkdBQVhtS1g0NVA4cC81YmV5WGY1Rk4vUzc3bVB2RGJBWGxDSEc2RmJIMjJSREQ3cFRlU2s3S2w3aUN0UDFQVnlmUW9hMWZCK0IxcXQxWXF0aWVCSEtZdG4rZjAwREdEbDZncXRxeStHMEgxNUlsZlZ2dmFXdE5lZlZXVUVINVRWL1JLUFVBcXlMMW5uNFRoRU83OTJtc1Zna244UmgzL1JRWjBuRUlVN2NVNTA3UE5DNE1ua0VOUmt2SkVncTV1bWhVWHNobjZ4MFZzbUFGN3Z6ZXBzSWlra3J3NE9PQWQ1SHlYbUJvdVgrODRaYmMxTDcxL1R5SDZ4SXpTYndiNVNUWHEzeUFQSmFycVlLc3NIMHVKL0xmNlhGU1FTejZpS0U5czVGSmx3ZjJRSElXQ2lHN3BwbFhkSVNoNVJiQVU1UXJNNWwvRXU5dGhOR21mckNZNDk4RXBRUWdWTGt5Zzkva01QdDVmcXdnSkxZT3NyRFNEWXZUSlNVS0pKYlZ1c2tmRnN6bWdzU0FiTExHT0JHK2xNRWtjMEVicFFGdjByVzY2MjRKS2h4SktnQWxOMjk5MnVRVmJHK0M3SUhCZkFDWEgwdzc2RnExN0lwNXhDQT09XCIsXCJNSUlGN1RDQ0E5V2dBd0lCQWdJUVA0dkl0Znlmc3BaRHRXbldiRUxoUkRBTkJna3Foa2lHOXcwQkFRc0ZBRENCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd0hoY05NVEV3TXpJeU1qSXdOVEk0V2hjTk16WXdNekl5TWpJeE16QTBXakNCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd2dnSWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUNEd0F3Z2dJS0FvSUNBUUN5Z0VHcU5UaE5FM0l5YUNKTnVMTHgvOVZTdkd6SDlkSktqRGJ1MGNKY2ZveUtycThUS0cvQWMrTTZ6dEFscUZvNmJlK291Rm1yRXlOb3pRd3BoOUZ2Z0Z5UFJIOWRrQUZTV0t4UnhWOHFoOXpjMkFvZHdRTzVlN0JXNktQZVpHSENudmp6Zkxuc0RiVlUva3kyWlUrSThKeEltUXhDQ3dsOE1Wa1hlUVo0S0kySk9rd0RKYjV4YWx3TDU0UmdwSmtpNDlLdmhLU24rOUdZN1F5cDNwU0o0UTZnM01ET21UM3FDRks3Vm5ua0g0UzZIcmkweEVsY1R6RkxoOTNkQldjbW1ZRGdjUkdqdUtWQjRxUlR1ZmN5S1lNTUU3ODJYZ1N6UzBOSEwydmlrUjdUbUUvZFFnZkk2QjBTL0ptcGF6NlNmc2pXYVRyOFpMMjJDWjNLL1F3TG9wdDNZRXNEbEtRd2FSTFdRaTNCUVV6SzNLcjlqMXVEUnByWi9MSFI0N1BKZjBoNnpTVHdRWTljZE5Dc3NCQWdCa20zeHkwaHlGZmowSWJ6QTJqNzBNNXh3WW1aU21RQmJQM3NNSkhQUVR5U3grVzZoaDFoaE1kZmd6bGlyclNTTDBmekMvaFY2NkFmV2RDN2RKc2UwSGJtOHVrRzF4RG8rbVRlYWNZMWxvZ0M4RWE0UHllWmI4dHhpU2sxOTBnV0FqV1AxWGw4VFFMUFgrdUtnMDlGY1lqNXFRMU9jdW5DbkFmUFNSdE9CQTVqVVl4ZTJBREJWU3kyeHVEQ1pVN0pORG4xbkxQRWZ1aGhiaE5mRmNSZjJYN3RIYzd1Uk96TExvYXg3RGoyY08yclhCUEIyUThOeDRDeVZlMDA5NnliNU1QYTUwYzhwcldQTWQvRlM2L3I4UUlEQVFBQm8xRXdUekFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVWNpMDZBakdRUTdrVUJVN2g2cWZITWRFamlUUXdFQVlKS3dZQkJBR0NOeFVCQkFNQ0FRQXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnSUJBSDl5encrM3hSWGJtOEJKeWlaYi9wNFQ1dFB3MHR1WFgvSkxQMDJ6cmhtdTdkZVhvS3p2cVRxandrR3c1YmlSbmhPQkpBUG1DZjAvVjBBNUlTUlcwUkF2UzBDcE5vWkx0Rk5YbXZ2eGZvbVBFZjRZYkZHcTZPMEpsYlhsY2NtaDZZZDFwaFYveVg0M1ZGNTBrOFhEWjh3TlQydW9Gd3h0Q0pKK2k5MkJxaTF3SWNNOUJoUzd2eVJlcDRUWFB3OGhJcjFMQUFiYmx4ellYdFRGQzF5SGJsQ2s2TU00cFB2TExNV1NacHVGWHN0NmJKTjhnQ2xZVzFlMVFHbTZDSG1tWkdJVm5ZZVdSYlZtSXlBRGl4eHpvTk9pZVRQZ1VGbUcyeS9sQWlYcWN5cWZBQlRJTnNlU08rbE9BT3pZVmdtNU0wa1MwbFFMQWF1c1I3YVJLWDFNdEhXQVVnSG95b0wybjh5c25JOFg2aThtc0t0eXJBditubEVleDBOVlowOVJzMWZXdHV6dVVyYzY2VTdoMTRHSXZFK09kYnRMcVBBMXFpYlVaMmRKc25CTU81UGNIZDk0a0laeXNqaWswZHlTVGNsWTZ5c1NYTlE3cm94cnNJUGxBVC80Q1RMMmt6VTBJcS9kTncxM0NZQXJ6VWdBOFl5WkdVY0ZBZW5SdjlGTzBPWW9RemVacEFwS0NObWFjWFBTcXMweEUyTjJvVGR2a2pnZWZSSThaakxueTIzaC9GS0ozY3JXWmdXYWxtRytvaWpISEtPbk5sQThPcVRmU203bWh6dk82L0RnZ1RlZEV6eFNqcjI1SFRUR0hkVUthajJZS1hDTWlTclJxNElRU0IvYzlPK2x4YnRWR2poamhFNjNiSzJWVk94bEloQkpGN2pBSHNjUHJGUkhcIl19IiA+ICVUTVAlXHNlbnNlVG1wLnR4dCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCiAgIHNldCAiZXJyb3JEZXNjcmlwdGlvbj1VbmFibGUgdG8gd3JpdGUgb25ib2FyZGluZyBpbmZvcm1hdGlvbiB0byByZWdpc3RyeS4iCiAgIHNldCBlcnJvckNvZGU9MTAKICAgc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKICAgR09UTyBFUlJPUgopCgplY2hvIFN0YXJ0aW5nIHRoZSBzZXJ2aWNlLCBpZiBub3QgYWxyZWFkeSBydW5uaW5nID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgR09UTyBSVU5OSU5HCgpuZXQgc3RhcnQgc2Vuc2UgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAogICBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBoYXMgbm90IHN0YXJ0ZWQgeWV0ID5OVUwgMj4mMQogICBHT1RPIFdBSVRfRk9SX1RIRV9TRVJWSUNFX1RPX1NUQVJUCikKZ290byBTVUNDRUVERUQKCjpSVU5OSU5HCnNldCAicnVubmluZ091dHB1dD1UaGUgV2luZG93cyBEZWZlbmRlciBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiBTZXJ2aWNlIGlzIGFscmVhZHkgcnVubmluZyEiCmVjaG8gJXJ1bm5pbmdPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMTAgL2QgIiVydW5uaW5nT3V0cHV0JSIgPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpFUlJPUgpTZXQgL1AgZXJyb3JNc2c9PCVUTVAlXHNlbnNlVG1wLnR4dApzZXQgImVycm9yT3V0cHV0PVtFcnJvciBJZDogJWVycm9yQ29kZSUsIEVycm9yIExldmVsOiAlbGFzdEVycm9yJV0gJWVycm9yRGVzY3JpcHRpb24lIEVycm9yIG1lc3NhZ2U6ICVlcnJvck1zZyUiCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuRXJyb3IsIEtleXdvcmRzID0gKEV2ZW50S2V5d29yZHMpMHgwMDAwMjAwMDAwMDAwMDAwLCBUYWdzID0gKEV2ZW50VGFncykweDAyMDAwMDB9OyBwdWJsaWMgdm9pZCBXcml0ZU9uYm9hcmRpbmdNZXNzYWdlKHN0cmluZyBtZXNzYWdlKXtlcy5Xcml0ZShcIk9uYm9hcmRpbmdTY3JpcHRcIiwgVGVsZW1ldHJ5Q3JpdGljYWxPcHRpb24sIG5ldyBPbmJvYXJkaW5nIHtNZXNzYWdlID0gbWVzc2FnZX0pO30gcHJpdmF0ZSBzdGF0aWMgcmVhZG9ubHkgc3RyaW5nW10gdGVsZW1ldHJ5VHJhaXRzID0geyBcIkVUV19HUk9VUFwiLCBcIns1RUNCMEJBQy1COTMwLTQ3RjUtQThBNC1FODI1MzUyOUVEQjd9XCIgfTsgcHJpdmF0ZSBFdmVudFNvdXJjZSBlcyA9IG5ldyBFdmVudFNvdXJjZShcIk1pY3Jvc29mdC5XaW5kb3dzLlNlbnNlLkNsaWVudC5NYW5hZ2VtZW50XCIsRXZlbnRTb3VyY2VTZXR0aW5ncy5FdHdTZWxmRGVzY3JpYmluZ0V2ZW50Rm9ybWF0LHRlbGVtZXRyeVRyYWl0cyk7fX0nOyAkbG9nZ2VyID0gTmV3LU9iamVjdCAtVHlwZU5hbWUgU2Vuc2UuVHJhY2U7ICRsb2dnZXIuV3JpdGVPbmJvYXJkaW5nTWVzc2FnZSgnJWVycm9yT3V0cHV0JScpIiA+TlVMIDI+JjEKZWNobyAlZXJyb3JPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBFcnJvciAvaWQgJWVycm9yQ29kZSUgL2QgIiVlcnJvck91dHB1dCUiID5OVUwgMj4mMQpHT1RPIENMRUFOVVAKCjpTVUNDRUVERUQKZWNobyBGaW5pc2hlZCBwZXJmb3JtaW5nIG9uYm9hcmRpbmcgb3BlcmF0aW9ucyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpXQUlUX0ZPUl9USEVfU0VSVklDRV9UT19TVEFSVAplY2hvIFdhaXRpbmcgZm9yIHRoZSBzZXJ2aWNlIHRvIHN0YXJ0ID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9SVU5OSU5HX1dBSVQKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAoJSUYgJWNvdW50ZXIlIEVRVSA0ICgKCQlzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIHN0YXJ0IFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZS4iCgkJc2V0IGVycm9yQ29kZT0xNQoJCXNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfUlVOTklOR19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfU1RBVFVTX1dBSVQKUkVHIHF1ZXJ5ICJIS0xNXFNPRlRXQVJFXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uXFN0YXR1cyIgL3YgT25ib2FyZGluZ1N0YXRlIC9yZWc6NjQgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT0zNQogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1NUQVRVU19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfV0FJVApSRUcgcXVlcnkgIkhLTE1cU09GVFdBUkVcTWljcm9zb2Z0XFdpbmRvd3MgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb25cU3RhdHVzIiAvdiBPbmJvYXJkaW5nU3RhdGUgL3JlZzo2NCB8IGZpbmQgL2kgIjB4MSIgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT00MAogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1dBSVQKKQoKc2V0ICJzdWNjZXNzT3V0cHV0PVN1Y2Nlc3NmdWxseSBvbmJvYXJkZWQgbWFjaGluZSB0byBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIgplY2hvICVzdWNjZXNzT3V0cHV0JSA+TlVMIDI+JjEKZWNoby4KZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMjAgL2QgIiVzdWNjZXNzT3V0cHV0JSIgPk5VTCAyPiYxCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuSW5mb3JtYXRpb25hbCwgS2V5d29yZHMgPSAoRXZlbnRLZXl3b3JkcykweDAwMDAyMDAwMDAwMDAwMDAsIFRhZ3MgPSAoRXZlbnRUYWdzKTB4MDIwMDAwMH07IHB1YmxpYyB2b2lkIFdyaXRlT25ib2FyZGluZ01lc3NhZ2Uoc3RyaW5nIG1lc3NhZ2Upe2VzLldyaXRlKFwiT25ib2FyZGluZ1NjcmlwdFwiLCBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiwgbmV3IE9uYm9hcmRpbmcge01lc3NhZ2UgPSBtZXNzYWdlfSk7fSBwcml2YXRlIHN0YXRpYyByZWFkb25seSBzdHJpbmdbXSB0ZWxlbWV0cnlUcmFpdHMgPSB7IFwiRVRXX0dST1VQXCIsIFwiezVFQ0IwQkFDLUI5MzAtNDdGNS1BOEE0LUU4MjUzNTI5RURCN31cIiB9OyBwcml2YXRlIEV2ZW50U291cmNlIGVzID0gbmV3IEV2ZW50U291cmNlKFwiTWljcm9zb2Z0LldpbmRvd3MuU2Vuc2UuQ2xpZW50Lk1hbmFnZW1lbnRcIixFdmVudFNvdXJjZVNldHRpbmdzLkV0d1NlbGZEZXNjcmliaW5nRXZlbnRGb3JtYXQsdGVsZW1ldHJ5VHJhaXRzKTt9fSc7ICRsb2dnZXIgPSBOZXctT2JqZWN0IC1UeXBlTmFtZSBTZW5zZS5UcmFjZTsgJGxvZ2dlci5Xcml0ZU9uYm9hcmRpbmdNZXNzYWdlKCclc3VjY2Vzc091dHB1dCUnKSIgPk5VTCAyPiYxCiIlUFJPR1JBTUZJTEVTJVxXaW5kb3dzIERlZmVuZGVyXE1wQ21kUnVuLmV4ZSIgLVJlbG9hZEVuZ2luZSA+TlVMIDI+JjEKCkdPVE8gQ0xFQU5VUAoKOkNMRUFOVVAKaWYgZXhpc3QgJVRNUCVcc2Vuc2VUbXAudHh0IGRlbCAlVE1QJVxzZW5zZVRtcC50eHQKRVhJVCAvQiAlZXJyb3JDb2RlJQo=="),
	// 		OnboardingPackageWindows: []byte("QGVjaG8gb2ZmCgplY2hvLiA+TlVMIDI+JjEKZWNobyBTdGFydGluZyBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIG9uYm9hcmRpbmcgcHJvY2Vzcy4uLiA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCgpzZXQgZXJyb3JDb2RlPTAKc2V0IGxhc3RFcnJvcj0wCnNldCAidHJvdWJsZXNob290SW5mbz1Gb3IgbW9yZSBpbmZvcm1hdGlvbiwgdmlzaXQ6IGh0dHBzOi8vZ28ubWljcm9zb2Z0LmNvbS9md2xpbmsvcC8/bGlua2lkPTgyMjgwNyIKc2V0ICJlcnJvckRlc2NyaXB0aW9uPSIKCmVjaG8gVGVzdGluZyBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXMgPk5VTCAyPiYxCgpuZXQgc2Vzc2lvbiA+TlVMIDI+JjEKaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKCUBlY2hvIFNjcmlwdCBpcyBydW5uaW5nIHdpdGggaW5zdWZmaWNpZW50IHByaXZpbGVnZXMuIFBsZWFzZSBydW4gd2l0aCBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXM+ICVUTVAlXHNlbnNlVG1wLnR4dAoJc2V0IGVycm9yQ29kZT02NQogc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKCUdPVE8gRVJST1IKKQoKZWNobyBTY3JpcHQgaXMgcnVubmluZyB3aXRoIHN1ZmZpY2llbnQgcHJpdmlsZWdlcyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCmVjaG8gUGVyZm9ybWluZyBvbmJvYXJkaW5nIG9wZXJhdGlvbnMgPk5VTCAyPiYxCmVjaG8uID5OVUwgMj4mMQoKSUYgWyVQUk9DRVNTT1JfQVJDSElURVc2NDMyJV0gRVFVIFtdICgKICBzZXQgcG93ZXJzaGVsbFBhdGg9JXdpbmRpciVcU3lzdGVtMzJcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopIEVMU0UgKAogIHNldCBwb3dlcnNoZWxsUGF0aD0ld2luZGlyJVxTeXNOYXRpdmVcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopCgpzZXQgc2RiaW49MDEwMDA0ODA0NDAwMDAwMDU0MDAwMDAwMDAwMDAwMDAxNDAwMDAwMDAyMDAzMDAwMDIwMDAwMDAwMDAwMTQwMEZGMEYxMjAwMDEwMTAwMDAwMDAwMDAwNTEyMDAwMDAwMDAwMDE0MDBFMTA0MTIwMDAxMDEwMDAwMDAwMDAwMDUwQjAwMDAwMDAxMDIwMDAwMDAwMDAwMDUyMDAwMDAwMDIwMDIwMDAwMDEwMjAwMDAwMDAwMDAwNTIwMDAwMDAwMjAwMjAwMDAgPk5VTCAyPiYxCnJlZyBhZGQgSEtMTVxTWVNURU1cQ3VycmVudENvbnRyb2xTZXRcQ29udHJvbFxXTUlcU2VjdXJpdHkgL3YgMTRmODEzOGUtM2I2MS01ODBiLTU0NGItMjYwOTM3OGFlNDYwIC90IFJFR19CSU5BUlkgL2QgJXNkYmluJSAvZiA+TlVMIDI+JjEKcmVnIGFkZCBIS0xNXFNZU1RFTVxDdXJyZW50Q29udHJvbFNldFxDb250cm9sXFdNSVxTZWN1cml0eSAvdiBjYjJmZjcyZC1kNGU0LTU4NWQtMzNmOS1mM2EzOTVjNDBiZTcgL3QgUkVHX0JJTkFSWSAvZCAlc2RiaW4lIC9mID5OVUwgMj4mMQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93c1xEYXRhQ29sbGVjdGlvbiIgL3YgRGlzYWJsZUVudGVycHJpc2VBdXRoUHJveHkgL3QgUkVHX0RXT1JEIC9mIC9kIDEgPk5VTCAyPiYxCgolcG93ZXJzaGVsbFBhdGglIC1FeGVjdXRpb25Qb2xpY3kgQnlwYXNzIC1Ob1Byb2ZpbGUgLUNvbW1hbmQgIkFkZC1UeXBlICcgdXNpbmcgU3lzdGVtOyB1c2luZyBTeXN0ZW0uSU87IHVzaW5nIFN5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlczsgdXNpbmcgTWljcm9zb2Z0LldpbjMyLlNhZmVIYW5kbGVzOyB1c2luZyBTeXN0ZW0uQ29tcG9uZW50TW9kZWw7IHB1YmxpYyBzdGF0aWMgY2xhc3MgRWxhbXsgW0RsbEltcG9ydChcIktlcm5lbDMyXCIsIENoYXJTZXQ9Q2hhclNldC5BdXRvLCBTZXRMYXN0RXJyb3I9dHJ1ZSldIHB1YmxpYyBzdGF0aWMgZXh0ZXJuIGJvb2wgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8oU2FmZUZpbGVIYW5kbGUgaGFuZGxlKTsgcHVibGljIHN0YXRpYyB2b2lkIEluc3RhbGxXZEJvb3Qoc3RyaW5nIHBhdGgpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQWJvdXQgdG8gY2FsbCBjcmVhdGUgZmlsZSBvbiB7MH1cIiwgcGF0aCk7IHZhciBzdHJlYW0gPSBGaWxlLk9wZW4ocGF0aCwgRmlsZU1vZGUuT3BlbiwgRmlsZUFjY2Vzcy5SZWFkLCBGaWxlU2hhcmUuUmVhZCk7IHZhciBoYW5kbGUgPSBzdHJlYW0uU2FmZUZpbGVIYW5kbGU7IENvbnNvbGUuT3V0LldyaXRlTGluZShcIkFib3V0IHRvIGNhbGwgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8gb24gaGFuZGxlIHswfVwiLCBoYW5kbGUuRGFuZ2Vyb3VzR2V0SGFuZGxlKCkpOyBpZiAoIUluc3RhbGxFTEFNQ2VydGlmaWNhdGVJbmZvKGhhbmRsZSkpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQ2FsbCBmYWlsZWQuXCIpOyB0aHJvdyBuZXcgV2luMzJFeGNlcHRpb24oTWFyc2hhbC5HZXRMYXN0V2luMzJFcnJvcigpKTsgfSBDb25zb2xlLk91dC5Xcml0ZUxpbmUoXCJDYWxsIHN1Y2Nlc3NmdWwuXCIpOyB9IH0gJzsgJGRyaXZlclBhdGggPSAkZW52OlN5c3RlbVJvb3QgKyAnXFN5c3RlbTMyXERyaXZlcnNcV2RCb290LnN5cyc7IFtFbGFtXTo6SW5zdGFsbFdkQm9vdCgkZHJpdmVyUGF0aCkgIiA+TlVMIDI+JjEKClJFRyBxdWVyeSAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgNjk2QzFGQTEtNDAzMC00RkE0LTg3MTMtRkFGOUIyRUE3QzBBIC9yZWc6NjQgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgKCAgCiAgICBSRUcgZGVsZXRlICJIS0xNXFNPRlRXQVJFXFBvbGljaWVzXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIiAvdiA2OTZDMUZBMS00MDMwLTRGQTQtODcxMy1GQUY5QjJFQTdDMEEgL2YgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQogICAgaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKICAgICAgICBzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIGRlbGV0ZSBwcmV2aW91cyBvZmZib2FyZGluZyBpbmZvcm1hdGlvbiBmcm9tIHJlZ2lzdHJ5LiIKICAgICAgICBzZXQgZXJyb3JDb2RlPTUKICAgICAgICBzZXQgbGFzdEVycm9yPSVFUlJPUkxFVkVMJQogICAgICAgIEdPVE8gRVJST1IKICAgICkKKQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgT25ib2FyZGluZ0luZm8gL3QgUkVHX1NaIC9mIC9kICJ7XCJib2R5XCI6XCJ7XFxcInByZXZpb3VzT3JnSWRzXFxcIjpbXSxcXFwib3JnSWRcXFwiOlxcXCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMGRlYWRcXFwiLFxcXCJnZW9Mb2NhdGlvblVybFxcXCI6XFxcImh0dHBzOi8vc2V2aWxsZWNsb3VkZ2F0ZXdheS1zdGcubWljcm9zb2Z0LmNvbS9cXFwiLFxcXCJkYXRhY2VudGVyXFxcIjpcXFwiRWFzdFVzMlxcXCIsXFxcInZvcnRleEdlb0xvY2F0aW9uXFxcIjpcXFwiU2FuZGJveFxcXCIsXFxcInZlcnNpb25cXFwiOlxcXCIxLjNcXFwifVwiLFwic2lnXCI6XCJKc0dGR2o3UCtIL1cvUEExcW9LTml3RXROZkU4YkhGblhxeks1SDhsQ09wc0RnRGNWTWpoT3BmQTZJTTJ3RFZadk5kWGhvZ0dEQ1FDWjNYdFJCbHRkcGFWc3pZNGtINVpHVkdnRUQxVE80ZCtCTjk2VDFSa3pOZ2NjZ2ZCWDNNQUw1bllUWXdiMGlUQUtFMGIxb3BmQmZrMzJQN3Q3b3A5dkhPeXZNMW5qdlZybVdWWWVSNk4rZFFrLzM4UDNUY2V3b2FkRmFUb3pidjBZK3dZOHgrbFcxeWN6bk1KMitQWTlxRHpabXoybE1rd0FlaDJwRTI4VW5MT0lhNjg0Y3U5RitHUlAveGhhR3dQWmpoc1JCSW51cHV5U1E2Y09YdE9kSERCQlRaZzVKSEhHMDBkNk9tUk5ONmxBelJWeFJURUVmaFFUVnN0U1poKzNMSjJTMGhmZGc9PVwiLFwic2hhMjU2c2lnXCI6XCJsVGI4ZittdkFveDRCckxPS0lqejFnTTNrRHREbG9wL21uNmZodmVEWjMvblVqb1lhNk81V2p4R0x2Z3lqZ0RtdThETkdPNUtqWWlxTVZ6Z0QzcHdqOVYwOXVOeUdYNGJUaXN0d1BnQTFLbGMrMUFLcmtWQTRGWGlQTHlST2tXdlhLM2dydFFJWU9nYjdSRlh6dzhnQlB5YlV0Z0FWbmNaMVFpdTAzblFLdGh5MFU3aXBlZUxaVE9oYVlhN001cTJxUTcya1BaSTZWUWlqSE42NVg3UTEvcm5rdUlSUkFmUEErZElIeE4wN0tpSlY2MGZsbDFZUUtOUlpSYUhKeGQ1UDd0RmdaaytEZE5mNVNXcHVaSTZTZE9MdExDN3VnbmdnK0krU2pUeUtvcVFKZElkWGRRaE5JK3I3WEM1L1M0ZlhnRVNtWmZKTUYxL0JtVlVFZUJDZlE9PVwiLFwiY2VydFwiOlwiTUlJRjVqQ0NBODZnQXdJQkFnSVRNd0FBQVkwdmh1VTl6R2x5b1FBQUFBQUJqVEFOQmdrcWhraUc5dzBCQVFzRkFEQitNUXN3Q1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1YyRnphR2x1WjNSdmJqRVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVNnd0pnWURWUVFERXg5TmFXTnliM052Wm5RZ1UyVmpkWEpsSUZObGNuWmxjaUJEUVNBeU1ERXhNQjRYRFRJd01EZ3dOakl3TlRBMU9Gb1hEVEl4TURnd05qSXdOVEExT0Zvd2dZb3hDekFKQmdOVkJBWVRBbFZUTVFzd0NRWURWUVFJRXdKWFFURVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVI0d0hBWURWUVFMRXhWTmFXTnliM052Wm5RZ1EyOXljRzl5WVhScGIyNHhIREFhQmdOVkJBTVRFMU5sZG1sc2JHVXVWMmx1Wkc5M2N5NWpiMjB3Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRRENmcWtCcmV1Um1qdm90bDFFdURQWVplaVc1dUVERmV6MXhsYmh6cjVaa1BjSUJYT3RIMVZWRjRaUmVrdTFpK3ZMbTNON2xkVGl4c2RSZW0yU09iVkFGb1dDbjZ2cEYwL1ZYcWpmUTJHbyt2dk9UU1Q0Si9pQWxocXhialVVbkRyWFpXYUMvS2xtU0lYMjlHUng5bG1pT0IrWVBhRzlOTEE1U3F3emNad2hjTThzS3F0VDhHaWQ3Q3JFNGs1WldES0gyL1dPVTVsQ01iZTY2MWtrbWxKZDB2TlBDTXpyMUgzVmNmRG1qVVo4Q25WQzBFODlhVVA3VHhhME1uS0FzVFArQkpCNXJMenhkVlJRbGRNbmhHVXNXRU0ydUNOWXFOdWc4QWYrTGp3RytySXZrSVR3NVlDMUZDZy9qVHBvdHJnSFhmSGRqaURqa0F3ZWY1TlVkTmx0QWdNQkFBR2pnZ0ZPTUlJQlNqQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdIUVlEVlIwT0JCWUVGT0U1NVFoeno5bEhuWTl2aDVTWmtyMTdjbEtzTUI0R0ExVWRFUVFYTUJXQ0UxTmxkbWxzYkdVdVYybHVaRzkzY3k1amIyMHdId1lEVlIwakJCZ3dGb0FVTmxhSlpVbkxXNXN2UEt4Q0ZsQk5rYmt6MTVFd1V3WURWUjBmQkV3d1NqQklvRWFnUklaQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFXOXdjeTlqY213dlRXbGpVMlZqVTJWeVEwRXlNREV4WHpJd01URXRNVEF0TVRndVkzSnNNR0FHQ0NzR0FRVUZCd0VCQkZRd1VqQlFCZ2dyQmdFRkJRY3dBb1pFYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVc5d2N5OWpaWEowY3k5TmFXTlRaV05UWlhKRFFUSXdNVEZmTWpBeE1TMHhNQzB4T0M1amNuUXdEQVlEVlIwVEFRSC9CQUl3QURBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQWdFQVp3ZGxhWjg4U3BURFdUUjc5NWRHV2N0dUxUWmc2UDBqYmh4Q0dhOXBnb3AzSXZ1Qi9QYzJXT2Ruc1ZCYUpUZG5WN3NvcFZHa3V4Vjc1eWk2Q0NQM2sxNG0xQ1FhNk01cmNodmJuVEY0TFdjWld4U1g4Z0hjRWhObFdYV3hxU3FKMzNnSHVGNEc5SCs3VDM3UlNMb2Jqb1MyeVRhc21SRWtCNTI4b1gwWVU0cVpjeVdyK0xEMVovQk10dEhMUlZUZUtHdnpMaVpCNmhqWURybW9qUUxKZXZwSEdoTVdOTU9oR2RLd2pOS0crZGhVRHV6dTdsVXgwZzdhaUR3c1l4NzFTaU9ucDJWOSt5UEhET2R5OXlBRUNPb0N3bUprbW5qLzlDMmVNMDFDQjFZMUxTWHNiQUJtQVd3Si9iczhRNnhTWlJtSnkyRXJSQ3VTakl0MUQydzRTUFVMRFNNVTdIaDk3TWJpQVJDV25TMVRRMGg5azZFWVVmbW1ZaFNHQ0p3MXFlekFqZ2FmTngyYWcrRDhzRFFkQzRjVHhUSTk5aGthUm1DakFmeW1qcVdscUx5V0pCUmdvaXdTd21MVDFUbzRJNUVjZHFoQ1FNdEpoRVVRR2dpenk2ZUE2RlhtNHhmeExua08xSkNKSGJUejlqL2c4OW5zZ0hVN2V4SDVnZHhZQ0FDMGJkUlZLN1YrVlBDcExnLy9SemtlNm9mc1Y3WkxyQUpvN0EyQTZka0dVL09XeGhpVjJiY0VlUEpmSWsrVjM3UHp3c25yZ1JFV2RpM1pic3dBOU5aTTVzZGVSMFlFRm11bit0b2JCRGMzMlRidlVyTUpTb2tjcG9XNnRZczlkR0tUcE1GV01EZ09UeEZjSHljbHZrMjRVQVV2dXk2WVcvSVN2VlY4a3BRPVwiLFwiY2hhaW5cIjpbXCJNSUlHMkRDQ0JNQ2dBd0lCQWdJS1lUKzNHQUFBQUFBQUJEQU5CZ2txaGtpRzl3MEJBUXNGQURDQmlERUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV5TURBR0ExVUVBeE1wVFdsamNtOXpiMlowSUZKdmIzUWdRMlZ5ZEdsbWFXTmhkR1VnUVhWMGFHOXlhWFI1SURJd01URXdIaGNOTVRFeE1ERTRNakkxTlRFNVdoY05Nall4TURFNE1qTXdOVEU1V2pCK01Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LVjJGemFHbHVaM1J2YmpFUU1BNEdBMVVFQnhNSFVtVmtiVzl1WkRFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU2d3SmdZRFZRUURFeDlOYVdOeWIzTnZablFnVTJWamRYSmxJRk5sY25abGNpQkRRU0F5TURFeE1JSUNJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBZzhBTUlJQ0NnS0NBZ0VBMEF2QXBLZ1pnZUkyNWVLcTVmT3lGVmgxdnJUbFNmSGdoUG03RFdUdmhjR0JWYmp6NS9GdFFGVTl6b3RxMFlTVDlYVjhXNlRVZEJES012TWowNjd1ejU0RVdNTFpSOHZSZkFCQlNIRWJBV2NYR0svRy9uTURmdVR2UTV6dkFYRXFINEVtUTNlWVZGZHpuVlVyOEo2T2ZRWU9yQnRVOHliMytDTUlJb3VlQmgwM09QMXkwc3JsWThHYVduMnliYk5TcVc3cHJyWDhpemI1bnZyMkhGZ2JsMWFsRWVXM1V0dTc2ZkJVdjdUL0xHeTRYU2JPb0FyWDM1UHRmOTJzOFN4ekd0a1pOMVc2M1NKNGpxSFVtd240QnlJeGNiQ1VydUN3NXlaRVY1Q0JseFhPWWV4bDRrdnhoVklXTXZpMWVLcCt6VTNzZ3lHa3FKdSttbW9FNEtNY3pWWVliUDFyTDBJKzRqZnljcXZRZUhOeWU5N3NBRmpsSVRDakNEcVo3NS9EOTNvV2xtVzF3NEd2OURsd1NhLzJxZlpxQURqNXRBZ1o0Qm8xcFZaMklsOXE4bW11UHExWVJrMjRWUGFKUVVRZWNyRzhFaWRUMHNIL3NzMVFtQjYxOUx1MndvSTUyYXdiOGpzbmhHcXd4aVlMMXpvUTU3UGJmTk5XckZOTUMvbzdNVGQwMkZrcitRQjVHUVo3L1J3ZFF0UkJEUzhGRHRWclNTUC96ODM0ZW9MUDJqd3QzK2pZRWdRWXVoNklkN2lZSHhBSHU4Z0ZmZ3NKdjJ2ZDQwNWJzUG5IaEtZN3lreWZXMklwOThlaXFKV0ljQ3psd1Q4OFVpTlBRSnJETVlXREw3OHA4UjFRanlHV0I4N3Y4b0RDUkgyYll1OHZ3M2VKcTBWTlV6NENlZE1DQXdFQUFhT0NBVXN3Z2dGSE1CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1CMEdBMVVkRGdRV0JCUTJWb2xsU2N0Ym15ODhyRUlXVUUyUnVUUFhrVEFaQmdrckJnRUVBWUkzRkFJRURCNEtBRk1BZFFCaUFFTUFRVEFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZkJnTlZIU01FR0RBV2dCUnlMVG9DTVpCRHVSUUZUdUhxcDhjeDBTT0pOREJhQmdOVkhSOEVVekJSTUUrZ1RhQkxoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwTDJOeWJDOXdjbTlrZFdOMGN5OU5hV05TYjI5RFpYSkJkWFF5TURFeFh6SXdNVEZmTUROZk1qSXVZM0pzTUY0R0NDc0dBUVVGQndFQkJGSXdVREJPQmdnckJnRUZCUWN3QW9aQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFTOWpaWEowY3k5TmFXTlNiMjlEWlhKQmRYUXlNREV4WHpJd01URmZNRE5mTWpJdVkzSjBNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUNBUUJCeUdIQjlWdWVQcEV4OGJER3Z3a0J0SjIya0hUWENkdW1MZzJmeU9kMk5FYXZCMkNKVElHelBOWDBFalYxd25PbDlVMkVqTXVrWGErL2t2WVhDRmRDbFhKbEJYWjVyZTdSdXJndVZLTlJCNnhvNnlFTTR5V0J3czBxOHNQL3o4SzlTUmlheC9DRXhma1V2R3VWNVpidnMwTFNVOVZLb0JMRXJoSjJVd2xXRHAzMzA2WkppRkR5aWl5WElLSytUbmp2QldXM1M2RVdpTjR4eHdoQ0pIeWtlNTZkdkdBQVhtS1g0NVA4cC81YmV5WGY1Rk4vUzc3bVB2RGJBWGxDSEc2RmJIMjJSREQ3cFRlU2s3S2w3aUN0UDFQVnlmUW9hMWZCK0IxcXQxWXF0aWVCSEtZdG4rZjAwREdEbDZncXRxeStHMEgxNUlsZlZ2dmFXdE5lZlZXVUVINVRWL1JLUFVBcXlMMW5uNFRoRU83OTJtc1Zna244UmgzL1JRWjBuRUlVN2NVNTA3UE5DNE1ua0VOUmt2SkVncTV1bWhVWHNobjZ4MFZzbUFGN3Z6ZXBzSWlra3J3NE9PQWQ1SHlYbUJvdVgrODRaYmMxTDcxL1R5SDZ4SXpTYndiNVNUWHEzeUFQSmFycVlLc3NIMHVKL0xmNlhGU1FTejZpS0U5czVGSmx3ZjJRSElXQ2lHN3BwbFhkSVNoNVJiQVU1UXJNNWwvRXU5dGhOR21mckNZNDk4RXBRUWdWTGt5Zzkva01QdDVmcXdnSkxZT3NyRFNEWXZUSlNVS0pKYlZ1c2tmRnN6bWdzU0FiTExHT0JHK2xNRWtjMEVicFFGdjByVzY2MjRKS2h4SktnQWxOMjk5MnVRVmJHK0M3SUhCZkFDWEgwdzc2RnExN0lwNXhDQT09XCIsXCJNSUlGN1RDQ0E5V2dBd0lCQWdJUVA0dkl0Znlmc3BaRHRXbldiRUxoUkRBTkJna3Foa2lHOXcwQkFRc0ZBRENCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd0hoY05NVEV3TXpJeU1qSXdOVEk0V2hjTk16WXdNekl5TWpJeE16QTBXakNCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd2dnSWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUNEd0F3Z2dJS0FvSUNBUUN5Z0VHcU5UaE5FM0l5YUNKTnVMTHgvOVZTdkd6SDlkSktqRGJ1MGNKY2ZveUtycThUS0cvQWMrTTZ6dEFscUZvNmJlK291Rm1yRXlOb3pRd3BoOUZ2Z0Z5UFJIOWRrQUZTV0t4UnhWOHFoOXpjMkFvZHdRTzVlN0JXNktQZVpHSENudmp6Zkxuc0RiVlUva3kyWlUrSThKeEltUXhDQ3dsOE1Wa1hlUVo0S0kySk9rd0RKYjV4YWx3TDU0UmdwSmtpNDlLdmhLU24rOUdZN1F5cDNwU0o0UTZnM01ET21UM3FDRks3Vm5ua0g0UzZIcmkweEVsY1R6RkxoOTNkQldjbW1ZRGdjUkdqdUtWQjRxUlR1ZmN5S1lNTUU3ODJYZ1N6UzBOSEwydmlrUjdUbUUvZFFnZkk2QjBTL0ptcGF6NlNmc2pXYVRyOFpMMjJDWjNLL1F3TG9wdDNZRXNEbEtRd2FSTFdRaTNCUVV6SzNLcjlqMXVEUnByWi9MSFI0N1BKZjBoNnpTVHdRWTljZE5Dc3NCQWdCa20zeHkwaHlGZmowSWJ6QTJqNzBNNXh3WW1aU21RQmJQM3NNSkhQUVR5U3grVzZoaDFoaE1kZmd6bGlyclNTTDBmekMvaFY2NkFmV2RDN2RKc2UwSGJtOHVrRzF4RG8rbVRlYWNZMWxvZ0M4RWE0UHllWmI4dHhpU2sxOTBnV0FqV1AxWGw4VFFMUFgrdUtnMDlGY1lqNXFRMU9jdW5DbkFmUFNSdE9CQTVqVVl4ZTJBREJWU3kyeHVEQ1pVN0pORG4xbkxQRWZ1aGhiaE5mRmNSZjJYN3RIYzd1Uk96TExvYXg3RGoyY08yclhCUEIyUThOeDRDeVZlMDA5NnliNU1QYTUwYzhwcldQTWQvRlM2L3I4UUlEQVFBQm8xRXdUekFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVWNpMDZBakdRUTdrVUJVN2g2cWZITWRFamlUUXdFQVlKS3dZQkJBR0NOeFVCQkFNQ0FRQXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnSUJBSDl5encrM3hSWGJtOEJKeWlaYi9wNFQ1dFB3MHR1WFgvSkxQMDJ6cmhtdTdkZVhvS3p2cVRxandrR3c1YmlSbmhPQkpBUG1DZjAvVjBBNUlTUlcwUkF2UzBDcE5vWkx0Rk5YbXZ2eGZvbVBFZjRZYkZHcTZPMEpsYlhsY2NtaDZZZDFwaFYveVg0M1ZGNTBrOFhEWjh3TlQydW9Gd3h0Q0pKK2k5MkJxaTF3SWNNOUJoUzd2eVJlcDRUWFB3OGhJcjFMQUFiYmx4ellYdFRGQzF5SGJsQ2s2TU00cFB2TExNV1NacHVGWHN0NmJKTjhnQ2xZVzFlMVFHbTZDSG1tWkdJVm5ZZVdSYlZtSXlBRGl4eHpvTk9pZVRQZ1VGbUcyeS9sQWlYcWN5cWZBQlRJTnNlU08rbE9BT3pZVmdtNU0wa1MwbFFMQWF1c1I3YVJLWDFNdEhXQVVnSG95b0wybjh5c25JOFg2aThtc0t0eXJBditubEVleDBOVlowOVJzMWZXdHV6dVVyYzY2VTdoMTRHSXZFK09kYnRMcVBBMXFpYlVaMmRKc25CTU81UGNIZDk0a0laeXNqaWswZHlTVGNsWTZ5c1NYTlE3cm94cnNJUGxBVC80Q1RMMmt6VTBJcS9kTncxM0NZQXJ6VWdBOFl5WkdVY0ZBZW5SdjlGTzBPWW9RemVacEFwS0NObWFjWFBTcXMweEUyTjJvVGR2a2pnZWZSSThaakxueTIzaC9GS0ozY3JXWmdXYWxtRytvaWpISEtPbk5sQThPcVRmU203bWh6dk82L0RnZ1RlZEV6eFNqcjI1SFRUR0hkVUthajJZS1hDTWlTclJxNElRU0IvYzlPK2x4YnRWR2poamhFNjNiSzJWVk94bEloQkpGN2pBSHNjUHJGUkhcIl19IiA+ICVUTVAlXHNlbnNlVG1wLnR4dCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCiAgIHNldCAiZXJyb3JEZXNjcmlwdGlvbj1VbmFibGUgdG8gd3JpdGUgb25ib2FyZGluZyBpbmZvcm1hdGlvbiB0byByZWdpc3RyeS4iCiAgIHNldCBlcnJvckNvZGU9MTAKICAgc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKICAgR09UTyBFUlJPUgopCgplY2hvIFN0YXJ0aW5nIHRoZSBzZXJ2aWNlLCBpZiBub3QgYWxyZWFkeSBydW5uaW5nID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgR09UTyBSVU5OSU5HCgpuZXQgc3RhcnQgc2Vuc2UgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAogICBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBoYXMgbm90IHN0YXJ0ZWQgeWV0ID5OVUwgMj4mMQogICBHT1RPIFdBSVRfRk9SX1RIRV9TRVJWSUNFX1RPX1NUQVJUCikKZ290byBTVUNDRUVERUQKCjpSVU5OSU5HCnNldCAicnVubmluZ091dHB1dD1UaGUgV2luZG93cyBEZWZlbmRlciBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiBTZXJ2aWNlIGlzIGFscmVhZHkgcnVubmluZyEiCmVjaG8gJXJ1bm5pbmdPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMTAgL2QgIiVydW5uaW5nT3V0cHV0JSIgPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpFUlJPUgpTZXQgL1AgZXJyb3JNc2c9PCVUTVAlXHNlbnNlVG1wLnR4dApzZXQgImVycm9yT3V0cHV0PVtFcnJvciBJZDogJWVycm9yQ29kZSUsIEVycm9yIExldmVsOiAlbGFzdEVycm9yJV0gJWVycm9yRGVzY3JpcHRpb24lIEVycm9yIG1lc3NhZ2U6ICVlcnJvck1zZyUiCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuRXJyb3IsIEtleXdvcmRzID0gKEV2ZW50S2V5d29yZHMpMHgwMDAwMjAwMDAwMDAwMDAwLCBUYWdzID0gKEV2ZW50VGFncykweDAyMDAwMDB9OyBwdWJsaWMgdm9pZCBXcml0ZU9uYm9hcmRpbmdNZXNzYWdlKHN0cmluZyBtZXNzYWdlKXtlcy5Xcml0ZShcIk9uYm9hcmRpbmdTY3JpcHRcIiwgVGVsZW1ldHJ5Q3JpdGljYWxPcHRpb24sIG5ldyBPbmJvYXJkaW5nIHtNZXNzYWdlID0gbWVzc2FnZX0pO30gcHJpdmF0ZSBzdGF0aWMgcmVhZG9ubHkgc3RyaW5nW10gdGVsZW1ldHJ5VHJhaXRzID0geyBcIkVUV19HUk9VUFwiLCBcIns1RUNCMEJBQy1COTMwLTQ3RjUtQThBNC1FODI1MzUyOUVEQjd9XCIgfTsgcHJpdmF0ZSBFdmVudFNvdXJjZSBlcyA9IG5ldyBFdmVudFNvdXJjZShcIk1pY3Jvc29mdC5XaW5kb3dzLlNlbnNlLkNsaWVudC5NYW5hZ2VtZW50XCIsRXZlbnRTb3VyY2VTZXR0aW5ncy5FdHdTZWxmRGVzY3JpYmluZ0V2ZW50Rm9ybWF0LHRlbGVtZXRyeVRyYWl0cyk7fX0nOyAkbG9nZ2VyID0gTmV3LU9iamVjdCAtVHlwZU5hbWUgU2Vuc2UuVHJhY2U7ICRsb2dnZXIuV3JpdGVPbmJvYXJkaW5nTWVzc2FnZSgnJWVycm9yT3V0cHV0JScpIiA+TlVMIDI+JjEKZWNobyAlZXJyb3JPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBFcnJvciAvaWQgJWVycm9yQ29kZSUgL2QgIiVlcnJvck91dHB1dCUiID5OVUwgMj4mMQpHT1RPIENMRUFOVVAKCjpTVUNDRUVERUQKZWNobyBGaW5pc2hlZCBwZXJmb3JtaW5nIG9uYm9hcmRpbmcgb3BlcmF0aW9ucyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpXQUlUX0ZPUl9USEVfU0VSVklDRV9UT19TVEFSVAplY2hvIFdhaXRpbmcgZm9yIHRoZSBzZXJ2aWNlIHRvIHN0YXJ0ID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9SVU5OSU5HX1dBSVQKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAoJSUYgJWNvdW50ZXIlIEVRVSA0ICgKCQlzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIHN0YXJ0IFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZS4iCgkJc2V0IGVycm9yQ29kZT0xNQoJCXNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfUlVOTklOR19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfU1RBVFVTX1dBSVQKUkVHIHF1ZXJ5ICJIS0xNXFNPRlRXQVJFXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uXFN0YXR1cyIgL3YgT25ib2FyZGluZ1N0YXRlIC9yZWc6NjQgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT0zNQogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1NUQVRVU19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfV0FJVApSRUcgcXVlcnkgIkhLTE1cU09GVFdBUkVcTWljcm9zb2Z0XFdpbmRvd3MgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb25cU3RhdHVzIiAvdiBPbmJvYXJkaW5nU3RhdGUgL3JlZzo2NCB8IGZpbmQgL2kgIjB4MSIgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT00MAogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1dBSVQKKQoKc2V0ICJzdWNjZXNzT3V0cHV0PVN1Y2Nlc3NmdWxseSBvbmJvYXJkZWQgbWFjaGluZSB0byBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIgplY2hvICVzdWNjZXNzT3V0cHV0JSA+TlVMIDI+JjEKZWNoby4KZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMjAgL2QgIiVzdWNjZXNzT3V0cHV0JSIgPk5VTCAyPiYxCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuSW5mb3JtYXRpb25hbCwgS2V5d29yZHMgPSAoRXZlbnRLZXl3b3JkcykweDAwMDAyMDAwMDAwMDAwMDAsIFRhZ3MgPSAoRXZlbnRUYWdzKTB4MDIwMDAwMH07IHB1YmxpYyB2b2lkIFdyaXRlT25ib2FyZGluZ01lc3NhZ2Uoc3RyaW5nIG1lc3NhZ2Upe2VzLldyaXRlKFwiT25ib2FyZGluZ1NjcmlwdFwiLCBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiwgbmV3IE9uYm9hcmRpbmcge01lc3NhZ2UgPSBtZXNzYWdlfSk7fSBwcml2YXRlIHN0YXRpYyByZWFkb25seSBzdHJpbmdbXSB0ZWxlbWV0cnlUcmFpdHMgPSB7IFwiRVRXX0dST1VQXCIsIFwiezVFQ0IwQkFDLUI5MzAtNDdGNS1BOEE0LUU4MjUzNTI5RURCN31cIiB9OyBwcml2YXRlIEV2ZW50U291cmNlIGVzID0gbmV3IEV2ZW50U291cmNlKFwiTWljcm9zb2Z0LldpbmRvd3MuU2Vuc2UuQ2xpZW50Lk1hbmFnZW1lbnRcIixFdmVudFNvdXJjZVNldHRpbmdzLkV0d1NlbGZEZXNjcmliaW5nRXZlbnRGb3JtYXQsdGVsZW1ldHJ5VHJhaXRzKTt9fSc7ICRsb2dnZXIgPSBOZXctT2JqZWN0IC1UeXBlTmFtZSBTZW5zZS5UcmFjZTsgJGxvZ2dlci5Xcml0ZU9uYm9hcmRpbmdNZXNzYWdlKCclc3VjY2Vzc091dHB1dCUnKSIgPk5VTCAyPiYxCiIlUFJPR1JBTUZJTEVTJVxXaW5kb3dzIERlZmVuZGVyXE1wQ21kUnVuLmV4ZSIgLVJlbG9hZEVuZ2luZSA+TlVMIDI+JjEKCkdPVE8gQ0xFQU5VUAoKOkNMRUFOVVAKaWYgZXhpc3QgJVRNUCVcc2Vuc2VUbXAudHh0IGRlbCAlVE1QJVxzZW5zZVRtcC50eHQKRVhJVCAvQiAlZXJyb3JDb2RlJQo=="),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMdeOnboardingsClient().List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MdeOnboardingDataList = armsecurity.MdeOnboardingDataList{
	// 	Value: []*armsecurity.MdeOnboardingData{
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.Security/mdeOnboarding"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/mdeOnboarding/default"),
	// 			Properties: &armsecurity.MdeOnboardingDataProperties{
	// 				OnboardingPackageLinux: []byte("QGVjaG8gb2ZmCgplY2hvLiA+TlVMIDI+JjEKZWNobyBTdGFydGluZyBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIG9uYm9hcmRpbmcgcHJvY2Vzcy4uLiA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCgpzZXQgZXJyb3JDb2RlPTAKc2V0IGxhc3RFcnJvcj0wCnNldCAidHJvdWJsZXNob290SW5mbz1Gb3IgbW9yZSBpbmZvcm1hdGlvbiwgdmlzaXQ6IGh0dHBzOi8vZ28ubWljcm9zb2Z0LmNvbS9md2xpbmsvcC8/bGlua2lkPTgyMjgwNyIKc2V0ICJlcnJvckRlc2NyaXB0aW9uPSIKCmVjaG8gVGVzdGluZyBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXMgPk5VTCAyPiYxCgpuZXQgc2Vzc2lvbiA+TlVMIDI+JjEKaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKCUBlY2hvIFNjcmlwdCBpcyBydW5uaW5nIHdpdGggaW5zdWZmaWNpZW50IHByaXZpbGVnZXMuIFBsZWFzZSBydW4gd2l0aCBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXM+ICVUTVAlXHNlbnNlVG1wLnR4dAoJc2V0IGVycm9yQ29kZT02NQogc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKCUdPVE8gRVJST1IKKQoKZWNobyBTY3JpcHQgaXMgcnVubmluZyB3aXRoIHN1ZmZpY2llbnQgcHJpdmlsZWdlcyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCmVjaG8gUGVyZm9ybWluZyBvbmJvYXJkaW5nIG9wZXJhdGlvbnMgPk5VTCAyPiYxCmVjaG8uID5OVUwgMj4mMQoKSUYgWyVQUk9DRVNTT1JfQVJDSElURVc2NDMyJV0gRVFVIFtdICgKICBzZXQgcG93ZXJzaGVsbFBhdGg9JXdpbmRpciVcU3lzdGVtMzJcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopIEVMU0UgKAogIHNldCBwb3dlcnNoZWxsUGF0aD0ld2luZGlyJVxTeXNOYXRpdmVcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopCgpzZXQgc2RiaW49MDEwMDA0ODA0NDAwMDAwMDU0MDAwMDAwMDAwMDAwMDAxNDAwMDAwMDAyMDAzMDAwMDIwMDAwMDAwMDAwMTQwMEZGMEYxMjAwMDEwMTAwMDAwMDAwMDAwNTEyMDAwMDAwMDAwMDE0MDBFMTA0MTIwMDAxMDEwMDAwMDAwMDAwMDUwQjAwMDAwMDAxMDIwMDAwMDAwMDAwMDUyMDAwMDAwMDIwMDIwMDAwMDEwMjAwMDAwMDAwMDAwNTIwMDAwMDAwMjAwMjAwMDAgPk5VTCAyPiYxCnJlZyBhZGQgSEtMTVxTWVNURU1cQ3VycmVudENvbnRyb2xTZXRcQ29udHJvbFxXTUlcU2VjdXJpdHkgL3YgMTRmODEzOGUtM2I2MS01ODBiLTU0NGItMjYwOTM3OGFlNDYwIC90IFJFR19CSU5BUlkgL2QgJXNkYmluJSAvZiA+TlVMIDI+JjEKcmVnIGFkZCBIS0xNXFNZU1RFTVxDdXJyZW50Q29udHJvbFNldFxDb250cm9sXFdNSVxTZWN1cml0eSAvdiBjYjJmZjcyZC1kNGU0LTU4NWQtMzNmOS1mM2EzOTVjNDBiZTcgL3QgUkVHX0JJTkFSWSAvZCAlc2RiaW4lIC9mID5OVUwgMj4mMQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93c1xEYXRhQ29sbGVjdGlvbiIgL3YgRGlzYWJsZUVudGVycHJpc2VBdXRoUHJveHkgL3QgUkVHX0RXT1JEIC9mIC9kIDEgPk5VTCAyPiYxCgolcG93ZXJzaGVsbFBhdGglIC1FeGVjdXRpb25Qb2xpY3kgQnlwYXNzIC1Ob1Byb2ZpbGUgLUNvbW1hbmQgIkFkZC1UeXBlICcgdXNpbmcgU3lzdGVtOyB1c2luZyBTeXN0ZW0uSU87IHVzaW5nIFN5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlczsgdXNpbmcgTWljcm9zb2Z0LldpbjMyLlNhZmVIYW5kbGVzOyB1c2luZyBTeXN0ZW0uQ29tcG9uZW50TW9kZWw7IHB1YmxpYyBzdGF0aWMgY2xhc3MgRWxhbXsgW0RsbEltcG9ydChcIktlcm5lbDMyXCIsIENoYXJTZXQ9Q2hhclNldC5BdXRvLCBTZXRMYXN0RXJyb3I9dHJ1ZSldIHB1YmxpYyBzdGF0aWMgZXh0ZXJuIGJvb2wgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8oU2FmZUZpbGVIYW5kbGUgaGFuZGxlKTsgcHVibGljIHN0YXRpYyB2b2lkIEluc3RhbGxXZEJvb3Qoc3RyaW5nIHBhdGgpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQWJvdXQgdG8gY2FsbCBjcmVhdGUgZmlsZSBvbiB7MH1cIiwgcGF0aCk7IHZhciBzdHJlYW0gPSBGaWxlLk9wZW4ocGF0aCwgRmlsZU1vZGUuT3BlbiwgRmlsZUFjY2Vzcy5SZWFkLCBGaWxlU2hhcmUuUmVhZCk7IHZhciBoYW5kbGUgPSBzdHJlYW0uU2FmZUZpbGVIYW5kbGU7IENvbnNvbGUuT3V0LldyaXRlTGluZShcIkFib3V0IHRvIGNhbGwgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8gb24gaGFuZGxlIHswfVwiLCBoYW5kbGUuRGFuZ2Vyb3VzR2V0SGFuZGxlKCkpOyBpZiAoIUluc3RhbGxFTEFNQ2VydGlmaWNhdGVJbmZvKGhhbmRsZSkpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQ2FsbCBmYWlsZWQuXCIpOyB0aHJvdyBuZXcgV2luMzJFeGNlcHRpb24oTWFyc2hhbC5HZXRMYXN0V2luMzJFcnJvcigpKTsgfSBDb25zb2xlLk91dC5Xcml0ZUxpbmUoXCJDYWxsIHN1Y2Nlc3NmdWwuXCIpOyB9IH0gJzsgJGRyaXZlclBhdGggPSAkZW52OlN5c3RlbVJvb3QgKyAnXFN5c3RlbTMyXERyaXZlcnNcV2RCb290LnN5cyc7IFtFbGFtXTo6SW5zdGFsbFdkQm9vdCgkZHJpdmVyUGF0aCkgIiA+TlVMIDI+JjEKClJFRyBxdWVyeSAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgNjk2QzFGQTEtNDAzMC00RkE0LTg3MTMtRkFGOUIyRUE3QzBBIC9yZWc6NjQgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgKCAgCiAgICBSRUcgZGVsZXRlICJIS0xNXFNPRlRXQVJFXFBvbGljaWVzXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIiAvdiA2OTZDMUZBMS00MDMwLTRGQTQtODcxMy1GQUY5QjJFQTdDMEEgL2YgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQogICAgaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKICAgICAgICBzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIGRlbGV0ZSBwcmV2aW91cyBvZmZib2FyZGluZyBpbmZvcm1hdGlvbiBmcm9tIHJlZ2lzdHJ5LiIKICAgICAgICBzZXQgZXJyb3JDb2RlPTUKICAgICAgICBzZXQgbGFzdEVycm9yPSVFUlJPUkxFVkVMJQogICAgICAgIEdPVE8gRVJST1IKICAgICkKKQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgT25ib2FyZGluZ0luZm8gL3QgUkVHX1NaIC9mIC9kICJ7XCJib2R5XCI6XCJ7XFxcInByZXZpb3VzT3JnSWRzXFxcIjpbXSxcXFwib3JnSWRcXFwiOlxcXCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMGRlYWRcXFwiLFxcXCJnZW9Mb2NhdGlvblVybFxcXCI6XFxcImh0dHBzOi8vc2V2aWxsZWNsb3VkZ2F0ZXdheS1zdGcubWljcm9zb2Z0LmNvbS9cXFwiLFxcXCJkYXRhY2VudGVyXFxcIjpcXFwiRWFzdFVzMlxcXCIsXFxcInZvcnRleEdlb0xvY2F0aW9uXFxcIjpcXFwiU2FuZGJveFxcXCIsXFxcInZlcnNpb25cXFwiOlxcXCIxLjNcXFwifVwiLFwic2lnXCI6XCJKc0dGR2o3UCtIL1cvUEExcW9LTml3RXROZkU4YkhGblhxeks1SDhsQ09wc0RnRGNWTWpoT3BmQTZJTTJ3RFZadk5kWGhvZ0dEQ1FDWjNYdFJCbHRkcGFWc3pZNGtINVpHVkdnRUQxVE80ZCtCTjk2VDFSa3pOZ2NjZ2ZCWDNNQUw1bllUWXdiMGlUQUtFMGIxb3BmQmZrMzJQN3Q3b3A5dkhPeXZNMW5qdlZybVdWWWVSNk4rZFFrLzM4UDNUY2V3b2FkRmFUb3pidjBZK3dZOHgrbFcxeWN6bk1KMitQWTlxRHpabXoybE1rd0FlaDJwRTI4VW5MT0lhNjg0Y3U5RitHUlAveGhhR3dQWmpoc1JCSW51cHV5U1E2Y09YdE9kSERCQlRaZzVKSEhHMDBkNk9tUk5ONmxBelJWeFJURUVmaFFUVnN0U1poKzNMSjJTMGhmZGc9PVwiLFwic2hhMjU2c2lnXCI6XCJsVGI4ZittdkFveDRCckxPS0lqejFnTTNrRHREbG9wL21uNmZodmVEWjMvblVqb1lhNk81V2p4R0x2Z3lqZ0RtdThETkdPNUtqWWlxTVZ6Z0QzcHdqOVYwOXVOeUdYNGJUaXN0d1BnQTFLbGMrMUFLcmtWQTRGWGlQTHlST2tXdlhLM2dydFFJWU9nYjdSRlh6dzhnQlB5YlV0Z0FWbmNaMVFpdTAzblFLdGh5MFU3aXBlZUxaVE9oYVlhN001cTJxUTcya1BaSTZWUWlqSE42NVg3UTEvcm5rdUlSUkFmUEErZElIeE4wN0tpSlY2MGZsbDFZUUtOUlpSYUhKeGQ1UDd0RmdaaytEZE5mNVNXcHVaSTZTZE9MdExDN3VnbmdnK0krU2pUeUtvcVFKZElkWGRRaE5JK3I3WEM1L1M0ZlhnRVNtWmZKTUYxL0JtVlVFZUJDZlE9PVwiLFwiY2VydFwiOlwiTUlJRjVqQ0NBODZnQXdJQkFnSVRNd0FBQVkwdmh1VTl6R2x5b1FBQUFBQUJqVEFOQmdrcWhraUc5dzBCQVFzRkFEQitNUXN3Q1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1YyRnphR2x1WjNSdmJqRVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVNnd0pnWURWUVFERXg5TmFXTnliM052Wm5RZ1UyVmpkWEpsSUZObGNuWmxjaUJEUVNBeU1ERXhNQjRYRFRJd01EZ3dOakl3TlRBMU9Gb1hEVEl4TURnd05qSXdOVEExT0Zvd2dZb3hDekFKQmdOVkJBWVRBbFZUTVFzd0NRWURWUVFJRXdKWFFURVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVI0d0hBWURWUVFMRXhWTmFXTnliM052Wm5RZ1EyOXljRzl5WVhScGIyNHhIREFhQmdOVkJBTVRFMU5sZG1sc2JHVXVWMmx1Wkc5M2N5NWpiMjB3Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRRENmcWtCcmV1Um1qdm90bDFFdURQWVplaVc1dUVERmV6MXhsYmh6cjVaa1BjSUJYT3RIMVZWRjRaUmVrdTFpK3ZMbTNON2xkVGl4c2RSZW0yU09iVkFGb1dDbjZ2cEYwL1ZYcWpmUTJHbyt2dk9UU1Q0Si9pQWxocXhialVVbkRyWFpXYUMvS2xtU0lYMjlHUng5bG1pT0IrWVBhRzlOTEE1U3F3emNad2hjTThzS3F0VDhHaWQ3Q3JFNGs1WldES0gyL1dPVTVsQ01iZTY2MWtrbWxKZDB2TlBDTXpyMUgzVmNmRG1qVVo4Q25WQzBFODlhVVA3VHhhME1uS0FzVFArQkpCNXJMenhkVlJRbGRNbmhHVXNXRU0ydUNOWXFOdWc4QWYrTGp3RytySXZrSVR3NVlDMUZDZy9qVHBvdHJnSFhmSGRqaURqa0F3ZWY1TlVkTmx0QWdNQkFBR2pnZ0ZPTUlJQlNqQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdIUVlEVlIwT0JCWUVGT0U1NVFoeno5bEhuWTl2aDVTWmtyMTdjbEtzTUI0R0ExVWRFUVFYTUJXQ0UxTmxkbWxzYkdVdVYybHVaRzkzY3k1amIyMHdId1lEVlIwakJCZ3dGb0FVTmxhSlpVbkxXNXN2UEt4Q0ZsQk5rYmt6MTVFd1V3WURWUjBmQkV3d1NqQklvRWFnUklaQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFXOXdjeTlqY213dlRXbGpVMlZqVTJWeVEwRXlNREV4WHpJd01URXRNVEF0TVRndVkzSnNNR0FHQ0NzR0FRVUZCd0VCQkZRd1VqQlFCZ2dyQmdFRkJRY3dBb1pFYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVc5d2N5OWpaWEowY3k5TmFXTlRaV05UWlhKRFFUSXdNVEZmTWpBeE1TMHhNQzB4T0M1amNuUXdEQVlEVlIwVEFRSC9CQUl3QURBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQWdFQVp3ZGxhWjg4U3BURFdUUjc5NWRHV2N0dUxUWmc2UDBqYmh4Q0dhOXBnb3AzSXZ1Qi9QYzJXT2Ruc1ZCYUpUZG5WN3NvcFZHa3V4Vjc1eWk2Q0NQM2sxNG0xQ1FhNk01cmNodmJuVEY0TFdjWld4U1g4Z0hjRWhObFdYV3hxU3FKMzNnSHVGNEc5SCs3VDM3UlNMb2Jqb1MyeVRhc21SRWtCNTI4b1gwWVU0cVpjeVdyK0xEMVovQk10dEhMUlZUZUtHdnpMaVpCNmhqWURybW9qUUxKZXZwSEdoTVdOTU9oR2RLd2pOS0crZGhVRHV6dTdsVXgwZzdhaUR3c1l4NzFTaU9ucDJWOSt5UEhET2R5OXlBRUNPb0N3bUprbW5qLzlDMmVNMDFDQjFZMUxTWHNiQUJtQVd3Si9iczhRNnhTWlJtSnkyRXJSQ3VTakl0MUQydzRTUFVMRFNNVTdIaDk3TWJpQVJDV25TMVRRMGg5azZFWVVmbW1ZaFNHQ0p3MXFlekFqZ2FmTngyYWcrRDhzRFFkQzRjVHhUSTk5aGthUm1DakFmeW1qcVdscUx5V0pCUmdvaXdTd21MVDFUbzRJNUVjZHFoQ1FNdEpoRVVRR2dpenk2ZUE2RlhtNHhmeExua08xSkNKSGJUejlqL2c4OW5zZ0hVN2V4SDVnZHhZQ0FDMGJkUlZLN1YrVlBDcExnLy9SemtlNm9mc1Y3WkxyQUpvN0EyQTZka0dVL09XeGhpVjJiY0VlUEpmSWsrVjM3UHp3c25yZ1JFV2RpM1pic3dBOU5aTTVzZGVSMFlFRm11bit0b2JCRGMzMlRidlVyTUpTb2tjcG9XNnRZczlkR0tUcE1GV01EZ09UeEZjSHljbHZrMjRVQVV2dXk2WVcvSVN2VlY4a3BRPVwiLFwiY2hhaW5cIjpbXCJNSUlHMkRDQ0JNQ2dBd0lCQWdJS1lUKzNHQUFBQUFBQUJEQU5CZ2txaGtpRzl3MEJBUXNGQURDQmlERUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV5TURBR0ExVUVBeE1wVFdsamNtOXpiMlowSUZKdmIzUWdRMlZ5ZEdsbWFXTmhkR1VnUVhWMGFHOXlhWFI1SURJd01URXdIaGNOTVRFeE1ERTRNakkxTlRFNVdoY05Nall4TURFNE1qTXdOVEU1V2pCK01Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LVjJGemFHbHVaM1J2YmpFUU1BNEdBMVVFQnhNSFVtVmtiVzl1WkRFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU2d3SmdZRFZRUURFeDlOYVdOeWIzTnZablFnVTJWamRYSmxJRk5sY25abGNpQkRRU0F5TURFeE1JSUNJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBZzhBTUlJQ0NnS0NBZ0VBMEF2QXBLZ1pnZUkyNWVLcTVmT3lGVmgxdnJUbFNmSGdoUG03RFdUdmhjR0JWYmp6NS9GdFFGVTl6b3RxMFlTVDlYVjhXNlRVZEJES012TWowNjd1ejU0RVdNTFpSOHZSZkFCQlNIRWJBV2NYR0svRy9uTURmdVR2UTV6dkFYRXFINEVtUTNlWVZGZHpuVlVyOEo2T2ZRWU9yQnRVOHliMytDTUlJb3VlQmgwM09QMXkwc3JsWThHYVduMnliYk5TcVc3cHJyWDhpemI1bnZyMkhGZ2JsMWFsRWVXM1V0dTc2ZkJVdjdUL0xHeTRYU2JPb0FyWDM1UHRmOTJzOFN4ekd0a1pOMVc2M1NKNGpxSFVtd240QnlJeGNiQ1VydUN3NXlaRVY1Q0JseFhPWWV4bDRrdnhoVklXTXZpMWVLcCt6VTNzZ3lHa3FKdSttbW9FNEtNY3pWWVliUDFyTDBJKzRqZnljcXZRZUhOeWU5N3NBRmpsSVRDakNEcVo3NS9EOTNvV2xtVzF3NEd2OURsd1NhLzJxZlpxQURqNXRBZ1o0Qm8xcFZaMklsOXE4bW11UHExWVJrMjRWUGFKUVVRZWNyRzhFaWRUMHNIL3NzMVFtQjYxOUx1MndvSTUyYXdiOGpzbmhHcXd4aVlMMXpvUTU3UGJmTk5XckZOTUMvbzdNVGQwMkZrcitRQjVHUVo3L1J3ZFF0UkJEUzhGRHRWclNTUC96ODM0ZW9MUDJqd3QzK2pZRWdRWXVoNklkN2lZSHhBSHU4Z0ZmZ3NKdjJ2ZDQwNWJzUG5IaEtZN3lreWZXMklwOThlaXFKV0ljQ3psd1Q4OFVpTlBRSnJETVlXREw3OHA4UjFRanlHV0I4N3Y4b0RDUkgyYll1OHZ3M2VKcTBWTlV6NENlZE1DQXdFQUFhT0NBVXN3Z2dGSE1CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1CMEdBMVVkRGdRV0JCUTJWb2xsU2N0Ym15ODhyRUlXVUUyUnVUUFhrVEFaQmdrckJnRUVBWUkzRkFJRURCNEtBRk1BZFFCaUFFTUFRVEFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZkJnTlZIU01FR0RBV2dCUnlMVG9DTVpCRHVSUUZUdUhxcDhjeDBTT0pOREJhQmdOVkhSOEVVekJSTUUrZ1RhQkxoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwTDJOeWJDOXdjbTlrZFdOMGN5OU5hV05TYjI5RFpYSkJkWFF5TURFeFh6SXdNVEZmTUROZk1qSXVZM0pzTUY0R0NDc0dBUVVGQndFQkJGSXdVREJPQmdnckJnRUZCUWN3QW9aQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFTOWpaWEowY3k5TmFXTlNiMjlEWlhKQmRYUXlNREV4WHpJd01URmZNRE5mTWpJdVkzSjBNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUNBUUJCeUdIQjlWdWVQcEV4OGJER3Z3a0J0SjIya0hUWENkdW1MZzJmeU9kMk5FYXZCMkNKVElHelBOWDBFalYxd25PbDlVMkVqTXVrWGErL2t2WVhDRmRDbFhKbEJYWjVyZTdSdXJndVZLTlJCNnhvNnlFTTR5V0J3czBxOHNQL3o4SzlTUmlheC9DRXhma1V2R3VWNVpidnMwTFNVOVZLb0JMRXJoSjJVd2xXRHAzMzA2WkppRkR5aWl5WElLSytUbmp2QldXM1M2RVdpTjR4eHdoQ0pIeWtlNTZkdkdBQVhtS1g0NVA4cC81YmV5WGY1Rk4vUzc3bVB2RGJBWGxDSEc2RmJIMjJSREQ3cFRlU2s3S2w3aUN0UDFQVnlmUW9hMWZCK0IxcXQxWXF0aWVCSEtZdG4rZjAwREdEbDZncXRxeStHMEgxNUlsZlZ2dmFXdE5lZlZXVUVINVRWL1JLUFVBcXlMMW5uNFRoRU83OTJtc1Zna244UmgzL1JRWjBuRUlVN2NVNTA3UE5DNE1ua0VOUmt2SkVncTV1bWhVWHNobjZ4MFZzbUFGN3Z6ZXBzSWlra3J3NE9PQWQ1SHlYbUJvdVgrODRaYmMxTDcxL1R5SDZ4SXpTYndiNVNUWHEzeUFQSmFycVlLc3NIMHVKL0xmNlhGU1FTejZpS0U5czVGSmx3ZjJRSElXQ2lHN3BwbFhkSVNoNVJiQVU1UXJNNWwvRXU5dGhOR21mckNZNDk4RXBRUWdWTGt5Zzkva01QdDVmcXdnSkxZT3NyRFNEWXZUSlNVS0pKYlZ1c2tmRnN6bWdzU0FiTExHT0JHK2xNRWtjMEVicFFGdjByVzY2MjRKS2h4SktnQWxOMjk5MnVRVmJHK0M3SUhCZkFDWEgwdzc2RnExN0lwNXhDQT09XCIsXCJNSUlGN1RDQ0E5V2dBd0lCQWdJUVA0dkl0Znlmc3BaRHRXbldiRUxoUkRBTkJna3Foa2lHOXcwQkFRc0ZBRENCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd0hoY05NVEV3TXpJeU1qSXdOVEk0V2hjTk16WXdNekl5TWpJeE16QTBXakNCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd2dnSWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUNEd0F3Z2dJS0FvSUNBUUN5Z0VHcU5UaE5FM0l5YUNKTnVMTHgvOVZTdkd6SDlkSktqRGJ1MGNKY2ZveUtycThUS0cvQWMrTTZ6dEFscUZvNmJlK291Rm1yRXlOb3pRd3BoOUZ2Z0Z5UFJIOWRrQUZTV0t4UnhWOHFoOXpjMkFvZHdRTzVlN0JXNktQZVpHSENudmp6Zkxuc0RiVlUva3kyWlUrSThKeEltUXhDQ3dsOE1Wa1hlUVo0S0kySk9rd0RKYjV4YWx3TDU0UmdwSmtpNDlLdmhLU24rOUdZN1F5cDNwU0o0UTZnM01ET21UM3FDRks3Vm5ua0g0UzZIcmkweEVsY1R6RkxoOTNkQldjbW1ZRGdjUkdqdUtWQjRxUlR1ZmN5S1lNTUU3ODJYZ1N6UzBOSEwydmlrUjdUbUUvZFFnZkk2QjBTL0ptcGF6NlNmc2pXYVRyOFpMMjJDWjNLL1F3TG9wdDNZRXNEbEtRd2FSTFdRaTNCUVV6SzNLcjlqMXVEUnByWi9MSFI0N1BKZjBoNnpTVHdRWTljZE5Dc3NCQWdCa20zeHkwaHlGZmowSWJ6QTJqNzBNNXh3WW1aU21RQmJQM3NNSkhQUVR5U3grVzZoaDFoaE1kZmd6bGlyclNTTDBmekMvaFY2NkFmV2RDN2RKc2UwSGJtOHVrRzF4RG8rbVRlYWNZMWxvZ0M4RWE0UHllWmI4dHhpU2sxOTBnV0FqV1AxWGw4VFFMUFgrdUtnMDlGY1lqNXFRMU9jdW5DbkFmUFNSdE9CQTVqVVl4ZTJBREJWU3kyeHVEQ1pVN0pORG4xbkxQRWZ1aGhiaE5mRmNSZjJYN3RIYzd1Uk96TExvYXg3RGoyY08yclhCUEIyUThOeDRDeVZlMDA5NnliNU1QYTUwYzhwcldQTWQvRlM2L3I4UUlEQVFBQm8xRXdUekFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVWNpMDZBakdRUTdrVUJVN2g2cWZITWRFamlUUXdFQVlKS3dZQkJBR0NOeFVCQkFNQ0FRQXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnSUJBSDl5encrM3hSWGJtOEJKeWlaYi9wNFQ1dFB3MHR1WFgvSkxQMDJ6cmhtdTdkZVhvS3p2cVRxandrR3c1YmlSbmhPQkpBUG1DZjAvVjBBNUlTUlcwUkF2UzBDcE5vWkx0Rk5YbXZ2eGZvbVBFZjRZYkZHcTZPMEpsYlhsY2NtaDZZZDFwaFYveVg0M1ZGNTBrOFhEWjh3TlQydW9Gd3h0Q0pKK2k5MkJxaTF3SWNNOUJoUzd2eVJlcDRUWFB3OGhJcjFMQUFiYmx4ellYdFRGQzF5SGJsQ2s2TU00cFB2TExNV1NacHVGWHN0NmJKTjhnQ2xZVzFlMVFHbTZDSG1tWkdJVm5ZZVdSYlZtSXlBRGl4eHpvTk9pZVRQZ1VGbUcyeS9sQWlYcWN5cWZBQlRJTnNlU08rbE9BT3pZVmdtNU0wa1MwbFFMQWF1c1I3YVJLWDFNdEhXQVVnSG95b0wybjh5c25JOFg2aThtc0t0eXJBditubEVleDBOVlowOVJzMWZXdHV6dVVyYzY2VTdoMTRHSXZFK09kYnRMcVBBMXFpYlVaMmRKc25CTU81UGNIZDk0a0laeXNqaWswZHlTVGNsWTZ5c1NYTlE3cm94cnNJUGxBVC80Q1RMMmt6VTBJcS9kTncxM0NZQXJ6VWdBOFl5WkdVY0ZBZW5SdjlGTzBPWW9RemVacEFwS0NObWFjWFBTcXMweEUyTjJvVGR2a2pnZWZSSThaakxueTIzaC9GS0ozY3JXWmdXYWxtRytvaWpISEtPbk5sQThPcVRmU203bWh6dk82L0RnZ1RlZEV6eFNqcjI1SFRUR0hkVUthajJZS1hDTWlTclJxNElRU0IvYzlPK2x4YnRWR2poamhFNjNiSzJWVk94bEloQkpGN2pBSHNjUHJGUkhcIl19IiA+ICVUTVAlXHNlbnNlVG1wLnR4dCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCiAgIHNldCAiZXJyb3JEZXNjcmlwdGlvbj1VbmFibGUgdG8gd3JpdGUgb25ib2FyZGluZyBpbmZvcm1hdGlvbiB0byByZWdpc3RyeS4iCiAgIHNldCBlcnJvckNvZGU9MTAKICAgc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKICAgR09UTyBFUlJPUgopCgplY2hvIFN0YXJ0aW5nIHRoZSBzZXJ2aWNlLCBpZiBub3QgYWxyZWFkeSBydW5uaW5nID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgR09UTyBSVU5OSU5HCgpuZXQgc3RhcnQgc2Vuc2UgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAogICBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBoYXMgbm90IHN0YXJ0ZWQgeWV0ID5OVUwgMj4mMQogICBHT1RPIFdBSVRfRk9SX1RIRV9TRVJWSUNFX1RPX1NUQVJUCikKZ290byBTVUNDRUVERUQKCjpSVU5OSU5HCnNldCAicnVubmluZ091dHB1dD1UaGUgV2luZG93cyBEZWZlbmRlciBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiBTZXJ2aWNlIGlzIGFscmVhZHkgcnVubmluZyEiCmVjaG8gJXJ1bm5pbmdPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMTAgL2QgIiVydW5uaW5nT3V0cHV0JSIgPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpFUlJPUgpTZXQgL1AgZXJyb3JNc2c9PCVUTVAlXHNlbnNlVG1wLnR4dApzZXQgImVycm9yT3V0cHV0PVtFcnJvciBJZDogJWVycm9yQ29kZSUsIEVycm9yIExldmVsOiAlbGFzdEVycm9yJV0gJWVycm9yRGVzY3JpcHRpb24lIEVycm9yIG1lc3NhZ2U6ICVlcnJvck1zZyUiCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuRXJyb3IsIEtleXdvcmRzID0gKEV2ZW50S2V5d29yZHMpMHgwMDAwMjAwMDAwMDAwMDAwLCBUYWdzID0gKEV2ZW50VGFncykweDAyMDAwMDB9OyBwdWJsaWMgdm9pZCBXcml0ZU9uYm9hcmRpbmdNZXNzYWdlKHN0cmluZyBtZXNzYWdlKXtlcy5Xcml0ZShcIk9uYm9hcmRpbmdTY3JpcHRcIiwgVGVsZW1ldHJ5Q3JpdGljYWxPcHRpb24sIG5ldyBPbmJvYXJkaW5nIHtNZXNzYWdlID0gbWVzc2FnZX0pO30gcHJpdmF0ZSBzdGF0aWMgcmVhZG9ubHkgc3RyaW5nW10gdGVsZW1ldHJ5VHJhaXRzID0geyBcIkVUV19HUk9VUFwiLCBcIns1RUNCMEJBQy1COTMwLTQ3RjUtQThBNC1FODI1MzUyOUVEQjd9XCIgfTsgcHJpdmF0ZSBFdmVudFNvdXJjZSBlcyA9IG5ldyBFdmVudFNvdXJjZShcIk1pY3Jvc29mdC5XaW5kb3dzLlNlbnNlLkNsaWVudC5NYW5hZ2VtZW50XCIsRXZlbnRTb3VyY2VTZXR0aW5ncy5FdHdTZWxmRGVzY3JpYmluZ0V2ZW50Rm9ybWF0LHRlbGVtZXRyeVRyYWl0cyk7fX0nOyAkbG9nZ2VyID0gTmV3LU9iamVjdCAtVHlwZU5hbWUgU2Vuc2UuVHJhY2U7ICRsb2dnZXIuV3JpdGVPbmJvYXJkaW5nTWVzc2FnZSgnJWVycm9yT3V0cHV0JScpIiA+TlVMIDI+JjEKZWNobyAlZXJyb3JPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBFcnJvciAvaWQgJWVycm9yQ29kZSUgL2QgIiVlcnJvck91dHB1dCUiID5OVUwgMj4mMQpHT1RPIENMRUFOVVAKCjpTVUNDRUVERUQKZWNobyBGaW5pc2hlZCBwZXJmb3JtaW5nIG9uYm9hcmRpbmcgb3BlcmF0aW9ucyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpXQUlUX0ZPUl9USEVfU0VSVklDRV9UT19TVEFSVAplY2hvIFdhaXRpbmcgZm9yIHRoZSBzZXJ2aWNlIHRvIHN0YXJ0ID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9SVU5OSU5HX1dBSVQKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAoJSUYgJWNvdW50ZXIlIEVRVSA0ICgKCQlzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIHN0YXJ0IFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZS4iCgkJc2V0IGVycm9yQ29kZT0xNQoJCXNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfUlVOTklOR19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfU1RBVFVTX1dBSVQKUkVHIHF1ZXJ5ICJIS0xNXFNPRlRXQVJFXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uXFN0YXR1cyIgL3YgT25ib2FyZGluZ1N0YXRlIC9yZWc6NjQgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT0zNQogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1NUQVRVU19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfV0FJVApSRUcgcXVlcnkgIkhLTE1cU09GVFdBUkVcTWljcm9zb2Z0XFdpbmRvd3MgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb25cU3RhdHVzIiAvdiBPbmJvYXJkaW5nU3RhdGUgL3JlZzo2NCB8IGZpbmQgL2kgIjB4MSIgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT00MAogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1dBSVQKKQoKc2V0ICJzdWNjZXNzT3V0cHV0PVN1Y2Nlc3NmdWxseSBvbmJvYXJkZWQgbWFjaGluZSB0byBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIgplY2hvICVzdWNjZXNzT3V0cHV0JSA+TlVMIDI+JjEKZWNoby4KZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMjAgL2QgIiVzdWNjZXNzT3V0cHV0JSIgPk5VTCAyPiYxCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuSW5mb3JtYXRpb25hbCwgS2V5d29yZHMgPSAoRXZlbnRLZXl3b3JkcykweDAwMDAyMDAwMDAwMDAwMDAsIFRhZ3MgPSAoRXZlbnRUYWdzKTB4MDIwMDAwMH07IHB1YmxpYyB2b2lkIFdyaXRlT25ib2FyZGluZ01lc3NhZ2Uoc3RyaW5nIG1lc3NhZ2Upe2VzLldyaXRlKFwiT25ib2FyZGluZ1NjcmlwdFwiLCBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiwgbmV3IE9uYm9hcmRpbmcge01lc3NhZ2UgPSBtZXNzYWdlfSk7fSBwcml2YXRlIHN0YXRpYyByZWFkb25seSBzdHJpbmdbXSB0ZWxlbWV0cnlUcmFpdHMgPSB7IFwiRVRXX0dST1VQXCIsIFwiezVFQ0IwQkFDLUI5MzAtNDdGNS1BOEE0LUU4MjUzNTI5RURCN31cIiB9OyBwcml2YXRlIEV2ZW50U291cmNlIGVzID0gbmV3IEV2ZW50U291cmNlKFwiTWljcm9zb2Z0LldpbmRvd3MuU2Vuc2UuQ2xpZW50Lk1hbmFnZW1lbnRcIixFdmVudFNvdXJjZVNldHRpbmdzLkV0d1NlbGZEZXNjcmliaW5nRXZlbnRGb3JtYXQsdGVsZW1ldHJ5VHJhaXRzKTt9fSc7ICRsb2dnZXIgPSBOZXctT2JqZWN0IC1UeXBlTmFtZSBTZW5zZS5UcmFjZTsgJGxvZ2dlci5Xcml0ZU9uYm9hcmRpbmdNZXNzYWdlKCclc3VjY2Vzc091dHB1dCUnKSIgPk5VTCAyPiYxCiIlUFJPR1JBTUZJTEVTJVxXaW5kb3dzIERlZmVuZGVyXE1wQ21kUnVuLmV4ZSIgLVJlbG9hZEVuZ2luZSA+TlVMIDI+JjEKCkdPVE8gQ0xFQU5VUAoKOkNMRUFOVVAKaWYgZXhpc3QgJVRNUCVcc2Vuc2VUbXAudHh0IGRlbCAlVE1QJVxzZW5zZVRtcC50eHQKRVhJVCAvQiAlZXJyb3JDb2RlJQo=="),
	// 				OnboardingPackageWindows: []byte("QGVjaG8gb2ZmCgplY2hvLiA+TlVMIDI+JjEKZWNobyBTdGFydGluZyBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIG9uYm9hcmRpbmcgcHJvY2Vzcy4uLiA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCgpzZXQgZXJyb3JDb2RlPTAKc2V0IGxhc3RFcnJvcj0wCnNldCAidHJvdWJsZXNob290SW5mbz1Gb3IgbW9yZSBpbmZvcm1hdGlvbiwgdmlzaXQ6IGh0dHBzOi8vZ28ubWljcm9zb2Z0LmNvbS9md2xpbmsvcC8/bGlua2lkPTgyMjgwNyIKc2V0ICJlcnJvckRlc2NyaXB0aW9uPSIKCmVjaG8gVGVzdGluZyBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXMgPk5VTCAyPiYxCgpuZXQgc2Vzc2lvbiA+TlVMIDI+JjEKaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKCUBlY2hvIFNjcmlwdCBpcyBydW5uaW5nIHdpdGggaW5zdWZmaWNpZW50IHByaXZpbGVnZXMuIFBsZWFzZSBydW4gd2l0aCBhZG1pbmlzdHJhdG9yIHByaXZpbGVnZXM+ICVUTVAlXHNlbnNlVG1wLnR4dAoJc2V0IGVycm9yQ29kZT02NQogc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKCUdPVE8gRVJST1IKKQoKZWNobyBTY3JpcHQgaXMgcnVubmluZyB3aXRoIHN1ZmZpY2llbnQgcHJpdmlsZWdlcyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCmVjaG8gUGVyZm9ybWluZyBvbmJvYXJkaW5nIG9wZXJhdGlvbnMgPk5VTCAyPiYxCmVjaG8uID5OVUwgMj4mMQoKSUYgWyVQUk9DRVNTT1JfQVJDSElURVc2NDMyJV0gRVFVIFtdICgKICBzZXQgcG93ZXJzaGVsbFBhdGg9JXdpbmRpciVcU3lzdGVtMzJcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopIEVMU0UgKAogIHNldCBwb3dlcnNoZWxsUGF0aD0ld2luZGlyJVxTeXNOYXRpdmVcV2luZG93c1Bvd2VyU2hlbGxcdjEuMFxwb3dlcnNoZWxsLmV4ZQopCgpzZXQgc2RiaW49MDEwMDA0ODA0NDAwMDAwMDU0MDAwMDAwMDAwMDAwMDAxNDAwMDAwMDAyMDAzMDAwMDIwMDAwMDAwMDAwMTQwMEZGMEYxMjAwMDEwMTAwMDAwMDAwMDAwNTEyMDAwMDAwMDAwMDE0MDBFMTA0MTIwMDAxMDEwMDAwMDAwMDAwMDUwQjAwMDAwMDAxMDIwMDAwMDAwMDAwMDUyMDAwMDAwMDIwMDIwMDAwMDEwMjAwMDAwMDAwMDAwNTIwMDAwMDAwMjAwMjAwMDAgPk5VTCAyPiYxCnJlZyBhZGQgSEtMTVxTWVNURU1cQ3VycmVudENvbnRyb2xTZXRcQ29udHJvbFxXTUlcU2VjdXJpdHkgL3YgMTRmODEzOGUtM2I2MS01ODBiLTU0NGItMjYwOTM3OGFlNDYwIC90IFJFR19CSU5BUlkgL2QgJXNkYmluJSAvZiA+TlVMIDI+JjEKcmVnIGFkZCBIS0xNXFNZU1RFTVxDdXJyZW50Q29udHJvbFNldFxDb250cm9sXFdNSVxTZWN1cml0eSAvdiBjYjJmZjcyZC1kNGU0LTU4NWQtMzNmOS1mM2EzOTVjNDBiZTcgL3QgUkVHX0JJTkFSWSAvZCAlc2RiaW4lIC9mID5OVUwgMj4mMQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93c1xEYXRhQ29sbGVjdGlvbiIgL3YgRGlzYWJsZUVudGVycHJpc2VBdXRoUHJveHkgL3QgUkVHX0RXT1JEIC9mIC9kIDEgPk5VTCAyPiYxCgolcG93ZXJzaGVsbFBhdGglIC1FeGVjdXRpb25Qb2xpY3kgQnlwYXNzIC1Ob1Byb2ZpbGUgLUNvbW1hbmQgIkFkZC1UeXBlICcgdXNpbmcgU3lzdGVtOyB1c2luZyBTeXN0ZW0uSU87IHVzaW5nIFN5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlczsgdXNpbmcgTWljcm9zb2Z0LldpbjMyLlNhZmVIYW5kbGVzOyB1c2luZyBTeXN0ZW0uQ29tcG9uZW50TW9kZWw7IHB1YmxpYyBzdGF0aWMgY2xhc3MgRWxhbXsgW0RsbEltcG9ydChcIktlcm5lbDMyXCIsIENoYXJTZXQ9Q2hhclNldC5BdXRvLCBTZXRMYXN0RXJyb3I9dHJ1ZSldIHB1YmxpYyBzdGF0aWMgZXh0ZXJuIGJvb2wgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8oU2FmZUZpbGVIYW5kbGUgaGFuZGxlKTsgcHVibGljIHN0YXRpYyB2b2lkIEluc3RhbGxXZEJvb3Qoc3RyaW5nIHBhdGgpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQWJvdXQgdG8gY2FsbCBjcmVhdGUgZmlsZSBvbiB7MH1cIiwgcGF0aCk7IHZhciBzdHJlYW0gPSBGaWxlLk9wZW4ocGF0aCwgRmlsZU1vZGUuT3BlbiwgRmlsZUFjY2Vzcy5SZWFkLCBGaWxlU2hhcmUuUmVhZCk7IHZhciBoYW5kbGUgPSBzdHJlYW0uU2FmZUZpbGVIYW5kbGU7IENvbnNvbGUuT3V0LldyaXRlTGluZShcIkFib3V0IHRvIGNhbGwgSW5zdGFsbEVMQU1DZXJ0aWZpY2F0ZUluZm8gb24gaGFuZGxlIHswfVwiLCBoYW5kbGUuRGFuZ2Vyb3VzR2V0SGFuZGxlKCkpOyBpZiAoIUluc3RhbGxFTEFNQ2VydGlmaWNhdGVJbmZvKGhhbmRsZSkpIHsgQ29uc29sZS5PdXQuV3JpdGVMaW5lKFwiQ2FsbCBmYWlsZWQuXCIpOyB0aHJvdyBuZXcgV2luMzJFeGNlcHRpb24oTWFyc2hhbC5HZXRMYXN0V2luMzJFcnJvcigpKTsgfSBDb25zb2xlLk91dC5Xcml0ZUxpbmUoXCJDYWxsIHN1Y2Nlc3NmdWwuXCIpOyB9IH0gJzsgJGRyaXZlclBhdGggPSAkZW52OlN5c3RlbVJvb3QgKyAnXFN5c3RlbTMyXERyaXZlcnNcV2RCb290LnN5cyc7IFtFbGFtXTo6SW5zdGFsbFdkQm9vdCgkZHJpdmVyUGF0aCkgIiA+TlVMIDI+JjEKClJFRyBxdWVyeSAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgNjk2QzFGQTEtNDAzMC00RkE0LTg3MTMtRkFGOUIyRUE3QzBBIC9yZWc6NjQgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgKCAgCiAgICBSRUcgZGVsZXRlICJIS0xNXFNPRlRXQVJFXFBvbGljaWVzXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIiAvdiA2OTZDMUZBMS00MDMwLTRGQTQtODcxMy1GQUY5QjJFQTdDMEEgL2YgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQogICAgaWYgJUVSUk9STEVWRUwlIE5FUSAwICgKICAgICAgICBzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIGRlbGV0ZSBwcmV2aW91cyBvZmZib2FyZGluZyBpbmZvcm1hdGlvbiBmcm9tIHJlZ2lzdHJ5LiIKICAgICAgICBzZXQgZXJyb3JDb2RlPTUKICAgICAgICBzZXQgbGFzdEVycm9yPSVFUlJPUkxFVkVMJQogICAgICAgIEdPVE8gRVJST1IKICAgICkKKQoKUkVHIGFkZCAiSEtMTVxTT0ZUV0FSRVxQb2xpY2llc1xNaWNyb3NvZnRcV2luZG93cyBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiIgL3YgT25ib2FyZGluZ0luZm8gL3QgUkVHX1NaIC9mIC9kICJ7XCJib2R5XCI6XCJ7XFxcInByZXZpb3VzT3JnSWRzXFxcIjpbXSxcXFwib3JnSWRcXFwiOlxcXCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMGRlYWRcXFwiLFxcXCJnZW9Mb2NhdGlvblVybFxcXCI6XFxcImh0dHBzOi8vc2V2aWxsZWNsb3VkZ2F0ZXdheS1zdGcubWljcm9zb2Z0LmNvbS9cXFwiLFxcXCJkYXRhY2VudGVyXFxcIjpcXFwiRWFzdFVzMlxcXCIsXFxcInZvcnRleEdlb0xvY2F0aW9uXFxcIjpcXFwiU2FuZGJveFxcXCIsXFxcInZlcnNpb25cXFwiOlxcXCIxLjNcXFwifVwiLFwic2lnXCI6XCJKc0dGR2o3UCtIL1cvUEExcW9LTml3RXROZkU4YkhGblhxeks1SDhsQ09wc0RnRGNWTWpoT3BmQTZJTTJ3RFZadk5kWGhvZ0dEQ1FDWjNYdFJCbHRkcGFWc3pZNGtINVpHVkdnRUQxVE80ZCtCTjk2VDFSa3pOZ2NjZ2ZCWDNNQUw1bllUWXdiMGlUQUtFMGIxb3BmQmZrMzJQN3Q3b3A5dkhPeXZNMW5qdlZybVdWWWVSNk4rZFFrLzM4UDNUY2V3b2FkRmFUb3pidjBZK3dZOHgrbFcxeWN6bk1KMitQWTlxRHpabXoybE1rd0FlaDJwRTI4VW5MT0lhNjg0Y3U5RitHUlAveGhhR3dQWmpoc1JCSW51cHV5U1E2Y09YdE9kSERCQlRaZzVKSEhHMDBkNk9tUk5ONmxBelJWeFJURUVmaFFUVnN0U1poKzNMSjJTMGhmZGc9PVwiLFwic2hhMjU2c2lnXCI6XCJsVGI4ZittdkFveDRCckxPS0lqejFnTTNrRHREbG9wL21uNmZodmVEWjMvblVqb1lhNk81V2p4R0x2Z3lqZ0RtdThETkdPNUtqWWlxTVZ6Z0QzcHdqOVYwOXVOeUdYNGJUaXN0d1BnQTFLbGMrMUFLcmtWQTRGWGlQTHlST2tXdlhLM2dydFFJWU9nYjdSRlh6dzhnQlB5YlV0Z0FWbmNaMVFpdTAzblFLdGh5MFU3aXBlZUxaVE9oYVlhN001cTJxUTcya1BaSTZWUWlqSE42NVg3UTEvcm5rdUlSUkFmUEErZElIeE4wN0tpSlY2MGZsbDFZUUtOUlpSYUhKeGQ1UDd0RmdaaytEZE5mNVNXcHVaSTZTZE9MdExDN3VnbmdnK0krU2pUeUtvcVFKZElkWGRRaE5JK3I3WEM1L1M0ZlhnRVNtWmZKTUYxL0JtVlVFZUJDZlE9PVwiLFwiY2VydFwiOlwiTUlJRjVqQ0NBODZnQXdJQkFnSVRNd0FBQVkwdmh1VTl6R2x5b1FBQUFBQUJqVEFOQmdrcWhraUc5dzBCQVFzRkFEQitNUXN3Q1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1YyRnphR2x1WjNSdmJqRVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVNnd0pnWURWUVFERXg5TmFXTnliM052Wm5RZ1UyVmpkWEpsSUZObGNuWmxjaUJEUVNBeU1ERXhNQjRYRFRJd01EZ3dOakl3TlRBMU9Gb1hEVEl4TURnd05qSXdOVEExT0Zvd2dZb3hDekFKQmdOVkJBWVRBbFZUTVFzd0NRWURWUVFJRXdKWFFURVFNQTRHQTFVRUJ4TUhVbVZrYlc5dVpERWVNQndHQTFVRUNoTVZUV2xqY205emIyWjBJRU52Y25CdmNtRjBhVzl1TVI0d0hBWURWUVFMRXhWTmFXTnliM052Wm5RZ1EyOXljRzl5WVhScGIyNHhIREFhQmdOVkJBTVRFMU5sZG1sc2JHVXVWMmx1Wkc5M2N5NWpiMjB3Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRRENmcWtCcmV1Um1qdm90bDFFdURQWVplaVc1dUVERmV6MXhsYmh6cjVaa1BjSUJYT3RIMVZWRjRaUmVrdTFpK3ZMbTNON2xkVGl4c2RSZW0yU09iVkFGb1dDbjZ2cEYwL1ZYcWpmUTJHbyt2dk9UU1Q0Si9pQWxocXhialVVbkRyWFpXYUMvS2xtU0lYMjlHUng5bG1pT0IrWVBhRzlOTEE1U3F3emNad2hjTThzS3F0VDhHaWQ3Q3JFNGs1WldES0gyL1dPVTVsQ01iZTY2MWtrbWxKZDB2TlBDTXpyMUgzVmNmRG1qVVo4Q25WQzBFODlhVVA3VHhhME1uS0FzVFArQkpCNXJMenhkVlJRbGRNbmhHVXNXRU0ydUNOWXFOdWc4QWYrTGp3RytySXZrSVR3NVlDMUZDZy9qVHBvdHJnSFhmSGRqaURqa0F3ZWY1TlVkTmx0QWdNQkFBR2pnZ0ZPTUlJQlNqQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdIUVlEVlIwT0JCWUVGT0U1NVFoeno5bEhuWTl2aDVTWmtyMTdjbEtzTUI0R0ExVWRFUVFYTUJXQ0UxTmxkbWxzYkdVdVYybHVaRzkzY3k1amIyMHdId1lEVlIwakJCZ3dGb0FVTmxhSlpVbkxXNXN2UEt4Q0ZsQk5rYmt6MTVFd1V3WURWUjBmQkV3d1NqQklvRWFnUklaQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFXOXdjeTlqY213dlRXbGpVMlZqVTJWeVEwRXlNREV4WHpJd01URXRNVEF0TVRndVkzSnNNR0FHQ0NzR0FRVUZCd0VCQkZRd1VqQlFCZ2dyQmdFRkJRY3dBb1pFYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVc5d2N5OWpaWEowY3k5TmFXTlRaV05UWlhKRFFUSXdNVEZmTWpBeE1TMHhNQzB4T0M1amNuUXdEQVlEVlIwVEFRSC9CQUl3QURBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQWdFQVp3ZGxhWjg4U3BURFdUUjc5NWRHV2N0dUxUWmc2UDBqYmh4Q0dhOXBnb3AzSXZ1Qi9QYzJXT2Ruc1ZCYUpUZG5WN3NvcFZHa3V4Vjc1eWk2Q0NQM2sxNG0xQ1FhNk01cmNodmJuVEY0TFdjWld4U1g4Z0hjRWhObFdYV3hxU3FKMzNnSHVGNEc5SCs3VDM3UlNMb2Jqb1MyeVRhc21SRWtCNTI4b1gwWVU0cVpjeVdyK0xEMVovQk10dEhMUlZUZUtHdnpMaVpCNmhqWURybW9qUUxKZXZwSEdoTVdOTU9oR2RLd2pOS0crZGhVRHV6dTdsVXgwZzdhaUR3c1l4NzFTaU9ucDJWOSt5UEhET2R5OXlBRUNPb0N3bUprbW5qLzlDMmVNMDFDQjFZMUxTWHNiQUJtQVd3Si9iczhRNnhTWlJtSnkyRXJSQ3VTakl0MUQydzRTUFVMRFNNVTdIaDk3TWJpQVJDV25TMVRRMGg5azZFWVVmbW1ZaFNHQ0p3MXFlekFqZ2FmTngyYWcrRDhzRFFkQzRjVHhUSTk5aGthUm1DakFmeW1qcVdscUx5V0pCUmdvaXdTd21MVDFUbzRJNUVjZHFoQ1FNdEpoRVVRR2dpenk2ZUE2RlhtNHhmeExua08xSkNKSGJUejlqL2c4OW5zZ0hVN2V4SDVnZHhZQ0FDMGJkUlZLN1YrVlBDcExnLy9SemtlNm9mc1Y3WkxyQUpvN0EyQTZka0dVL09XeGhpVjJiY0VlUEpmSWsrVjM3UHp3c25yZ1JFV2RpM1pic3dBOU5aTTVzZGVSMFlFRm11bit0b2JCRGMzMlRidlVyTUpTb2tjcG9XNnRZczlkR0tUcE1GV01EZ09UeEZjSHljbHZrMjRVQVV2dXk2WVcvSVN2VlY4a3BRPVwiLFwiY2hhaW5cIjpbXCJNSUlHMkRDQ0JNQ2dBd0lCQWdJS1lUKzNHQUFBQUFBQUJEQU5CZ2txaGtpRzl3MEJBUXNGQURDQmlERUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV5TURBR0ExVUVBeE1wVFdsamNtOXpiMlowSUZKdmIzUWdRMlZ5ZEdsbWFXTmhkR1VnUVhWMGFHOXlhWFI1SURJd01URXdIaGNOTVRFeE1ERTRNakkxTlRFNVdoY05Nall4TURFNE1qTXdOVEU1V2pCK01Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LVjJGemFHbHVaM1J2YmpFUU1BNEdBMVVFQnhNSFVtVmtiVzl1WkRFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU2d3SmdZRFZRUURFeDlOYVdOeWIzTnZablFnVTJWamRYSmxJRk5sY25abGNpQkRRU0F5TURFeE1JSUNJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBZzhBTUlJQ0NnS0NBZ0VBMEF2QXBLZ1pnZUkyNWVLcTVmT3lGVmgxdnJUbFNmSGdoUG03RFdUdmhjR0JWYmp6NS9GdFFGVTl6b3RxMFlTVDlYVjhXNlRVZEJES012TWowNjd1ejU0RVdNTFpSOHZSZkFCQlNIRWJBV2NYR0svRy9uTURmdVR2UTV6dkFYRXFINEVtUTNlWVZGZHpuVlVyOEo2T2ZRWU9yQnRVOHliMytDTUlJb3VlQmgwM09QMXkwc3JsWThHYVduMnliYk5TcVc3cHJyWDhpemI1bnZyMkhGZ2JsMWFsRWVXM1V0dTc2ZkJVdjdUL0xHeTRYU2JPb0FyWDM1UHRmOTJzOFN4ekd0a1pOMVc2M1NKNGpxSFVtd240QnlJeGNiQ1VydUN3NXlaRVY1Q0JseFhPWWV4bDRrdnhoVklXTXZpMWVLcCt6VTNzZ3lHa3FKdSttbW9FNEtNY3pWWVliUDFyTDBJKzRqZnljcXZRZUhOeWU5N3NBRmpsSVRDakNEcVo3NS9EOTNvV2xtVzF3NEd2OURsd1NhLzJxZlpxQURqNXRBZ1o0Qm8xcFZaMklsOXE4bW11UHExWVJrMjRWUGFKUVVRZWNyRzhFaWRUMHNIL3NzMVFtQjYxOUx1MndvSTUyYXdiOGpzbmhHcXd4aVlMMXpvUTU3UGJmTk5XckZOTUMvbzdNVGQwMkZrcitRQjVHUVo3L1J3ZFF0UkJEUzhGRHRWclNTUC96ODM0ZW9MUDJqd3QzK2pZRWdRWXVoNklkN2lZSHhBSHU4Z0ZmZ3NKdjJ2ZDQwNWJzUG5IaEtZN3lreWZXMklwOThlaXFKV0ljQ3psd1Q4OFVpTlBRSnJETVlXREw3OHA4UjFRanlHV0I4N3Y4b0RDUkgyYll1OHZ3M2VKcTBWTlV6NENlZE1DQXdFQUFhT0NBVXN3Z2dGSE1CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1CMEdBMVVkRGdRV0JCUTJWb2xsU2N0Ym15ODhyRUlXVUUyUnVUUFhrVEFaQmdrckJnRUVBWUkzRkFJRURCNEtBRk1BZFFCaUFFTUFRVEFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZkJnTlZIU01FR0RBV2dCUnlMVG9DTVpCRHVSUUZUdUhxcDhjeDBTT0pOREJhQmdOVkhSOEVVekJSTUUrZ1RhQkxoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwTDJOeWJDOXdjbTlrZFdOMGN5OU5hV05TYjI5RFpYSkJkWFF5TURFeFh6SXdNVEZmTUROZk1qSXVZM0pzTUY0R0NDc0dBUVVGQndFQkJGSXdVREJPQmdnckJnRUZCUWN3QW9aQ2FIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFTOWpaWEowY3k5TmFXTlNiMjlEWlhKQmRYUXlNREV4WHpJd01URmZNRE5mTWpJdVkzSjBNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUNBUUJCeUdIQjlWdWVQcEV4OGJER3Z3a0J0SjIya0hUWENkdW1MZzJmeU9kMk5FYXZCMkNKVElHelBOWDBFalYxd25PbDlVMkVqTXVrWGErL2t2WVhDRmRDbFhKbEJYWjVyZTdSdXJndVZLTlJCNnhvNnlFTTR5V0J3czBxOHNQL3o4SzlTUmlheC9DRXhma1V2R3VWNVpidnMwTFNVOVZLb0JMRXJoSjJVd2xXRHAzMzA2WkppRkR5aWl5WElLSytUbmp2QldXM1M2RVdpTjR4eHdoQ0pIeWtlNTZkdkdBQVhtS1g0NVA4cC81YmV5WGY1Rk4vUzc3bVB2RGJBWGxDSEc2RmJIMjJSREQ3cFRlU2s3S2w3aUN0UDFQVnlmUW9hMWZCK0IxcXQxWXF0aWVCSEtZdG4rZjAwREdEbDZncXRxeStHMEgxNUlsZlZ2dmFXdE5lZlZXVUVINVRWL1JLUFVBcXlMMW5uNFRoRU83OTJtc1Zna244UmgzL1JRWjBuRUlVN2NVNTA3UE5DNE1ua0VOUmt2SkVncTV1bWhVWHNobjZ4MFZzbUFGN3Z6ZXBzSWlra3J3NE9PQWQ1SHlYbUJvdVgrODRaYmMxTDcxL1R5SDZ4SXpTYndiNVNUWHEzeUFQSmFycVlLc3NIMHVKL0xmNlhGU1FTejZpS0U5czVGSmx3ZjJRSElXQ2lHN3BwbFhkSVNoNVJiQVU1UXJNNWwvRXU5dGhOR21mckNZNDk4RXBRUWdWTGt5Zzkva01QdDVmcXdnSkxZT3NyRFNEWXZUSlNVS0pKYlZ1c2tmRnN6bWdzU0FiTExHT0JHK2xNRWtjMEVicFFGdjByVzY2MjRKS2h4SktnQWxOMjk5MnVRVmJHK0M3SUhCZkFDWEgwdzc2RnExN0lwNXhDQT09XCIsXCJNSUlGN1RDQ0E5V2dBd0lCQWdJUVA0dkl0Znlmc3BaRHRXbldiRUxoUkRBTkJna3Foa2lHOXcwQkFRc0ZBRENCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd0hoY05NVEV3TXpJeU1qSXdOVEk0V2hjTk16WXdNekl5TWpJeE16QTBXakNCaURFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDbGRoYzJocGJtZDBiMjR4RURBT0JnTlZCQWNUQjFKbFpHMXZibVF4SGpBY0JnTlZCQW9URlUxcFkzSnZjMjltZENCRGIzSndiM0poZEdsdmJqRXlNREFHQTFVRUF4TXBUV2xqY205emIyWjBJRkp2YjNRZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJREl3TVRFd2dnSWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUNEd0F3Z2dJS0FvSUNBUUN5Z0VHcU5UaE5FM0l5YUNKTnVMTHgvOVZTdkd6SDlkSktqRGJ1MGNKY2ZveUtycThUS0cvQWMrTTZ6dEFscUZvNmJlK291Rm1yRXlOb3pRd3BoOUZ2Z0Z5UFJIOWRrQUZTV0t4UnhWOHFoOXpjMkFvZHdRTzVlN0JXNktQZVpHSENudmp6Zkxuc0RiVlUva3kyWlUrSThKeEltUXhDQ3dsOE1Wa1hlUVo0S0kySk9rd0RKYjV4YWx3TDU0UmdwSmtpNDlLdmhLU24rOUdZN1F5cDNwU0o0UTZnM01ET21UM3FDRks3Vm5ua0g0UzZIcmkweEVsY1R6RkxoOTNkQldjbW1ZRGdjUkdqdUtWQjRxUlR1ZmN5S1lNTUU3ODJYZ1N6UzBOSEwydmlrUjdUbUUvZFFnZkk2QjBTL0ptcGF6NlNmc2pXYVRyOFpMMjJDWjNLL1F3TG9wdDNZRXNEbEtRd2FSTFdRaTNCUVV6SzNLcjlqMXVEUnByWi9MSFI0N1BKZjBoNnpTVHdRWTljZE5Dc3NCQWdCa20zeHkwaHlGZmowSWJ6QTJqNzBNNXh3WW1aU21RQmJQM3NNSkhQUVR5U3grVzZoaDFoaE1kZmd6bGlyclNTTDBmekMvaFY2NkFmV2RDN2RKc2UwSGJtOHVrRzF4RG8rbVRlYWNZMWxvZ0M4RWE0UHllWmI4dHhpU2sxOTBnV0FqV1AxWGw4VFFMUFgrdUtnMDlGY1lqNXFRMU9jdW5DbkFmUFNSdE9CQTVqVVl4ZTJBREJWU3kyeHVEQ1pVN0pORG4xbkxQRWZ1aGhiaE5mRmNSZjJYN3RIYzd1Uk96TExvYXg3RGoyY08yclhCUEIyUThOeDRDeVZlMDA5NnliNU1QYTUwYzhwcldQTWQvRlM2L3I4UUlEQVFBQm8xRXdUekFMQmdOVkhROEVCQU1DQVlZd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVWNpMDZBakdRUTdrVUJVN2g2cWZITWRFamlUUXdFQVlKS3dZQkJBR0NOeFVCQkFNQ0FRQXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnSUJBSDl5encrM3hSWGJtOEJKeWlaYi9wNFQ1dFB3MHR1WFgvSkxQMDJ6cmhtdTdkZVhvS3p2cVRxandrR3c1YmlSbmhPQkpBUG1DZjAvVjBBNUlTUlcwUkF2UzBDcE5vWkx0Rk5YbXZ2eGZvbVBFZjRZYkZHcTZPMEpsYlhsY2NtaDZZZDFwaFYveVg0M1ZGNTBrOFhEWjh3TlQydW9Gd3h0Q0pKK2k5MkJxaTF3SWNNOUJoUzd2eVJlcDRUWFB3OGhJcjFMQUFiYmx4ellYdFRGQzF5SGJsQ2s2TU00cFB2TExNV1NacHVGWHN0NmJKTjhnQ2xZVzFlMVFHbTZDSG1tWkdJVm5ZZVdSYlZtSXlBRGl4eHpvTk9pZVRQZ1VGbUcyeS9sQWlYcWN5cWZBQlRJTnNlU08rbE9BT3pZVmdtNU0wa1MwbFFMQWF1c1I3YVJLWDFNdEhXQVVnSG95b0wybjh5c25JOFg2aThtc0t0eXJBditubEVleDBOVlowOVJzMWZXdHV6dVVyYzY2VTdoMTRHSXZFK09kYnRMcVBBMXFpYlVaMmRKc25CTU81UGNIZDk0a0laeXNqaWswZHlTVGNsWTZ5c1NYTlE3cm94cnNJUGxBVC80Q1RMMmt6VTBJcS9kTncxM0NZQXJ6VWdBOFl5WkdVY0ZBZW5SdjlGTzBPWW9RemVacEFwS0NObWFjWFBTcXMweEUyTjJvVGR2a2pnZWZSSThaakxueTIzaC9GS0ozY3JXWmdXYWxtRytvaWpISEtPbk5sQThPcVRmU203bWh6dk82L0RnZ1RlZEV6eFNqcjI1SFRUR0hkVUthajJZS1hDTWlTclJxNElRU0IvYzlPK2x4YnRWR2poamhFNjNiSzJWVk94bEloQkpGN2pBSHNjUHJGUkhcIl19IiA+ICVUTVAlXHNlbnNlVG1wLnR4dCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCiAgIHNldCAiZXJyb3JEZXNjcmlwdGlvbj1VbmFibGUgdG8gd3JpdGUgb25ib2FyZGluZyBpbmZvcm1hdGlvbiB0byByZWdpc3RyeS4iCiAgIHNldCBlcnJvckNvZGU9MTAKICAgc2V0IGxhc3RFcnJvcj0lRVJST1JMRVZFTCUKICAgR09UTyBFUlJPUgopCgplY2hvIFN0YXJ0aW5nIHRoZSBzZXJ2aWNlLCBpZiBub3QgYWxyZWFkeSBydW5uaW5nID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgRVFVIDAgR09UTyBSVU5OSU5HCgpuZXQgc3RhcnQgc2Vuc2UgPiAlVE1QJVxzZW5zZVRtcC50eHQgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAogICBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBoYXMgbm90IHN0YXJ0ZWQgeWV0ID5OVUwgMj4mMQogICBHT1RPIFdBSVRfRk9SX1RIRV9TRVJWSUNFX1RPX1NUQVJUCikKZ290byBTVUNDRUVERUQKCjpSVU5OSU5HCnNldCAicnVubmluZ091dHB1dD1UaGUgV2luZG93cyBEZWZlbmRlciBBZHZhbmNlZCBUaHJlYXQgUHJvdGVjdGlvbiBTZXJ2aWNlIGlzIGFscmVhZHkgcnVubmluZyEiCmVjaG8gJXJ1bm5pbmdPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMTAgL2QgIiVydW5uaW5nT3V0cHV0JSIgPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpFUlJPUgpTZXQgL1AgZXJyb3JNc2c9PCVUTVAlXHNlbnNlVG1wLnR4dApzZXQgImVycm9yT3V0cHV0PVtFcnJvciBJZDogJWVycm9yQ29kZSUsIEVycm9yIExldmVsOiAlbGFzdEVycm9yJV0gJWVycm9yRGVzY3JpcHRpb24lIEVycm9yIG1lc3NhZ2U6ICVlcnJvck1zZyUiCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuRXJyb3IsIEtleXdvcmRzID0gKEV2ZW50S2V5d29yZHMpMHgwMDAwMjAwMDAwMDAwMDAwLCBUYWdzID0gKEV2ZW50VGFncykweDAyMDAwMDB9OyBwdWJsaWMgdm9pZCBXcml0ZU9uYm9hcmRpbmdNZXNzYWdlKHN0cmluZyBtZXNzYWdlKXtlcy5Xcml0ZShcIk9uYm9hcmRpbmdTY3JpcHRcIiwgVGVsZW1ldHJ5Q3JpdGljYWxPcHRpb24sIG5ldyBPbmJvYXJkaW5nIHtNZXNzYWdlID0gbWVzc2FnZX0pO30gcHJpdmF0ZSBzdGF0aWMgcmVhZG9ubHkgc3RyaW5nW10gdGVsZW1ldHJ5VHJhaXRzID0geyBcIkVUV19HUk9VUFwiLCBcIns1RUNCMEJBQy1COTMwLTQ3RjUtQThBNC1FODI1MzUyOUVEQjd9XCIgfTsgcHJpdmF0ZSBFdmVudFNvdXJjZSBlcyA9IG5ldyBFdmVudFNvdXJjZShcIk1pY3Jvc29mdC5XaW5kb3dzLlNlbnNlLkNsaWVudC5NYW5hZ2VtZW50XCIsRXZlbnRTb3VyY2VTZXR0aW5ncy5FdHdTZWxmRGVzY3JpYmluZ0V2ZW50Rm9ybWF0LHRlbGVtZXRyeVRyYWl0cyk7fX0nOyAkbG9nZ2VyID0gTmV3LU9iamVjdCAtVHlwZU5hbWUgU2Vuc2UuVHJhY2U7ICRsb2dnZXIuV3JpdGVPbmJvYXJkaW5nTWVzc2FnZSgnJWVycm9yT3V0cHV0JScpIiA+TlVMIDI+JjEKZWNobyAlZXJyb3JPdXRwdXQlID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBFcnJvciAvaWQgJWVycm9yQ29kZSUgL2QgIiVlcnJvck91dHB1dCUiID5OVUwgMj4mMQpHT1RPIENMRUFOVVAKCjpTVUNDRUVERUQKZWNobyBGaW5pc2hlZCBwZXJmb3JtaW5nIG9uYm9hcmRpbmcgb3BlcmF0aW9ucyA+TlVMIDI+JjEKZWNoby4gPk5VTCAyPiYxCkdPVE8gV0FJVF9GT1JfVEhFX1NFUlZJQ0VfVE9fU1RBUlQKCjpXQUlUX0ZPUl9USEVfU0VSVklDRV9UT19TVEFSVAplY2hvIFdhaXRpbmcgZm9yIHRoZSBzZXJ2aWNlIHRvIHN0YXJ0ID5OVUwgMj4mMQplY2hvLiA+TlVMIDI+JjEKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9SVU5OSU5HX1dBSVQKc2MgcXVlcnkgIlNFTlNFIiB8IGZpbmQgL2kgIlJVTk5JTkciID5OVUwgMj4mMQppZiAlRVJST1JMRVZFTCUgTkVRIDAgKAoJSUYgJWNvdW50ZXIlIEVRVSA0ICgKCQlzZXQgImVycm9yRGVzY3JpcHRpb249VW5hYmxlIHRvIHN0YXJ0IFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZS4iCgkJc2V0IGVycm9yQ29kZT0xNQoJCXNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfUlVOTklOR19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfU1RBVFVTX1dBSVQKUkVHIHF1ZXJ5ICJIS0xNXFNPRlRXQVJFXE1pY3Jvc29mdFxXaW5kb3dzIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uXFN0YXR1cyIgL3YgT25ib2FyZGluZ1N0YXRlIC9yZWc6NjQgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT0zNQogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1NUQVRVU19XQUlUCikKCnNldCAvYSBjb3VudGVyPTAKCjpTRU5TRV9PTkJPQVJERURfV0FJVApSRUcgcXVlcnkgIkhLTE1cU09GVFdBUkVcTWljcm9zb2Z0XFdpbmRvd3MgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb25cU3RhdHVzIiAvdiBPbmJvYXJkaW5nU3RhdGUgL3JlZzo2NCB8IGZpbmQgL2kgIjB4MSIgPk5VTCAyPiYxCmlmICVFUlJPUkxFVkVMJSBORVEgMCAoCglJRiAlY291bnRlciUgRVFVIDQgKAoJCUBlY2hvIFdpbmRvd3MgRGVmZW5kZXIgQWR2YW5jZWQgVGhyZWF0IFByb3RlY3Rpb24gU2VydmljZSBpcyBub3QgcnVubmluZyBhcyBleHBlY3RlZD4gJVRNUCVcc2Vuc2VUbXAudHh0CgkJc2V0IGVycm9yQ29kZT00MAogICAgIHNldCBsYXN0RXJyb3I9JUVSUk9STEVWRUwlCgkJR09UTyBFUlJPUgoJKQoKCXNldCAvYSBjb3VudGVyPSVjb3VudGVyJSsxCgoJdGltZW91dCA1ID5OVUwgMj4mMQoJR09UTyA6U0VOU0VfT05CT0FSREVEX1dBSVQKKQoKc2V0ICJzdWNjZXNzT3V0cHV0PVN1Y2Nlc3NmdWxseSBvbmJvYXJkZWQgbWFjaGluZSB0byBXaW5kb3dzIERlZmVuZGVyIEFkdmFuY2VkIFRocmVhdCBQcm90ZWN0aW9uIgplY2hvICVzdWNjZXNzT3V0cHV0JSA+TlVMIDI+JjEKZWNoby4KZXZlbnRjcmVhdGUgL2wgQXBwbGljYXRpb24gL3NvIFdEQVRQT25ib2FyZGluZyAvdCBJbmZvcm1hdGlvbiAvaWQgMjAgL2QgIiVzdWNjZXNzT3V0cHV0JSIgPk5VTCAyPiYxCiVwb3dlcnNoZWxsUGF0aCUgLUV4ZWN1dGlvblBvbGljeSBCeXBhc3MgLU5vUHJvZmlsZSAtQ29tbWFuZCAiQWRkLVR5cGUgJ3VzaW5nIFN5c3RlbTsgdXNpbmcgU3lzdGVtLkRpYWdub3N0aWNzOyB1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3MuVHJhY2luZzsgbmFtZXNwYWNlIFNlbnNlIHsgW0V2ZW50RGF0YShOYW1lID0gXCJPbmJvYXJkaW5nXCIpXXB1YmxpYyBzdHJ1Y3QgT25ib2FyZGluZ3twdWJsaWMgc3RyaW5nIE1lc3NhZ2UgeyBnZXQ7IHNldDsgfX0gcHVibGljIGNsYXNzIFRyYWNlIHtwdWJsaWMgc3RhdGljIEV2ZW50U291cmNlT3B0aW9ucyBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiA9IG5ldyBFdmVudFNvdXJjZU9wdGlvbnMoKXtMZXZlbCA9IEV2ZW50TGV2ZWwuSW5mb3JtYXRpb25hbCwgS2V5d29yZHMgPSAoRXZlbnRLZXl3b3JkcykweDAwMDAyMDAwMDAwMDAwMDAsIFRhZ3MgPSAoRXZlbnRUYWdzKTB4MDIwMDAwMH07IHB1YmxpYyB2b2lkIFdyaXRlT25ib2FyZGluZ01lc3NhZ2Uoc3RyaW5nIG1lc3NhZ2Upe2VzLldyaXRlKFwiT25ib2FyZGluZ1NjcmlwdFwiLCBUZWxlbWV0cnlDcml0aWNhbE9wdGlvbiwgbmV3IE9uYm9hcmRpbmcge01lc3NhZ2UgPSBtZXNzYWdlfSk7fSBwcml2YXRlIHN0YXRpYyByZWFkb25seSBzdHJpbmdbXSB0ZWxlbWV0cnlUcmFpdHMgPSB7IFwiRVRXX0dST1VQXCIsIFwiezVFQ0IwQkFDLUI5MzAtNDdGNS1BOEE0LUU4MjUzNTI5RURCN31cIiB9OyBwcml2YXRlIEV2ZW50U291cmNlIGVzID0gbmV3IEV2ZW50U291cmNlKFwiTWljcm9zb2Z0LldpbmRvd3MuU2Vuc2UuQ2xpZW50Lk1hbmFnZW1lbnRcIixFdmVudFNvdXJjZVNldHRpbmdzLkV0d1NlbGZEZXNjcmliaW5nRXZlbnRGb3JtYXQsdGVsZW1ldHJ5VHJhaXRzKTt9fSc7ICRsb2dnZXIgPSBOZXctT2JqZWN0IC1UeXBlTmFtZSBTZW5zZS5UcmFjZTsgJGxvZ2dlci5Xcml0ZU9uYm9hcmRpbmdNZXNzYWdlKCclc3VjY2Vzc091dHB1dCUnKSIgPk5VTCAyPiYxCiIlUFJPR1JBTUZJTEVTJVxXaW5kb3dzIERlZmVuZGVyXE1wQ21kUnVuLmV4ZSIgLVJlbG9hZEVuZ2luZSA+TlVMIDI+JjEKCkdPVE8gQ0xFQU5VUAoKOkNMRUFOVVAKaWYgZXhpc3QgJVRNUCVcc2Vuc2VUbXAudHh0IGRlbCAlVE1QJVxzZW5zZVRtcC50eHQKRVhJVCAvQiAlZXJyb3JDb2RlJQo=="),
	// 			},
	// 	}},
	// }
}
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 {
	// The resource of the configuration or data needed to onboard the machine to MDE
	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 {
	// List of all MDE onboarding data resources
	MdeOnboardingDataList
}

MdeOnboardingsClientListResponse contains the response from method MdeOnboardingsClient.List.

type MinimalRiskLevel added in v0.14.0

type MinimalRiskLevel string

MinimalRiskLevel - Defines the minimal attack path risk level which will be sent as email notifications

const (
	// MinimalRiskLevelCritical - Get notifications on new attack paths with Critical risk level
	MinimalRiskLevelCritical MinimalRiskLevel = "Critical"
	// MinimalRiskLevelHigh - Get notifications on new attack paths with High or Critical risk level
	MinimalRiskLevelHigh MinimalRiskLevel = "High"
	// MinimalRiskLevelLow - Get notifications on new attach paths with Low, Medium, High or Critical risk level
	MinimalRiskLevelLow MinimalRiskLevel = "Low"
	// MinimalRiskLevelMedium - Get notifications on new attach paths with Medium, High or Critical risk level
	MinimalRiskLevelMedium MinimalRiskLevel = "Medium"
)

func PossibleMinimalRiskLevelValues added in v0.14.0

func PossibleMinimalRiskLevelValues() []MinimalRiskLevel

PossibleMinimalRiskLevelValues returns the possible values for the MinimalRiskLevel const type.

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 - 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 MipIntegrationStatus added in v0.11.0

type MipIntegrationStatus string

MipIntegrationStatus - Microsoft information protection integration status

const (
	MipIntegrationStatusNoAutoLabelingRules MipIntegrationStatus = "noAutoLabelingRules"
	MipIntegrationStatusNoConsent           MipIntegrationStatus = "noConsent"
	MipIntegrationStatusNoMipLabels         MipIntegrationStatus = "noMipLabels"
	MipIntegrationStatusOk                  MipIntegrationStatus = "Ok"
)

func PossibleMipIntegrationStatusValues added in v0.11.0

func PossibleMipIntegrationStatusValues() []MipIntegrationStatus

PossibleMipIntegrationStatusValues returns the possible values for the MipIntegrationStatus const type.

type MqttC2DMessagesNotInAllowedRange

type MqttC2DMessagesNotInAllowedRange struct {
	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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 NotificationsSource added in v0.14.0

type NotificationsSource struct {
	// REQUIRED; The source type that will trigger the notification
	SourceType *SourceType
}

NotificationsSource - A valid notification source type

func (*NotificationsSource) GetNotificationsSource added in v0.14.0

func (n *NotificationsSource) GetNotificationsSource() *NotificationsSource

GetNotificationsSource implements the NotificationsSourceClassification interface for type NotificationsSource.

func (NotificationsSource) MarshalJSON added in v0.14.0

func (n NotificationsSource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NotificationsSource.

func (*NotificationsSource) UnmarshalJSON added in v0.14.0

func (n *NotificationsSource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationsSource.

type NotificationsSourceAlert added in v0.14.0

type NotificationsSourceAlert struct {
	// REQUIRED; The source type that will trigger the notification
	SourceType *SourceType

	// Defines the minimal alert severity which will be sent as email notifications
	MinimalSeverity *MinimalSeverity
}

NotificationsSourceAlert - Alert notification source

func (*NotificationsSourceAlert) GetNotificationsSource added in v0.14.0

func (n *NotificationsSourceAlert) GetNotificationsSource() *NotificationsSource

GetNotificationsSource implements the NotificationsSourceClassification interface for type NotificationsSourceAlert.

func (NotificationsSourceAlert) MarshalJSON added in v0.14.0

func (n NotificationsSourceAlert) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NotificationsSourceAlert.

func (*NotificationsSourceAlert) UnmarshalJSON added in v0.14.0

func (n *NotificationsSourceAlert) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationsSourceAlert.

type NotificationsSourceAttackPath added in v0.14.0

type NotificationsSourceAttackPath struct {
	// REQUIRED; The source type that will trigger the notification
	SourceType *SourceType

	// Defines the minimal attach path risk level which will be sent as email notifications
	MinimalRiskLevel *MinimalRiskLevel
}

NotificationsSourceAttackPath - Attack path notification source

func (*NotificationsSourceAttackPath) GetNotificationsSource added in v0.14.0

func (n *NotificationsSourceAttackPath) GetNotificationsSource() *NotificationsSource

GetNotificationsSource implements the NotificationsSourceClassification interface for type NotificationsSourceAttackPath.

func (NotificationsSourceAttackPath) MarshalJSON added in v0.14.0

func (n NotificationsSourceAttackPath) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NotificationsSourceAttackPath.

func (*NotificationsSourceAttackPath) UnmarshalJSON added in v0.14.0

func (n *NotificationsSourceAttackPath) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationsSourceAttackPath.

type NotificationsSourceClassification added in v0.14.0

type NotificationsSourceClassification interface {
	// GetNotificationsSource returns the NotificationsSource content of the underlying type.
	GetNotificationsSource() *NotificationsSource
}

NotificationsSourceClassification provides polymorphic access to related types. Call the interface's GetNotificationsSource() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *NotificationsSource, *NotificationsSourceAlert, *NotificationsSourceAttackPath

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"
	OfferingTypeCspmMonitorGitLab        OfferingType = "CspmMonitorGitLab"
	OfferingTypeCspmMonitorGithub        OfferingType = "CspmMonitorGithub"
	OfferingTypeDefenderCspmAws          OfferingType = "DefenderCspmAws"
	OfferingTypeDefenderCspmGcp          OfferingType = "DefenderCspmGcp"
	OfferingTypeDefenderForContainersAws OfferingType = "DefenderForContainersAws"
	OfferingTypeDefenderForContainersGcp OfferingType = "DefenderForContainersGcp"
	OfferingTypeDefenderForDatabasesAws  OfferingType = "DefenderForDatabasesAws"
	OfferingTypeDefenderForDatabasesGcp  OfferingType = "DefenderForDatabasesGcp"
	OfferingTypeDefenderForServersAws    OfferingType = "DefenderForServersAws"
	OfferingTypeDefenderForServersGcp    OfferingType = "DefenderForServersGcp"
)

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

	// REQUIRED; The platform where the assessed resource resides
	Source *Source

	// REQUIRED; The oms agent Id installed on the machine
	SourceComputerID *string

	// REQUIRED; The unique Id of the machine
	Vmuuid *string

	// REQUIRED; Azure resource Id of the workspace the machine is attached to
	WorkspaceID *string
}

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

	// REQUIRED; The name of the machine
	MachineName *string

	// REQUIRED; The Sql server name installed on the machine
	ServerName *string

	// REQUIRED; The platform where the assessed resource resides
	Source *Source

	// REQUIRED; The oms agent Id installed on the machine
	SourceComputerID *string

	// REQUIRED; The unique Id of the machine
	Vmuuid *string

	// REQUIRED; Azure resource Id of the workspace the machine is attached to
	WorkspaceID *string
}

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 OnUploadProperties added in v0.13.0

type OnUploadProperties struct {
	// Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
	CapGBPerMonth *int32

	// Indicates whether On Upload malware scanning should be enabled.
	IsEnabled *bool
}

OnUploadProperties - Properties of On Upload malware scanning.

func (OnUploadProperties) MarshalJSON added in v0.13.0

func (o OnUploadProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OnUploadProperties.

func (*OnUploadProperties) UnmarshalJSON added in v0.13.0

func (o *OnUploadProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OnUploadProperties.

type OnboardingState added in v0.13.0

type OnboardingState string

OnboardingState - Details about resource onboarding status across all connectors. OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. Onboarded - this resource has already been onboarded by the specified connector. NotOnboarded - this resource has not been onboarded to any connector. NotApplicable - the onboarding state is not applicable to the current endpoint.

const (
	OnboardingStateNotApplicable             OnboardingState = "NotApplicable"
	OnboardingStateNotOnboarded              OnboardingState = "NotOnboarded"
	OnboardingStateOnboarded                 OnboardingState = "Onboarded"
	OnboardingStateOnboardedByOtherConnector OnboardingState = "OnboardedByOtherConnector"
)

func PossibleOnboardingStateValues added in v0.13.0

func PossibleOnboardingStateValues() []OnboardingState

PossibleOnboardingStateValues returns the possible values for the OnboardingState const type.

type Operation

type Operation struct {
	// Security operation display
	Display *OperationDisplay

	// READ-ONLY; Name of the operation
	Name *string

	// READ-ONLY; Where the operation is originated
	Origin *string
}

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

	// READ-ONLY; The display name of the security operation.
	Operation *string

	// READ-ONLY; The resource provider for the operation.
	Provider *string

	// READ-ONLY; The display name of the resource the operation applies to.
	Resource *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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 OperationResult added in v0.11.0

type OperationResult string

OperationResult - The status of the long run operation result of governance rule

const (
	// OperationResultCanceled - The operation canceled
	OperationResultCanceled OperationResult = "Canceled"
	// OperationResultFailed - The operation failed
	OperationResultFailed OperationResult = "Failed"
	// OperationResultSucceeded - The operation succeeded
	OperationResultSucceeded OperationResult = "Succeeded"
)

func PossibleOperationResultValues added in v0.11.0

func PossibleOperationResultValues() []OperationResult

PossibleOperationResultValues returns the possible values for the OperationResult const type.

type OperationResultAutoGenerated added in v0.11.0

type OperationResultAutoGenerated struct {
	// READ-ONLY; The status of the long run operation result of governance rule
	Status *OperationResult
}

OperationResultAutoGenerated - Long run operation status of governance rule over a given scope

func (OperationResultAutoGenerated) MarshalJSON added in v0.11.0

func (o OperationResultAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationResultAutoGenerated.

func (*OperationResultAutoGenerated) UnmarshalJSON added in v0.11.0

func (o *OperationResultAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultAutoGenerated.

type OperationStatus added in v0.11.0

type OperationStatus struct {
	// The operation status code.
	Code *string

	// Additional information regarding the success/failure of the operation.
	Message *string
}

OperationStatus - A status describing the success/failure of the enablement/disablement operation.

func (OperationStatus) MarshalJSON added in v0.11.0

func (o OperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationStatus.

func (*OperationStatus) UnmarshalJSON added in v0.11.0

func (o *OperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus.

type OperationStatusAutoGenerated added in v0.13.0

type OperationStatusAutoGenerated struct {
	// The operation status code.
	Code *Code

	// Additional information regarding the success/failure of the operation.
	Message *string
}

OperationStatusAutoGenerated - A status describing the success/failure of the extension's enablement/disablement operation.

func (OperationStatusAutoGenerated) MarshalJSON added in v0.13.0

func (o OperationStatusAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationStatusAutoGenerated.

func (*OperationStatusAutoGenerated) UnmarshalJSON added in v0.13.0

func (o *OperationStatusAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusAutoGenerated.

type OperationStatusResult added in v0.13.0

type OperationStatusResult struct {
	// REQUIRED; Operation status.
	Status *string

	// The end time of the operation.
	EndTime *time.Time

	// If present, details of the operation error.
	Error *ErrorDetailAutoGenerated

	// Fully qualified ID for the async operation.
	ID *string

	// Name of the async operation.
	Name *string

	// The operations list.
	Operations []*OperationStatusResult

	// Percent of the operation that is complete.
	PercentComplete *float32

	// The start time of the operation.
	StartTime *time.Time
}

OperationStatusResult - The current status of an async operation.

func (OperationStatusResult) MarshalJSON added in v0.13.0

func (o OperationStatusResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.

func (*OperationStatusResult) UnmarshalJSON added in v0.13.0

func (o *OperationStatusResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.

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.NewListPager method.

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// List of possible operations for Microsoft.Security resource provider
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

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 OperatorList added in v0.11.0

type OperatorList struct {
	// REQUIRED; List of SecurityOperator configurations
	Value []*OperatorResource
}

OperatorList - List of SecurityOperator response.

func (OperatorList) MarshalJSON added in v0.11.0

func (o OperatorList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperatorList.

func (*OperatorList) UnmarshalJSON added in v0.11.0

func (o *OperatorList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperatorList.

type OperatorResource added in v0.11.0

type OperatorResource struct {
	// Identity for the resource.
	Identity *Identity

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

OperatorResource - Security operator under a given subscription and pricing

func (OperatorResource) MarshalJSON added in v0.11.0

func (o OperatorResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperatorResource.

func (*OperatorResource) UnmarshalJSON added in v0.11.0

func (o *OperatorResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperatorResource.

type OperatorsClient added in v0.11.0

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

OperatorsClient contains the methods for the SecurityOperators group. Don't use this type directly, use NewOperatorsClient() instead.

func NewOperatorsClient added in v0.11.0

func NewOperatorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperatorsClient, error)

NewOperatorsClient creates a new instance of OperatorsClient 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 (*OperatorsClient) CreateOrUpdate added in v0.11.0

func (client *OperatorsClient) CreateOrUpdate(ctx context.Context, pricingName string, securityOperatorName string, options *OperatorsClientCreateOrUpdateOptions) (OperatorsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates Microsoft Defender for Cloud security operator on the given scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01-preview

  • pricingName - name of the pricing configuration
  • securityOperatorName - name of the securityOperator
  • options - OperatorsClientCreateOrUpdateOptions contains the optional parameters for the OperatorsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/PutSecurityOperatorByName_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperatorsClient().CreateOrUpdate(ctx, "CloudPosture", "DefenderCSPMSecurityOperator", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperatorResource = armsecurity.OperatorResource{
	// 	Name: to.Ptr("DefenderCSPMSecurityOperator"),
	// 	Type: to.Ptr("Microsoft.Security/pricings/securityOperator"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator"),
	// 	Identity: &armsecurity.Identity{
	// 		Type: to.Ptr("SystemAssigned"),
	// 		PrincipalID: to.Ptr("44ee8e7e-7f52-4750-b937-27490fbf7663"),
	// 		TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 	},
	// }
}
Output:

func (*OperatorsClient) Delete added in v0.11.0

func (client *OperatorsClient) Delete(ctx context.Context, pricingName string, securityOperatorName string, options *OperatorsClientDeleteOptions) (OperatorsClientDeleteResponse, error)

Delete - Delete Microsoft Defender for Cloud securityOperator in the subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01-preview

  • pricingName - name of the pricing configuration
  • securityOperatorName - name of the securityOperator
  • options - OperatorsClientDeleteOptions contains the optional parameters for the OperatorsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/DeleteSecurityOperatorByName_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewOperatorsClient().Delete(ctx, "CloudPosture", "DefenderCSPMSecurityOperator", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*OperatorsClient) Get added in v0.11.0

func (client *OperatorsClient) Get(ctx context.Context, pricingName string, securityOperatorName string, options *OperatorsClientGetOptions) (OperatorsClientGetResponse, error)

Get - Get a specific security operator for the requested scope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01-preview

  • pricingName - name of the pricing configuration
  • securityOperatorName - name of the securityOperator
  • options - OperatorsClientGetOptions contains the optional parameters for the OperatorsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/GetSecurityOperatorByName_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperatorsClient().Get(ctx, "CloudPosture", "DefenderCSPMSecurityOperator", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperatorResource = armsecurity.OperatorResource{
	// 	Name: to.Ptr("DefenderCSPMSecurityOperator"),
	// 	Type: to.Ptr("Microsoft.Security/pricings/securityOperator"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator"),
	// 	Identity: &armsecurity.Identity{
	// 		Type: to.Ptr("SystemAssigned"),
	// 		PrincipalID: to.Ptr("44ee8e7e-7f52-4750-b937-27490fbf7663"),
	// 		TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 	},
	// }
}
Output:

func (*OperatorsClient) List added in v0.11.0

List - Lists Microsoft Defender for Cloud securityOperators in the subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01-preview

  • pricingName - name of the pricing configuration
  • options - OperatorsClientListOptions contains the optional parameters for the OperatorsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ListSecurityOperators_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperatorsClient().List(ctx, "CloudPosture", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperatorList = armsecurity.OperatorList{
	// 	Value: []*armsecurity.OperatorResource{
	// 		{
	// 			Name: to.Ptr("DefenderCSPMSecurityOperator"),
	// 			Type: to.Ptr("Microsoft.Security/pricings/securityOperator"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator"),
	// 			Identity: &armsecurity.Identity{
	// 				Type: to.Ptr("SystemAssigned"),
	// 				PrincipalID: to.Ptr("44ee8e7e-7f52-4750-b937-27490fbf7663"),
	// 				TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 			},
	// 	}},
	// }
}
Output:

type OperatorsClientCreateOrUpdateOptions added in v0.11.0

type OperatorsClientCreateOrUpdateOptions struct {
}

OperatorsClientCreateOrUpdateOptions contains the optional parameters for the OperatorsClient.CreateOrUpdate method.

type OperatorsClientCreateOrUpdateResponse added in v0.11.0

type OperatorsClientCreateOrUpdateResponse struct {
	// Security operator under a given subscription and pricing
	OperatorResource
}

OperatorsClientCreateOrUpdateResponse contains the response from method OperatorsClient.CreateOrUpdate.

type OperatorsClientDeleteOptions added in v0.11.0

type OperatorsClientDeleteOptions struct {
}

OperatorsClientDeleteOptions contains the optional parameters for the OperatorsClient.Delete method.

type OperatorsClientDeleteResponse added in v0.11.0

type OperatorsClientDeleteResponse struct {
}

OperatorsClientDeleteResponse contains the response from method OperatorsClient.Delete.

type OperatorsClientGetOptions added in v0.11.0

type OperatorsClientGetOptions struct {
}

OperatorsClientGetOptions contains the optional parameters for the OperatorsClient.Get method.

type OperatorsClientGetResponse added in v0.11.0

type OperatorsClientGetResponse struct {
	// Security operator under a given subscription and pricing
	OperatorResource
}

OperatorsClientGetResponse contains the response from method OperatorsClient.Get.

type OperatorsClientListOptions added in v0.11.0

type OperatorsClientListOptions struct {
}

OperatorsClientListOptions contains the optional parameters for the OperatorsClient.List method.

type OperatorsClientListResponse added in v0.11.0

type OperatorsClientListResponse struct {
	// List of SecurityOperator response.
	OperatorList
}

OperatorsClientListResponse contains the response from method OperatorsClient.List.

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

	// Whether the application is commonly run on the machine
	Common *bool

	// The configuration status of the machines group or machine or rule
	ConfigurationStatus *ConfigurationStatus

	// The type of the file (for Linux files - Executable is used)
	FileType *FileType

	// The full path of the file, or an identifier of the application
	Path *string

	// Represents the publisher information of a process/rule
	PublisherInfo *PublisherInfo

	// The type of IoT Security recommendation.
	Type      *RecommendationType
	UserSids  []*string
	Usernames []*UserRecommendation
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

Pricing - Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. 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
}

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; Indicates whether the Defender plan is enabled on the selected scope. Microsoft Defender for Cloud is provided
	// in two pricing tiers: free and standard. The standard tier offers advanced security
	// capabilities, while the free tier offers basic security features.
	PricingTier *PricingTier

	// If set to "False", it allows the descendants of this scope to override the pricing configuration set on this scope (allows
	// setting inherited="False"). If set to "True", it prevents overrides and
	// forces this pricing configuration on all the descendants of this scope. This field is only available for subscription-level
	// pricing.
	Enforce *Enforce

	// Optional. List of extensions offered under a plan.
	Extensions []*Extension

	// 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. For
	// VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource level only 'P1' sub plan is supported.
	SubPlan *string

	// READ-ONLY; Optional. True if the plan is deprecated. If there are replacing plans they will appear in replacedBy property
	Deprecated *bool

	// READ-ONLY; Optional. If pricingTier is Standard then this property holds the date of the last time the pricingTier was
	// set to Standard, when available (e.g 2023-03-01T12:42:42.1921106Z).
	EnablementTime *time.Time

	// READ-ONLY; The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S).
	FreeTrialRemainingTime *string

	// READ-ONLY; "inherited" = "True" indicates that the current scope inherits its pricing configuration from its parent. The
	// ID of the parent scope that provides the inherited configuration is displayed in the
	// "inheritedFrom" field. On the other hand, "inherited" = "False" indicates that the current scope has its own pricing configuration
	// explicitly set, and does not inherit from its parent. This field is
	// read only and available only for resource-level pricing.
	Inherited *Inherited

	// READ-ONLY; The id of the scope inherited from. "Null" if not inherited. This field is only available for resource-level
	// pricing.
	InheritedFrom *string

	// READ-ONLY; Optional. List of plans that replace this plan. This property exists only if this plan is deprecated.
	ReplacedBy []*string

	// READ-ONLY; This field is available for subscription-level only, and reflects the coverage status of the resources under
	// the subscription. Please note: The "pricingTier" field reflects the plan status of the
	// subscription. However, since the plan status can also be defined at the resource level, there might be misalignment between
	// the subscription's plan status and the resource status. This field helps
	// indicate the coverage status of the resources.
	ResourcesCoverageStatus *ResourcesCoverageStatus
}

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 - Indicates whether the Defender plan is enabled on the selected scope. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. 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(credential azcore.TokenCredential, options *arm.ClientOptions) (*PricingsClient, error)

NewPricingsClient creates a new instance of PricingsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PricingsClient) Delete added in v0.13.0

func (client *PricingsClient) Delete(ctx context.Context, scopeID string, pricingName string, options *PricingsClientDeleteOptions) (PricingsClientDeleteResponse, error)

Delete - Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • scopeID - The identifier of the resource, (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName})
  • pricingName - name of the pricing configuration
  • options - PricingsClientDeleteOptions contains the optional parameters for the PricingsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/DeleteResourcePricing_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewPricingsClient().Delete(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", "VirtualMachines", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*PricingsClient) Get

func (client *PricingsClient) Get(ctx context.Context, scopeID string, pricingName string, options *PricingsClientGetOptions) (PricingsClientGetResponse, error)

Get - Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • scopeID - The scope id of the pricing. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or a specific resource (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName})
  • Supported resources are (VirtualMachines)
  • pricingName - name of the pricing configuration
  • options - PricingsClientGetOptions contains the optional parameters for the PricingsClient.Get method.
Example (GetPricingsOnResourceVirtualMachinesPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetResourcePricingByNameVirtualMachines_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", "VirtualMachines", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("VirtualMachines"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/VirtualMachines"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		Inherited: to.Ptr(armsecurity.InheritedTrue),
	// 		InheritedFrom: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		SubPlan: to.Ptr("P2"),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				AdditionalExtensionProperties: map[string]any{
	// 					"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 				},
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("MdeDesignatedSubscription"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 		}},
	// 	},
	// }
}
Output:

Example (GetPricingsOnSubscriptionCloudPosturePlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameCloudPosture_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("CloudPosture"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				AdditionalExtensionProperties: map[string]any{
	// 					"ExclusionTags": "[]",
	// 				},
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("SensitiveDataDiscovery"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("EntraPermissionsManagement"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 		}},
	// 	},
	// }
}
Output:

Example (GetPricingsOnSubscriptionContainersPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameContainers_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "Containers", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("Containers"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/Containers"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 		}},
	// 	},
	// }
}
Output:

Example (GetPricingsOnSubscriptionDnsPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameDns_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "Dns", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("Dns"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/Dns"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		Deprecated: to.Ptr(true),
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ReplacedBy: []*string{
	// 			to.Ptr("VirtualMachines")},
	// 			ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		},
	// 	}
}
Output:

Example (GetPricingsOnSubscriptionStorageAccountsPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameStorageAccounts_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "StorageAccounts", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("StorageAccounts"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/StorageAccounts"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		SubPlan: to.Ptr("PerStorageAccount"),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("OnUploadMalwareScanning"),
	// 				AdditionalExtensionProperties: map[string]any{
	// 					"capGBPerMonthPerStorageAccount": float64(10),
	// 				},
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("SensitiveDataDiscovery"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 		}},
	// 	},
	// }
}
Output:

Example (GetPricingsOnSubscriptionVirtualMachinesPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/GetPricingByNameVirtualMachines_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Get(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("VirtualMachines"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusPartiallyCovered),
	// 		SubPlan: to.Ptr("P2"),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				AdditionalExtensionProperties: map[string]any{
	// 					"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 				},
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 			},
	// 			{
	// 				Name: to.Ptr("MdeDesignatedSubscription"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 		}},
	// 	},
	// }
}
Output:

func (*PricingsClient) List

List - Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},…)'. If $filter is not provided, the unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list includes the pricings set for 'planName1' and 'planName2' only. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • scopeID - The scope id of the pricing. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or a specific resource (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName})
  • Supported resources are (VirtualMachines)
  • options - PricingsClientListOptions contains the optional parameters for the PricingsClient.List method.
Example (GetPricingsOnResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ListResourcePricings_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().List(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", &armsecurity.PricingsClientListOptions{Filter: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PricingList = armsecurity.PricingList{
	// 	Value: []*armsecurity.Pricing{
	// 		{
	// 			Name: to.Ptr("VirtualMachines"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/VirtualMachines"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				Inherited: to.Ptr(armsecurity.InheritedTrue),
	// 				InheritedFrom: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				SubPlan: to.Ptr("P2"),
	// 				Extensions: []*armsecurity.Extension{
	// 					{
	// 						Name: to.Ptr("AgentlessVmScanning"),
	// 						AdditionalExtensionProperties: map[string]any{
	// 							"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 						},
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 					},
	// 					{
	// 						Name: to.Ptr("MdeDesignatedSubscription"),
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("CloudPosture"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/CloudPosture"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				Inherited: to.Ptr(armsecurity.InheritedFalse),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierFree),
	// 			},
	// 	}},
	// }
}
Output:

Example (GetPricingsOnSubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().List(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", &armsecurity.PricingsClientListOptions{Filter: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PricingList = armsecurity.PricingList{
	// 	Value: []*armsecurity.Pricing{
	// 		{
	// 			Name: to.Ptr("VirtualMachines"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusPartiallyCovered),
	// 				SubPlan: to.Ptr("P2"),
	// 				Extensions: []*armsecurity.Extension{
	// 					{
	// 						Name: to.Ptr("AgentlessVmScanning"),
	// 						AdditionalExtensionProperties: map[string]any{
	// 							"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 						},
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 					},
	// 					{
	// 						Name: to.Ptr("MdeDesignatedSubscription"),
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("SqlServers"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/SqlServers"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("AppServices"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/AppServices"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierFree),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusNotCovered),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("StorageAccounts"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/StorageAccounts"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 				SubPlan: to.Ptr("DefenderForStorageV2"),
	// 				Extensions: []*armsecurity.Extension{
	// 					{
	// 						Name: to.Ptr("OnUploadMalwareScanning"),
	// 						AdditionalExtensionProperties: map[string]any{
	// 							"capGBPerMonthPerStorageAccount": float64(10),
	// 						},
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 					},
	// 					{
	// 						Name: to.Ptr("SensitiveDataDiscovery"),
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("SqlServerVirtualMachines"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/SqlServerVirtualMachines"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("KubernetesService"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/KubernetesService"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				Deprecated: to.Ptr(true),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierFree),
	// 				ReplacedBy: []*string{
	// 					to.Ptr("Containers")},
	// 					ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusNotCovered),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("ContainerRegistry"),
	// 				Type: to.Ptr("Microsoft.Security/pricings"),
	// 				ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/ContainerRegistry"),
	// 				Properties: &armsecurity.PricingProperties{
	// 					Deprecated: to.Ptr(true),
	// 					Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 					FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 					PricingTier: to.Ptr(armsecurity.PricingTierFree),
	// 					ReplacedBy: []*string{
	// 						to.Ptr("Containers")},
	// 						ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusNotCovered),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("KeyVaults"),
	// 					Type: to.Ptr("Microsoft.Security/pricings"),
	// 					ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/KeyVaults"),
	// 					Properties: &armsecurity.PricingProperties{
	// 						EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 						Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 						FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 						PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 						ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 						SubPlan: to.Ptr("PerKeyVault"),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("Dns"),
	// 					Type: to.Ptr("Microsoft.Security/pricings"),
	// 					ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Dns"),
	// 					Properties: &armsecurity.PricingProperties{
	// 						Deprecated: to.Ptr(true),
	// 						EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 						Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 						FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 						PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 						ReplacedBy: []*string{
	// 							to.Ptr("VirtualMachines")},
	// 							ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("Arm"),
	// 						Type: to.Ptr("Microsoft.Security/pricings"),
	// 						ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Arm"),
	// 						Properties: &armsecurity.PricingProperties{
	// 							EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 							Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 							FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 							PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 							ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 							SubPlan: to.Ptr("PerSubscription"),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("OpenSourceRelationalDatabases"),
	// 						Type: to.Ptr("Microsoft.Security/pricings"),
	// 						ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/OpenSourceRelationalDatabases"),
	// 						Properties: &armsecurity.PricingProperties{
	// 							Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 							FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 							PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 							ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("Containers"),
	// 						Type: to.Ptr("Microsoft.Security/pricings"),
	// 						ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Containers"),
	// 						Properties: &armsecurity.PricingProperties{
	// 							EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 							Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 							FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 							PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 							ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 							Extensions: []*armsecurity.Extension{
	// 								{
	// 									Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
	// 									IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 							}},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("CloudPosture"),
	// 						Type: to.Ptr("Microsoft.Security/pricings"),
	// 						ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/CloudPosture"),
	// 						Properties: &armsecurity.PricingProperties{
	// 							EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 							Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 							FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 							PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 							ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 							Extensions: []*armsecurity.Extension{
	// 								{
	// 									Name: to.Ptr("AgentlessVmScanning"),
	// 									AdditionalExtensionProperties: map[string]any{
	// 										"ExclusionTags": "[]",
	// 									},
	// 									IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 								},
	// 								{
	// 									Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
	// 									IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 								},
	// 								{
	// 									Name: to.Ptr("SensitiveDataDiscovery"),
	// 									IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 								},
	// 								{
	// 									Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
	// 									IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 								},
	// 								{
	// 									Name: to.Ptr("EntraPermissionsManagement"),
	// 									IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 							}},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("Api"),
	// 						Type: to.Ptr("Microsoft.Security/pricings"),
	// 						ID: to.Ptr("subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Api"),
	// 						Properties: &armsecurity.PricingProperties{
	// 							FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 							PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 							SubPlan: to.Ptr("P1"),
	// 						},
	// 				}},
	// 			}
}
Output:

Example (GetPricingsOnSubscriptionWithPlansFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ListPricingsWithPlanFilter_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().List(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", &armsecurity.PricingsClientListOptions{Filter: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PricingList = armsecurity.PricingList{
	// 	Value: []*armsecurity.Pricing{
	// 		{
	// 			Name: to.Ptr("VirtualMachines"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusPartiallyCovered),
	// 				SubPlan: to.Ptr("P2"),
	// 				Extensions: []*armsecurity.Extension{
	// 					{
	// 						Name: to.Ptr("AgentlessVmScanning"),
	// 						AdditionalExtensionProperties: map[string]any{
	// 							"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 						},
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 					},
	// 					{
	// 						Name: to.Ptr("MdeDesignatedSubscription"),
	// 						IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				}},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("KeyVaults"),
	// 			Type: to.Ptr("Microsoft.Security/pricings"),
	// 			ID: to.Ptr("/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/KeyVaults"),
	// 			Properties: &armsecurity.PricingProperties{
	// 				EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 				Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 				FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 				PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 				ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 				SubPlan: to.Ptr("PerKeyVault"),
	// 			},
	// 	}},
	// }
}
Output:

func (*PricingsClient) Update

func (client *PricingsClient) Update(ctx context.Context, scopeID string, pricingName string, pricing Pricing, options *PricingsClientUpdateOptions) (PricingsClientUpdateResponse, error)

Update - Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and only for plan='VirtualMachines' and subPlan='P1'). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • scopeID - The scope id of the pricing. Valid scopes are: subscription (format: 'subscriptions/{subscriptionId}'), or a specific resource (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName})
  • Supported resources are (VirtualMachines)
  • pricingName - name of the pricing configuration
  • pricing - Pricing object
  • options - PricingsClientUpdateOptions contains the optional parameters for the PricingsClient.Update method.
Example (UpdatePricingOnResourceExampleForVirtualMachinesPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutResourcePricingByNameVirtualMachines_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", "virtualMachines", armsecurity.Pricing{
		Properties: &armsecurity.PricingProperties{
			PricingTier: to.Ptr(armsecurity.PricingTierStandard),
			SubPlan:     to.Ptr("P1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("virtualMachines"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1/providers/Microsoft.Security/pricings/virtualMachines"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		Inherited: to.Ptr(armsecurity.InheritedFalse),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		SubPlan: to.Ptr("P1"),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("MdeDesignatedSubscription"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledFalse),
	// 			},
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				AdditionalExtensionProperties: map[string]any{
	// 					"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 				},
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 		}},
	// 	},
	// }
}
Output:

Example (UpdatePricingOnSubscriptionExampleForCloudPosturePlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", armsecurity.Pricing{
		Properties: &armsecurity.PricingProperties{
			PricingTier: to.Ptr(armsecurity.PricingTierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("CloudPosture"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("SensitiveDataDiscovery"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("EntraPermissionsManagement"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

Example (UpdatePricingOnSubscriptionExampleForCloudPosturePlanPartialSuccess)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingByNamePartialSuccess_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", armsecurity.Pricing{
		Properties: &armsecurity.PricingProperties{
			PricingTier: to.Ptr(armsecurity.PricingTierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("CloudPosture"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceFalse),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeFailed),
	// 					Message: to.Ptr("Failed find dedicated first party application client ID for extension"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("AgentlessDiscoveryForKubernetes"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeFailed),
	// 					Message: to.Ptr("Failed assigning roles {d5a2ae44-610b-4500-93be-660a0c5f5ca6} to {identityName} for plan"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("SensitiveDataDiscovery"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeFailed),
	// 					Message: to.Ptr("Failed assigning roles {f58310d9-a9f6-439a-9e8d-f62e7b41a168} to {identityName} for plan"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("ContainerRegistriesVulnerabilityAssessments"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("EntraPermissionsManagement"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

Example (UpdatePricingOnSubscriptionExampleForVirtualMachinesPlan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/PutPricingVMsByName_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPricingsClient().Update(ctx, "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines", armsecurity.Pricing{
		Properties: &armsecurity.PricingProperties{
			Enforce:     to.Ptr(armsecurity.EnforceTrue),
			PricingTier: to.Ptr(armsecurity.PricingTierStandard),
			SubPlan:     to.Ptr("P2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pricing = armsecurity.Pricing{
	// 	Name: to.Ptr("VirtualMachines"),
	// 	Type: to.Ptr("Microsoft.Security/pricings"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines"),
	// 	Properties: &armsecurity.PricingProperties{
	// 		EnablementTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T12:42:42.192Z"); return t}()),
	// 		Enforce: to.Ptr(armsecurity.EnforceTrue),
	// 		FreeTrialRemainingTime: to.Ptr("PT0S"),
	// 		PricingTier: to.Ptr(armsecurity.PricingTierStandard),
	// 		ResourcesCoverageStatus: to.Ptr(armsecurity.ResourcesCoverageStatusFullyCovered),
	// 		SubPlan: to.Ptr("P2"),
	// 		Extensions: []*armsecurity.Extension{
	// 			{
	// 				Name: to.Ptr("MdeDesignatedSubscription"),
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledFalse),
	// 			},
	// 			{
	// 				Name: to.Ptr("AgentlessVmScanning"),
	// 				AdditionalExtensionProperties: map[string]any{
	// 					"ExclusionTags": "[{\"Key\":\"TestKey1\",\"Value\":\"TestValue1\"},{\"Key\":\"TestKey2\",\"Value\":\"TestValue2\"}]",
	// 				},
	// 				IsEnabled: to.Ptr(armsecurity.IsEnabledTrue),
	// 				OperationStatus: &armsecurity.OperationStatusAutoGenerated{
	// 					Code: to.Ptr(armsecurity.CodeSucceeded),
	// 					Message: to.Ptr("Successfully enabled extension"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

type PricingsClientDeleteOptions added in v0.13.0

type PricingsClientDeleteOptions struct {
}

PricingsClientDeleteOptions contains the optional parameters for the PricingsClient.Delete method.

type PricingsClientDeleteResponse added in v0.13.0

type PricingsClientDeleteResponse struct {
}

PricingsClientDeleteResponse contains the response from method PricingsClient.Delete.

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 {
	// Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced security
	// capabilities, while the free tier offers basic security features.
	Pricing
}

PricingsClientGetResponse contains the response from method PricingsClient.Get.

type PricingsClientListOptions added in v0.3.0

type PricingsClientListOptions struct {
	// OData filter. Optional.
	Filter *string
}

PricingsClientListOptions contains the optional parameters for the PricingsClient.List method.

type PricingsClientListResponse added in v0.3.0

type PricingsClientListResponse struct {
	// List of pricing configurations response.
	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 {
	// Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced security
	// capabilities, while the free tier offers basic security features.
	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

	// REQUIRED; Status of the custom alert.
	IsEnabled *bool

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string

	// READ-ONLY; The value type of the items in the list.
	ValueType *ValueType
}

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

	// The application control policy enforcement/protection mode of the machine group
	Executable *EnforcementMode

	// The application control policy enforcement/protection mode of the machine group
	Msi *EnforcementMode

	// The application control policy enforcement/protection mode of the machine group
	Script *EnforcementMode
}

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 ProxyResource added in v0.13.0

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v0.13.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v0.13.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type ProxyServerProperties

type ProxyServerProperties struct {
	// Proxy server IP
	IP *string

	// Proxy server port
	Port *string
}

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

	// The product name taken from the file's version resource
	ProductName *string

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

	// The binary file version taken from the file's version resource
	Version *string
}

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

	// Expected result.
	ExpectedResult [][]*string

	// The rule query.
	Query *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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 (
	RankCritical Rank = "Critical"
	RankHigh     Rank = "High"
	RankLow      Rank = "Low"
	RankMedium   Rank = "Medium"
	RankNone     Rank = "None"
)

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

	// REQUIRED; Recommendation status. When the recommendation status is disabled recommendations are not generated.
	Status *RecommendationConfigStatus

	// READ-ONLY
	Name *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; Link to more detailed assessment results data. The response type will be according to the assessmentType field
	AssessmentDetailsLink *string

	// READ-ONLY; The expected type of assessment contained in the AssessmentDetailsLink
	AssessmentType *string

	// READ-ONLY; The description of the regulatory compliance assessment
	Description *string

	// READ-ONLY; The given assessment's related resources count with failed state.
	FailedResources *int32

	// READ-ONLY; The given assessment's related resources count with passed state.
	PassedResources *int32

	// READ-ONLY; The given assessment's related resources count with skipped state.
	SkippedResources *int32

	// READ-ONLY; The given assessment's related resources count with unsupported state.
	UnsupportedResources *int32
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRegulatoryComplianceAssessmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RegulatoryComplianceAssessment = armsecurity.RegulatoryComplianceAssessment{
	// 	Name: to.Ptr("968548cb-02b3-8cd2-11f8-0cf64ab1a347"),
	// 	Type: to.Ptr("Microsoft.Security/regulatoryComplianceAssessment"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1/regulatoryComplianceAssessments/968548cb-02b3-8cd2-11f8-0cf64ab1a347"),
	// 	Properties: &armsecurity.RegulatoryComplianceAssessmentProperties{
	// 		Description: to.Ptr("Troubleshoot missing scan data on your machines"),
	// 		AssessmentDetailsLink: to.Ptr("https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/968548cb-02b3-8cd2-11f8-0cf64ab1a347"),
	// 		AssessmentType: to.Ptr("Assessment"),
	// 		FailedResources: to.Ptr[int32](4),
	// 		PassedResources: to.Ptr[int32](7),
	// 		SkippedResources: to.Ptr[int32](0),
	// 		State: to.Ptr(armsecurity.StateFailed),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegulatoryComplianceAssessmentsClient().NewListPager("PCI-DSS-3.2", "1.1", &armsecurity.RegulatoryComplianceAssessmentsClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RegulatoryComplianceAssessmentList = armsecurity.RegulatoryComplianceAssessmentList{
		// 	Value: []*armsecurity.RegulatoryComplianceAssessment{
		// 		{
		// 			Name: to.Ptr("968548cb-02b3-8cd2-11f8-0cf64ab1a347"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceAssessment"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1/regulatoryComplianceAssessments/968548cb-02b3-8cd2-11f8-0cf64ab1a347"),
		// 			Properties: &armsecurity.RegulatoryComplianceAssessmentProperties{
		// 				Description: to.Ptr("Troubleshoot missing scan data on your machines"),
		// 				AssessmentDetailsLink: to.Ptr("https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/968548cb-02b3-8cd2-11f8-0cf64ab1a347"),
		// 				AssessmentType: to.Ptr("Assessment"),
		// 				FailedResources: to.Ptr[int32](4),
		// 				PassedResources: to.Ptr[int32](7),
		// 				SkippedResources: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StateFailed),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceAssessment"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2/regulatoryComplianceAssessments/3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a"),
		// 			Properties: &armsecurity.RegulatoryComplianceAssessmentProperties{
		// 				Description: to.Ptr("Resolve endpoint protection health issues on your machines"),
		// 				AssessmentDetailsLink: to.Ptr("https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a"),
		// 				AssessmentType: to.Ptr("Assessment"),
		// 				FailedResources: to.Ptr[int32](0),
		// 				PassedResources: to.Ptr[int32](0),
		// 				SkippedResources: to.Ptr[int32](10),
		// 				State: to.Ptr(armsecurity.StateSkipped),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("d1db3318-01ff-16de-29eb-28b344515626"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceAssessment"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2.1/regulatoryComplianceAssessments/d1db3318-01ff-16de-29eb-28b344515626"),
		// 			Properties: &armsecurity.RegulatoryComplianceAssessmentProperties{
		// 				Description: to.Ptr("Install monitoring agent on your machines"),
		// 				AssessmentDetailsLink: to.Ptr("https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/d1db3318-01ff-16de-29eb-28b344515626"),
		// 				AssessmentType: to.Ptr("Assessment"),
		// 				FailedResources: to.Ptr[int32](0),
		// 				PassedResources: to.Ptr[int32](8),
		// 				SkippedResources: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StatePassed),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Regulatory compliance assessment details and state
	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.NewListPager method.

type RegulatoryComplianceAssessmentsClientListResponse added in v0.3.0

type RegulatoryComplianceAssessmentsClientListResponse struct {
	// List of regulatory compliance assessment response
	RegulatoryComplianceAssessmentList
}

RegulatoryComplianceAssessmentsClientListResponse contains the response from method RegulatoryComplianceAssessmentsClient.NewListPager.

type RegulatoryComplianceControl

type RegulatoryComplianceControl struct {
	// Regulatory compliance control data
	Properties *RegulatoryComplianceControlProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; The description of the regulatory compliance control
	Description *string

	// READ-ONLY; The number of supported regulatory compliance assessments of the given control with a failed state
	FailedAssessments *int32

	// READ-ONLY; The number of supported regulatory compliance assessments of the given control with a passed state
	PassedAssessments *int32

	// READ-ONLY; The number of supported regulatory compliance assessments of the given control with a skipped state
	SkippedAssessments *int32
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRegulatoryComplianceControlsClient().Get(ctx, "PCI-DSS-3.2", "1.1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RegulatoryComplianceControl = armsecurity.RegulatoryComplianceControl{
	// 	Name: to.Ptr("1.1"),
	// 	Type: to.Ptr("Microsoft.Security/regulatoryComplianceControl"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1"),
	// 	Properties: &armsecurity.RegulatoryComplianceControlProperties{
	// 		Description: to.Ptr("Common Criteria Related to Organization and Management"),
	// 		FailedAssessments: to.Ptr[int32](4),
	// 		PassedAssessments: to.Ptr[int32](7),
	// 		SkippedAssessments: to.Ptr[int32](0),
	// 		State: to.Ptr(armsecurity.StateFailed),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegulatoryComplianceControlsClient().NewListPager("PCI-DSS-3.2", &armsecurity.RegulatoryComplianceControlsClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RegulatoryComplianceControlList = armsecurity.RegulatoryComplianceControlList{
		// 	Value: []*armsecurity.RegulatoryComplianceControl{
		// 		{
		// 			Name: to.Ptr("1.1"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceControl"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1"),
		// 			Properties: &armsecurity.RegulatoryComplianceControlProperties{
		// 				Description: to.Ptr("Common Criteria Related to Organization and Management."),
		// 				FailedAssessments: to.Ptr[int32](4),
		// 				PassedAssessments: to.Ptr[int32](7),
		// 				SkippedAssessments: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StateFailed),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceControl"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2"),
		// 			Properties: &armsecurity.RegulatoryComplianceControlProperties{
		// 				Description: to.Ptr("Confidential information is protected during the system design, development, testing, implementation, and change processes in accordance with confidentiality commitments and requirements."),
		// 				FailedAssessments: to.Ptr[int32](0),
		// 				PassedAssessments: to.Ptr[int32](0),
		// 				SkippedAssessments: to.Ptr[int32](10),
		// 				State: to.Ptr(armsecurity.StateSkipped),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2.1"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceControl"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2.1"),
		// 			Properties: &armsecurity.RegulatoryComplianceControlProperties{
		// 				Description: to.Ptr("Changes to confidentiality commitments and requirements are communicated to internal and external users, vendors, and other third parties whose products and services are included in the system."),
		// 				FailedAssessments: to.Ptr[int32](0),
		// 				PassedAssessments: to.Ptr[int32](0),
		// 				SkippedAssessments: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StateUnsupported),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Regulatory compliance control details and state
	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.NewListPager method.

type RegulatoryComplianceControlsClientListResponse added in v0.3.0

type RegulatoryComplianceControlsClientListResponse struct {
	// List of regulatory compliance controls response
	RegulatoryComplianceControlList
}

RegulatoryComplianceControlsClientListResponse contains the response from method RegulatoryComplianceControlsClient.NewListPager.

type RegulatoryComplianceStandard

type RegulatoryComplianceStandard struct {
	// Regulatory compliance standard data
	Properties *RegulatoryComplianceStandardProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; The number of supported regulatory compliance controls of the given standard with a failed state
	FailedControls *int32

	// READ-ONLY; The number of supported regulatory compliance controls of the given standard with a passed state
	PassedControls *int32

	// READ-ONLY; The number of supported regulatory compliance controls of the given standard with a skipped state
	SkippedControls *int32

	// READ-ONLY; The number of regulatory compliance controls of the given standard which are unsupported by automated assessments
	UnsupportedControls *int32
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRegulatoryComplianceStandardsClient().Get(ctx, "PCI-DSS-3.2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RegulatoryComplianceStandard = armsecurity.RegulatoryComplianceStandard{
	// 	Name: to.Ptr("PCI-DSS-3.2"),
	// 	Type: to.Ptr("Microsoft.Security/regulatoryComplianceStandard"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2"),
	// 	Properties: &armsecurity.RegulatoryComplianceStandardProperties{
	// 		FailedControls: to.Ptr[int32](4),
	// 		PassedControls: to.Ptr[int32](7),
	// 		SkippedControls: to.Ptr[int32](0),
	// 		State: to.Ptr(armsecurity.StateFailed),
	// 		UnsupportedControls: to.Ptr[int32](0),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegulatoryComplianceStandardsClient().NewListPager(&armsecurity.RegulatoryComplianceStandardsClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RegulatoryComplianceStandardList = armsecurity.RegulatoryComplianceStandardList{
		// 	Value: []*armsecurity.RegulatoryComplianceStandard{
		// 		{
		// 			Name: to.Ptr("PCI-DSS-3.2"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceStandard"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2"),
		// 			Properties: &armsecurity.RegulatoryComplianceStandardProperties{
		// 				FailedControls: to.Ptr[int32](4),
		// 				PassedControls: to.Ptr[int32](7),
		// 				SkippedControls: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StateFailed),
		// 				UnsupportedControls: to.Ptr[int32](0),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ISO-27001"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceStandard"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/ISO-27001"),
		// 			Properties: &armsecurity.RegulatoryComplianceStandardProperties{
		// 				FailedControls: to.Ptr[int32](0),
		// 				PassedControls: to.Ptr[int32](0),
		// 				SkippedControls: to.Ptr[int32](10),
		// 				State: to.Ptr(armsecurity.StateSkipped),
		// 				UnsupportedControls: to.Ptr[int32](0),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("AZURE-CIS"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceStandard"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/AZURE-CIS"),
		// 			Properties: &armsecurity.RegulatoryComplianceStandardProperties{
		// 				FailedControls: to.Ptr[int32](0),
		// 				PassedControls: to.Ptr[int32](0),
		// 				SkippedControls: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StateUnsupported),
		// 				UnsupportedControls: to.Ptr[int32](0),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SOC-TSP"),
		// 			Type: to.Ptr("Microsoft.Security/regulatoryComplianceStandard"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/SOC-TSP"),
		// 			Properties: &armsecurity.RegulatoryComplianceStandardProperties{
		// 				FailedControls: to.Ptr[int32](0),
		// 				PassedControls: to.Ptr[int32](15),
		// 				SkippedControls: to.Ptr[int32](0),
		// 				State: to.Ptr(armsecurity.StatePassed),
		// 				UnsupportedControls: to.Ptr[int32](0),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Regulatory compliance standard details and state
	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.NewListPager method.

type RegulatoryComplianceStandardsClientListResponse added in v0.3.0

type RegulatoryComplianceStandardsClientListResponse struct {
	// List of regulatory compliance standards response
	RegulatoryComplianceStandardList
}

RegulatoryComplianceStandardsClientListResponse contains the response from method RegulatoryComplianceStandardsClient.NewListPager.

type Remediation

type Remediation struct {
	// Is remediation automated.
	Automated *bool

	// Remediation description.
	Description *string

	// Optional link to remediate in Azure Portal.
	PortalLink *string

	// Remediation script.
	Scripts []*string
}

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

	// REQUIRED; Justification for change of Eta.
	Justification *string
}

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

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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 ResourceAutoGenerated added in v0.13.0

type ResourceAutoGenerated struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ResourceAutoGenerated - Common fields that are returned in the response for all Azure Resource Manager resources

func (ResourceAutoGenerated) MarshalJSON added in v0.13.0

func (r ResourceAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceAutoGenerated.

func (*ResourceAutoGenerated) UnmarshalJSON added in v0.13.0

func (r *ResourceAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAutoGenerated.

type ResourceAutoGenerated2 added in v0.13.0

type ResourceAutoGenerated2 struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ResourceAutoGenerated2 - Common fields that are returned in the response for all Azure Resource Manager resources

func (ResourceAutoGenerated2) MarshalJSON added in v0.13.0

func (r ResourceAutoGenerated2) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceAutoGenerated2.

func (*ResourceAutoGenerated2) UnmarshalJSON added in v0.13.0

func (r *ResourceAutoGenerated2) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAutoGenerated2.

type ResourceDetails

type ResourceDetails struct {
	// REQUIRED; The platform where the assessed resource resides
	Source *Source
}

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 ResourceDetailsAutoGenerated added in v0.11.0

type ResourceDetailsAutoGenerated struct {
	// The status of the health report
	Source *Source

	// READ-ONLY; The id of the connector
	ConnectorID *string

	// READ-ONLY; The azure id of the resource
	ID *string
}

ResourceDetailsAutoGenerated - The resource details of the health report

func (ResourceDetailsAutoGenerated) MarshalJSON added in v0.11.0

func (r ResourceDetailsAutoGenerated) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceDetailsAutoGenerated.

func (*ResourceDetailsAutoGenerated) UnmarshalJSON added in v0.11.0

func (r *ResourceDetailsAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDetailsAutoGenerated.

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
}

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 ResourcesCoverageStatus added in v0.13.0

type ResourcesCoverageStatus string

ResourcesCoverageStatus - This field is available for subscription-level only, and reflects the coverage status of the resources under the subscription. Please note: The "pricingTier" field reflects the plan status of the subscription. However, since the plan status can also be defined at the resource level, there might be misalignment between the subscription's plan status and the resource status. This field helps indicate the coverage status of the resources.

const (
	// ResourcesCoverageStatusFullyCovered - This value indicates that all resources associated with the subscription have the
	// Defender plan enabled.
	ResourcesCoverageStatusFullyCovered ResourcesCoverageStatus = "FullyCovered"
	// ResourcesCoverageStatusNotCovered - This value indicates that the Defender plan is disabled for all resources under the
	// subscription. None of the resources are protected by the Defender plan.
	ResourcesCoverageStatusNotCovered ResourcesCoverageStatus = "NotCovered"
	// ResourcesCoverageStatusPartiallyCovered - This value indicates that some resources under the subscription have the Defender
	// plan enabled, while others have it disabled. There is a mixed coverage status among resources.
	ResourcesCoverageStatusPartiallyCovered ResourcesCoverageStatus = "PartiallyCovered"
)

func PossibleResourcesCoverageStatusValues added in v0.13.0

func PossibleResourcesCoverageStatusValues() []ResourcesCoverageStatus

PossibleResourcesCoverageStatusValues returns the possible values for the ResourcesCoverageStatus const type.

type Rule

type Rule struct {
	// The rule's destination port
	DestinationPort *int32

	// The rule's direction
	Direction *Direction

	// The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol
	IPAddresses []*string

	// The name of the rule
	Name *string

	// The rule's transport protocols
	Protocols []*TransportProtocol
}

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 RuleCategory added in v0.13.0

type RuleCategory string

RuleCategory - Rule categories. Code - code scanning results. Artifact scanning results. Dependencies scanning results. IaC results. Secrets scanning results. Container scanning results.

const (
	RuleCategoryArtifacts    RuleCategory = "Artifacts"
	RuleCategoryCode         RuleCategory = "Code"
	RuleCategoryContainers   RuleCategory = "Containers"
	RuleCategoryDependencies RuleCategory = "Dependencies"
	RuleCategoryIaC          RuleCategory = "IaC"
	RuleCategorySecrets      RuleCategory = "Secrets"
)

func PossibleRuleCategoryValues added in v0.13.0

func PossibleRuleCategoryValues() []RuleCategory

PossibleRuleCategoryValues returns the possible values for the RuleCategory const type.

type RuleResults

type RuleResults struct {
	// Rule results properties.
	Properties *RuleResultsProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
	Results [][]*string
}

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
}

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 (
	RuleStateDisabled RuleState = "Disabled"
	RuleStateEnabled  RuleState = "Enabled"
	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
}

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

	// Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
	Results map[string][][]*string
}

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

	// READ-ONLY; The T-SQL query that runs on your SQL database to perform the particular check
	Query *string

	// READ-ONLY; The resource type the sub assessment refers to in its resource details
	Type *string
}

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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RulesResults = armsecurity.RulesResults{
	// 	Value: []*armsecurity.RuleResults{
	// 		{
	// 			Name: to.Ptr("VA1234"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1234"),
	// 			Properties: &armsecurity.RuleResultsProperties{
	// 				Results: [][]*string{
	// 					[]*string{
	// 						to.Ptr("userA"),
	// 						to.Ptr("SELECT")},
	// 						[]*string{
	// 							to.Ptr("userB"),
	// 							to.Ptr("SELECT")}},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("VA5678"),
	// 						Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 						ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA5678"),
	// 						Properties: &armsecurity.RuleResultsProperties{
	// 							Results: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 								},
	// 						}},
	// 					}
}
Output:

Example (CreateABaselineForAllRulesUsingTheLatestScanResults)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RulesResults = armsecurity.RulesResults{
	// 	Value: []*armsecurity.RuleResults{
	// 		{
	// 			Name: to.Ptr("VA1234"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1234"),
	// 			Properties: &armsecurity.RuleResultsProperties{
	// 				Results: [][]*string{
	// 					[]*string{
	// 						to.Ptr("userA"),
	// 						to.Ptr("SELECT")},
	// 						[]*string{
	// 							to.Ptr("userB"),
	// 							to.Ptr("SELECT")}},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("VA5678"),
	// 						Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 						ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA5678"),
	// 						Properties: &armsecurity.RuleResultsProperties{
	// 							Results: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 								},
	// 						}},
	// 					}
}
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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RuleResults = armsecurity.RuleResults{
	// 	Name: to.Ptr("VA1234"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1234"),
	// 	Properties: &armsecurity.RuleResultsProperties{
	// 		Results: [][]*string{
	// 			[]*string{
	// 				to.Ptr("userA"),
	// 				to.Ptr("SELECT")},
	// 				[]*string{
	// 					to.Ptr("userB"),
	// 					to.Ptr("SELECT")}},
	// 				},
	// 			}
}
Output:

Example (CreateABaselineUsingTheLatestScanResults)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RuleResults = armsecurity.RuleResults{
	// 	Name: to.Ptr("VA1234"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1234"),
	// 	Properties: &armsecurity.RuleResultsProperties{
	// 		Results: [][]*string{
	// 			[]*string{
	// 				to.Ptr("userA"),
	// 				to.Ptr("SELECT")},
	// 				[]*string{
	// 					to.Ptr("userB"),
	// 					to.Ptr("SELECT")}},
	// 				},
	// 			}
}
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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RuleResults = armsecurity.RuleResults{
	// 	Name: to.Ptr("VA1234"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1234"),
	// 	Properties: &armsecurity.RuleResultsProperties{
	// 		Results: [][]*string{
	// 			[]*string{
	// 				to.Ptr("userA"),
	// 				to.Ptr("SELECT")},
	// 				[]*string{
	// 					to.Ptr("userB"),
	// 					to.Ptr("SELECT")}},
	// 				},
	// 			}
}
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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentBaselineRulesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RulesResults = armsecurity.RulesResults{
	// 	Value: []*armsecurity.RuleResults{
	// 		{
	// 			Name: to.Ptr("VA1234"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA1234"),
	// 			Properties: &armsecurity.RuleResultsProperties{
	// 				Results: [][]*string{
	// 					[]*string{
	// 						to.Ptr("userA"),
	// 						to.Ptr("SELECT")},
	// 						[]*string{
	// 							to.Ptr("userB"),
	// 							to.Ptr("SELECT")}},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("VA5678"),
	// 						Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/baselineRules"),
	// 						ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/VA5678"),
	// 						Properties: &armsecurity.RuleResultsProperties{
	// 							Results: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 								},
	// 						}},
	// 					}
}
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 {
	// A list of rules results.
	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 {
	// Rule results.
	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 {
	// Rule results.
	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 {
	// A list of rules results.
	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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScanResultsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScanResult = armsecurity.ScanResult{
	// 	Name: to.Ptr("VA2063"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2063"),
	// 	Properties: &armsecurity.ScanResultProperties{
	// 		BaselineAdjustedResult: &armsecurity.BaselineAdjustedResult{
	// 			Baseline: &armsecurity.Baseline{
	// 				ExpectedResults: [][]*string{
	// 					[]*string{
	// 						to.Ptr("Test"),
	// 						to.Ptr("0.0.0.0"),
	// 						to.Ptr("125.125.125.125")}},
	// 						UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T12:49:41.027Z"); return t}()),
	// 					},
	// 					ResultsNotInBaseline: [][]*string{
	// 					},
	// 					ResultsOnlyInBaseline: [][]*string{
	// 					},
	// 					Status: to.Ptr(armsecurity.RuleStatusNonFinding),
	// 				},
	// 				IsTrimmed: to.Ptr(false),
	// 				QueryResults: [][]*string{
	// 					[]*string{
	// 						to.Ptr("Test"),
	// 						to.Ptr("0.0.0.0"),
	// 						to.Ptr("125.125.125.125")}},
	// 						Remediation: &armsecurity.Remediation{
	// 							Description: to.Ptr("Remove server firewall rules that grant excessive access"),
	// 							Automated: to.Ptr(false),
	// 							PortalLink: to.Ptr("ReviewServerFirewallRules"),
	// 							Scripts: []*string{
	// 								to.Ptr("EXECUTE sp_delete_firewall_rule N'Test';")},
	// 							},
	// 							RuleID: to.Ptr("VA2063"),
	// 							RuleMetadata: &armsecurity.VaRule{
	// 								Description: to.Ptr("The Azure SQL server-level firewall helps protect your server by preventing all access to your databases until you specify which IP addresses have permission. Server-level firewall rules grant access to all databases that belong to the server based on the originating IP address of each request.\n\nServer-level firewall rules can only be created and managed through Transact-SQL as well as through the Azure portal or PowerShell. For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that server-level firewall rules do not grant excessive access."),
	// 								BenchmarkReferences: []*armsecurity.BenchmarkReference{
	// 								},
	// 								Category: to.Ptr("SurfaceAreaReduction"),
	// 								QueryCheck: &armsecurity.QueryCheck{
	// 									ColumnNames: []*string{
	// 										to.Ptr("Firewall Rule Name"),
	// 										to.Ptr("Start Address"),
	// 										to.Ptr("End Address")},
	// 										ExpectedResult: [][]*string{
	// 										},
	// 										Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.firewall_rules\nWHERE ( \n        (CONVERT(bigint, parsename(end_ip_address, 1)) +\n         CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n        - \n        (CONVERT(bigint, parsename(start_ip_address, 1)) +\n         CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n      ) > 255;"),
	// 									},
	// 									Rationale: to.Ptr("Often, administrators add rules that grant excessive access as part of a troubleshooting process � to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected server.\n\nGranting excessive access using server firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your databases. In fact, it's the equivalent of placing the server outside of the firewall."),
	// 									RuleID: to.Ptr("VA2063"),
	// 									RuleType: to.Ptr(armsecurity.RuleTypeNegativeList),
	// 									Severity: to.Ptr(armsecurity.RuleSeverityHigh),
	// 									Title: to.Ptr("Server-level firewall rules should not grant excessive access"),
	// 								},
	// 								Status: to.Ptr(armsecurity.RuleStatusFinding),
	// 							},
	// 						}
}
Output:

Example (GetScanDetailsOfTheLatestScanRecord)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScanResultsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScanResult = armsecurity.ScanResult{
	// 	Name: to.Ptr("VA2063"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2063"),
	// 	Properties: &armsecurity.ScanResultProperties{
	// 		BaselineAdjustedResult: &armsecurity.BaselineAdjustedResult{
	// 			Baseline: &armsecurity.Baseline{
	// 				ExpectedResults: [][]*string{
	// 					[]*string{
	// 						to.Ptr("Test"),
	// 						to.Ptr("0.0.0.0"),
	// 						to.Ptr("125.125.125.125")}},
	// 						UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T12:49:41.027Z"); return t}()),
	// 					},
	// 					ResultsNotInBaseline: [][]*string{
	// 					},
	// 					ResultsOnlyInBaseline: [][]*string{
	// 					},
	// 					Status: to.Ptr(armsecurity.RuleStatusNonFinding),
	// 				},
	// 				IsTrimmed: to.Ptr(false),
	// 				QueryResults: [][]*string{
	// 					[]*string{
	// 						to.Ptr("Test"),
	// 						to.Ptr("0.0.0.0"),
	// 						to.Ptr("125.125.125.125")}},
	// 						Remediation: &armsecurity.Remediation{
	// 							Description: to.Ptr("Remove server firewall rules that grant excessive access"),
	// 							Automated: to.Ptr(false),
	// 							PortalLink: to.Ptr("ReviewServerFirewallRules"),
	// 							Scripts: []*string{
	// 								to.Ptr("EXECUTE sp_delete_firewall_rule N'Test';")},
	// 							},
	// 							RuleID: to.Ptr("VA2063"),
	// 							RuleMetadata: &armsecurity.VaRule{
	// 								Description: to.Ptr("The Azure SQL server-level firewall helps protect your server by preventing all access to your databases until you specify which IP addresses have permission. Server-level firewall rules grant access to all databases that belong to the server based on the originating IP address of each request.\n\nServer-level firewall rules can only be created and managed through Transact-SQL as well as through the Azure portal or PowerShell. For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that server-level firewall rules do not grant excessive access."),
	// 								BenchmarkReferences: []*armsecurity.BenchmarkReference{
	// 								},
	// 								Category: to.Ptr("SurfaceAreaReduction"),
	// 								QueryCheck: &armsecurity.QueryCheck{
	// 									ColumnNames: []*string{
	// 										to.Ptr("Firewall Rule Name"),
	// 										to.Ptr("Start Address"),
	// 										to.Ptr("End Address")},
	// 										ExpectedResult: [][]*string{
	// 										},
	// 										Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.firewall_rules\nWHERE ( \n        (CONVERT(bigint, parsename(end_ip_address, 1)) +\n         CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n        - \n        (CONVERT(bigint, parsename(start_ip_address, 1)) +\n         CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n      ) > 255;"),
	// 									},
	// 									Rationale: to.Ptr("Often, administrators add rules that grant excessive access as part of a troubleshooting process � to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected server.\n\nGranting excessive access using server firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your databases. In fact, it's the equivalent of placing the server outside of the firewall."),
	// 									RuleID: to.Ptr("VA2063"),
	// 									RuleType: to.Ptr(armsecurity.RuleTypeNegativeList),
	// 									Severity: to.Ptr(armsecurity.RuleSeverityHigh),
	// 									Title: to.Ptr("Server-level firewall rules should not grant excessive access"),
	// 								},
	// 								Status: to.Ptr(armsecurity.RuleStatusFinding),
	// 							},
	// 						}
}
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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScanResultsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScanResults = armsecurity.ScanResults{
	// 	Value: []*armsecurity.ScanResult{
	// 		{
	// 			Name: to.Ptr("VA2062"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2062"),
	// 			Properties: &armsecurity.ScanResultProperties{
	// 				IsTrimmed: to.Ptr(false),
	// 				QueryResults: [][]*string{
	// 				},
	// 				Remediation: &armsecurity.Remediation{
	// 					Description: to.Ptr("Remove database firewall rules that grant excessive access"),
	// 					Automated: to.Ptr(false),
	// 					PortalLink: to.Ptr(""),
	// 					Scripts: []*string{
	// 					},
	// 				},
	// 				RuleID: to.Ptr("VA2062"),
	// 				RuleMetadata: &armsecurity.VaRule{
	// 					Description: to.Ptr("The Azure SQL Database-level firewall helps protect your data by preventing all access to your database until you specify which IP addresses have permission. Database-level firewall rules grant access to the specific database based on the originating IP address of each request.\n\nDatabase-level firewall rules for master and user databases can only be created and managed through Transact-SQL (unlike server-level firewall rules which can also be created and managed using the Azure portal or PowerShell). For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that database-level firewall rules do not grant excessive access."),
	// 					BenchmarkReferences: []*armsecurity.BenchmarkReference{
	// 					},
	// 					Category: to.Ptr("SurfaceAreaReduction"),
	// 					QueryCheck: &armsecurity.QueryCheck{
	// 						ColumnNames: []*string{
	// 							to.Ptr("Firewall Rule Name"),
	// 							to.Ptr("Start Address"),
	// 							to.Ptr("End Address")},
	// 							ExpectedResult: [][]*string{
	// 							},
	// 							Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.database_firewall_rules\nWHERE ( \n        (CONVERT(bigint, parsename(end_ip_address, 1)) +\n         CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n        - \n        (CONVERT(bigint, parsename(start_ip_address, 1)) +\n         CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n      ) > 255;"),
	// 						},
	// 						Rationale: to.Ptr("Often, administrators add rules that grant excessive access as part of a troubleshooting process - to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected database.\n\nGranting excessive access using database firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your database. In fact, it's the equivalent of placing the database outside of the firewall."),
	// 						RuleID: to.Ptr("VA2062"),
	// 						RuleType: to.Ptr(armsecurity.RuleTypeNegativeList),
	// 						Severity: to.Ptr(armsecurity.RuleSeverityHigh),
	// 						Title: to.Ptr("Database-level firewall rules should not grant excessive access"),
	// 					},
	// 					Status: to.Ptr(armsecurity.RuleStatusNonFinding),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("VA2063"),
	// 				Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults"),
	// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2063"),
	// 				Properties: &armsecurity.ScanResultProperties{
	// 					BaselineAdjustedResult: &armsecurity.BaselineAdjustedResult{
	// 						Baseline: &armsecurity.Baseline{
	// 							ExpectedResults: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 									UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T12:49:41.027Z"); return t}()),
	// 								},
	// 								ResultsNotInBaseline: [][]*string{
	// 								},
	// 								ResultsOnlyInBaseline: [][]*string{
	// 								},
	// 								Status: to.Ptr(armsecurity.RuleStatusNonFinding),
	// 							},
	// 							IsTrimmed: to.Ptr(false),
	// 							QueryResults: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 									Remediation: &armsecurity.Remediation{
	// 										Description: to.Ptr("Remove server firewall rules that grant excessive access"),
	// 										Automated: to.Ptr(false),
	// 										PortalLink: to.Ptr("ReviewServerFirewallRules"),
	// 										Scripts: []*string{
	// 											to.Ptr("EXECUTE sp_delete_firewall_rule N'Test';")},
	// 										},
	// 										RuleID: to.Ptr("VA2063"),
	// 										RuleMetadata: &armsecurity.VaRule{
	// 											Description: to.Ptr("The Azure SQL server-level firewall helps protect your server by preventing all access to your databases until you specify which IP addresses have permission. Server-level firewall rules grant access to all databases that belong to the server based on the originating IP address of each request.\n\nServer-level firewall rules can only be created and managed through Transact-SQL as well as through the Azure portal or PowerShell. For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that server-level firewall rules do not grant excessive access."),
	// 											BenchmarkReferences: []*armsecurity.BenchmarkReference{
	// 											},
	// 											Category: to.Ptr("SurfaceAreaReduction"),
	// 											QueryCheck: &armsecurity.QueryCheck{
	// 												ColumnNames: []*string{
	// 													to.Ptr("Firewall Rule Name"),
	// 													to.Ptr("Start Address"),
	// 													to.Ptr("End Address")},
	// 													ExpectedResult: [][]*string{
	// 													},
	// 													Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.firewall_rules\nWHERE ( \n        (CONVERT(bigint, parsename(end_ip_address, 1)) +\n         CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n        - \n        (CONVERT(bigint, parsename(start_ip_address, 1)) +\n         CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n      ) > 255;"),
	// 												},
	// 												Rationale: to.Ptr("Often, administrators add rules that grant excessive access as part of a troubleshooting process � to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected server.\n\nGranting excessive access using server firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your databases. In fact, it's the equivalent of placing the server outside of the firewall."),
	// 												RuleID: to.Ptr("VA2063"),
	// 												RuleType: to.Ptr(armsecurity.RuleTypeNegativeList),
	// 												Severity: to.Ptr(armsecurity.RuleSeverityHigh),
	// 												Title: to.Ptr("Server-level firewall rules should not grant excessive access"),
	// 											},
	// 											Status: to.Ptr(armsecurity.RuleStatusFinding),
	// 										},
	// 								}},
	// 							}
}
Output:

Example (ListScanResultsOfTheLatestScan)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScanResultsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScanResults = armsecurity.ScanResults{
	// 	Value: []*armsecurity.ScanResult{
	// 		{
	// 			Name: to.Ptr("VA2062"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2062"),
	// 			Properties: &armsecurity.ScanResultProperties{
	// 				IsTrimmed: to.Ptr(false),
	// 				QueryResults: [][]*string{
	// 				},
	// 				Remediation: &armsecurity.Remediation{
	// 					Description: to.Ptr("Remove database firewall rules that grant excessive access"),
	// 					Automated: to.Ptr(false),
	// 					PortalLink: to.Ptr(""),
	// 					Scripts: []*string{
	// 					},
	// 				},
	// 				RuleID: to.Ptr("VA2062"),
	// 				RuleMetadata: &armsecurity.VaRule{
	// 					Description: to.Ptr("The Azure SQL Database-level firewall helps protect your data by preventing all access to your database until you specify which IP addresses have permission. Database-level firewall rules grant access to the specific database based on the originating IP address of each request.\n\nDatabase-level firewall rules for master and user databases can only be created and managed through Transact-SQL (unlike server-level firewall rules which can also be created and managed using the Azure portal or PowerShell). For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that database-level firewall rules do not grant excessive access."),
	// 					BenchmarkReferences: []*armsecurity.BenchmarkReference{
	// 					},
	// 					Category: to.Ptr("SurfaceAreaReduction"),
	// 					QueryCheck: &armsecurity.QueryCheck{
	// 						ColumnNames: []*string{
	// 							to.Ptr("Firewall Rule Name"),
	// 							to.Ptr("Start Address"),
	// 							to.Ptr("End Address")},
	// 							ExpectedResult: [][]*string{
	// 							},
	// 							Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.database_firewall_rules\nWHERE ( \n        (CONVERT(bigint, parsename(end_ip_address, 1)) +\n         CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n        - \n        (CONVERT(bigint, parsename(start_ip_address, 1)) +\n         CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n      ) > 255;"),
	// 						},
	// 						Rationale: to.Ptr("Often, administrators add rules that grant excessive access as part of a troubleshooting process - to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected database.\n\nGranting excessive access using database firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your database. In fact, it's the equivalent of placing the database outside of the firewall."),
	// 						RuleID: to.Ptr("VA2062"),
	// 						RuleType: to.Ptr(armsecurity.RuleTypeNegativeList),
	// 						Severity: to.Ptr(armsecurity.RuleSeverityHigh),
	// 						Title: to.Ptr("Database-level firewall rules should not grant excessive access"),
	// 					},
	// 					Status: to.Ptr(armsecurity.RuleStatusNonFinding),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("VA2063"),
	// 				Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanResults"),
	// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623/scanResults/VA2063"),
	// 				Properties: &armsecurity.ScanResultProperties{
	// 					BaselineAdjustedResult: &armsecurity.BaselineAdjustedResult{
	// 						Baseline: &armsecurity.Baseline{
	// 							ExpectedResults: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 									UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T12:49:41.027Z"); return t}()),
	// 								},
	// 								ResultsNotInBaseline: [][]*string{
	// 								},
	// 								ResultsOnlyInBaseline: [][]*string{
	// 								},
	// 								Status: to.Ptr(armsecurity.RuleStatusNonFinding),
	// 							},
	// 							IsTrimmed: to.Ptr(false),
	// 							QueryResults: [][]*string{
	// 								[]*string{
	// 									to.Ptr("Test"),
	// 									to.Ptr("0.0.0.0"),
	// 									to.Ptr("125.125.125.125")}},
	// 									Remediation: &armsecurity.Remediation{
	// 										Description: to.Ptr("Remove server firewall rules that grant excessive access"),
	// 										Automated: to.Ptr(false),
	// 										PortalLink: to.Ptr("ReviewServerFirewallRules"),
	// 										Scripts: []*string{
	// 											to.Ptr("EXECUTE sp_delete_firewall_rule N'Test';")},
	// 										},
	// 										RuleID: to.Ptr("VA2063"),
	// 										RuleMetadata: &armsecurity.VaRule{
	// 											Description: to.Ptr("The Azure SQL server-level firewall helps protect your server by preventing all access to your databases until you specify which IP addresses have permission. Server-level firewall rules grant access to all databases that belong to the server based on the originating IP address of each request.\n\nServer-level firewall rules can only be created and managed through Transact-SQL as well as through the Azure portal or PowerShell. For more details please see: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure\n\nThis check verifies that server-level firewall rules do not grant excessive access."),
	// 											BenchmarkReferences: []*armsecurity.BenchmarkReference{
	// 											},
	// 											Category: to.Ptr("SurfaceAreaReduction"),
	// 											QueryCheck: &armsecurity.QueryCheck{
	// 												ColumnNames: []*string{
	// 													to.Ptr("Firewall Rule Name"),
	// 													to.Ptr("Start Address"),
	// 													to.Ptr("End Address")},
	// 													ExpectedResult: [][]*string{
	// 													},
	// 													Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.firewall_rules\nWHERE ( \n        (CONVERT(bigint, parsename(end_ip_address, 1)) +\n         CONVERT(bigint, parsename(end_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(end_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(end_ip_address, 4)) * 16777216 ) \n        - \n        (CONVERT(bigint, parsename(start_ip_address, 1)) +\n         CONVERT(bigint, parsename(start_ip_address, 2)) * 256 + \n         CONVERT(bigint, parsename(start_ip_address, 3)) * 65536 + \n         CONVERT(bigint, parsename(start_ip_address, 4)) * 16777216 )\n      ) > 255;"),
	// 												},
	// 												Rationale: to.Ptr("Often, administrators add rules that grant excessive access as part of a troubleshooting process � to eliminate the firewall as the source of a problem, they simply create a rule that allows all traffic to pass to the affected server.\n\nGranting excessive access using server firewall rules is a clear security concern, as it violates the principle of least privilege by allowing unnecessary access to your databases. In fact, it's the equivalent of placing the server outside of the firewall."),
	// 												RuleID: to.Ptr("VA2063"),
	// 												RuleType: to.Ptr(armsecurity.RuleTypeNegativeList),
	// 												Severity: to.Ptr(armsecurity.RuleSeverityHigh),
	// 												Title: to.Ptr("Server-level firewall rules should not grant excessive access"),
	// 											},
	// 											Status: to.Ptr(armsecurity.RuleStatusFinding),
	// 										},
	// 								}},
	// 							}
}
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 {
	// A vulnerability assessment scan result for a single rule.
	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 {
	// A list of vulnerability assessment scan results.
	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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Scan = armsecurity.Scan{
	// 	Name: to.Ptr("Scheduled-20200623"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623"),
	// 	Properties: &armsecurity.ScanProperties{
	// 		Database: to.Ptr("master"),
	// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()),
	// 		HighSeverityFailedRulesCount: to.Ptr[int32](3),
	// 		IsBaselineApplied: to.Ptr(false),
	// 		LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()),
	// 		LowSeverityFailedRulesCount: to.Ptr[int32](1),
	// 		MediumSeverityFailedRulesCount: to.Ptr[int32](2),
	// 		Server: to.Ptr("server1"),
	// 		SQLVersion: to.Ptr("15.0.2000"),
	// 		StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()),
	// 		State: to.Ptr(armsecurity.ScanStateFailed),
	// 		TotalFailedRulesCount: to.Ptr[int32](6),
	// 		TotalPassedRulesCount: to.Ptr[int32](20),
	// 		TotalRulesCount: to.Ptr[int32](26),
	// 		TriggerType: to.Ptr(armsecurity.ScanTriggerTypeRecurring),
	// 	},
	// }
}
Output:

Example (GetScanDetailsOfTheLatestScanRecord)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Scan = armsecurity.Scan{
	// 	Name: to.Ptr("Scheduled-20200623"),
	// 	Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans"),
	// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200623"),
	// 	Properties: &armsecurity.ScanProperties{
	// 		Database: to.Ptr("master"),
	// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()),
	// 		HighSeverityFailedRulesCount: to.Ptr[int32](3),
	// 		IsBaselineApplied: to.Ptr(false),
	// 		LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()),
	// 		LowSeverityFailedRulesCount: to.Ptr[int32](1),
	// 		MediumSeverityFailedRulesCount: to.Ptr[int32](2),
	// 		Server: to.Ptr("server1"),
	// 		SQLVersion: to.Ptr("15.0.2000"),
	// 		StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()),
	// 		State: to.Ptr(armsecurity.ScanStateFailed),
	// 		TotalFailedRulesCount: to.Ptr[int32](6),
	// 		TotalPassedRulesCount: to.Ptr[int32](20),
	// 		TotalRulesCount: to.Ptr[int32](26),
	// 		TriggerType: to.Ptr(armsecurity.ScanTriggerTypeRecurring),
	// 	},
	// }
}
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 2023-02-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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Scans = armsecurity.Scans{
	// 	Value: []*armsecurity.Scan{
	// 		{
	// 			Name: to.Ptr("Scheduled-20200225"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200225"),
	// 			Properties: &armsecurity.ScanProperties{
	// 				Database: to.Ptr("master"),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-25T11:38:07.860Z"); return t}()),
	// 				HighSeverityFailedRulesCount: to.Ptr[int32](3),
	// 				IsBaselineApplied: to.Ptr(false),
	// 				LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()),
	// 				LowSeverityFailedRulesCount: to.Ptr[int32](1),
	// 				MediumSeverityFailedRulesCount: to.Ptr[int32](2),
	// 				Server: to.Ptr("server1"),
	// 				SQLVersion: to.Ptr("15.0.2000"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-25T11:34:29.139Z"); return t}()),
	// 				State: to.Ptr(armsecurity.ScanStateFailed),
	// 				TotalFailedRulesCount: to.Ptr[int32](6),
	// 				TotalPassedRulesCount: to.Ptr[int32](20),
	// 				TotalRulesCount: to.Ptr[int32](26),
	// 				TriggerType: to.Ptr(armsecurity.ScanTriggerTypeRecurring),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("scan_20200226_113429"),
	// 			Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scan_20200226_113429"),
	// 			Properties: &armsecurity.ScanProperties{
	// 				Database: to.Ptr("master"),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-26T11:38:07.860Z"); return t}()),
	// 				HighSeverityFailedRulesCount: to.Ptr[int32](0),
	// 				IsBaselineApplied: to.Ptr(true),
	// 				LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()),
	// 				LowSeverityFailedRulesCount: to.Ptr[int32](0),
	// 				MediumSeverityFailedRulesCount: to.Ptr[int32](0),
	// 				Server: to.Ptr("server1"),
	// 				SQLVersion: to.Ptr("15.0.2000"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-26T11:34:29.139Z"); return t}()),
	// 				State: to.Ptr(armsecurity.ScanStatePassed),
	// 				TotalFailedRulesCount: to.Ptr[int32](0),
	// 				TotalPassedRulesCount: to.Ptr[int32](26),
	// 				TotalRulesCount: to.Ptr[int32](26),
	// 				TriggerType: to.Ptr(armsecurity.ScanTriggerTypeOnDemand),
	// 			},
	// 	}},
	// }
}
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 {
	// A vulnerability assessment scan record.
	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 {
	// A list of vulnerability assessment scan records.
	Scans
}

SQLVulnerabilityAssessmentScansClientListResponse contains the response from method SQLVulnerabilityAssessmentScansClient.List.

type Scan

type Scan struct {
	// A vulnerability assessment scan record properties.
	Properties *ScanProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// Scan results are valid until end time (UTC).
	EndTime *time.Time

	// The number of failed rules with high severity.
	HighSeverityFailedRulesCount *int32

	// Baseline created for this database, and has one or more rules.
	IsBaselineApplied *bool

	// Last scan time.
	LastScanTime *time.Time

	// The number of failed rules with low severity.
	LowSeverityFailedRulesCount *int32

	// The number of failed rules with medium severity.
	MediumSeverityFailedRulesCount *int32

	// The SQL version.
	SQLVersion *string

	// The server name.
	Server *string

	// The scan start time (UTC).
	StartTime *time.Time

	// The scan status.
	State *ScanState

	// The number of total failed rules.
	TotalFailedRulesCount *int32

	// The number of total passed rules.
	TotalPassedRulesCount *int32

	// The number of total rules assessed.
	TotalRulesCount *int32

	// The scan trigger type.
	TriggerType *ScanTriggerType
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// Indicated whether the results specified here are trimmed.
	IsTrimmed *bool

	// The results of the query that was run.
	QueryResults [][]*string

	// Remediation details.
	Remediation *Remediation

	// The rule Id.
	RuleID *string

	// vulnerability assessment rule metadata details.
	RuleMetadata *VaRule

	// The rule result status.
	Status *RuleStatus
}

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
}

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
}

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]any

	// The alert entity type to suppress by.
	Field *string
}

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

	// READ-ONLY; Maximum score available
	Max *int32

	// READ-ONLY; Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point
	Percentage *float64
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; User friendly description of the control
	Description *string

	// READ-ONLY; User friendly display name of the control
	DisplayName *string

	// READ-ONLY; Maximum control score (0..10)
	MaxScore *int32

	// READ-ONLY; Source object from which the control was created
	Source *SecureScoreControlDefinitionSource
}

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

	// READ-ONLY; Collection of security controls definition in this page
	Value []*SecureScoreControlDefinitionItem
}

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
}

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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecureScoreControlDefinitionsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecureScoreControlDefinitionList = armsecurity.SecureScoreControlDefinitionList{
		// 	Value: []*armsecurity.SecureScoreControlDefinitionItem{
		// 		{
		// 			Name: to.Ptr("a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Type: to.Ptr("Microsoft.Security/SecureScoreControlDefinitions"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/SecureScoreControlDefinitions/a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 				Description: to.Ptr("This control contains recommendations regarding DDoS attack prevention"),
		// 				AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e3de1cc0-f4dd-3b34-e496-8b5381ba2d70"),
		// 				}},
		// 				DisplayName: to.Ptr("Protect applications against DDoS attacks"),
		// 				MaxScore: to.Ptr[int32](2),
		// 				Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 					SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Type: to.Ptr("Microsoft.Security/SecureScoreControlDefinitions"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/SecureScoreControlDefinitions/34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 				Description: to.Ptr("This control contains recommendations regarding MFA"),
		// 				AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/151e82c5-5341-a74b-1eb0-bc38d2c84bb5"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/57e98606-6b1e-6193-0e3d-fe621387c16b"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/94290b00-4d0c-d7b4-7cea-064a9554e681"),
		// 				}},
		// 				DisplayName: to.Ptr("Enable MFA"),
		// 				MaxScore: to.Ptr[int32](10),
		// 				Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 					SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("a000c66f-6da2-4f9d-826d-2364347d2588"),
		// 			Type: to.Ptr("Microsoft.Security/SecureScoreControlDefinitions"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/SecureScoreControlDefinitions/a000c66f-6da2-4f9d-826d-2364347d2588"),
		// 			Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 				Description: to.Ptr("This control contains recommendations regarding enabling adaptive application control"),
		// 				AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/35f45c95-27cf-4e52-891f-8390d1de5828"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"),
		// 				}},
		// 				DisplayName: to.Ptr("Apply adaptive application control"),
		// 				MaxScore: to.Ptr[int32](3),
		// 				Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 					SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecureScoreControlDefinitionsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecureScoreControlDefinitionList = armsecurity.SecureScoreControlDefinitionList{
		// 	Value: []*armsecurity.SecureScoreControlDefinitionItem{
		// 		{
		// 			Name: to.Ptr("a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Type: to.Ptr("Microsoft.Security/SecureScoreControlDefinitions"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/SecureScoreControlDefinitions/a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 				Description: to.Ptr("This control contains recommendations regarding DDoS attack prevention"),
		// 				AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e3de1cc0-f4dd-3b34-e496-8b5381ba2d70"),
		// 				}},
		// 				DisplayName: to.Ptr("Protect applications against DDoS attacks"),
		// 				MaxScore: to.Ptr[int32](2),
		// 				Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 					SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("a000c66f-6da2-4f9d-826d-2364347d2588"),
		// 			Type: to.Ptr("Microsoft.Security/SecureScoreControlDefinitions"),
		// 			ID: to.Ptr("/providers/Microsoft.Security/SecureScoreControlDefinitions/a000c66f-6da2-4f9d-826d-2364347d2588"),
		// 			Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 				Description: to.Ptr("This control contains recommendations regarding enabling adaptive application control"),
		// 				AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/35f45c95-27cf-4e52-891f-8390d1de5828"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"),
		// 				}},
		// 				DisplayName: to.Ptr("Apply adaptive application control"),
		// 				MaxScore: to.Ptr[int32](3),
		// 				Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 					SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type SecureScoreControlDefinitionsClientListBySubscriptionOptions added in v0.3.0

type SecureScoreControlDefinitionsClientListBySubscriptionOptions struct {
}

SecureScoreControlDefinitionsClientListBySubscriptionOptions contains the optional parameters for the SecureScoreControlDefinitionsClient.NewListBySubscriptionPager method.

type SecureScoreControlDefinitionsClientListBySubscriptionResponse added in v0.3.0

type SecureScoreControlDefinitionsClientListBySubscriptionResponse struct {
	// List of security controls definition
	SecureScoreControlDefinitionList
}

SecureScoreControlDefinitionsClientListBySubscriptionResponse contains the response from method SecureScoreControlDefinitionsClient.NewListBySubscriptionPager.

type SecureScoreControlDefinitionsClientListOptions added in v0.3.0

type SecureScoreControlDefinitionsClientListOptions struct {
}

SecureScoreControlDefinitionsClientListOptions contains the optional parameters for the SecureScoreControlDefinitionsClient.NewListPager method.

type SecureScoreControlDefinitionsClientListResponse added in v0.3.0

type SecureScoreControlDefinitionsClientListResponse struct {
	// List of security controls definition
	SecureScoreControlDefinitionList
}

SecureScoreControlDefinitionsClientListResponse contains the response from method SecureScoreControlDefinitionsClient.NewListPager.

type SecureScoreControlDetails

type SecureScoreControlDetails struct {
	// Calculation result data in control level
	Properties *SecureScoreControlScoreDetails

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; Collection of security controls in this page
	Value []*SecureScoreControlDetails
}

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

	// READ-ONLY; Maximum control score (0..10)
	Max *int32

	// READ-ONLY; Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point
	Percentage *float64
}

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

	// READ-ONLY; User friendly display name of the control
	DisplayName *string

	// READ-ONLY; Number of healthy resources in the control
	HealthyResourceCount *int32

	// READ-ONLY; Number of not applicable resources in the control
	NotApplicableResourceCount *int32

	// READ-ONLY; Actual score object for the control
	Score *ScoreDetails

	// READ-ONLY; Number of unhealthy resources in the control
	UnhealthyResourceCount *int32

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

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.NewListBySecureScorePager method.
Example (GetSecurityControlsAndTheirCurrentScoreForTheSpecifiedInitiative)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecureScoreControlsClient().NewListBySecureScorePager("ascScore", &armsecurity.SecureScoreControlsClientListBySecureScoreOptions{Expand: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecureScoreControlList = armsecurity.SecureScoreControlList{
		// 	Value: []*armsecurity.SecureScoreControlDetails{
		// 		{
		// 			Name: to.Ptr("a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Protect applications against DDoS attacks"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](1),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](0),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable MFA"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](10),
		// 					Max: to.Ptr[int32](10),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("76763537-9feb-42d3-b4f4-78c01117be80"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/76763537-9feb-42d3-b4f4-78c01117be80"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Implement security best practices"),
		// 				HealthyResourceCount: to.Ptr[int32](7),
		// 				NotApplicableResourceCount: to.Ptr[int32](1),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](7),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable Advanced Threat Protection"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable auditing and logging"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0.2),
		// 					Max: to.Ptr[int32](1),
		// 					Percentage: to.Ptr[float64](0.2),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](4),
		// 				Weight: to.Ptr[int64](5),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Manage access and permissions"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](2),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0.5),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](2),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Remediate security configurations"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable endpoint protection"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](2),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Apply system updates"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](6),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("0e55495e-034f-4abc-8293-767229250176"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/0e55495e-034f-4abc-8293-767229250176"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Encrypt data in transit"),
		// 				HealthyResourceCount: to.Ptr[int32](5),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](3.33),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0.8325),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](6),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Restrict unauthorized network access"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](4),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable encryption at rest"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](4),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (GetSecurityControlsAndTheirCurrentScoreForTheSpecifiedInitiativeWithTheExpandParameter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecureScoreControlsClient().NewListBySecureScorePager("ascScore", &armsecurity.SecureScoreControlsClientListBySecureScoreOptions{Expand: to.Ptr(armsecurity.ExpandControlsEnumDefinition)})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecureScoreControlList = armsecurity.SecureScoreControlList{
		// 	Value: []*armsecurity.SecureScoreControlDetails{
		// 		{
		// 			Name: to.Ptr("a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("a9909064-42b4-4d34-8143-275477afe18b"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/a9909064-42b4-4d34-8143-275477afe18b"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e3de1cc0-f4dd-3b34-e496-8b5381ba2d70"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/08e628db-e2ed-4793-bc91-d13e684401c3"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/405c9ae6-49f9-46c4-8873-a86690f27818"),
		// 						}},
		// 						DisplayName: to.Ptr("Protect applications against DDoS attacks"),
		// 						MaxScore: to.Ptr[int32](2),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Protect applications against DDoS attacks"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](1),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](0),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/94290b00-4d0c-d7b4-7cea-064a9554e681"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/57e98606-6b1e-6193-0e3d-fe621387c16b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1f24d55a-df0f-4772-9090-4629c2d6bfff"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8e3d9ac0-a248-4276-a437-304c6cd1443b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8d7a6128-c8f2-43df-b422-7877346f9ddb"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/dbfc99e3-e648-4c3b-bd32-995e6268430d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/4a946e22-47e8-443d-8761-b25620b4a1e1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a7c8fa46-526d-4bf6-b8b3-17fa01310fd8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/20f6c761-4dd7-4f27-9e37-6db8471486ef"),
		// 						}},
		// 						DisplayName: to.Ptr("Enable MFA"),
		// 						MaxScore: to.Ptr[int32](10),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Enable MFA"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](10),
		// 					Max: to.Ptr[int32](10),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("76763537-9feb-42d3-b4f4-78c01117be80"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/76763537-9feb-42d3-b4f4-78c01117be80"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("76763537-9feb-42d3-b4f4-78c01117be80"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/76763537-9feb-42d3-b4f4-78c01117be80"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/151e82c5-5341-a74b-1eb0-bc38d2c84bb5"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a8c6a4ad-d51e-88fe-2979-d3ee3c864f8b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/6f90a6d6-d4d6-0794-0ec1-98fa77878c2e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a9341235-9389-42f0-a0bf-9bfb57960d44"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/45d313c3-3fca-5040-035f-d61928366d31"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f0553104-cfdb-65e6-759c-002812e38500"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/47bb383c-8e25-95f0-c2aa-437add1d87d3"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/12018f4f-3d10-999b-e4c4-86ec25be08a1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/eade5b56-eefd-444f-95c8-23f29e5d93cb"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ebe970fe-9c27-4dd7-a165-1e943d565e10"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f7010359-8d21-4598-a9f2-c3e81a17141e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/24d8af06-d441-40b4-a49c-311421aa9f58"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8c3e93d3-0276-4d06-b20a-9a9f3012742c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9172da4e-9571-6e33-2b5b-d742847f3be7"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/093c685b-56dd-13a3-8ed5-887a001837a2"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/64b8637e-4e1d-76a9-0fc9-c1e487a97ed8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/fe02b3b7-a722-d4d6-6731-6493776203a6"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/57f36d21-69e3-4b0f-a66c-18629d1b736d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/6c99f570-2ce7-46bc-8175-cde013df43bc"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/22489c48-27d1-4e40-9420-4303ad9cffef"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/fc84abc0-eee6-4758-8372-a7681965ca44"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/726cde3e-02f8-4041-8935-727f2be19ba7"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a2bb3a1b-4a09-4cf7-9e79-c438687e2c2f"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/664c6a0b-5cd2-4140-aaff-a94241c07afd"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3af5de46-fda8-4b6e-90f1-6565187d7c48"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a9a59ebb-5d6f-42f5-92a1-036fd0fd1879"),
		// 						}},
		// 						DisplayName: to.Ptr("Implement security best practices"),
		// 						MaxScore: to.Ptr[int32](0),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Implement security best practices"),
		// 				HealthyResourceCount: to.Ptr[int32](7),
		// 				NotApplicableResourceCount: to.Ptr[int32](1),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](7),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/56a6e81f-7413-4f72-9a1b-aaeeaa87c872"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0876ef51-fee7-449d-ba1e-f2662c7e43c6"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/58d72d9d-0310-4792-9a3b-6dd111093cdb"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/6ac66a74-761f-4a59-928a-d373eea3f028"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1be22853-8ed1-4005-9907-ddad64cb1417"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/86ea1a79-29d3-4eac-a9f4-3541ace4e718"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/53572822-d3fc-4363-bfb9-248645841612"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b1af52e4-e968-4e2b-b6d0-6736c9651f0a"),
		// 						}},
		// 						DisplayName: to.Ptr("Enable Advanced Threat Protection"),
		// 						MaxScore: to.Ptr[int32](0),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Enable Advanced Threat Protection"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/94208a8b-16e8-4e5b-abbd-4e81c9d02bee"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c6dad669-efd7-cd72-61c5-289935607791"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/77785808-ce86-4e40-b45f-19110a547397"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/32771b45-220c-1a8b-584e-fdd5a2584a66"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f11b27f2-8c49-5bb4-eff5-e1e5384bf95e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f19ab7d9-5ff2-f8fd-ab3b-0bf95dcb6889"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ad5bbaeb-7632-5edf-f1c2-752075831ce8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/dea5192e-1bb3-101b-b70c-4646546f5e1e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1597605a-0faf-5860-eb74-462ae2e9fc21"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/91387f44-7e43-4ecc-55f0-46f5adee3dd5"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/961eb649-3ea9-f8c2-6595-88e9a3aeedeb"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/88bbc99c-e5af-ddd7-6105-6150b2bfa519"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/22438e3c-73c8-40af-a083-10c980c63aa2"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5720f1a6-6061-4768-9c0d-2000a6041744"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/dbfc99e3-e648-4c3b-bd32-995e6268430d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/30c69b23-a9a2-4729-aca6-f21adacfff66"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a9ac48d8-8dd7-42b9-9752-b1fa70ea5dd9"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/00261067-76a8-4ebb-b5fc-becc81067bee"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/83ca4867-58c1-45d6-b6b6-dbf226512891"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a269cbdb-86e8-431c-9ff2-f0ea491174d8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5ea59e47-093b-446f-9765-5b0ec4c9da61"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/011397ca-1366-4bcc-b85a-7a5e3df2e80b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c62371bc-f6a7-4915-b5b5-14288682cf79"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/293ba336-7312-42fc-a59d-836e4e678b17"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0b547a38-2c0d-47e1-b9a2-a59fccc140db"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/7d0ad86f-f43b-4889-b2f7-09d91bd1407b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b20558b6-de31-480c-8aa0-e920d62b9764"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/022efc2d-5119-480b-a203-e151b6b2645c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3ee7608e-f0e7-4c26-8921-5ae46c4e99df"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/33765629-073d-49eb-bab4-64bdf8ac90da"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9c054f50-823f-45ab-839e-9df4eb7c2f11"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f61e15f3-4bcf-4d2e-8f06-32237cabe0a0"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/cdb3af55-2abf-476b-aac7-5cfec366a4dd"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bc26b0d4-a1d7-4665-9d44-efc205ae73f0"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3812e247-34f2-4f06-a312-89a8fe51fa37"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f0f8405a-5ecc-4314-808e-083e030d6163"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c23e0eec-eee4-4632-b1c2-6c884c3c963b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/7ce5a01f-e94b-438a-8b72-fa02c076f11a"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/46e4e0ed-106d-405e-b1a9-ca34c8f7d31f"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b1294b0d-9b2e-4e1b-9f67-77a75fb10a65"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0b86a67f-bde5-4c91-b10c-4102033b8692"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3d55e4b1-ecdb-4eaf-9e3f-b00a764182bd"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a7c8fa46-526d-4bf6-b8b3-17fa01310fd8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/20f6c761-4dd7-4f27-9e37-6db8471486ef"),
		// 						}},
		// 						DisplayName: to.Ptr("Enable auditing and logging"),
		// 						MaxScore: to.Ptr[int32](1),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Enable auditing and logging"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0.2),
		// 					Max: to.Ptr[int32](1),
		// 					Percentage: to.Ptr[float64](0.2),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](4),
		// 				Weight: to.Ptr[int64](5),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c3b6ae71-f1f0-31b4-e6c1-d5951285d03d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/04e7147b-0deb-9796-2e5c-0336343ceb3d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e52064aa-6853-e252-a11e-dffc675689c2"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/00c6d40b-e990-6acf-d4f3-471e747a27c4"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/2c79b4af-f830-b61e-92b9-63dfa30f16e4"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b0fdc63a-38e7-4bab-a7c4-2c2665abbaa9"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/03afeb6f-7634-adb3-0a01-803b0b9cb611"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9d07b7e6-2986-4964-a76c-b2689604e212"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/08e628db-e2ed-4793-bc91-d13e684401c3"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5d90913f-a1c5-4429-ad54-2c6c17fb3c73"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/582c14e9-48c1-4b25-ab93-91bdeaf9120c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8a10942a-02ca-483f-81ae-2260ea7808cc"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9b8eac17-6b11-4b94-9bb4-18c81aee7123"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/554ba13c-d7d4-4530-88ce-94cf11a670ce"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/66a1d478-4d24-42d4-8eca-dcdab6532a18"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b396f112-a462-4813-a93f-80bc90041e4d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5425052d-cc0d-4424-af71-050311f99634"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/09cb7d54-db05-4d31-97f3-9bbfe1dff610"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/01fb1ad4-303b-4789-abf2-c024c4a76523"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0de072b9-6515-4985-842e-0318047bb85b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8c3f474a-234e-442f-92b3-2a45e37f7eee"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c55461af-4923-4fbb-b270-40d5e5f4c0ff"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bbdc4999-1462-4d46-853b-2f8c6ca1c682"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9e1f12d0-cb3d-4e1c-a468-6bc3d934c99d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/fd5d38f6-340e-4bd2-88f2-e1314c3c07a9"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0384d5b7-5def-4130-b7b5-db7da7e63276"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/dbfc99e3-e648-4c3b-bd32-995e6268430d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0ad39832-f031-4fdd-885e-c6cce85ac77c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/90191798-da1b-40dd-aa9c-1c0eafb1ba87"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ddced3c8-a5e2-4dc4-b0fe-1331c77fc9c4"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/52f83ea2-6871-45c3-8b26-13566e966638"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/79b4eb34-c06e-49bf-883d-5352a21a962f"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5723400d-5b2a-45f1-99ee-837986866318"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/76e8881d-f18e-4e1b-b01d-376d0260e066"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0eaf40a8-5673-4b33-8457-a31d85882233"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5a235918-41a2-4bd0-8ab0-00a596e9d6a8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3ff38dcd-92e2-4b67-8765-35bb0174a4c7"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1ff4501b-2109-4ef6-ba9d-e824a96d63d0"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f493084a-d3c4-4886-8cf2-3c815aeef901"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a7c8fa46-526d-4bf6-b8b3-17fa01310fd8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/20f6c761-4dd7-4f27-9e37-6db8471486ef"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/11c95609-3553-430d-b788-fd41cde8b2db"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/27d6f0e9-b4d5-468b-ae7e-03d5473fd864"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f0debc84-981c-4a0d-924d-aa4bd7d55fef"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9b795646-9130-41a4-90b7-df9eae2437c8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/802c0637-5a8c-4c98-abd7-7c96d89d6010"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/43dc2a2e-ce69-4d42-923e-ab7d136f2cfe"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/2acd365d-e8b5-4094-bce4-244b7c51d67c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/51fd8bb1-0db4-bbf1-7e2b-cfcba7eb66a6"),
		// 						}},
		// 						DisplayName: to.Ptr("Manage access and permissions"),
		// 						MaxScore: to.Ptr[int32](4),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Manage access and permissions"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](2),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0.5),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](2),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/27ac71b1-75c5-41c2-adc2-858f5db45b08"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/720a3e77-0b9a-4fa9-98b6-ddf0fd7e32c1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/181ac480-f7c4-544b-9865-11b8ffe87f47"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8c3d9ad0-3639-4686-9cd2-2b2ab2609bda"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0677209d-e675-2c6f-e91a-54cef2878663"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a3eee263-aa01-4b52-a7c0-0094578ef48f"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/45cfe080-ceb1-a91e-9743-71551ed24e94"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8941d121-f740-35f6-952c-6561d2b38d36"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0396b18c-41aa-489c-affd-4ee5d1714a59"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/fa924a53-0837-4296-9bf7-18ce7dd68593"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9e1789cd-7b61-42db-ba12-7268283ba466"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/233da9cd-11bf-463a-8aa7-4c81b9e788d1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c4131c22-1ecc-4beb-9961-d90108bd975f"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d74d2738-2485-4103-9919-69c7e63776ec"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5f65e47f-7a00-4bf3-acae-90ee441ee876"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bc85a7ee-7f43-47ab-8736-4faaec9346b5"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/08e628db-e2ed-4793-bc91-d13e684401c3"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/86f91051-9d6a-47c3-a07f-bd14cb214b45"),
		// 						}},
		// 						DisplayName: to.Ptr("Remediate security configurations"),
		// 						MaxScore: to.Ptr[int32](4),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Remediate security configurations"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/27ac71b1-75c5-41c2-adc2-858f5db45b08"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/720a3e77-0b9a-4fa9-98b6-ddf0fd7e32c1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/83f577bd-a1b6-b7e1-0891-12ca19d1e6df"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/4fb67663-9ab9-475d-b026-8c544cced439"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/383cf3bc-fdf9-4a02-120a-3e7e36c6bfee"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/37a3689a-818e-4a0e-82ac-b1392b9bb000"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/45cfe080-ceb1-a91e-9743-71551ed24e94"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/21300918-b2e3-0346-785f-c77ff57d243b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e71020c2-860c-3235-cd39-04f3f8c936d2"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bc85a7ee-7f43-47ab-8736-4faaec9346b5"),
		// 						}},
		// 						DisplayName: to.Ptr("Enable endpoint protection"),
		// 						MaxScore: to.Ptr[int32](2),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Enable endpoint protection"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](2),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/27ac71b1-75c5-41c2-adc2-858f5db45b08"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/720a3e77-0b9a-4fa9-98b6-ddf0fd7e32c1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/4ab6e3c5-74dd-8b35-9ab9-f61b30875b27"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f2805ebc-abc2-4aac-a8d6-35664c479971"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c0f5316d-5ac5-9218-b77a-b96e16ccfd66"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/45cfe080-ceb1-a91e-9743-71551ed24e94"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bd20bd91-aaf1-7f14-b6e4-866de2f43146"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/8bc390da-9eb6-938d-25ed-44a35d9bcc9d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/22e18b64-4576-41e6-8972-0eb28c9af0c8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bc85a7ee-7f43-47ab-8736-4faaec9346b5"),
		// 						}},
		// 						DisplayName: to.Ptr("Apply system updates"),
		// 						MaxScore: to.Ptr[int32](6),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Apply system updates"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](6),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("0e55495e-034f-4abc-8293-767229250176"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/0e55495e-034f-4abc-8293-767229250176"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("0e55495e-034f-4abc-8293-767229250176"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/0e55495e-034f-4abc-8293-767229250176"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1b351b29-41ca-6df5-946c-c190a56be5fe"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/cb0acdc6-0846-fd48-debe-9905af151b6d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/bf82a334-13b6-ca57-ea75-096fc2ffce50"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/35b25be2-d08a-e340-45ed-f08a95d804fc"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1c5de8e1-f68d-6a17-e0d2-ec259c42768c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a3ebc80a-847b-46d5-a37d-8dca5e6947df"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c28a89d9-7cf4-439b-a8c4-ad4e769f68ee"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/2acc27c6-5fdb-405e-9080-cb66b850c8f5"),
		// 						}},
		// 						DisplayName: to.Ptr("Encrypt data in transit"),
		// 						MaxScore: to.Ptr[int32](4),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Encrypt data in transit"),
		// 				HealthyResourceCount: to.Ptr[int32](5),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](3.33),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0.8325),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](6),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/483f12ed-ae23-447e-a2de-a67a10db4353"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3b20e985-f71f-483b-b078-f30d73936d43"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f9f0eed0-f143-47bf-b856-671ea2eeed62"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1a2b5b4c-f80d-46e7-ac81-b51a9fb363de"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c3b51c94-588b-426b-a892-24696f9e54cc"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e40df93c-7a7c-1b0a-c787-9987ceb98e54"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/7b3d4796-9400-2904-692b-4a5ede7f0a1e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/df4d1739-47f0-60c7-1706-3731fea6ab03"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1a36f14a-8bd8-45f5-abe5-eef88d76ab5b"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/beb62be3-5e78-49bd-ac5f-099250ef3c7c"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ba975338-f956-41e7-a9f2-7614832d382d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d5a8d84a-9ad0-42e2-80e0-d38e3d46028a"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5a3d6cdd-8eb3-46d2-ba11-d24a0d47fe65"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d8326952-60bb-40fb-b33f-51e662708a88"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/08e628db-e2ed-4793-bc91-d13e684401c3"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/5f88450f-9546-4b78-a181-a2d9162bb441"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/add45209-73f6-4fa5-a5a5-74a451b07fbe"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/dbfc99e3-e648-4c3b-bd32-995e6268430d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b3473ed6-78c0-40d5-b5f0-674e98924952"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/9dd55566-33b9-4c07-a959-14794ce02355"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ad0b04b9-eaf9-49f8-b85e-724f9520e760"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ece6ec5d-a862-4e22-a8db-271661216018"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/e40b679a-f44e-4366-87dd-7693e16a2128"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0bdcd23c-4ff2-4077-aa14-eb6950bfbdd8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/1f386f4e-449e-41e8-b829-a2fe01086ae1"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/2f6c8a5a-9407-467c-8082-0ad4ab915d77"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3b1713ec-feb3-4b32-b5b0-251acff0a84a"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/049f1551-438b-444e-8904-a3c3afbcb43e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/684307e9-62a8-4f2a-887a-4b90de5e4b98"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/0327f9da-f758-4d69-8903-55448b8cf70e"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/cc637123-c11e-40ee-adf8-93c0876481f4"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a7c8fa46-526d-4bf6-b8b3-17fa01310fd8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/20f6c761-4dd7-4f27-9e37-6db8471486ef"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/ebc68898-5c0f-4353-a426-4a5f1e737b12"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/f67fb4ed-d481-44d7-91e5-efadf504f74a"),
		// 						}},
		// 						DisplayName: to.Ptr("Restrict unauthorized network access"),
		// 						MaxScore: to.Ptr[int32](4),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Restrict unauthorized network access"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](4),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				Definition: &armsecurity.SecureScoreControlDefinitionItem{
		// 					Name: to.Ptr("8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 					Type: to.Ptr("Microsoft.Security/secureScoreControlDefinitions"),
		// 					ID: to.Ptr("/providers/Microsoft.Security/secureScoreControlDefinitions/8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 					Properties: &armsecurity.SecureScoreControlDefinitionItemProperties{
		// 						AssessmentDefinitions: []*armsecurity.AzureResourceLink{
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/d57a4221-a804-52ca-3dea-768284f06bb7"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/651967bf-044e-4bde-8376-3e08e0600105"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/b12bc79e-4f12-44db-acda-571820191ddc"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/7f04fc0c-4a3d-5c7e-ce19-666cb871b510"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/dbfc99e3-e648-4c3b-bd32-995e6268430d"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/c01fab9f-bde1-4ba5-9d35-7de51f31c2d3"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/23b514bd-2afc-4a3e-8d3d-f4327118eee9"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/3053474d-4fab-4603-8d18-2a6dfd09f782"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/6be98232-0100-474a-b33d-ba9c1a747f70"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/a7c8fa46-526d-4bf6-b8b3-17fa01310fd8"),
		// 							},
		// 							{
		// 								ID: to.Ptr("/providers/Microsoft.Security/assessmentMetadata/20f6c761-4dd7-4f27-9e37-6db8471486ef"),
		// 						}},
		// 						DisplayName: to.Ptr("Enable encryption at rest"),
		// 						MaxScore: to.Ptr[int32](4),
		// 						Source: &armsecurity.SecureScoreControlDefinitionSource{
		// 							SourceType: to.Ptr(armsecurity.ControlTypeBuiltIn),
		// 						},
		// 					},
		// 				},
		// 				DisplayName: to.Ptr("Enable encryption at rest"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](4),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecureScoreControlsClient().NewListPager(&armsecurity.SecureScoreControlsClientListOptions{Expand: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecureScoreControlList = armsecurity.SecureScoreControlList{
		// 	Value: []*armsecurity.SecureScoreControlDetails{
		// 		{
		// 			Name: to.Ptr("a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/a9909064-42b4-4d34-8143-275477afe18b"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Protect applications against DDoS attacks"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](1),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](0),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/34a42fb3-e6db-409c-b56b-7b1db6b8aee0"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable MFA"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](10),
		// 					Max: to.Ptr[int32](10),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("76763537-9feb-42d3-b4f4-78c01117be80"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/76763537-9feb-42d3-b4f4-78c01117be80"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Implement security best practices"),
		// 				HealthyResourceCount: to.Ptr[int32](7),
		// 				NotApplicableResourceCount: to.Ptr[int32](1),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](7),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/4db8d6cf-075b-4149-a813-da09ca2ae120"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable Advanced Threat Protection"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](0),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/27b24961-75ba-4fe4-8909-97286d5dd5ee"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable auditing and logging"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0.2),
		// 					Max: to.Ptr[int32](1),
		// 					Percentage: to.Ptr[float64](0.2),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](4),
		// 				Weight: to.Ptr[int64](5),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/2d85f639-0bea-4a4a-b6c6-608952a1414a"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Manage access and permissions"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](2),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0.5),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](2),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/99fc8df2-e0f5-40f8-9415-a7f7ca948b5a"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Remediate security configurations"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/12136bd9-dc24-44f2-9587-7be3af6aac14"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable endpoint protection"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](2),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/61702b76-1fab-41f2-bcbc-50b7870dcf38"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Apply system updates"),
		// 				HealthyResourceCount: to.Ptr[int32](0),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](0),
		// 					Max: to.Ptr[int32](6),
		// 					Percentage: to.Ptr[float64](0),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("0e55495e-034f-4abc-8293-767229250176"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/0e55495e-034f-4abc-8293-767229250176"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Encrypt data in transit"),
		// 				HealthyResourceCount: to.Ptr[int32](5),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](3.33),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](0.8325),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](1),
		// 				Weight: to.Ptr[int64](6),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/f9d5432b-8f7b-45e9-b90c-e214a30f6a02"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Restrict unauthorized network access"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](4),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores/secureScoreControls"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls/8fd574ec-43cf-426e-a439-a67cbaf2d564"),
		// 			Properties: &armsecurity.SecureScoreControlScoreDetails{
		// 				DisplayName: to.Ptr("Enable encryption at rest"),
		// 				HealthyResourceCount: to.Ptr[int32](1),
		// 				NotApplicableResourceCount: to.Ptr[int32](0),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](4),
		// 					Max: to.Ptr[int32](4),
		// 					Percentage: to.Ptr[float64](1),
		// 				},
		// 				UnhealthyResourceCount: to.Ptr[int32](0),
		// 				Weight: to.Ptr[int64](1),
		// 			},
		// 	}},
		// }
	}
}
Output:

type SecureScoreControlsClientListBySecureScoreOptions added in v0.3.0

type SecureScoreControlsClientListBySecureScoreOptions struct {
	// OData expand. Optional.
	Expand *ExpandControlsEnum
}

SecureScoreControlsClientListBySecureScoreOptions contains the optional parameters for the SecureScoreControlsClient.NewListBySecureScorePager method.

type SecureScoreControlsClientListBySecureScoreResponse added in v0.3.0

type SecureScoreControlsClientListBySecureScoreResponse struct {
	// List of security controls
	SecureScoreControlList
}

SecureScoreControlsClientListBySecureScoreResponse contains the response from method SecureScoreControlsClient.NewListBySecureScorePager.

type SecureScoreControlsClientListOptions added in v0.3.0

type SecureScoreControlsClientListOptions struct {
	// OData expand. Optional.
	Expand *ExpandControlsEnum
}

SecureScoreControlsClientListOptions contains the optional parameters for the SecureScoreControlsClient.NewListPager method.

type SecureScoreControlsClientListResponse added in v0.3.0

type SecureScoreControlsClientListResponse struct {
	// List of security controls
	SecureScoreControlList
}

SecureScoreControlsClientListResponse contains the response from method SecureScoreControlsClient.NewListPager.

type SecureScoreItem

type SecureScoreItem struct {
	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Secure score item
	Properties *SecureScoreItemProperties

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; score object
	Score *ScoreDetails

	// READ-ONLY; The relative weight for each subscription. Used when calculating an aggregated secure score for multiple subscriptions.
	Weight *int64
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSecureScoresClient().Get(ctx, "ascScore", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SecureScoreItem = armsecurity.SecureScoreItem{
	// 	Name: to.Ptr("ascScore"),
	// 	Type: to.Ptr("Microsoft.Security/secureScores"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore"),
	// 	Properties: &armsecurity.SecureScoreItemProperties{
	// 		DisplayName: to.Ptr("ASC score"),
	// 		Score: &armsecurity.ScoreDetails{
	// 			Current: to.Ptr[float64](23.53),
	// 			Max: to.Ptr[int32](39),
	// 			Percentage: to.Ptr[float64](0.6033),
	// 		},
	// 		Weight: to.Ptr[int64](67),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecureScoresClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SecureScoresList = armsecurity.SecureScoresList{
		// 	Value: []*armsecurity.SecureScoreItem{
		// 		{
		// 			Name: to.Ptr("ascScore"),
		// 			Type: to.Ptr("Microsoft.Security/secureScores"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore"),
		// 			Properties: &armsecurity.SecureScoreItemProperties{
		// 				DisplayName: to.Ptr("ASC score"),
		// 				Score: &armsecurity.ScoreDetails{
		// 					Current: to.Ptr[float64](23.53),
		// 					Max: to.Ptr[int32](39),
		// 					Percentage: to.Ptr[float64](0.6033),
		// 				},
		// 				Weight: to.Ptr[int64](67),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Secure score item data model
	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.NewListPager method.

type SecureScoresClientListResponse added in v0.3.0

type SecureScoresClientListResponse struct {
	// List of secure scores
	SecureScoresList
}

SecureScoresClientListResponse contains the response from method SecureScoresClient.NewListPager.

type SecureScoresList

type SecureScoresList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string

	// READ-ONLY; Collection of secure scores in this page
	Value []*SecureScoreItem
}

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 SecurityContactName added in v0.14.0

type SecurityContactName string
const (
	// SecurityContactNameDefault - The single applicable name of the security contact object
	SecurityContactNameDefault SecurityContactName = "default"
)

func PossibleSecurityContactNameValues added in v0.14.0

func PossibleSecurityContactNameValues() []SecurityContactName

PossibleSecurityContactNameValues returns the possible values for the SecurityContactName const type.

type SecurityContactRole added in v0.14.0

type SecurityContactRole string

SecurityContactRole - A possible role to configure sending security notification alerts to

const (
	// SecurityContactRoleAccountAdmin - If enabled, send notification on new alerts to the account admins
	SecurityContactRoleAccountAdmin SecurityContactRole = "AccountAdmin"
	// SecurityContactRoleContributor - If enabled, send notification on new alerts to the subscription contributors
	SecurityContactRoleContributor SecurityContactRole = "Contributor"
	// SecurityContactRoleOwner - If enabled, send notification on new alerts to the subscription owners
	SecurityContactRoleOwner SecurityContactRole = "Owner"
	// SecurityContactRoleServiceAdmin - If enabled, send notification on new alerts to the service admins
	SecurityContactRoleServiceAdmin SecurityContactRole = "ServiceAdmin"
)

func PossibleSecurityContactRoleValues added in v0.14.0

func PossibleSecurityContactRoleValues() []SecurityContactRole

PossibleSecurityContactRoleValues returns the possible values for the SecurityContactRole const type.

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 SensitiveDataDiscoveryProperties added in v0.13.0

type SensitiveDataDiscoveryProperties struct {
	// Indicates whether Sensitive Data Discovery should be enabled.
	IsEnabled *bool

	// READ-ONLY; Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
	OperationStatus *OperationStatus
}

SensitiveDataDiscoveryProperties - Properties of Sensitive Data Discovery.

func (SensitiveDataDiscoveryProperties) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type SensitiveDataDiscoveryProperties.

func (*SensitiveDataDiscoveryProperties) UnmarshalJSON added in v0.13.0

func (s *SensitiveDataDiscoveryProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SensitiveDataDiscoveryProperties.

type SensitivityLabel

type SensitivityLabel struct {
	// The description of the sensitivity label.
	Description *string

	// The name of the sensitivity label.
	DisplayName *string

	// Indicates whether the label is enabled or not.
	Enabled *bool

	// The order of the sensitivity label.
	Order *int32

	// The rank of the sensitivity label.
	Rank *Rank
}

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 SensitivitySettingsClient added in v0.11.0

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

SensitivitySettingsClient contains the methods for the SensitivitySettings group. Don't use this type directly, use NewSensitivitySettingsClient() instead.

func NewSensitivitySettingsClient added in v0.11.0

func NewSensitivitySettingsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SensitivitySettingsClient, error)

NewSensitivitySettingsClient creates a new instance of SensitivitySettingsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SensitivitySettingsClient) CreateOrUpdate added in v0.14.0

CreateOrUpdate - Create or update data sensitivity settings for sensitive data discovery If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-15-preview

  • sensitivitySettings - The data sensitivity settings to update
  • options - SensitivitySettingsClientCreateOrUpdateOptions contains the optional parameters for the SensitivitySettingsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/PutSensitivitySettings_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSensitivitySettingsClient().CreateOrUpdate(ctx, armsecurity.UpdateSensitivitySettingsRequest{
		SensitiveInfoTypesIDs: []*string{
			to.Ptr("f2f8a7a1-28c0-404b-9ab4-30a0a7af18cb"),
			to.Ptr("b452f22b-f87d-4f48-8490-ecf0873325b5"),
			to.Ptr("d59ee8b6-2618-404b-a5e7-aa377cd67543")},
		SensitivityThresholdLabelID:    to.Ptr("f2f8a7a1-28c0-404b-9ab4-30a0a7af18cb"),
		SensitivityThresholdLabelOrder: to.Ptr[float32](2),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GetSensitivitySettingsResponse = armsecurity.GetSensitivitySettingsResponse{
	// 	Name: to.Ptr("current"),
	// 	Type: to.Ptr("Microsoft.Security/sensitivitySettings"),
	// 	ID: to.Ptr("/providers/Microsoft.Security/sensitivitySettings"),
	// 	Properties: &armsecurity.GetSensitivitySettingsResponseProperties{
	// 		MipInformation: &armsecurity.GetSensitivitySettingsResponsePropertiesMipInformation{
	// 			BuiltInInfoTypes: []*armsecurity.BuiltInInfoType{
	// 				{
	// 					Name: to.Ptr("Http Authorization Header"),
	// 					Type: to.Ptr("Credentials"),
	// 					ID: to.Ptr("4d0d3eb6-619f-4c8c-810c-c16150c95278"),
	// 				},
	// 				{
	// 					Name: to.Ptr("User Login Credentials"),
	// 					Type: to.Ptr("Credentials"),
	// 					ID: to.Ptr("a98fde82-45b6-4b2c-afd0-ad579cd9f826"),
	// 				},
	// 				{
	// 					Name: to.Ptr("Credit card number"),
	// 					Type: to.Ptr("Finance"),
	// 					ID: to.Ptr("50842eb7-edc8-4019-85dd-5a5c1f2bb085"),
	// 				},
	// 				{
	// 					Name: to.Ptr("EU debit card number"),
	// 					Type: to.Ptr("Finance"),
	// 					ID: to.Ptr("0e9b3178-9678-47dd-a509-37222ca96b42"),
	// 			}},
	// 			CustomInfoTypes: []*armsecurity.InfoType{
	// 				{
	// 					Name: to.Ptr("User created custom info type 1"),
	// 					Description: to.Ptr("Custom info type description"),
	// 					ID: to.Ptr("c5f9b9a1-2b9a-4a3a-8c5b-1f3d1d9d9c9b"),
	// 				},
	// 				{
	// 					Name: to.Ptr("User created custom info type 2"),
	// 					Description: to.Ptr("Custom info type description"),
	// 					ID: to.Ptr("a4fee2b6-5618-404b-a5e7-aa377cd67543"),
	// 				},
	// 				{
	// 					Name: to.Ptr("User created custom info type 3"),
	// 					Description: to.Ptr("Custom info type description"),
	// 					ID: to.Ptr("a355f11e-f87d-4f48-8490-ecf0873325b5"),
	// 			}},
	// 			Labels: []*armsecurity.Label{
	// 				{
	// 					Name: to.Ptr("Public"),
	// 					ID: to.Ptr("fdfb5435-124d-4651-a889-a4210fec6a77"),
	// 					Order: to.Ptr[float32](0),
	// 				},
	// 				{
	// 					Name: to.Ptr("Confidential"),
	// 					ID: to.Ptr("4c5447ec-f7f3-4345-a160-6a5850f2bf0c"),
	// 					Order: to.Ptr[float32](1),
	// 				},
	// 				{
	// 					Name: to.Ptr("Highly Confidential"),
	// 					ID: to.Ptr("f38ac75c-f42a-4c89-aa37-9c4e74101414"),
	// 					Order: to.Ptr[float32](2),
	// 			}},
	// 			MipIntegrationStatus: to.Ptr(armsecurity.MipIntegrationStatusOk),
	// 		},
	// 		SensitiveInfoTypesIDs: []*string{
	// 			to.Ptr("a98fde82-45b6-4b2c-afd0-ad579cd9f826"),
	// 			to.Ptr("4d0d3eb6-619f-4c8c-810c-c16150c95278"),
	// 			to.Ptr("0e9b3178-9678-47dd-a509-37222ca96b42"),
	// 			to.Ptr("c5f9b9a1-2b9a-4a3a-8c5b-1f3d1d9d9c9b")},
	// 			SensitivityThresholdLabelOrder: to.Ptr[float32](2),
	// 		},
	// 	}
}
Output:

func (*SensitivitySettingsClient) Get added in v0.14.0

Get - Gets data sensitivity settings for sensitive data discovery If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-15-preview

  • options - SensitivitySettingsClientGetOptions contains the optional parameters for the SensitivitySettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/GetSensitivitySettings_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSensitivitySettingsClient().Get(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GetSensitivitySettingsResponse = armsecurity.GetSensitivitySettingsResponse{
	// 	Name: to.Ptr("current"),
	// 	Type: to.Ptr("Microsoft.Security/sensitivitySettings"),
	// 	ID: to.Ptr("/providers/Microsoft.Security/sensitivitySettings"),
	// 	Properties: &armsecurity.GetSensitivitySettingsResponseProperties{
	// 		MipInformation: &armsecurity.GetSensitivitySettingsResponsePropertiesMipInformation{
	// 			BuiltInInfoTypes: []*armsecurity.BuiltInInfoType{
	// 				{
	// 					Name: to.Ptr("Http Authorization Header"),
	// 					Type: to.Ptr("Credentials"),
	// 					ID: to.Ptr("4d0d3eb6-619f-4c8c-810c-c16150c95278"),
	// 				},
	// 				{
	// 					Name: to.Ptr("User Login Credentials"),
	// 					Type: to.Ptr("Credentials"),
	// 					ID: to.Ptr("a98fde82-45b6-4b2c-afd0-ad579cd9f826"),
	// 				},
	// 				{
	// 					Name: to.Ptr("Credit card number"),
	// 					Type: to.Ptr("Finance"),
	// 					ID: to.Ptr("50842eb7-edc8-4019-85dd-5a5c1f2bb085"),
	// 				},
	// 				{
	// 					Name: to.Ptr("EU debit card number"),
	// 					Type: to.Ptr("Finance"),
	// 					ID: to.Ptr("0e9b3178-9678-47dd-a509-37222ca96b42"),
	// 			}},
	// 			CustomInfoTypes: []*armsecurity.InfoType{
	// 				{
	// 					Name: to.Ptr("User created custom info type 1"),
	// 					Description: to.Ptr("Custom info type description"),
	// 					ID: to.Ptr("c5f9b9a1-2b9a-4a3a-8c5b-1f3d1d9d9c9b"),
	// 				},
	// 				{
	// 					Name: to.Ptr("User created custom info type 2"),
	// 					Description: to.Ptr("Custom info type description"),
	// 					ID: to.Ptr("a4fee2b6-5618-404b-a5e7-aa377cd67543"),
	// 				},
	// 				{
	// 					Name: to.Ptr("User created custom info type 3"),
	// 					Description: to.Ptr("Custom info type description"),
	// 					ID: to.Ptr("a355f11e-f87d-4f48-8490-ecf0873325b5"),
	// 			}},
	// 			Labels: []*armsecurity.Label{
	// 				{
	// 					Name: to.Ptr("Public"),
	// 					ID: to.Ptr("fdfb5435-124d-4651-a889-a4210fec6a77"),
	// 					Order: to.Ptr[float32](0),
	// 				},
	// 				{
	// 					Name: to.Ptr("Confidential"),
	// 					ID: to.Ptr("4c5447ec-f7f3-4345-a160-6a5850f2bf0c"),
	// 					Order: to.Ptr[float32](1),
	// 				},
	// 				{
	// 					Name: to.Ptr("Highly Confidential"),
	// 					ID: to.Ptr("f38ac75c-f42a-4c89-aa37-9c4e74101414"),
	// 					Order: to.Ptr[float32](2),
	// 			}},
	// 			MipIntegrationStatus: to.Ptr(armsecurity.MipIntegrationStatusOk),
	// 		},
	// 		SensitiveInfoTypesIDs: []*string{
	// 			to.Ptr("a98fde82-45b6-4b2c-afd0-ad579cd9f826"),
	// 			to.Ptr("4d0d3eb6-619f-4c8c-810c-c16150c95278"),
	// 			to.Ptr("0e9b3178-9678-47dd-a509-37222ca96b42"),
	// 			to.Ptr("c5f9b9a1-2b9a-4a3a-8c5b-1f3d1d9d9c9b")},
	// 			SensitivityThresholdLabelOrder: to.Ptr[float32](1),
	// 		},
	// 	}
}
Output:

func (*SensitivitySettingsClient) List added in v0.11.0

List - Gets a list with a single sensitivity settings resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-15-preview

  • options - SensitivitySettingsClientListOptions contains the optional parameters for the SensitivitySettingsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/GetSensitivitySettingsList_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSensitivitySettingsClient().List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GetSensitivitySettingsListResponse = armsecurity.GetSensitivitySettingsListResponse{
	// 	Value: []*armsecurity.GetSensitivitySettingsResponse{
	// 		{
	// 			Name: to.Ptr("current"),
	// 			Type: to.Ptr("Microsoft.Security/sensitivitySettings"),
	// 			ID: to.Ptr("/providers/Microsoft.Security/sensitivitySettings"),
	// 			Properties: &armsecurity.GetSensitivitySettingsResponseProperties{
	// 				MipInformation: &armsecurity.GetSensitivitySettingsResponsePropertiesMipInformation{
	// 					BuiltInInfoTypes: []*armsecurity.BuiltInInfoType{
	// 						{
	// 							Name: to.Ptr("Http Authorization Header"),
	// 							Type: to.Ptr("Credentials"),
	// 							ID: to.Ptr("4d0d3eb6-619f-4c8c-810c-c16150c95278"),
	// 						},
	// 						{
	// 							Name: to.Ptr("User Login Credentials"),
	// 							Type: to.Ptr("Credentials"),
	// 							ID: to.Ptr("a98fde82-45b6-4b2c-afd0-ad579cd9f826"),
	// 						},
	// 						{
	// 							Name: to.Ptr("Credit card number"),
	// 							Type: to.Ptr("Finance"),
	// 							ID: to.Ptr("50842eb7-edc8-4019-85dd-5a5c1f2bb085"),
	// 						},
	// 						{
	// 							Name: to.Ptr("EU debit card number"),
	// 							Type: to.Ptr("Finance"),
	// 							ID: to.Ptr("0e9b3178-9678-47dd-a509-37222ca96b42"),
	// 					}},
	// 					CustomInfoTypes: []*armsecurity.InfoType{
	// 						{
	// 							Name: to.Ptr("User created custom info type 1"),
	// 							Description: to.Ptr("Custom info type description"),
	// 							ID: to.Ptr("c5f9b9a1-2b9a-4a3a-8c5b-1f3d1d9d9c9b"),
	// 						},
	// 						{
	// 							Name: to.Ptr("User created custom info type 2"),
	// 							Description: to.Ptr("Custom info type description"),
	// 							ID: to.Ptr("a4fee2b6-5618-404b-a5e7-aa377cd67543"),
	// 						},
	// 						{
	// 							Name: to.Ptr("User created custom info type 3"),
	// 							Description: to.Ptr("Custom info type description"),
	// 							ID: to.Ptr("a355f11e-f87d-4f48-8490-ecf0873325b5"),
	// 					}},
	// 					Labels: []*armsecurity.Label{
	// 						{
	// 							Name: to.Ptr("Public"),
	// 							ID: to.Ptr("fdfb5435-124d-4651-a889-a4210fec6a77"),
	// 							Order: to.Ptr[float32](0),
	// 						},
	// 						{
	// 							Name: to.Ptr("Confidential"),
	// 							ID: to.Ptr("4c5447ec-f7f3-4345-a160-6a5850f2bf0c"),
	// 							Order: to.Ptr[float32](1),
	// 						},
	// 						{
	// 							Name: to.Ptr("Highly Confidential"),
	// 							ID: to.Ptr("f38ac75c-f42a-4c89-aa37-9c4e74101414"),
	// 							Order: to.Ptr[float32](2),
	// 					}},
	// 					MipIntegrationStatus: to.Ptr(armsecurity.MipIntegrationStatusOk),
	// 				},
	// 				SensitiveInfoTypesIDs: []*string{
	// 					to.Ptr("a98fde82-45b6-4b2c-afd0-ad579cd9f826"),
	// 					to.Ptr("4d0d3eb6-619f-4c8c-810c-c16150c95278"),
	// 					to.Ptr("0e9b3178-9678-47dd-a509-37222ca96b42"),
	// 					to.Ptr("c5f9b9a1-2b9a-4a3a-8c5b-1f3d1d9d9c9b")},
	// 					SensitivityThresholdLabelOrder: to.Ptr[float32](1),
	// 				},
	// 		}},
	// 	}
}
Output:

type SensitivitySettingsClientCreateOrUpdateOptions added in v0.14.0

type SensitivitySettingsClientCreateOrUpdateOptions struct {
}

SensitivitySettingsClientCreateOrUpdateOptions contains the optional parameters for the SensitivitySettingsClient.CreateOrUpdate method.

type SensitivitySettingsClientCreateOrUpdateResponse added in v0.14.0

type SensitivitySettingsClientCreateOrUpdateResponse struct {
	// Data sensitivity settings for sensitive data discovery
	GetSensitivitySettingsResponse
}

SensitivitySettingsClientCreateOrUpdateResponse contains the response from method SensitivitySettingsClient.CreateOrUpdate.

type SensitivitySettingsClientGetOptions added in v0.14.0

type SensitivitySettingsClientGetOptions struct {
}

SensitivitySettingsClientGetOptions contains the optional parameters for the SensitivitySettingsClient.Get method.

type SensitivitySettingsClientGetResponse added in v0.14.0

type SensitivitySettingsClientGetResponse struct {
	// Data sensitivity settings for sensitive data discovery
	GetSensitivitySettingsResponse
}

SensitivitySettingsClientGetResponse contains the response from method SensitivitySettingsClient.Get.

type SensitivitySettingsClientListOptions added in v0.11.0

type SensitivitySettingsClientListOptions struct {
}

SensitivitySettingsClientListOptions contains the optional parameters for the SensitivitySettingsClient.List method.

type SensitivitySettingsClientListResponse added in v0.11.0

type SensitivitySettingsClientListResponse struct {
	// A list with a single sensitivity settings resource
	GetSensitivitySettingsListResponse
}

SensitivitySettingsClientListResponse contains the response from method SensitivitySettingsClient.List.

type ServerVulnerabilityAssessment

type ServerVulnerabilityAssessment struct {
	// describes ServerVulnerabilityAssessment properties.
	Properties *ServerVulnerabilityAssessmentProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServerVulnerabilityAssessmentClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewServerVulnerabilityAssessmentClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServerVulnerabilityAssessmentClient().Get(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ServerVulnerabilityAssessment = armsecurity.ServerVulnerabilityAssessment{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Security/serverVulnerabilityAssessments"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default"),
	// 	Properties: &armsecurity.ServerVulnerabilityAssessmentProperties{
	// 		ProvisioningState: to.Ptr(armsecurity.ServerVulnerabilityAssessmentPropertiesProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServerVulnerabilityAssessmentClient().ListByExtendedResource(ctx, "rg1", "Microsoft.Compute", "virtualMachines", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ServerVulnerabilityAssessmentsList = armsecurity.ServerVulnerabilityAssessmentsList{
	// 	Value: []*armsecurity.ServerVulnerabilityAssessment{
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.Security/serverVulnerabilityAssessments"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default"),
	// 			Properties: &armsecurity.ServerVulnerabilityAssessmentProperties{
	// 				ProvisioningState: to.Ptr(armsecurity.ServerVulnerabilityAssessmentPropertiesProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
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 {
	// Describes the server vulnerability assessment details on a resource
	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.BeginDelete.

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 {
	// Describes the server vulnerability assessment details on a resource
	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 {
	// List of server vulnerability assessments
	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
}

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 ServerVulnerabilityAssessmentsAzureSettingProperties added in v0.13.0

type ServerVulnerabilityAssessmentsAzureSettingProperties struct {
	// REQUIRED; The selected vulnerability assessments provider on Azure servers in the defined scope.
	SelectedProvider *ServerVulnerabilityAssessmentsAzureSettingSelectedProvider
}

ServerVulnerabilityAssessmentsAzureSettingProperties - Describes the vulnerability assessments setting properties on Azure servers in the defined scope.

func (ServerVulnerabilityAssessmentsAzureSettingProperties) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentsAzureSettingProperties.

func (*ServerVulnerabilityAssessmentsAzureSettingProperties) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentsAzureSettingProperties.

type ServerVulnerabilityAssessmentsAzureSettingSelectedProvider added in v0.13.0

type ServerVulnerabilityAssessmentsAzureSettingSelectedProvider string

ServerVulnerabilityAssessmentsAzureSettingSelectedProvider - The selected vulnerability assessments provider on Azure servers in the defined scope.

const (
	// ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm - Microsoft Defender for Endpoints threat and vulnerability
	// management.
	ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm ServerVulnerabilityAssessmentsAzureSettingSelectedProvider = "MdeTvm"
)

func PossibleServerVulnerabilityAssessmentsAzureSettingSelectedProviderValues added in v0.13.0

func PossibleServerVulnerabilityAssessmentsAzureSettingSelectedProviderValues() []ServerVulnerabilityAssessmentsAzureSettingSelectedProvider

PossibleServerVulnerabilityAssessmentsAzureSettingSelectedProviderValues returns the possible values for the ServerVulnerabilityAssessmentsAzureSettingSelectedProvider const type.

type ServerVulnerabilityAssessmentsList

type ServerVulnerabilityAssessmentsList struct {
	Value []*ServerVulnerabilityAssessment
}

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 ServerVulnerabilityAssessmentsSetting added in v0.13.0

type ServerVulnerabilityAssessmentsSetting struct {
	// REQUIRED; The kind of the server vulnerability assessments setting.
	Kind *ServerVulnerabilityAssessmentsSettingKind

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ServerVulnerabilityAssessmentsSetting - A base vulnerability assessments setting on servers in the defined scope.

func (*ServerVulnerabilityAssessmentsSetting) GetServerVulnerabilityAssessmentsSetting added in v0.13.0

func (s *ServerVulnerabilityAssessmentsSetting) GetServerVulnerabilityAssessmentsSetting() *ServerVulnerabilityAssessmentsSetting

GetServerVulnerabilityAssessmentsSetting implements the ServerVulnerabilityAssessmentsSettingClassification interface for type ServerVulnerabilityAssessmentsSetting.

func (ServerVulnerabilityAssessmentsSetting) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentsSetting.

func (*ServerVulnerabilityAssessmentsSetting) UnmarshalJSON added in v0.13.0

func (s *ServerVulnerabilityAssessmentsSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentsSetting.

type ServerVulnerabilityAssessmentsSettingClassification added in v0.13.0

type ServerVulnerabilityAssessmentsSettingClassification interface {
	// GetServerVulnerabilityAssessmentsSetting returns the ServerVulnerabilityAssessmentsSetting content of the underlying type.
	GetServerVulnerabilityAssessmentsSetting() *ServerVulnerabilityAssessmentsSetting
}

ServerVulnerabilityAssessmentsSettingClassification provides polymorphic access to related types. Call the interface's GetServerVulnerabilityAssessmentsSetting() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureServersSetting, *ServerVulnerabilityAssessmentsSetting

type ServerVulnerabilityAssessmentsSettingKind added in v0.13.0

type ServerVulnerabilityAssessmentsSettingKind string

ServerVulnerabilityAssessmentsSettingKind - The kind of the server vulnerability assessments setting

const (
	ServerVulnerabilityAssessmentsSettingKindAzureServersSetting ServerVulnerabilityAssessmentsSettingKind = "AzureServersSetting"
)

func PossibleServerVulnerabilityAssessmentsSettingKindValues added in v0.13.0

func PossibleServerVulnerabilityAssessmentsSettingKindValues() []ServerVulnerabilityAssessmentsSettingKind

PossibleServerVulnerabilityAssessmentsSettingKindValues returns the possible values for the ServerVulnerabilityAssessmentsSettingKind const type.

type ServerVulnerabilityAssessmentsSettingKindName added in v0.13.0

type ServerVulnerabilityAssessmentsSettingKindName string
const (
	ServerVulnerabilityAssessmentsSettingKindNameAzureServersSetting ServerVulnerabilityAssessmentsSettingKindName = "azureServersSetting"
)

func PossibleServerVulnerabilityAssessmentsSettingKindNameValues added in v0.13.0

func PossibleServerVulnerabilityAssessmentsSettingKindNameValues() []ServerVulnerabilityAssessmentsSettingKindName

PossibleServerVulnerabilityAssessmentsSettingKindNameValues returns the possible values for the ServerVulnerabilityAssessmentsSettingKindName const type.

type ServerVulnerabilityAssessmentsSettingsClient added in v0.13.0

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

ServerVulnerabilityAssessmentsSettingsClient contains the methods for the ServerVulnerabilityAssessmentsSettings group. Don't use this type directly, use NewServerVulnerabilityAssessmentsSettingsClient() instead.

func NewServerVulnerabilityAssessmentsSettingsClient added in v0.13.0

func NewServerVulnerabilityAssessmentsSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerVulnerabilityAssessmentsSettingsClient, error)

NewServerVulnerabilityAssessmentsSettingsClient creates a new instance of ServerVulnerabilityAssessmentsSettingsClient 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 (*ServerVulnerabilityAssessmentsSettingsClient) CreateOrUpdate added in v0.13.0

CreateOrUpdate - Create or update a server vulnerability assessments setting of the requested kind on the subscription If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • settingKind - The kind of the server vulnerability assessments setting
  • serverVulnerabilityAssessmentsSetting - A server vulnerability assessments setting over a predefined scope
  • options - ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/PutServerVulnerabilityAssessmentsSetting_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServerVulnerabilityAssessmentsSettingsClient().CreateOrUpdate(ctx, armsecurity.ServerVulnerabilityAssessmentsSettingKindNameAzureServersSetting, &armsecurity.AzureServersSetting{
		Kind: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsSettingKindAzureServersSetting),
		Properties: &armsecurity.ServerVulnerabilityAssessmentsAzureSettingProperties{
			SelectedProvider: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armsecurity.ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse{
	// 	                            ServerVulnerabilityAssessmentsSettingClassification: &armsecurity.AzureServersSetting{
	// 		Name: to.Ptr("azureServersSetting"),
	// 		Type: to.Ptr("Microsoft.Security/serverVulnerabilityAssessmentsSettings"),
	// 		ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/azureServersSetting"),
	// 		SystemData: &armsecurity.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-12T13:47:50.328Z"); return t}()),
	// 			CreatedBy: to.Ptr("user@contoso.com"),
	// 			CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-12T13:47:50.328Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		},
	// 		Kind: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsSettingKindAzureServersSetting),
	// 		Properties: &armsecurity.ServerVulnerabilityAssessmentsAzureSettingProperties{
	// 			SelectedProvider: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm),
	// 		},
	// 	},
	// 	                        }
}
Output:

func (*ServerVulnerabilityAssessmentsSettingsClient) Delete added in v0.13.0

Delete - Delete the server vulnerability assessments setting of the requested kind from the subscription If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • settingKind - The kind of the server vulnerability assessments setting
  • options - ServerVulnerabilityAssessmentsSettingsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/DeleteServerVulnerabilityAssessmentsSetting_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewServerVulnerabilityAssessmentsSettingsClient().Delete(ctx, armsecurity.ServerVulnerabilityAssessmentsSettingKindNameAzureServersSetting, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ServerVulnerabilityAssessmentsSettingsClient) Get added in v0.13.0

Get - Get a server vulnerability assessments setting of the requested kind, that is set on the subscription If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • settingKind - The kind of the server vulnerability assessments setting
  • options - ServerVulnerabilityAssessmentsSettingsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/GetServerVulnerabilityAssessmentsSetting_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServerVulnerabilityAssessmentsSettingsClient().Get(ctx, armsecurity.ServerVulnerabilityAssessmentsSettingKindNameAzureServersSetting, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armsecurity.ServerVulnerabilityAssessmentsSettingsClientGetResponse{
	// 	                            ServerVulnerabilityAssessmentsSettingClassification: &armsecurity.AzureServersSetting{
	// 		Name: to.Ptr("azureServersSetting"),
	// 		Type: to.Ptr("Microsoft.Security/serverVulnerabilityAssessmentsSettings"),
	// 		ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/azureServersSetting"),
	// 		SystemData: &armsecurity.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-12T13:47:50.328Z"); return t}()),
	// 			CreatedBy: to.Ptr("user@contoso.com"),
	// 			CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-12T13:47:50.328Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user@contoso.com"),
	// 			LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
	// 		},
	// 		Kind: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsSettingKindAzureServersSetting),
	// 		Properties: &armsecurity.ServerVulnerabilityAssessmentsAzureSettingProperties{
	// 			SelectedProvider: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm),
	// 		},
	// 	},
	// 	                        }
}
Output:

func (*ServerVulnerabilityAssessmentsSettingsClient) NewListBySubscriptionPager added in v0.13.0

NewListBySubscriptionPager - Get a list of all the server vulnerability assessments settings over a subscription level scope

Generated from API version 2023-05-01

  • options - ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/ListServerVulnerabilityAssessmentsSettings_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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServerVulnerabilityAssessmentsSettingsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ServerVulnerabilityAssessmentsSettingsList = armsecurity.ServerVulnerabilityAssessmentsSettingsList{
		// 	Value: []armsecurity.ServerVulnerabilityAssessmentsSettingClassification{
		// 		&armsecurity.AzureServersSetting{
		// 			Name: to.Ptr("azureServersSetting"),
		// 			Type: to.Ptr("Microsoft.Security/serverVulnerabilityAssessmentsSettings"),
		// 			ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/azureServersSetting"),
		// 			SystemData: &armsecurity.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-12T13:47:50.328Z"); return t}()),
		// 				CreatedBy: to.Ptr("user@contoso.com"),
		// 				CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-12T13:47:50.328Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("user@contoso.com"),
		// 				LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
		// 			},
		// 			Kind: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsSettingKindAzureServersSetting),
		// 			Properties: &armsecurity.ServerVulnerabilityAssessmentsAzureSettingProperties{
		// 				SelectedProvider: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions struct {
}

ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.CreateOrUpdate method.

type ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse struct {
	// A base vulnerability assessments setting on servers in the defined scope.
	ServerVulnerabilityAssessmentsSettingClassification
}

ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse contains the response from method ServerVulnerabilityAssessmentsSettingsClient.CreateOrUpdate.

func (*ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse.

type ServerVulnerabilityAssessmentsSettingsClientDeleteOptions added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientDeleteOptions struct {
}

ServerVulnerabilityAssessmentsSettingsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.Delete method.

type ServerVulnerabilityAssessmentsSettingsClientDeleteResponse added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientDeleteResponse struct {
}

ServerVulnerabilityAssessmentsSettingsClientDeleteResponse contains the response from method ServerVulnerabilityAssessmentsSettingsClient.Delete.

type ServerVulnerabilityAssessmentsSettingsClientGetOptions added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientGetOptions struct {
}

ServerVulnerabilityAssessmentsSettingsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.Get method.

type ServerVulnerabilityAssessmentsSettingsClientGetResponse added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientGetResponse struct {
	// A base vulnerability assessments setting on servers in the defined scope.
	ServerVulnerabilityAssessmentsSettingClassification
}

ServerVulnerabilityAssessmentsSettingsClientGetResponse contains the response from method ServerVulnerabilityAssessmentsSettingsClient.Get.

func (*ServerVulnerabilityAssessmentsSettingsClientGetResponse) UnmarshalJSON added in v0.13.0

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentsSettingsClientGetResponse.

type ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionOptions added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionOptions struct {
}

ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionOptions contains the optional parameters for the ServerVulnerabilityAssessmentsSettingsClient.NewListBySubscriptionPager method.

type ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionResponse added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionResponse struct {
	// A page of a server vulnerability assessments settings list
	ServerVulnerabilityAssessmentsSettingsList
}

ServerVulnerabilityAssessmentsSettingsClientListBySubscriptionResponse contains the response from method ServerVulnerabilityAssessmentsSettingsClient.NewListBySubscriptionPager.

type ServerVulnerabilityAssessmentsSettingsList added in v0.13.0

type ServerVulnerabilityAssessmentsSettingsList struct {
	// READ-ONLY; The URI to fetch the next page
	NextLink *string

	// READ-ONLY; A collection of server vulnerability assessments settings in this page
	Value []ServerVulnerabilityAssessmentsSettingClassification
}

ServerVulnerabilityAssessmentsSettingsList - A page of a server vulnerability assessments settings list

func (ServerVulnerabilityAssessmentsSettingsList) MarshalJSON added in v0.13.0

MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentsSettingsList.

func (*ServerVulnerabilityAssessmentsSettingsList) UnmarshalJSON added in v0.13.0

func (s *ServerVulnerabilityAssessmentsSettingsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentsSettingsList.

type ServerVulnerabilityProperties

type ServerVulnerabilityProperties struct {
	// REQUIRED; Sub-assessment resource type
	AssessedResourceType *AssessedResourceType

	// READ-ONLY; List of CVEs
	Cve []*CVE

	// READ-ONLY; Dictionary from cvss version to cvss details object
	Cvss map[string]*CVSS

	// READ-ONLY; Indicates whether a patch is available or not
	Patchable *bool

	// READ-ONLY; Published time
	PublishedTime *time.Time

	// READ-ONLY; Threat name
	Threat *string

	// READ-ONLY; Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered
	Type *string

	// READ-ONLY
	VendorReferences []*VendorReference
}

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

	// A secret string that the application uses to prove its identity, also can be referred to as application password (write
	// only).
	Secret *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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 (
	// SettingNameCurrent - Name of the Defender for Storage Settings name.
	SettingNameCurrent SettingName = "current"
)

func PossibleSettingNameValues added in v0.4.0

func PossibleSettingNameValues() []SettingName

PossibleSettingNameValues returns the possible values for the SettingName const type.

type SettingNameAutoGenerated added in v0.13.0

type SettingNameAutoGenerated string
const (
	SettingNameAutoGeneratedMCAS                           SettingNameAutoGenerated = "MCAS"
	SettingNameAutoGeneratedSentinel                       SettingNameAutoGenerated = "Sentinel"
	SettingNameAutoGeneratedWDATP                          SettingNameAutoGenerated = "WDATP"
	SettingNameAutoGeneratedWDATPEXCLUDELINUXPUBLICPREVIEW SettingNameAutoGenerated = "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW"
	SettingNameAutoGeneratedWDATPUNIFIEDSOLUTION           SettingNameAutoGenerated = "WDATP_UNIFIED_SOLUTION"
)

func PossibleSettingNameAutoGeneratedValues added in v0.13.0

func PossibleSettingNameAutoGeneratedValues() []SettingNameAutoGenerated

PossibleSettingNameAutoGeneratedValues returns the possible values for the SettingNameAutoGenerated 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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSettingsClient().Get(ctx, armsecurity.SettingNameAutoGeneratedWDATP, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armsecurity.SettingsClientGetResponse{
	// 	                            SettingClassification: &armsecurity.DataExportSettings{
	// 		Name: to.Ptr("WDATP"),
	// 		Type: to.Ptr("Microsoft.Security/settings"),
	// 		ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP"),
	// 		Kind: to.Ptr(armsecurity.SettingKindDataExportSettings),
	// 		Properties: &armsecurity.DataExportSettingProperties{
	// 			Enabled: to.Ptr(true),
	// 		},
	// 	},
	// 	                        }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSettingsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SettingsList = armsecurity.SettingsList{
		// 	Value: []armsecurity.SettingClassification{
		// 		&armsecurity.DataExportSettings{
		// 			Name: to.Ptr("WDATP"),
		// 			Type: to.Ptr("Microsoft.Security/settings"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP"),
		// 			Kind: to.Ptr(armsecurity.SettingKindDataExportSettings),
		// 			Properties: &armsecurity.DataExportSettingProperties{
		// 				Enabled: to.Ptr(false),
		// 			},
		// 		},
		// 		&armsecurity.DataExportSettings{
		// 			Name: to.Ptr("WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW"),
		// 			Type: to.Ptr("Microsoft.Security/settings"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW"),
		// 			Kind: to.Ptr(armsecurity.SettingKindDataExportSettings),
		// 			Properties: &armsecurity.DataExportSettingProperties{
		// 				Enabled: to.Ptr(false),
		// 			},
		// 		},
		// 		&armsecurity.DataExportSettings{
		// 			Name: to.Ptr("WDATP_UNIFIED_SOLUTION"),
		// 			Type: to.Ptr("Microsoft.Security/settings"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP_UNIFIED_SOLUTION"),
		// 			Kind: to.Ptr(armsecurity.SettingKindDataExportSettings),
		// 			Properties: &armsecurity.DataExportSettingProperties{
		// 				Enabled: to.Ptr(false),
		// 			},
		// 		},
		// 		&armsecurity.AlertSyncSettings{
		// 			Name: to.Ptr("Sentinel"),
		// 			Type: to.Ptr("Microsoft.Security/settings"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/Sentinel"),
		// 			Kind: to.Ptr(armsecurity.SettingKindAlertSyncSettings),
		// 			Properties: &armsecurity.AlertSyncSettingProperties{
		// 				Enabled: to.Ptr(false),
		// 			},
		// 	}},
		// }
	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSettingsClient().Update(ctx, armsecurity.SettingNameAutoGeneratedWDATP, &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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armsecurity.SettingsClientUpdateResponse{
	// 	                            SettingClassification: &armsecurity.DataExportSettings{
	// 		Name: to.Ptr("WDATP"),
	// 		Type: to.Ptr("Microsoft.Security/settings"),
	// 		ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP"),
	// 		Kind: to.Ptr(armsecurity.SettingKindDataExportSettings),
	// 		Properties: &armsecurity.DataExportSettingProperties{
	// 			Enabled: to.Ptr(true),
	// 		},
	// 	},
	// 	                        }
}
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 {
	// The kind of the security setting
	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.NewListPager method.

type SettingsClientListResponse added in v0.3.0

type SettingsClientListResponse struct {
	// Subscription settings list.
	SettingsList
}

SettingsClientListResponse contains the response from method SettingsClient.NewListPager.

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 {
	// The kind of the security setting
	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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSoftwareInventoriesClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Software = armsecurity.Software{
	// 	Name: to.Ptr("outlook_16.0.10371.20060"),
	// 	Type: to.Ptr("Microsoft.Security/softwareInventories"),
	// 	ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/EITAN-TESTS/providers/Microsoft.Compute/virtualMachines/Eitan-Test1/providers/Microsoft.Security/softwareInventories/outlook_16.0.10371.20060"),
	// 	Properties: &armsecurity.SoftwareProperties{
	// 		DeviceID: to.Ptr("7bd19ed6b07553e52a2844451bcec68d25963a53"),
	// 		EndOfSupportStatus: to.Ptr(armsecurity.EndOfSupportStatusNone),
	// 		FirstSeenAt: to.Ptr("2021-01-26 15:48:56"),
	// 		NumberOfKnownVulnerabilities: to.Ptr[int32](0),
	// 		OSPlatform: to.Ptr("Windows10"),
	// 		SoftwareName: to.Ptr("outlook"),
	// 		Vendor: to.Ptr("microsoft"),
	// 		Version: to.Ptr("16.0.10371.20060"),
	// 	},
	// }
}
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.NewListByExtendedResourcePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSoftwareInventoriesClient().NewListByExtendedResourcePager("EITAN-TESTS", "Microsoft.Compute", "virtualMachines", "Eitan-Test1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SoftwaresList = armsecurity.SoftwaresList{
		// 	Value: []*armsecurity.Software{
		// 		{
		// 			Name: to.Ptr("outlook_16.0.10371.20060"),
		// 			Type: to.Ptr("Microsoft.Security/softwareInventories"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/EITAN-TESTS/providers/Microsoft.Compute/virtualMachines/Eitan-Test1/providers/Microsoft.Security/softwareInventories/outlook_16.0.10371.20060"),
		// 			Properties: &armsecurity.SoftwareProperties{
		// 				DeviceID: to.Ptr("7bd19ed6b07553e52a2844451bcec68d25963a53"),
		// 				EndOfSupportStatus: to.Ptr(armsecurity.EndOfSupportStatusNone),
		// 				FirstSeenAt: to.Ptr("2021-01-26 15:48:56"),
		// 				NumberOfKnownVulnerabilities: to.Ptr[int32](0),
		// 				OSPlatform: to.Ptr("Windows10"),
		// 				SoftwareName: to.Ptr("outlook"),
		// 				Vendor: to.Ptr("microsoft"),
		// 				Version: to.Ptr("16.0.10371.20060"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("windows_10_10.0.19042.746"),
		// 			Type: to.Ptr("Microsoft.Security/softwareInventories"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/EITAN-TESTS/providers/Microsoft.Compute/virtualMachines/Eitan-Test1/providers/Microsoft.Security/softwareInventories/windows_10_10.0.19042.746"),
		// 			Properties: &armsecurity.SoftwareProperties{
		// 				DeviceID: to.Ptr("7bd19ed6b07553e52a2844451bcec68d25963a53"),
		// 				EndOfSupportStatus: to.Ptr(armsecurity.EndOfSupportStatusNone),
		// 				FirstSeenAt: to.Ptr("2021-01-26 15:51:19"),
		// 				NumberOfKnownVulnerabilities: to.Ptr[int32](26),
		// 				OSPlatform: to.Ptr("Windows10"),
		// 				SoftwareName: to.Ptr("windows_10"),
		// 				Vendor: to.Ptr("microsoft"),
		// 				Version: to.Ptr("10.0.19042.746"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSoftwareInventoriesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SoftwaresList = armsecurity.SoftwaresList{
		// 	Value: []*armsecurity.Software{
		// 		{
		// 			Name: to.Ptr("outlook_16.0.10371.20060"),
		// 			Type: to.Ptr("Microsoft.Security/softwareInventories"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/EITAN-TESTS/providers/Microsoft.Compute/virtualMachines/Eitan-Test1/providers/Microsoft.Security/softwareInventories/outlook_16.0.10371.20060"),
		// 			Properties: &armsecurity.SoftwareProperties{
		// 				DeviceID: to.Ptr("7bd19ed6b07553e52a2844451bcec68d25963a53"),
		// 				EndOfSupportStatus: to.Ptr(armsecurity.EndOfSupportStatusNone),
		// 				FirstSeenAt: to.Ptr("2021-01-26 15:48:56"),
		// 				NumberOfKnownVulnerabilities: to.Ptr[int32](0),
		// 				OSPlatform: to.Ptr("Windows10"),
		// 				SoftwareName: to.Ptr("outlook"),
		// 				Vendor: to.Ptr("microsoft"),
		// 				Version: to.Ptr("16.0.10371.20060"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("windows_10_10.0.19042.746"),
		// 			Type: to.Ptr("Microsoft.Security/softwareInventories"),
		// 			ID: to.Ptr("/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/EITAN-TESTS/providers/Microsoft.Compute/virtualMachines/Eitan-Test2/providers/Microsoft.Security/softwareInventories/windows_10_10.0.19042.746"),
		// 			Properties: &armsecurity.SoftwareProperties{
		// 				DeviceID: to.Ptr("7bd19ed6b07553e52a2844451bcec68d25963a53"),
		// 				EndOfSupportStatus: to.Ptr(armsecurity.EndOfSupportStatusNone),
		// 				FirstSeenAt: to.Ptr("2021-01-26 15:51:19"),
		// 				NumberOfKnownVulnerabilities: to.Ptr[int32](26),
		// 				OSPlatform: to.Ptr("Windows10"),
		// 				SoftwareName: to.Ptr("windows_10"),
		// 				Vendor: to.Ptr("microsoft"),
		// 				Version: to.Ptr("10.0.19042.746"),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Represents a software data
	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.NewListByExtendedResourcePager method.

type SoftwareInventoriesClientListByExtendedResourceResponse added in v0.3.0

type SoftwareInventoriesClientListByExtendedResourceResponse struct {
	// Represents the software inventory of the virtual machine.
	SoftwaresList
}

SoftwareInventoriesClientListByExtendedResourceResponse contains the response from method SoftwareInventoriesClient.NewListByExtendedResourcePager.

type SoftwareInventoriesClientListBySubscriptionOptions added in v0.3.0

type SoftwareInventoriesClientListBySubscriptionOptions struct {
}

SoftwareInventoriesClientListBySubscriptionOptions contains the optional parameters for the SoftwareInventoriesClient.NewListBySubscriptionPager method.

type SoftwareInventoriesClientListBySubscriptionResponse added in v0.3.0

type SoftwareInventoriesClientListBySubscriptionResponse struct {
	// Represents the software inventory of the virtual machine.
	SoftwaresList
}

SoftwareInventoriesClientListBySubscriptionResponse contains the response from method SoftwareInventoriesClient.NewListBySubscriptionPager.

type SoftwareProperties

type SoftwareProperties struct {
	// Unique identifier for the virtual machine in the service.
	DeviceID *string

	// The end of support date in case the product is upcoming end of support.
	EndOfSupportDate *string

	// End of support status.
	EndOfSupportStatus *EndOfSupportStatus

	// First time that the software was seen in the device.
	FirstSeenAt *string

	// Number of weaknesses.
	NumberOfKnownVulnerabilities *int32

	// Platform of the operating system running on the device.
	OSPlatform *string

	// Name of the software product.
	SoftwareName *string

	// Name of the software vendor.
	Vendor *string

	// Version number of the software product.
	Version *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// REQUIRED; The security family provisioning State
	ProvisioningState *ProvisioningState

	// REQUIRED; The security family of the security solution
	SecurityFamily *SecurityFamily

	// REQUIRED; The security solutions' template
	Template *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSolutionsClient().Get(ctx, "myRg2", "centralus", "paloalto7", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Solution = armsecurity.Solution{
	// 	Location: to.Ptr("eastus2"),
	// 	Name: to.Ptr("MyVA"),
	// 	Type: to.Ptr("Microsoft.Security/locations/securitySolutions"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/centralus/securitySolutions/paloalto7"),
	// 	Properties: &armsecurity.SolutionProperties{
	// 		ProtectionStatus: to.Ptr("Good"),
	// 		ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
	// 		SecurityFamily: to.Ptr(armsecurity.SecurityFamilyNgfw),
	// 		Template: to.Ptr("paloalto.paloaltofw"),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSolutionsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SolutionList = armsecurity.SolutionList{
		// 	Value: []*armsecurity.Solution{
		// 		{
		// 			Location: to.Ptr("eastus"),
		// 			Name: to.Ptr("MySaasWaf"),
		// 			Type: to.Ptr("Microsoft.Security/locations/securitySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/centralus/securitySolutions/SaasWaf"),
		// 			Properties: &armsecurity.SolutionProperties{
		// 				ProtectionStatus: to.Ptr("Good"),
		// 				ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
		// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilySaasWaf),
		// 				Template: to.Ptr("microsoft/ApplicationGateway-ARM"),
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("eastus2"),
		// 			Name: to.Ptr("MyVA"),
		// 			Type: to.Ptr("Microsoft.Security/locations/securitySolutions"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg2/providers/Microsoft.Security/locations/centralus/securitySolutions/MyVA"),
		// 			Properties: &armsecurity.SolutionProperties{
		// 				ProtectionStatus: to.Ptr("Good"),
		// 				ProvisioningState: to.Ptr(armsecurity.ProvisioningStateSucceeded),
		// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyVa),
		// 				Template: to.Ptr("qualys.qualysAgent"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.

type SolutionsClientListResponse added in v0.3.0

type SolutionsClientListResponse struct {
	SolutionList
}

SolutionsClientListResponse contains the response from method SolutionsClient.NewListPager.

type SolutionsReferenceData added in v0.3.0

type SolutionsReferenceData struct {
	// REQUIRED
	Properties *SolutionsReferenceDataProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSolutionsReferenceDataClient().List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SolutionsReferenceDataList = armsecurity.SolutionsReferenceDataList{
	// 	Value: []*armsecurity.SolutionsReferenceData{
	// 		{
	// 			Name: to.Ptr("microsoft.ApplicationGateway-ARM"),
	// 			Type: to.Ptr("Microsoft.Security/locations/securitySolutionsReferenceData"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westcentralus/securitySolutionsReferenceData/microsoft.ApplicationGateway-ARM"),
	// 			Properties: &armsecurity.SolutionsReferenceDataProperties{
	// 				AlertVendorName: to.Ptr("Microsoft"),
	// 				PackageInfoURL: to.Ptr("www.azure.com"),
	// 				ProductName: to.Ptr("Web Application Firewall"),
	// 				Publisher: to.Ptr("microsoft"),
	// 				PublisherDisplayName: to.Ptr("Microsoft Inc."),
	// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilySaasWaf),
	// 				Template: to.Ptr("microsoft/ApplicationGateway-ARM"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("qualys.qualysAgent"),
	// 			Type: to.Ptr("Microsoft.Security/locations/SecuritySolutions"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westcentralus/securitySolutionsReferenceData/qualys.qualysAgent"),
	// 			Properties: &armsecurity.SolutionsReferenceDataProperties{
	// 				AlertVendorName: to.Ptr("Qualys VA"),
	// 				PackageInfoURL: to.Ptr("http://www.qualys.com/"),
	// 				ProductName: to.Ptr("Vulnerability Assessment"),
	// 				Publisher: to.Ptr("qualys"),
	// 				PublisherDisplayName: to.Ptr("Qualys, Inc."),
	// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyVa),
	// 				Template: to.Ptr("qualys/qualysAgent"),
	// 			},
	// 	}},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSolutionsReferenceDataClient().ListByHomeRegion(ctx, "westcentralus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SolutionsReferenceDataList = armsecurity.SolutionsReferenceDataList{
	// 	Value: []*armsecurity.SolutionsReferenceData{
	// 		{
	// 			Name: to.Ptr("microsoft.ApplicationGateway-ARM"),
	// 			Type: to.Ptr("Microsoft.Security/locations/securitySolutionsReferenceData"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westcentralus/securitySolutionsReferenceData/microsoft.ApplicationGateway-ARM"),
	// 			Properties: &armsecurity.SolutionsReferenceDataProperties{
	// 				AlertVendorName: to.Ptr("Microsoft"),
	// 				PackageInfoURL: to.Ptr("www.azure.com"),
	// 				ProductName: to.Ptr("Web Application Firewall"),
	// 				Publisher: to.Ptr("microsoft"),
	// 				PublisherDisplayName: to.Ptr("Microsoft Inc."),
	// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilySaasWaf),
	// 				Template: to.Ptr("microsoft/ApplicationGateway-ARM"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("qualys.qualysAgent"),
	// 			Type: to.Ptr("Microsoft.Security/locations/SecuritySolutions"),
	// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westcentralus/securitySolutionsReferenceData/qualys.qualysAgent"),
	// 			Properties: &armsecurity.SolutionsReferenceDataProperties{
	// 				AlertVendorName: to.Ptr("Qualys VA"),
	// 				PackageInfoURL: to.Ptr("http://www.qualys.com/"),
	// 				ProductName: to.Ptr("Vulnerability Assessment"),
	// 				Publisher: to.Ptr("qualys"),
	// 				PublisherDisplayName: to.Ptr("Qualys, Inc."),
	// 				SecurityFamily: to.Ptr(armsecurity.SecurityFamilyVa),
	// 				Template: to.Ptr("qualys/qualysAgent"),
	// 			},
	// 	}},
	// }
}
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
}

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

	// REQUIRED; The security solutions' package info url
	PackageInfoURL *string

	// REQUIRED; The security solutions' product name
	ProductName *string

	// REQUIRED; The security solutions' publisher
	Publisher *string

	// REQUIRED; The security solutions' publisher display name
	PublisherDisplayName *string

	// REQUIRED; The security family of the security solution
	SecurityFamily *SecurityFamily

	// REQUIRED; The security solutions' template
	Template *string
}

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 SourceType added in v0.14.0

type SourceType string

SourceType - The source type that will trigger the notification

const (
	SourceTypeAlert      SourceType = "Alert"
	SourceTypeAttackPath SourceType = "AttackPath"
)

func PossibleSourceTypeValues added in v0.14.0

func PossibleSourceTypeValues() []SourceType

PossibleSourceTypeValues returns the possible values for the SourceType 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 StatusAutoGenerated added in v0.11.0

type StatusAutoGenerated struct {
	// The status of the health report
	Code *StatusName

	// READ-ONLY; The date of when the resource of the health report was scanned in the first time
	FirstEvaluationDate *time.Time

	// READ-ONLY; The date of when the resource was scanned in the last time
	LastScannedDate *time.Time

	// READ-ONLY; The reason of the given status
	Reason *string

	// READ-ONLY; The date of when the status of the health report was changed in the last time
	StatusChangeDate *time.Time
}

StatusAutoGenerated - The status of the health report

func (StatusAutoGenerated) MarshalJSON added in v0.11.0

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

MarshalJSON implements the json.Marshaller interface for type StatusAutoGenerated.

func (*StatusAutoGenerated) UnmarshalJSON added in v0.11.0

func (s *StatusAutoGenerated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StatusAutoGenerated.

type StatusName added in v0.11.0

type StatusName string

StatusName - The status of the health report

const (
	StatusNameHealthy       StatusName = "Healthy"
	StatusNameNotApplicable StatusName = "NotApplicable"
	StatusNameNotHealthy    StatusName = "NotHealthy"
)

func PossibleStatusNameValues added in v0.11.0

func PossibleStatusNameValues() []StatusName

PossibleStatusNameValues returns the possible values for the StatusName 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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY
	Value []*SubAssessment
}

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

	// Details of the resource that was assessed
	ResourceDetails ResourceDetailsClassification

	// Status of the sub-assessment
	Status *SubAssessmentStatus

	// READ-ONLY; Category of the sub-assessment
	Category *string

	// READ-ONLY; Human readable description of the assessment status
	Description *string

	// READ-ONLY; User friendly display name of the sub-assessment
	DisplayName *string

	// READ-ONLY; Vulnerability ID
	ID *string

	// READ-ONLY; Description of the impact of this sub-assessment
	Impact *string

	// READ-ONLY; Information on how to remediate this sub-assessment
	Remediation *string

	// READ-ONLY; The date and time the sub-assessment was generated
	TimeGenerated *time.Time
}

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

	// READ-ONLY; Programmatic code for the status of the assessment
	Code *SubAssessmentStatusCode

	// READ-ONLY; Human readable description of the assessment status
	Description *string

	// READ-ONLY; The sub-assessment severity level
	Severity *Severity
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSubAssessmentsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SubAssessment = armsecurity.SubAssessment{
	// 	Name: to.Ptr("95f7da9c-a2a4-1322-0758-fcd24ef09b85"),
	// 	Type: to.Ptr("Microsoft.Security/assessments/subAssessments"),
	// 	ID: to.Ptr("/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/DEMORG/providers/Microsoft.Compute/virtualMachines/vm2/providers/Microsoft.Security/assessments/1195afff-c881-495e-9bc5-1486211ae03f/subassessments/95f7da9c-a2a4-1322-0758-fcd24ef09b85"),
	// 	Properties: &armsecurity.SubAssessmentProperties{
	// 		Description: to.Ptr("PuTTY ssh_agent_channel_data Function Integer Overflow Vulnerability"),
	// 		AdditionalData: &armsecurity.AdditionalData{
	// 			AssessedResourceType: to.Ptr(armsecurity.AssessedResourceTypeServerVulnerability),
	// 		},
	// 		Category: to.Ptr("Local"),
	// 		DisplayName: to.Ptr("PuTTY ssh_agent_channel_data Function Integer Overflow Vulnerability"),
	// 		ID: to.Ptr("370361"),
	// 		Impact: to.Ptr("Successful exploitation could allow remote attackers to have unspecified impact via a large length value in an agent protocol message."),
	// 		Remediation: to.Ptr("Customers are advised to upgrade toPuTTY 0.68 or later version in order to remediate this vulnerability."),
	// 		ResourceDetails: &armsecurity.AzureResourceDetails{
	// 			Source: to.Ptr(armsecurity.SourceAzure),
	// 			ID: to.Ptr("/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/DEMORG/providers/Microsoft.Compute/virtualMachines/vm2"),
	// 		},
	// 		Status: &armsecurity.SubAssessmentStatus{
	// 			Code: to.Ptr(armsecurity.SubAssessmentStatusCodeUnhealthy),
	// 			Severity: to.Ptr(armsecurity.SeverityMedium),
	// 		},
	// 		TimeGenerated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-02T12:36:50.779Z"); return t}()),
	// 	},
	// }
}
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.NewListAllPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSubAssessmentsClient().NewListAllPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SubAssessmentList = armsecurity.SubAssessmentList{
		// 	Value: []*armsecurity.SubAssessment{
		// 		{
		// 			Name: to.Ptr("8c98f353-8b41-4e77-979b-6adeecd5d168"),
		// 			Type: to.Ptr("Microsoft.Security/assessments/subAssessments"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.ContainerRegistry/registries/myRegistry/providers/Microsoft.Security/assessments/dbd0cb49-b563-45e7-9724-889e799fa648/subAssessments/8c98f353-8b41-4e77-979b-6adeecd5d168"),
		// 			Properties: &armsecurity.SubAssessmentProperties{
		// 				Description: to.Ptr("The backdoor 'Back Orifice' was detected on this system.  The presence of this backdoor indicates that your system has already been compromised.  Unauthorized users can access your host at any time. Unauthorized users can take complete control of the host and manipulate data.  They can steal the data or even wipe out the host."),
		// 				AdditionalData: &armsecurity.ContainerRegistryVulnerabilityProperties{
		// 					AssessedResourceType: to.Ptr(armsecurity.AssessedResourceTypeContainerRegistryVulnerability),
		// 					Type: to.Ptr("Vulnerability"),
		// 					Cve: []*armsecurity.CVE{
		// 						{
		// 							Link: to.Ptr("http://contoso.com"),
		// 							Title: to.Ptr("CVE-2019-12345"),
		// 					}},
		// 					Cvss: map[string]*armsecurity.CVSS{
		// 						"2.0": &armsecurity.CVSS{
		// 							Base: to.Ptr[float32](10),
		// 						},
		// 						"3.0": &armsecurity.CVSS{
		// 							Base: to.Ptr[float32](10),
		// 						},
		// 					},
		// 					ImageDigest: to.Ptr("c186fc44-3154-4ce2-ba18-b719d895c3b0"),
		// 					Patchable: to.Ptr(true),
		// 					PublishedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.000Z"); return t}()),
		// 					RepositoryName: to.Ptr("myRepo"),
		// 					VendorReferences: []*armsecurity.VendorReference{
		// 						{
		// 							Link: to.Ptr("http://contoso.com"),
		// 							Title: to.Ptr("Reference_1"),
		// 					}},
		// 				},
		// 				Category: to.Ptr("Backdoors and trojan horses"),
		// 				DisplayName: to.Ptr("'Back Orifice' Backdoor"),
		// 				ID: to.Ptr("1001"),
		// 				Impact: to.Ptr("3"),
		// 				Remediation: to.Ptr("Use a recent anti-virus program to remove this backdoor and check your system regularly with anti-virus software."),
		// 				ResourceDetails: &armsecurity.AzureResourceDetails{
		// 					Source: to.Ptr(armsecurity.SourceAzure),
		// 					ID: to.Ptr("repositories/asc/msi-connector/images/sha256:877a6f2a212c44021281f80cb1f4c73a09dce4e99a8cb8efcc03f7ce3c877a6f"),
		// 				},
		// 				Status: &armsecurity.SubAssessmentStatus{
		// 					Description: to.Ptr("The resource is unhealthy"),
		// 					Cause: to.Ptr(""),
		// 					Code: to.Ptr(armsecurity.SubAssessmentStatusCodeUnhealthy),
		// 					Severity: to.Ptr(armsecurity.SeverityHigh),
		// 				},
		// 				TimeGenerated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-23T12:20:08.764Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("8fbe5054-e97c-3a7a-fda7-c8308ca8d3cf"),
		// 			Type: to.Ptr("Microsoft.Security/assessments/subAssessments"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/ascdemoRG/providers/Microsoft.Sql/servers/sqlserver1demo/providers/Microsoft.Security/assessments/82e20e14-edc5-4373-bfc4-f13121257c37/subassessments/8fbe5054-e97c-3a7a-fda7-c8308ca8d3cf"),
		// 			Properties: &armsecurity.SubAssessmentProperties{
		// 				Description: to.Ptr("The Azure SQL Database-level firewall helps protect your data by preventing all access to your database until you specify which IP addresses have permission. Database-level firewall rules grant access to the specific database based on the originating IP address of each request.\n\nDatabase-level firewall rules for master"),
		// 				AdditionalData: &armsecurity.SQLServerVulnerabilityProperties{
		// 					AssessedResourceType: to.Ptr(armsecurity.AssessedResourceTypeSQLServerVulnerability),
		// 					Type: to.Ptr("AzureDatabase"),
		// 					Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.database_firewall_rules"),
		// 				},
		// 				Category: to.Ptr("SurfaceAreaReduction"),
		// 				DisplayName: to.Ptr("Database-level firewall rules should be tracked and maintained at a strict minimum"),
		// 				ID: to.Ptr("VA2064"),
		// 				Impact: to.Ptr("Firewall rules should be strictly configured to allow access only to client computers that have a valid need to connect to the database. Any superfluous entries in the firewall may pose a threat by allowing an unauthorized source access to your database."),
		// 				Remediation: to.Ptr("Evaluate each of the database-level firewall rules. Remove any rules that grant unnecessary access and set the rest as a baseline. Deviations from the baseline will be identified and brought to your attention in subsequent scans."),
		// 				ResourceDetails: &armsecurity.AzureResourceDetails{
		// 					Source: to.Ptr(armsecurity.SourceAzure),
		// 					ID: to.Ptr("/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/ascdemoRG/providers/Microsoft.Sql/servers/sqlserver1demo/databases/database1"),
		// 				},
		// 				Status: &armsecurity.SubAssessmentStatus{
		// 					Cause: to.Ptr("Unknown"),
		// 					Code: to.Ptr(armsecurity.SubAssessmentStatusCodeHealthy),
		// 					Severity: to.Ptr(armsecurity.SeverityHigh),
		// 				},
		// 				TimeGenerated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-23T12:20:08.764Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSubAssessmentsClient().NewListPager("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "82e20e14-edc5-4373-bfc4-f13121257c37", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SubAssessmentList = armsecurity.SubAssessmentList{
		// 	Value: []*armsecurity.SubAssessment{
		// 		{
		// 			Name: to.Ptr("8fbe5054-e97c-3a7a-fda7-c8308ca8d3cf"),
		// 			Type: to.Ptr("Microsoft.Security/assessments/subAssessments"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/ascdemoRG/providers/Microsoft.Sql/servers/sqlserver1demo/providers/Microsoft.Security/assessments/82e20e14-edc5-4373-bfc4-f13121257c37/subassessments/8fbe5054-e97c-3a7a-fda7-c8308ca8d3cf"),
		// 			Properties: &armsecurity.SubAssessmentProperties{
		// 				Description: to.Ptr("The Azure SQL Database-level firewall helps protect your data by preventing all access to your database until you specify which IP addresses have permission. Database-level firewall rules grant access to the specific database based on the originating IP address of each request.\n\nDatabase-level firewall rules for master"),
		// 				AdditionalData: &armsecurity.SQLServerVulnerabilityProperties{
		// 					AssessedResourceType: to.Ptr(armsecurity.AssessedResourceTypeSQLServerVulnerability),
		// 					Type: to.Ptr("AzureDatabase"),
		// 					Query: to.Ptr("SELECT name\n    ,start_ip_address\n    ,end_ip_address\nFROM sys.database_firewall_rules"),
		// 				},
		// 				Category: to.Ptr("SurfaceAreaReduction"),
		// 				DisplayName: to.Ptr("Database-level firewall rules should be tracked and maintained at a strict minimum"),
		// 				ID: to.Ptr("VA2064"),
		// 				Impact: to.Ptr("Firewall rules should be strictly configured to allow access only to client computers that have a valid need to connect to the database. Any superfluous entries in the firewall may pose a threat by allowing an unauthorized source access to your database."),
		// 				Remediation: to.Ptr("Evaluate each of the database-level firewall rules. Remove any rules that grant unnecessary access and set the rest as a baseline. Deviations from the baseline will be identified and brought to your attention in subsequent scans."),
		// 				ResourceDetails: &armsecurity.AzureResourceDetails{
		// 					Source: to.Ptr(armsecurity.SourceAzure),
		// 					ID: to.Ptr("/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/ascdemoRG/providers/Microsoft.Sql/servers/sqlserver1demo/databases/database1"),
		// 				},
		// 				Status: &armsecurity.SubAssessmentStatus{
		// 					Cause: to.Ptr("Unknown"),
		// 					Code: to.Ptr(armsecurity.SubAssessmentStatusCodeHealthy),
		// 					Severity: to.Ptr(armsecurity.SeverityHigh),
		// 				},
		// 				TimeGenerated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-23T12:20:08.764Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Security sub-assessment on a resource
	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.NewListAllPager method.

type SubAssessmentsClientListAllResponse added in v0.3.0

type SubAssessmentsClientListAllResponse struct {
	// List of security sub-assessments
	SubAssessmentList
}

SubAssessmentsClientListAllResponse contains the response from method SubAssessmentsClient.NewListAllPager.

type SubAssessmentsClientListOptions added in v0.3.0

type SubAssessmentsClientListOptions struct {
}

SubAssessmentsClientListOptions contains the optional parameters for the SubAssessmentsClient.NewListPager method.

type SubAssessmentsClientListResponse added in v0.3.0

type SubAssessmentsClientListResponse struct {
	// List of security sub-assessments
	SubAssessmentList
}

SubAssessmentsClientListResponse contains the response from method SubAssessmentsClient.NewListPager.

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

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

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

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
}

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
}

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 TargetBranchConfiguration added in v0.13.0

type TargetBranchConfiguration struct {
	// Configuration of PR Annotations on default branch.
	// Enabled - PR Annotations are enabled on the resource's default branch. Disabled - PR Annotations are disabled on the resource's
	// default branch.
	AnnotateDefaultBranch *AnnotateDefaultBranchState

	// Gets or sets branches that should have annotations.
	BranchNames []*string
}

TargetBranchConfiguration - Repository branch configuration for PR Annotations.

func (TargetBranchConfiguration) MarshalJSON added in v0.13.0

func (t TargetBranchConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TargetBranchConfiguration.

func (*TargetBranchConfiguration) UnmarshalJSON added in v0.13.0

func (t *TargetBranchConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TargetBranchConfiguration.

type Task added in v0.3.0

type Task struct {
	// Describes properties of a task.
	Properties *TaskProperties

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY
	Value []*Task
}

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]any

	// READ-ONLY; Name of the task type
	Name *string
}

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

	// READ-ONLY; The time this task was discovered in UTC
	CreationTimeUTC *time.Time

	// READ-ONLY; The time this task's details were last changed in UTC
	LastStateChangeTimeUTC *time.Time

	// READ-ONLY; State of the task (Active, Resolved etc.)
	State *string

	// READ-ONLY; Additional data on the state of the task
	SubState *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTasksClient().GetResourceGroupLevelTask(ctx, "myRg", "westeurope", "d55b4dc0-779c-c66c-33e5-d7bce24c4222", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Task = armsecurity.Task{
	// 	Name: to.Ptr("d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
	// 	Type: to.Ptr("Microsoft.Security/locations/tasks"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
	// 	Properties: &armsecurity.TaskProperties{
	// 		CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
	// 		LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
	// 		SecurityTaskParameters: &armsecurity.TaskParameters{
	// 			AdditionalProperties: map[string]any{
	// 				"isDataDiskEncrypted": false,
	// 				"isOsDiskEncrypted": false,
	// 				"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
	// 				"severity": "High",
	// 				"uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
	// 				"vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
	// 				"vmName": "vm1",
	// 			},
	// 			Name: to.Ptr("EncryptionOnVm"),
	// 		},
	// 		State: to.Ptr("Active"),
	// 		SubState: to.Ptr("NA"),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTasksClient().GetSubscriptionLevelTask(ctx, "westeurope", "62609ee7-d0a5-8616-9fe4-1df5cca7758d", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Task = armsecurity.Task{
	// 	Name: to.Ptr("62609ee7-d0a5-8616-9fe4-1df5cca7758d"),
	// 	Type: to.Ptr("Microsoft.Security/locations/tasks"),
	// 	ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d"),
	// 	Properties: &armsecurity.TaskProperties{
	// 		CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-05T10:42:03.993Z"); return t}()),
	// 		LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-05T10:42:03.993Z"); return t}()),
	// 		SecurityTaskParameters: &armsecurity.TaskParameters{
	// 			AdditionalProperties: map[string]any{
	// 				"location": "uksouth",
	// 				"resourceGroup": "myRg",
	// 				"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
	// 				"resourceName": "default",
	// 				"resourceParent": "vnet1",
	// 				"resourceType": "Subnet",
	// 				"uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
	// 			},
	// 			Name: to.Ptr("NetworkSecurityGroupMissingOnSubnet"),
	// 		},
	// 		State: to.Ptr("Active"),
	// 		SubState: to.Ptr("NA"),
	// 	},
	// }
}
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.NewListByHomeRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTasksClient().NewListByHomeRegionPager("westeurope", &armsecurity.TasksClientListByHomeRegionOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TaskList = armsecurity.TaskList{
		// 	Value: []*armsecurity.Task{
		// 		{
		// 			Name: to.Ptr("62609ee7-d0a5-8616-9fe4-1df5cca7758d"),
		// 			Type: to.Ptr("Microsoft.Security/locations/tasks"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d"),
		// 			Properties: &armsecurity.TaskProperties{
		// 				CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-05T10:42:03.993Z"); return t}()),
		// 				LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-05T10:42:03.993Z"); return t}()),
		// 				SecurityTaskParameters: &armsecurity.TaskParameters{
		// 					AdditionalProperties: map[string]any{
		// 						"location": "uksouth",
		// 						"resourceGroup": "myRg",
		// 						"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
		// 						"resourceName": "default",
		// 						"resourceParent": "vnet1",
		// 						"resourceType": "Subnet",
		// 						"uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
		// 					},
		// 					Name: to.Ptr("NetworkSecurityGroupMissingOnSubnet"),
		// 				},
		// 				State: to.Ptr("Active"),
		// 				SubState: to.Ptr("NA"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
		// 			Type: to.Ptr("Microsoft.Security/locations/tasks"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
		// 			Properties: &armsecurity.TaskProperties{
		// 				CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
		// 				LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
		// 				SecurityTaskParameters: &armsecurity.TaskParameters{
		// 					AdditionalProperties: map[string]any{
		// 						"isDataDiskEncrypted": false,
		// 						"isOsDiskEncrypted": false,
		// 						"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"severity": "High",
		// 						"uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"vmName": "vm1",
		// 					},
		// 					Name: to.Ptr("EncryptionOnVm"),
		// 				},
		// 				State: to.Ptr("Active"),
		// 				SubState: to.Ptr("NA"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTasksClient().NewListByResourceGroupPager("myRg", "westeurope", &armsecurity.TasksClientListByResourceGroupOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TaskList = armsecurity.TaskList{
		// 	Value: []*armsecurity.Task{
		// 		{
		// 			Name: to.Ptr("d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
		// 			Type: to.Ptr("Microsoft.Security/locations/tasks"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
		// 			Properties: &armsecurity.TaskProperties{
		// 				CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
		// 				LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
		// 				SecurityTaskParameters: &armsecurity.TaskParameters{
		// 					AdditionalProperties: map[string]any{
		// 						"isDataDiskEncrypted": false,
		// 						"isOsDiskEncrypted": false,
		// 						"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"severity": "High",
		// 						"uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"vmName": "vm1",
		// 					},
		// 					Name: to.Ptr("EncryptionOnVm"),
		// 				},
		// 				State: to.Ptr("Active"),
		// 				SubState: to.Ptr("NA"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTasksClient().NewListPager(&armsecurity.TasksClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TaskList = armsecurity.TaskList{
		// 	Value: []*armsecurity.Task{
		// 		{
		// 			Name: to.Ptr("62609ee7-d0a5-8616-9fe4-1df5cca7758d"),
		// 			Type: to.Ptr("Microsoft.Security/locations/tasks"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d"),
		// 			Properties: &armsecurity.TaskProperties{
		// 				CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-05T10:42:03.993Z"); return t}()),
		// 				LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-05T10:42:03.993Z"); return t}()),
		// 				SecurityTaskParameters: &armsecurity.TaskParameters{
		// 					AdditionalProperties: map[string]any{
		// 						"location": "uksouth",
		// 						"resourceGroup": "myRg",
		// 						"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
		// 						"resourceName": "default",
		// 						"resourceParent": "vnet1",
		// 						"resourceType": "Subnet",
		// 						"uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
		// 					},
		// 					Name: to.Ptr("NetworkSecurityGroupMissingOnSubnet"),
		// 				},
		// 				State: to.Ptr("Active"),
		// 				SubState: to.Ptr("NA"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
		// 			Type: to.Ptr("Microsoft.Security/locations/tasks"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222"),
		// 			Properties: &armsecurity.TaskProperties{
		// 				CreationTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
		// 				LastStateChangeTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-02T11:41:27.054Z"); return t}()),
		// 				SecurityTaskParameters: &armsecurity.TaskParameters{
		// 					AdditionalProperties: map[string]any{
		// 						"isDataDiskEncrypted": false,
		// 						"isOsDiskEncrypted": false,
		// 						"resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"severity": "High",
		// 						"uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
		// 						"vmName": "vm1",
		// 					},
		// 					Name: to.Ptr("EncryptionOnVm"),
		// 				},
		// 				State: to.Ptr("Active"),
		// 				SubState: to.Ptr("NA"),
		// 			},
		// 	}},
		// }
	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewTasksClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewTasksClient().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 {
	// Security task that we recommend to do in order to strengthen security
	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 {
	// Security task that we recommend to do in order to strengthen security
	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.NewListByHomeRegionPager method.

type TasksClientListByHomeRegionResponse added in v0.3.0

type TasksClientListByHomeRegionResponse struct {
	// List of security task recommendations
	TaskList
}

TasksClientListByHomeRegionResponse contains the response from method TasksClient.NewListByHomeRegionPager.

type TasksClientListByResourceGroupOptions added in v0.3.0

type TasksClientListByResourceGroupOptions struct {
	// OData filter. Optional.
	Filter *string
}

TasksClientListByResourceGroupOptions contains the optional parameters for the TasksClient.NewListByResourceGroupPager method.

type TasksClientListByResourceGroupResponse added in v0.3.0

type TasksClientListByResourceGroupResponse struct {
	// List of security task recommendations
	TaskList
}

TasksClientListByResourceGroupResponse contains the response from method TasksClient.NewListByResourceGroupPager.

type TasksClientListOptions added in v0.3.0

type TasksClientListOptions struct {
	// OData filter. Optional.
	Filter *string
}

TasksClientListOptions contains the optional parameters for the TasksClient.NewListPager method.

type TasksClientListResponse added in v0.3.0

type TasksClientListResponse struct {
	// List of security task recommendations
	TaskList
}

TasksClientListResponse contains the response from method TasksClient.NewListPager.

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTopologyClient().Get(ctx, "myservers", "centralus", "vnets", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TopologyResource = armsecurity.TopologyResource{
	// 	Location: to.Ptr("westus"),
	// 	Name: to.Ptr("vnets"),
	// 	Type: to.Ptr("Microsoft.Security/locations/topologies"),
	// 	ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Security/locations/centralus/topologies/vnets"),
	// 	Properties: &armsecurity.TopologyResourceProperties{
	// 		CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-10T13:56:10.575Z"); return t}()),
	// 		TopologyResources: []*armsecurity.TopologySingleResource{
	// 			{
	// 				Children: []*armsecurity.TopologySingleResourceChild{
	// 					{
	// 						ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet"),
	// 				}},
	// 				Location: to.Ptr("westus"),
	// 				NetworkZones: to.Ptr("InternetFacing"),
	// 				RecommendationsExist: to.Ptr(false),
	// 				ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet"),
	// 				Severity: to.Ptr("Healthy"),
	// 				TopologyScore: to.Ptr[int32](0),
	// 		}},
	// 	},
	// }
}
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.NewListByHomeRegionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTopologyClient().NewListByHomeRegionPager("centralus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TopologyList = armsecurity.TopologyList{
		// 	Value: []*armsecurity.TopologyResource{
		// 		{
		// 			Location: to.Ptr("westus"),
		// 			Name: to.Ptr("vnets"),
		// 			Type: to.Ptr("Microsoft.Security/locations/topologies"),
		// 			ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Security/locations/centralus/topologies/vnets"),
		// 			Properties: &armsecurity.TopologyResourceProperties{
		// 				CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-10T13:56:10.575Z"); return t}()),
		// 				TopologyResources: []*armsecurity.TopologySingleResource{
		// 					{
		// 						Children: []*armsecurity.TopologySingleResourceChild{
		// 							{
		// 								ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet"),
		// 						}},
		// 						Location: to.Ptr("westus"),
		// 						NetworkZones: to.Ptr("Internal"),
		// 						RecommendationsExist: to.Ptr(false),
		// 						ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet"),
		// 						Severity: to.Ptr("Healthy"),
		// 						TopologyScore: to.Ptr[int32](0),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("westus"),
		// 			Name: to.Ptr("subnets"),
		// 			Type: to.Ptr("Microsoft.Security/locations/topologies"),
		// 			ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Security/locations/centralus/topologies/subnets"),
		// 			Properties: &armsecurity.TopologyResourceProperties{
		// 				CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-10T13:56:10.575Z"); return t}()),
		// 				TopologyResources: []*armsecurity.TopologySingleResource{
		// 					{
		// 						Location: to.Ptr("westus"),
		// 						NetworkZones: to.Ptr("Internal"),
		// 						Parents: []*armsecurity.TopologySingleResourceParent{
		// 							{
		// 								ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet"),
		// 						}},
		// 						RecommendationsExist: to.Ptr(false),
		// 						ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet"),
		// 						Severity: to.Ptr("Healthy"),
		// 						TopologyScore: to.Ptr[int32](5),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTopologyClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TopologyList = armsecurity.TopologyList{
		// 	Value: []*armsecurity.TopologyResource{
		// 		{
		// 			Location: to.Ptr("westus"),
		// 			Name: to.Ptr("vnets"),
		// 			Type: to.Ptr("Microsoft.Security/locations/topologies"),
		// 			ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Security/locations/centralus/topologies/vnets"),
		// 			Properties: &armsecurity.TopologyResourceProperties{
		// 				CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-10T13:56:10.575Z"); return t}()),
		// 				TopologyResources: []*armsecurity.TopologySingleResource{
		// 					{
		// 						Children: []*armsecurity.TopologySingleResourceChild{
		// 							{
		// 								ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet"),
		// 						}},
		// 						Location: to.Ptr("westus"),
		// 						NetworkZones: to.Ptr("Internal"),
		// 						RecommendationsExist: to.Ptr(false),
		// 						ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet"),
		// 						Severity: to.Ptr("Healthy"),
		// 						TopologyScore: to.Ptr[int32](0),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Location: to.Ptr("westus"),
		// 			Name: to.Ptr("subnets"),
		// 			Type: to.Ptr("Microsoft.Security/locations/topologies"),
		// 			ID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Security/locations/centralus/topologies/subnets"),
		// 			Properties: &armsecurity.TopologyResourceProperties{
		// 				CalculatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-10T13:56:10.575Z"); return t}()),
		// 				TopologyResources: []*armsecurity.TopologySingleResource{
		// 					{
		// 						Location: to.Ptr("westus"),
		// 						NetworkZones: to.Ptr("Internal"),
		// 						Parents: []*armsecurity.TopologySingleResourceParent{
		// 							{
		// 								ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet"),
		// 						}},
		// 						RecommendationsExist: to.Ptr(false),
		// 						ResourceID: to.Ptr("/subscriptions/3eeab341-f466-499c-a8be-85427e154bad/resourceGroups/myservers/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet"),
		// 						Severity: to.Ptr("Healthy"),
		// 						TopologyScore: to.Ptr[int32](5),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
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.NewListByHomeRegionPager method.

type TopologyClientListByHomeRegionResponse added in v0.3.0

type TopologyClientListByHomeRegionResponse struct {
	TopologyList
}

TopologyClientListByHomeRegionResponse contains the response from method TopologyClient.NewListByHomeRegionPager.

type TopologyClientListOptions added in v0.3.0

type TopologyClientListOptions struct {
}

TopologyClientListOptions contains the optional parameters for the TopologyClient.NewListPager method.

type TopologyClientListResponse added in v0.3.0

type TopologyClientListResponse struct {
	TopologyList
}

TopologyClientListResponse contains the response from method TopologyClient.NewListPager.

type TopologyList

type TopologyList struct {
	// READ-ONLY; The URI to fetch the next page.
	NextLink *string

	// READ-ONLY
	Value []*TopologyResource
}

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

	// READ-ONLY; Location where the resource is stored
	Location *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY
	Properties *TopologyResourceProperties

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; Azure resources which are part of this topology resource
	TopologyResources []*TopologySingleResource
}

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

	// READ-ONLY; The location of this resource
	Location *string

	// READ-ONLY; Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.)
	NetworkZones *string

	// READ-ONLY; Azure resources connected to this resource which are in higher level in the topology view
	Parents []*TopologySingleResourceParent

	// READ-ONLY; Indicates if the resource has security recommendations
	RecommendationsExist *bool

	// READ-ONLY; Azure resource id
	ResourceID *string

	// READ-ONLY; The security severity of the resource
	Severity *string

	// READ-ONLY; Score of the resource based on its security severity
	TopologyScore *int32
}

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
}

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
}

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

	// Kind of the resource
	Kind *string

	// Location where the resource is stored
	Location *string

	// A list of key value pairs that describe the resource.
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// REQUIRED; The maximum threshold.
	MaxThreshold *int32

	// REQUIRED; The minimum threshold.
	MinThreshold *int32

	// REQUIRED; The type of the custom alert rule.
	RuleType *string

	// REQUIRED; The time window size in iso8601 format.
	TimeWindowSize *string

	// READ-ONLY; The description of the custom alert.
	Description *string

	// READ-ONLY; The display name of the custom alert.
	DisplayName *string
}

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

	// Properties of the IoT Security solution's user defined resources.
	UserDefinedResources *UserDefinedResourcesProperties
}

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

	// Resource tags
	Tags map[string]*string
}

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 UpdateSensitivitySettingsRequest added in v0.11.0

type UpdateSensitivitySettingsRequest struct {
	// REQUIRED; List of selected sensitive info types' IDs.
	SensitiveInfoTypesIDs []*string

	// The id of the sensitivity threshold label. Any label at or above this rank will be considered sensitive.
	SensitivityThresholdLabelID *string

	// The order of the sensitivity threshold label. Any label at or above this order will be considered sensitive. If set to
	// -1, sensitivity by labels is turned off
	SensitivityThresholdLabelOrder *float32
}

UpdateSensitivitySettingsRequest - Request to update data sensitivity settings for sensitive data discovery

func (UpdateSensitivitySettingsRequest) MarshalJSON added in v0.11.0

func (u UpdateSensitivitySettingsRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateSensitivitySettingsRequest.

func (*UpdateSensitivitySettingsRequest) UnmarshalJSON added in v0.11.0

func (u *UpdateSensitivitySettingsRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSensitivitySettingsRequest.

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

	// REQUIRED; List of Azure subscription ids on which the user defined resources query should be executed.
	QuerySubscriptions []*string
}

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

	// Represents a user that is recommended to be allowed for a certain rule
	Username *string
}

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

	// The machine supportability of Enforce feature
	EnforcementSupport *EnforcementSupport

	// The recommendation action of the machine or rule
	RecommendationAction *RecommendationAction

	// The full resource id of the machine
	ResourceID *string
}

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 VMScannersAws added in v0.14.0

type VMScannersAws struct {
	// The cloud role ARN in AWS for this feature
	CloudRoleArn *string

	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

VMScannersAws - A VM scanning configuration for a security offering of a Aws environment

func (VMScannersAws) MarshalJSON added in v0.14.0

func (v VMScannersAws) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMScannersAws.

func (*VMScannersAws) UnmarshalJSON added in v0.14.0

func (v *VMScannersAws) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMScannersAws.

type VMScannersBase added in v0.14.0

type VMScannersBase struct {
	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

VMScannersBase - A VM scanning configuration for a security offering of a given environment

func (VMScannersBase) MarshalJSON added in v0.14.0

func (v VMScannersBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMScannersBase.

func (*VMScannersBase) UnmarshalJSON added in v0.14.0

func (v *VMScannersBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMScannersBase.

type VMScannersBaseConfiguration added in v0.14.0

type VMScannersBaseConfiguration struct {
	// Tags that indicates that a resource should not be scanned
	ExclusionTags map[string]*string

	// The scanning mode for the VM scan.
	ScanningMode *ScanningMode
}

VMScannersBaseConfiguration - Configuration for VM scanning

func (VMScannersBaseConfiguration) MarshalJSON added in v0.14.0

func (v VMScannersBaseConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMScannersBaseConfiguration.

func (*VMScannersBaseConfiguration) UnmarshalJSON added in v0.14.0

func (v *VMScannersBaseConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMScannersBaseConfiguration.

type VMScannersGcp added in v0.14.0

type VMScannersGcp struct {
	// Configuration for VM scanning
	Configuration *VMScannersBaseConfiguration

	// Is VM scanning enabled
	Enabled *bool
}

VMScannersGcp - A VM scanning configuration for a security offering of a GCP environment

func (VMScannersGcp) MarshalJSON added in v0.14.0

func (v VMScannersGcp) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMScannersGcp.

func (*VMScannersGcp) UnmarshalJSON added in v0.14.0

func (v *VMScannersGcp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMScannersGcp.

type VaRule

type VaRule struct {
	// The benchmark references.
	BenchmarkReferences []*BenchmarkReference

	// The rule category.
	Category *string

	// The rule description.
	Description *string

	// The rule query details.
	QueryCheck *QueryCheck

	// The rule rationale.
	Rationale *string

	// The rule Id.
	RuleID *string

	// The rule type.
	RuleType *RuleType

	// The rule severity.
	Severity *RuleSeverity

	// The rule title.
	Title *string
}

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

	// READ-ONLY; Link title
	Title *string
}

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

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

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

	// READ-ONLY; The URI to fetch the next page.
	NextLink *string
}

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

	// REQUIRED; The full Azure ID of the workspace to save the data in
	WorkspaceID *string
}

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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspaceSettingsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkspaceSetting = 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"),
	// 	},
	// }
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWorkspaceSettingsClient().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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspaceSettingsClient().Get(ctx, "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkspaceSetting = 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"),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspaceSettingsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkspaceSettingList = armsecurity.WorkspaceSettingList{
		// 	Value: []*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/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("myRg"),
		// 			Type: to.Ptr("Microsoft.Security/workspaceSettings"),
		// 			ID: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/workspaceSettings/myRg"),
		// 			Properties: &armsecurity.WorkspaceSettingProperties{
		// 				Scope: to.Ptr("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg"),
		// 				WorkspaceID: to.Ptr("/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myOtherRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace2"),
		// 			},
		// 	}},
		// }
	}
}
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/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/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()
	clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspaceSettingsClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkspaceSetting = 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"),
	// 	},
	// }
}
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 {
	// Configures where to store the OMS agent data for workspaces under a scope
	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 {
	// Configures where to store the OMS agent data for workspaces under a scope
	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.NewListPager method.

type WorkspaceSettingsClientListResponse added in v0.3.0

type WorkspaceSettingsClientListResponse struct {
	// List of workspace settings response
	WorkspaceSettingList
}

WorkspaceSettingsClientListResponse contains the response from method WorkspaceSettingsClient.NewListPager.

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 {
	// Configures where to store the OMS agent data for workspaces under a scope
	WorkspaceSetting
}

WorkspaceSettingsClientUpdateResponse contains the response from method WorkspaceSettingsClient.Update.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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