armappcomplianceautomation

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 15 Imported by: 2

README

Azure Appcomplianceautomation Module for Go

PkgGoDev

The armappcomplianceautomation module provides operations for working with Azure Appcomplianceautomation.

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 Appcomplianceautomation module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Appcomplianceautomation. 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 Appcomplianceautomation 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 := armappcomplianceautomation.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 := armappcomplianceautomation.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.NewSnapshotClient()

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 Appcomplianceautomation 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 ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type Category

type Category struct {
	// READ-ONLY; The name of the compliance category. e.g. "Operational Security"
	CategoryName *string

	// READ-ONLY; Category status.
	CategoryStatus *CategoryStatus

	// READ-ONLY; List of control families.
	ControlFamilies []*ControlFamily
}

Category - A class represent the compliance category.

func (Category) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Category.

func (*Category) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Category.

type CategoryStatus

type CategoryStatus string

CategoryStatus - Indicates the category status.

const (
	// CategoryStatusFailed - The category is failed.
	CategoryStatusFailed CategoryStatus = "Failed"
	// CategoryStatusNotApplicable - The category is not applicable.
	CategoryStatusNotApplicable CategoryStatus = "NotApplicable"
	// CategoryStatusPassed - The category is passed.
	CategoryStatusPassed CategoryStatus = "Passed"
	// CategoryStatusPendingApproval - The category is pending for approval.
	CategoryStatusPendingApproval CategoryStatus = "PendingApproval"
)

func PossibleCategoryStatusValues

func PossibleCategoryStatusValues() []CategoryStatus

PossibleCategoryStatusValues returns the possible values for the CategoryStatus const type.

type CertSyncRecord added in v1.0.0

type CertSyncRecord struct {
	// Indicates the status of certification process.
	CertificationStatus *string

	// The control records list to be synchronized.
	Controls []*ControlSyncRecord

	// Indicates the status of compliance process.
	IngestionStatus *string

	// The offerGuid which mapping to the reports.
	OfferGUID *string
}

CertSyncRecord - A class represent the certification record synchronized from app compliance.

func (CertSyncRecord) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type CertSyncRecord.

func (*CertSyncRecord) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertSyncRecord.

type CheckNameAvailabilityReason added in v1.0.0

type CheckNameAvailabilityReason string

CheckNameAvailabilityReason - The reason why the given name is not available.

const (
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	CheckNameAvailabilityReasonInvalid       CheckNameAvailabilityReason = "Invalid"
)

func PossibleCheckNameAvailabilityReasonValues added in v1.0.0

func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason

PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.

type CheckNameAvailabilityRequest added in v1.0.0

type CheckNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource type.
	Type *string
}

CheckNameAvailabilityRequest - The check availability request body.

func (CheckNameAvailabilityRequest) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.

func (*CheckNameAvailabilityRequest) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.

type CheckNameAvailabilityResponse added in v1.0.0

type CheckNameAvailabilityResponse struct {
	// Detailed reason why the given name is available.
	Message *string

	// Indicates if the resource name is available.
	NameAvailable *bool

	// The reason why the given name is not available.
	Reason *CheckNameAvailabilityReason
}

CheckNameAvailabilityResponse - The check availability result.

func (CheckNameAvailabilityResponse) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.

func (*CheckNameAvailabilityResponse) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.

type ClientFactory added in v0.2.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.2.0

func NewClientFactory(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.

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

func (*ClientFactory) NewEvidenceClient added in v1.0.0

func (c *ClientFactory) NewEvidenceClient() *EvidenceClient

NewEvidenceClient creates a new instance of EvidenceClient.

func (*ClientFactory) NewOperationsClient added in v0.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewProviderActionsClient added in v1.0.0

func (c *ClientFactory) NewProviderActionsClient() *ProviderActionsClient

NewProviderActionsClient creates a new instance of ProviderActionsClient.

func (*ClientFactory) NewReportClient added in v0.2.0

func (c *ClientFactory) NewReportClient() *ReportClient

NewReportClient creates a new instance of ReportClient.

func (*ClientFactory) NewScopingConfigurationClient added in v1.0.0

func (c *ClientFactory) NewScopingConfigurationClient() *ScopingConfigurationClient

NewScopingConfigurationClient creates a new instance of ScopingConfigurationClient.

func (*ClientFactory) NewSnapshotClient added in v0.2.0

func (c *ClientFactory) NewSnapshotClient() *SnapshotClient

NewSnapshotClient creates a new instance of SnapshotClient.

func (*ClientFactory) NewWebhookClient added in v1.0.0

func (c *ClientFactory) NewWebhookClient() *WebhookClient

NewWebhookClient creates a new instance of WebhookClient.

type ComplianceReportItem

type ComplianceReportItem struct {
	// READ-ONLY; The category name.
	CategoryName *string

	// READ-ONLY; The control family name.
	ControlFamilyName *string

	// READ-ONLY; The control Id - e.g. "1".
	ControlID *string

	// READ-ONLY; The control name.
	ControlName *string

	// READ-ONLY; Control status.
	ControlStatus *ControlStatus

	// READ-ONLY; The Id of the resource.
	ResourceID *string

	// READ-ONLY; Resource origin.
	ResourceOrigin *ResourceOrigin

	// READ-ONLY; Resource status.
	ResourceStatus *ResourceStatus

	// READ-ONLY; The status change date for the resource.
	ResourceStatusChangeDate *time.Time

	// READ-ONLY; The type of the resource. e.g. "Microsoft.SignalRService/SignalR"
	ResourceType *string

	// READ-ONLY; The description of the customer responsibility.
	ResponsibilityDescription *string

	// READ-ONLY; The title of the customer responsibility.
	ResponsibilityTitle *string
}

ComplianceReportItem - Object that includes all the content for single compliance result.

func (ComplianceReportItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComplianceReportItem.

func (*ComplianceReportItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComplianceReportItem.

type ComplianceResult

type ComplianceResult struct {
	// READ-ONLY; List of categories.
	Categories []*Category

	// READ-ONLY; The name of the compliance. e.g. "M365"
	ComplianceName *string
}

ComplianceResult - A class represent the 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 ContentType added in v1.0.0

type ContentType string

ContentType - content type

const (
	// ContentTypeApplicationJSON - The content type is application/json.
	ContentTypeApplicationJSON ContentType = "application/json"
)

func PossibleContentTypeValues added in v1.0.0

func PossibleContentTypeValues() []ContentType

PossibleContentTypeValues returns the possible values for the ContentType const type.

type Control

type Control struct {
	// READ-ONLY; The control's description
	ControlDescription *string

	// READ-ONLY; The hyper link to the control's description'.
	ControlDescriptionHyperLink *string

	// READ-ONLY; The full name of the control. e.g. "Validate that unsupported operating systems and software components are
	// not in use."
	ControlFullName *string

	// READ-ONLY; The Id of the control. e.g. "OperationalSecurity10"
	ControlID *string

	// READ-ONLY; The name of the control. e.g. "Unsupported OS and Software."
	ControlName *string

	// READ-ONLY; Control status.
	ControlStatus *ControlStatus

	// READ-ONLY; List of customer responsibility.
	Responsibilities []*Responsibility
}

Control - A class represent the control.

func (Control) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Control.

func (*Control) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Control.

type ControlFamily

type ControlFamily struct {
	// READ-ONLY; The name of the control family. e.g. "Malware Protection - Anti-Virus"
	ControlFamilyName *string

	// READ-ONLY; The control family status
	ControlFamilyStatus *ControlFamilyStatus

	// READ-ONLY; List of controls.
	Controls []*Control
}

ControlFamily - A class represent the control family.

func (ControlFamily) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ControlFamily.

func (*ControlFamily) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ControlFamily.

type ControlFamilyStatus

type ControlFamilyStatus string

ControlFamilyStatus - Indicates the control family status.

const (
	// ControlFamilyStatusFailed - The control family is failed.
	ControlFamilyStatusFailed ControlFamilyStatus = "Failed"
	// ControlFamilyStatusNotApplicable - The control family is not applicable.
	ControlFamilyStatusNotApplicable ControlFamilyStatus = "NotApplicable"
	// ControlFamilyStatusPassed - The control family is passed.
	ControlFamilyStatusPassed ControlFamilyStatus = "Passed"
	// ControlFamilyStatusPendingApproval - The control family is pending for approval.
	ControlFamilyStatusPendingApproval ControlFamilyStatus = "PendingApproval"
)

func PossibleControlFamilyStatusValues

func PossibleControlFamilyStatusValues() []ControlFamilyStatus

PossibleControlFamilyStatusValues returns the possible values for the ControlFamilyStatus const type.

type ControlStatus

type ControlStatus string

ControlStatus - Indicates the control status.

const (
	// ControlStatusFailed - The control is failed.
	ControlStatusFailed ControlStatus = "Failed"
	// ControlStatusNotApplicable - The control is not applicable.
	ControlStatusNotApplicable ControlStatus = "NotApplicable"
	// ControlStatusPassed - The control is passed.
	ControlStatusPassed ControlStatus = "Passed"
	// ControlStatusPendingApproval - The control is pending for approval.
	ControlStatusPendingApproval ControlStatus = "PendingApproval"
)

func PossibleControlStatusValues

func PossibleControlStatusValues() []ControlStatus

PossibleControlStatusValues returns the possible values for the ControlStatus const type.

type ControlSyncRecord added in v1.0.0

type ControlSyncRecord struct {
	// The Id of the control. e.g. "OperationalSecurity10"
	ControlID *string

	// Control status synchronized from app compliance.
	ControlStatus *string
}

ControlSyncRecord - A class represent the control record synchronized from app compliance.

func (ControlSyncRecord) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ControlSyncRecord.

func (*ControlSyncRecord) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ControlSyncRecord.

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 DeliveryStatus added in v1.0.0

type DeliveryStatus string

DeliveryStatus - webhook deliveryStatus

const (
	// DeliveryStatusFailed - The webhook is failed to deliver.
	DeliveryStatusFailed DeliveryStatus = "Failed"
	// DeliveryStatusNotStarted - The webhook is not delivered.
	DeliveryStatusNotStarted DeliveryStatus = "NotStarted"
	// DeliveryStatusSucceeded - The webhook is delivered successfully.
	DeliveryStatusSucceeded DeliveryStatus = "Succeeded"
)

func PossibleDeliveryStatusValues added in v1.0.0

func PossibleDeliveryStatusValues() []DeliveryStatus

PossibleDeliveryStatusValues returns the possible values for the DeliveryStatus const type.

type DownloadResponse

type DownloadResponse struct {
	// READ-ONLY; The detailed compliance pdf report
	ComplianceDetailedPDFReport *DownloadResponseComplianceDetailedPDFReport

	// READ-ONLY; Compliance pdf report
	CompliancePDFReport *DownloadResponseCompliancePDFReport

	// READ-ONLY; List of the compliance result
	ComplianceReport []*ComplianceReportItem

	// READ-ONLY; Resource list of the report
	ResourceList []*ResourceItem
}

DownloadResponse - Object that includes all the possible response for the download operation.

func (DownloadResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DownloadResponse.

func (*DownloadResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DownloadResponse.

type DownloadResponseComplianceDetailedPDFReport

type DownloadResponseComplianceDetailedPDFReport struct {
	// READ-ONLY; The uri of detailed compliance pdf report
	SasURI *string
}

DownloadResponseComplianceDetailedPDFReport - The detailed compliance pdf report

func (DownloadResponseComplianceDetailedPDFReport) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type DownloadResponseComplianceDetailedPDFReport.

func (*DownloadResponseComplianceDetailedPDFReport) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DownloadResponseComplianceDetailedPDFReport.

type DownloadResponseCompliancePDFReport

type DownloadResponseCompliancePDFReport struct {
	// READ-ONLY; The uri of compliance pdf report
	SasURI *string
}

DownloadResponseCompliancePDFReport - Compliance pdf report

func (DownloadResponseCompliancePDFReport) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DownloadResponseCompliancePDFReport.

func (*DownloadResponseCompliancePDFReport) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DownloadResponseCompliancePDFReport.

type DownloadType

type DownloadType string

DownloadType - Indicates the download type.

const (
	// DownloadTypeComplianceDetailedPDFReport - Download the detailed compliance pdf report.
	DownloadTypeComplianceDetailedPDFReport DownloadType = "ComplianceDetailedPdfReport"
	// DownloadTypeCompliancePDFReport - Download the compliance pdf report.
	DownloadTypeCompliancePDFReport DownloadType = "CompliancePdfReport"
	// DownloadTypeComplianceReport - Download the compliance report.
	DownloadTypeComplianceReport DownloadType = "ComplianceReport"
	// DownloadTypeResourceList - Download the resource list of the report.
	DownloadTypeResourceList DownloadType = "ResourceList"
)

func PossibleDownloadTypeValues

func PossibleDownloadTypeValues() []DownloadType

PossibleDownloadTypeValues returns the possible values for the DownloadType const type.

type EnableSSLVerification added in v1.0.0

type EnableSSLVerification string

EnableSSLVerification - whether to enable ssl verification

const (
	// EnableSSLVerificationFalse - The ssl verification is not enabled.
	EnableSSLVerificationFalse EnableSSLVerification = "false"
	// EnableSSLVerificationTrue - The ssl verification is enabled.
	EnableSSLVerificationTrue EnableSSLVerification = "true"
)

func PossibleEnableSSLVerificationValues added in v1.0.0

func PossibleEnableSSLVerificationValues() []EnableSSLVerification

PossibleEnableSSLVerificationValues returns the possible values for the EnableSSLVerification const type.

type EvidenceClient added in v1.0.0

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

EvidenceClient contains the methods for the Evidence group. Don't use this type directly, use NewEvidenceClient() instead.

func NewEvidenceClient added in v1.0.0

func NewEvidenceClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EvidenceClient, error)

NewEvidenceClient creates a new instance of EvidenceClient with the specified values.

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

func (*EvidenceClient) CreateOrUpdate added in v1.0.0

func (client *EvidenceClient) CreateOrUpdate(ctx context.Context, reportName string, evidenceName string, properties EvidenceResource, options *EvidenceClientCreateOrUpdateOptions) (EvidenceClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or Update an evidence a specified report If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • evidenceName - The evidence name.
  • properties - Parameters for the create or update operation
  • options - EvidenceClientCreateOrUpdateOptions contains the optional parameters for the EvidenceClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEvidenceClient().CreateOrUpdate(ctx, "testReportName", "evidence1", armappcomplianceautomation.EvidenceResource{}, &armappcomplianceautomation.EvidenceClientCreateOrUpdateOptions{OfferGUID: nil,
		ReportCreatorTenantID: 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.EvidenceResource = armappcomplianceautomation.EvidenceResource{
	// 	Name: to.Ptr("evidence1"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/evidences"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.EvidenceProperties{
	// 		ControlID: to.Ptr("Operational_Security_10"),
	// 		EvidenceType: to.Ptr(armappcomplianceautomation.EvidenceTypeFile),
	// 		ExtraData: to.Ptr("sampleData"),
	// 		FilePath: to.Ptr("/acat-container/evidence1.png"),
	// 		ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 		ResponsibilityID: to.Ptr("authorized_ip_ranges_should_be_defined_on_kubernetes_services"),
	// 	},
	// }
}
Output:

func (*EvidenceClient) Delete added in v1.0.0

func (client *EvidenceClient) Delete(ctx context.Context, reportName string, evidenceName string, options *EvidenceClientDeleteOptions) (EvidenceClientDeleteResponse, error)

Delete - Delete an existent evidence from a specified report If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • evidenceName - The evidence name.
  • options - EvidenceClientDeleteOptions contains the optional parameters for the EvidenceClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewEvidenceClient().Delete(ctx, "testReportName", "evidence1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*EvidenceClient) Download added in v1.0.0

Download - Download evidence file. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • evidenceName - The evidence name.
  • body - Parameters for the query operation
  • options - EvidenceClientDownloadOptions contains the optional parameters for the EvidenceClient.Download method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_Download.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEvidenceClient().Download(ctx, "testReportName", "evidence1", armappcomplianceautomation.EvidenceFileDownloadRequest{}, 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.EvidenceFileDownloadResponse = armappcomplianceautomation.EvidenceFileDownloadResponse{
	// 	EvidenceFile: &armappcomplianceautomation.EvidenceFileDownloadResponseEvidenceFile{
	// 		URL: to.Ptr("this is a url"),
	// 	},
	// }
}
Output:

func (*EvidenceClient) Get added in v1.0.0

func (client *EvidenceClient) Get(ctx context.Context, reportName string, evidenceName string, options *EvidenceClientGetOptions) (EvidenceClientGetResponse, error)

Get - Get the evidence metadata If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • evidenceName - The evidence name.
  • options - EvidenceClientGetOptions contains the optional parameters for the EvidenceClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEvidenceClient().Get(ctx, "testReportName", "evidence1", 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.EvidenceResource = armappcomplianceautomation.EvidenceResource{
	// 	Name: to.Ptr("evidence1"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/evidences"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.EvidenceProperties{
	// 		ControlID: to.Ptr("Operational_Security_10"),
	// 		EvidenceType: to.Ptr(armappcomplianceautomation.EvidenceTypeFile),
	// 		ExtraData: to.Ptr("sampleData"),
	// 		FilePath: to.Ptr("/acat-container/evidence1.png"),
	// 		ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 		ResponsibilityID: to.Ptr("authorized_ip_ranges_should_be_defined_on_kubernetes_services"),
	// 	},
	// }
}
Output:

func (*EvidenceClient) NewListByReportPager added in v1.0.0

func (client *EvidenceClient) NewListByReportPager(reportName string, options *EvidenceClientListByReportOptions) *runtime.Pager[EvidenceClientListByReportResponse]

NewListByReportPager - Returns a paginated list of evidences for a specified report.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - EvidenceClientListByReportOptions contains the optional parameters for the EvidenceClient.NewListByReportPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Evidence_ListByReport.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEvidenceClient().NewListByReportPager("reportName", &armappcomplianceautomation.EvidenceClientListByReportOptions{SkipToken: nil,
		Top:                   nil,
		Select:                nil,
		Filter:                nil,
		Orderby:               nil,
		OfferGUID:             nil,
		ReportCreatorTenantID: 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.EvidenceResourceListResult = armappcomplianceautomation.EvidenceResourceListResult{
		// 	Value: []*armappcomplianceautomation.EvidenceResource{
		// 		{
		// 			Name: to.Ptr("evidence1"),
		// 			Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/evidences"),
		// 			ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1"),
		// 			SystemData: &armappcomplianceautomation.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 			},
		// 			Properties: &armappcomplianceautomation.EvidenceProperties{
		// 				ControlID: to.Ptr("Operational_Security_10"),
		// 				EvidenceType: to.Ptr(armappcomplianceautomation.EvidenceTypeFile),
		// 				ExtraData: to.Ptr("sampleData"),
		// 				FilePath: to.Ptr("/acat-container/evidence1.png"),
		// 				ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
		// 				ResponsibilityID: to.Ptr("authorized_ip_ranges_should_be_defined_on_kubernetes_services"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type EvidenceClientCreateOrUpdateOptions added in v1.0.0

type EvidenceClientCreateOrUpdateOptions struct {
	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// The tenant id of the report creator.
	ReportCreatorTenantID *string
}

EvidenceClientCreateOrUpdateOptions contains the optional parameters for the EvidenceClient.CreateOrUpdate method.

type EvidenceClientCreateOrUpdateResponse added in v1.0.0

type EvidenceClientCreateOrUpdateResponse struct {
	// A class represent an AppComplianceAutomation evidence resource.
	EvidenceResource
}

EvidenceClientCreateOrUpdateResponse contains the response from method EvidenceClient.CreateOrUpdate.

type EvidenceClientDeleteOptions added in v1.0.0

type EvidenceClientDeleteOptions struct {
}

EvidenceClientDeleteOptions contains the optional parameters for the EvidenceClient.Delete method.

type EvidenceClientDeleteResponse added in v1.0.0

type EvidenceClientDeleteResponse struct {
}

EvidenceClientDeleteResponse contains the response from method EvidenceClient.Delete.

type EvidenceClientDownloadOptions added in v1.0.0

type EvidenceClientDownloadOptions struct {
}

EvidenceClientDownloadOptions contains the optional parameters for the EvidenceClient.Download method.

type EvidenceClientDownloadResponse added in v1.0.0

type EvidenceClientDownloadResponse struct {
	// Object that includes all the possible response for the evidence file download operation.
	EvidenceFileDownloadResponse
}

EvidenceClientDownloadResponse contains the response from method EvidenceClient.Download.

type EvidenceClientGetOptions added in v1.0.0

type EvidenceClientGetOptions struct {
}

EvidenceClientGetOptions contains the optional parameters for the EvidenceClient.Get method.

type EvidenceClientGetResponse added in v1.0.0

type EvidenceClientGetResponse struct {
	// A class represent an AppComplianceAutomation evidence resource.
	EvidenceResource
}

EvidenceClientGetResponse contains the response from method EvidenceClient.Get.

type EvidenceClientListByReportOptions added in v1.0.0

type EvidenceClientListByReportOptions struct {
	// The filter to apply on the operation.
	Filter *string

	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// OData order by query option.
	Orderby *string

	// The tenant id of the report creator.
	ReportCreatorTenantID *string

	// OData Select statement. Limits the properties on each entry to just those requested, e.g. ?$select=reportName,id.
	Select *string

	// Skip over when retrieving results.
	SkipToken *string

	// Number of elements to return when retrieving results.
	Top *int32
}

EvidenceClientListByReportOptions contains the optional parameters for the EvidenceClient.NewListByReportPager method.

type EvidenceClientListByReportResponse added in v1.0.0

type EvidenceClientListByReportResponse struct {
	// The response of a EvidenceResource list operation.
	EvidenceResourceListResult
}

EvidenceClientListByReportResponse contains the response from method EvidenceClient.NewListByReportPager.

type EvidenceFileDownloadRequest added in v1.0.0

type EvidenceFileDownloadRequest struct {
	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// Tenant id.
	ReportCreatorTenantID *string
}

EvidenceFileDownloadRequest - Evidence file's download request.

func (EvidenceFileDownloadRequest) MarshalJSON added in v1.0.0

func (e EvidenceFileDownloadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EvidenceFileDownloadRequest.

func (*EvidenceFileDownloadRequest) UnmarshalJSON added in v1.0.0

func (e *EvidenceFileDownloadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EvidenceFileDownloadRequest.

type EvidenceFileDownloadResponse added in v1.0.0

type EvidenceFileDownloadResponse struct {
	// READ-ONLY; The uri of evidence file
	EvidenceFile *EvidenceFileDownloadResponseEvidenceFile
}

EvidenceFileDownloadResponse - Object that includes all the possible response for the evidence file download operation.

func (EvidenceFileDownloadResponse) MarshalJSON added in v1.0.0

func (e EvidenceFileDownloadResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EvidenceFileDownloadResponse.

func (*EvidenceFileDownloadResponse) UnmarshalJSON added in v1.0.0

func (e *EvidenceFileDownloadResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EvidenceFileDownloadResponse.

type EvidenceFileDownloadResponseEvidenceFile added in v1.0.0

type EvidenceFileDownloadResponseEvidenceFile struct {
	// READ-ONLY; The url of evidence file
	URL *string
}

EvidenceFileDownloadResponseEvidenceFile - The uri of evidence file

func (EvidenceFileDownloadResponseEvidenceFile) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type EvidenceFileDownloadResponseEvidenceFile.

func (*EvidenceFileDownloadResponseEvidenceFile) UnmarshalJSON added in v1.0.0

func (e *EvidenceFileDownloadResponseEvidenceFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EvidenceFileDownloadResponseEvidenceFile.

type EvidenceProperties added in v1.0.0

type EvidenceProperties struct {
	// REQUIRED; The path of the file in storage.
	FilePath *string

	// Control id.
	ControlID *string

	// Evidence type.
	EvidenceType *EvidenceType

	// Extra data considered as evidence.
	ExtraData *string

	// Responsibility id.
	ResponsibilityID *string

	// READ-ONLY; Azure lifecycle management
	ProvisioningState *ProvisioningState
}

EvidenceProperties - Evidence's properties.

func (EvidenceProperties) MarshalJSON added in v1.0.0

func (e EvidenceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EvidenceProperties.

func (*EvidenceProperties) UnmarshalJSON added in v1.0.0

func (e *EvidenceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EvidenceProperties.

type EvidenceResource added in v1.0.0

type EvidenceResource struct {
	// REQUIRED; Evidence property.
	Properties *EvidenceProperties

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

EvidenceResource - A class represent an AppComplianceAutomation evidence resource.

func (EvidenceResource) MarshalJSON added in v1.0.0

func (e EvidenceResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EvidenceResource.

func (*EvidenceResource) UnmarshalJSON added in v1.0.0

func (e *EvidenceResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EvidenceResource.

type EvidenceResourceListResult added in v1.0.0

type EvidenceResourceListResult struct {
	// REQUIRED; The EvidenceResource items on this page
	Value []*EvidenceResource

	// The link to the next page of items
	NextLink *string
}

EvidenceResourceListResult - The response of a EvidenceResource list operation.

func (EvidenceResourceListResult) MarshalJSON added in v1.0.0

func (e EvidenceResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EvidenceResourceListResult.

func (*EvidenceResourceListResult) UnmarshalJSON added in v1.0.0

func (e *EvidenceResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EvidenceResourceListResult.

type EvidenceType added in v1.0.0

type EvidenceType string

EvidenceType - Evidence type

const (
	// EvidenceTypeAutoCollectedEvidence - The evidence auto collected by App Compliance Automation.
	EvidenceTypeAutoCollectedEvidence EvidenceType = "AutoCollectedEvidence"
	// EvidenceTypeData - The evidence is data.
	EvidenceTypeData EvidenceType = "Data"
	// EvidenceTypeFile - The evidence is a file.
	EvidenceTypeFile EvidenceType = "File"
)

func PossibleEvidenceTypeValues added in v1.0.0

func PossibleEvidenceTypeValues() []EvidenceType

PossibleEvidenceTypeValues returns the possible values for the EvidenceType const type.

type GetCollectionCountRequest added in v1.0.0

type GetCollectionCountRequest struct {
	// The resource type.
	Type *string
}

GetCollectionCountRequest - Get collection count's request object.

func (GetCollectionCountRequest) MarshalJSON added in v1.0.0

func (g GetCollectionCountRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetCollectionCountRequest.

func (*GetCollectionCountRequest) UnmarshalJSON added in v1.0.0

func (g *GetCollectionCountRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetCollectionCountRequest.

type GetCollectionCountResponse added in v1.0.0

type GetCollectionCountResponse struct {
	// The count of the specified resource.
	Count *int32
}

GetCollectionCountResponse - The get collection count response.

func (GetCollectionCountResponse) MarshalJSON added in v1.0.0

func (g GetCollectionCountResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetCollectionCountResponse.

func (*GetCollectionCountResponse) UnmarshalJSON added in v1.0.0

func (g *GetCollectionCountResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetCollectionCountResponse.

type GetOverviewStatusRequest added in v1.0.0

type GetOverviewStatusRequest struct {
	// The resource type.
	Type *string
}

GetOverviewStatusRequest - Get overview status request object.

func (GetOverviewStatusRequest) MarshalJSON added in v1.0.0

func (g GetOverviewStatusRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetOverviewStatusRequest.

func (*GetOverviewStatusRequest) UnmarshalJSON added in v1.0.0

func (g *GetOverviewStatusRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetOverviewStatusRequest.

type GetOverviewStatusResponse added in v1.0.0

type GetOverviewStatusResponse struct {
	// List of different status items.
	StatusList []*StatusItem
}

GetOverviewStatusResponse - The get overview status response.

func (GetOverviewStatusResponse) MarshalJSON added in v1.0.0

func (g GetOverviewStatusResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetOverviewStatusResponse.

func (*GetOverviewStatusResponse) UnmarshalJSON added in v1.0.0

func (g *GetOverviewStatusResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetOverviewStatusResponse.

type InputType added in v1.0.0

type InputType string

InputType - Question input type.

const (
	// InputTypeBoolean - The input content should be a boolean.
	InputTypeBoolean InputType = "Boolean"
	// InputTypeDate - The input content should be a date.
	InputTypeDate InputType = "Date"
	// InputTypeEmail - The input content should be an email address.
	InputTypeEmail InputType = "Email"
	// InputTypeGroup - The input content is a group of answers.
	InputTypeGroup InputType = "Group"
	// InputTypeMultiSelectCheckbox - The input content are multiple results seleted from the checkboxes.
	InputTypeMultiSelectCheckbox InputType = "MultiSelectCheckbox"
	// InputTypeMultiSelectDropdown - The input content are multiple results seleted from the dropdown options.
	InputTypeMultiSelectDropdown InputType = "MultiSelectDropdown"
	// InputTypeMultiSelectDropdownCustom - The input content are result seleted from the custom dropdown options.
	InputTypeMultiSelectDropdownCustom InputType = "MultiSelectDropdownCustom"
	// InputTypeMultilineText - The input content should be multiline text.
	InputTypeMultilineText InputType = "MultilineText"
	// InputTypeNone - The input type is a text box.
	InputTypeNone InputType = "None"
	// InputTypeNumber - The input content should be a number.
	InputTypeNumber InputType = "Number"
	// InputTypeSingleSelectDropdown - The input content is a single result seleted from the dropdown options.
	InputTypeSingleSelectDropdown InputType = "SingleSelectDropdown"
	// InputTypeSingleSelection - The input content is a single result seleted from the options.
	InputTypeSingleSelection InputType = "SingleSelection"
	// InputTypeTelephone - The input content should be a telephone number.
	InputTypeTelephone InputType = "Telephone"
	// InputTypeText - The input content is text string.
	InputTypeText InputType = "Text"
	// InputTypeURL - The input content should be a URL.
	InputTypeURL InputType = "Url"
	// InputTypeUpload - The input content is a uploaded file.
	InputTypeUpload InputType = "Upload"
	// InputTypeYearPicker - The input content is a Year, pick from the dropdown list.
	InputTypeYearPicker InputType = "YearPicker"
	// InputTypeYesNoNa - The input content should be Yes, No or Na.
	InputTypeYesNoNa InputType = "YesNoNa"
)

func PossibleInputTypeValues added in v1.0.0

func PossibleInputTypeValues() []InputType

PossibleInputTypeValues returns the possible values for the InputType const type.

type IsRecommendSolution added in v1.0.0

type IsRecommendSolution string

IsRecommendSolution - Indicates whether this solution is the recommended.

const (
	// IsRecommendSolutionFalse - This solution is not the recommended.
	IsRecommendSolutionFalse IsRecommendSolution = "false"
	// IsRecommendSolutionTrue - This solution is the recommended.
	IsRecommendSolutionTrue IsRecommendSolution = "true"
)

func PossibleIsRecommendSolutionValues added in v1.0.0

func PossibleIsRecommendSolutionValues() []IsRecommendSolution

PossibleIsRecommendSolutionValues returns the possible values for the IsRecommendSolution const type.

type ListInUseStorageAccountsRequest added in v1.0.0

type ListInUseStorageAccountsRequest struct {
	// List of subscription ids to be query. If the list is null or empty, the API will query all the subscriptions of the user.
	SubscriptionIDs []*string
}

ListInUseStorageAccountsRequest - Parameters for listing in use storage accounts operation. If subscription list is null, it will check the user's all subscriptions.

func (ListInUseStorageAccountsRequest) MarshalJSON added in v1.0.0

func (l ListInUseStorageAccountsRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListInUseStorageAccountsRequest.

func (*ListInUseStorageAccountsRequest) UnmarshalJSON added in v1.0.0

func (l *ListInUseStorageAccountsRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListInUseStorageAccountsRequest.

type ListInUseStorageAccountsResponse added in v1.0.0

type ListInUseStorageAccountsResponse struct {
	// The storage account list which in use in related reports.
	StorageAccountList []*StorageInfo
}

ListInUseStorageAccountsResponse - Parameters for listing in use storage accounts operation. If subscription list is null, it will check the user's all subscriptions.

func (ListInUseStorageAccountsResponse) MarshalJSON added in v1.0.0

func (l ListInUseStorageAccountsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListInUseStorageAccountsResponse.

func (*ListInUseStorageAccountsResponse) UnmarshalJSON added in v1.0.0

func (l *ListInUseStorageAccountsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListInUseStorageAccountsResponse.

type NotificationEvent added in v1.0.0

type NotificationEvent string

NotificationEvent - notification event.

const (
	// NotificationEventAssessmentFailure - The subscribed report failed while collecting the assessments.
	NotificationEventAssessmentFailure NotificationEvent = "assessment_failure"
	// NotificationEventGenerateSnapshotFailed - The subscribed report's snapshot is failed to generate.
	NotificationEventGenerateSnapshotFailed NotificationEvent = "generate_snapshot_failed"
	// NotificationEventGenerateSnapshotSuccess - The subscribed report's snapshot is successfully generated.
	NotificationEventGenerateSnapshotSuccess NotificationEvent = "generate_snapshot_success"
	// NotificationEventReportConfigurationChanges - The subscribed report's configuration is changed.
	NotificationEventReportConfigurationChanges NotificationEvent = "report_configuration_changes"
	// NotificationEventReportDeletion - The subscribed report is deleted.
	NotificationEventReportDeletion NotificationEvent = "report_deletion"
)

func PossibleNotificationEventValues added in v1.0.0

func PossibleNotificationEventValues() []NotificationEvent

PossibleNotificationEventValues returns the possible values for the NotificationEvent const type.

type OnboardRequest added in v1.0.0

type OnboardRequest struct {
	// REQUIRED; List of subscription ids to be onboarded
	SubscriptionIDs []*string
}

OnboardRequest - Parameters for onboard operation

func (OnboardRequest) MarshalJSON added in v1.0.0

func (o OnboardRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OnboardRequest.

func (*OnboardRequest) UnmarshalJSON added in v1.0.0

func (o *OnboardRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OnboardRequest.

type OnboardResponse added in v1.0.0

type OnboardResponse struct {
	// List of subscription ids that are onboarded
	SubscriptionIDs []*string
}

OnboardResponse - Success. The response indicates given subscriptions has been onboarded.

func (OnboardResponse) MarshalJSON added in v1.0.0

func (o OnboardResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OnboardResponse.

func (*OnboardResponse) UnmarshalJSON added in v1.0.0

func (o *OnboardResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OnboardResponse.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

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

NewListPager - List the operations for the provider

Generated from API version 2024-06-27

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Operations_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().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.OperationListResult = armappcomplianceautomation.OperationListResult{
		// 	Value: []*armappcomplianceautomation.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.AppComplianceAutomation/reports/write"),
		// 			Display: &armappcomplianceautomation.OperationDisplay{
		// 				Description: to.Ptr("Create new reports."),
		// 				Operation: to.Ptr("Microsoft.AppComplianceAutomation/reports/write"),
		// 				Provider: to.Ptr("Microsoft AppComplianceAutomation"),
		// 				Resource: to.Ptr("Microsoft.AppComplianceAutomation/reports"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type OverviewStatus

type OverviewStatus struct {
	// READ-ONLY; The count of all failed control.
	FailedCount *int32

	// READ-ONLY; The count of all manual control.
	ManualCount *int32

	// READ-ONLY; The count of all not applicable control.
	NotApplicableCount *int32

	// READ-ONLY; The count of all passed control.
	PassedCount *int32

	// READ-ONLY; The count of all pending for approval control.
	PendingCount *int32
}

OverviewStatus - The overview of the compliance result for one report.

func (OverviewStatus) MarshalJSON

func (o OverviewStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OverviewStatus.

func (*OverviewStatus) UnmarshalJSON

func (o *OverviewStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OverviewStatus.

type ProviderActionsClient added in v1.0.0

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

ProviderActionsClient contains the methods for the ProviderActions group. Don't use this type directly, use NewProviderActionsClient() instead.

func NewProviderActionsClient added in v1.0.0

func NewProviderActionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderActionsClient, error)

NewProviderActionsClient creates a new instance of ProviderActionsClient with the specified values.

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

func (*ProviderActionsClient) BeginOnboard added in v1.0.0

BeginOnboard - Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • body - The content of the action request
  • options - ProviderActionsClientBeginOnboardOptions contains the optional parameters for the ProviderActionsClient.BeginOnboard method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Onboard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProviderActionsClient().BeginOnboard(ctx, armappcomplianceautomation.OnboardRequest{}, 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.OnboardResponse = armappcomplianceautomation.OnboardResponse{
	// 	SubscriptionIDs: []*string{
	// 		to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		to.Ptr("00000000-0000-0000-0000-000000000001")},
	// 	}
}
Output:

func (*ProviderActionsClient) BeginTriggerEvaluation added in v1.0.0

BeginTriggerEvaluation - Trigger quick evaluation for the given subscriptions. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • body - The content of the action request
  • options - ProviderActionsClientBeginTriggerEvaluationOptions contains the optional parameters for the ProviderActionsClient.BeginTriggerEvaluation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/TriggerEvaluation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProviderActionsClient().BeginTriggerEvaluation(ctx, armappcomplianceautomation.TriggerEvaluationRequest{}, 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.TriggerEvaluationResponse = armappcomplianceautomation.TriggerEvaluationResponse{
	// 	Properties: &armappcomplianceautomation.TriggerEvaluationProperty{
	// 		EvaluationEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T05:10:00.000Z"); return t}()),
	// 		QuickAssessments: []*armappcomplianceautomation.QuickAssessment{
	// 			{
	// 				Description: to.Ptr("Protect your storage accounts from potential threats using virtual network rules as a preferred method instead of IP-based filtering. Disabling IP-based filtering prevents public IPs from accessing your storage accounts."),
	// 				DisplayName: to.Ptr("Storage accounts should restrict network access using virtual network rules"),
	// 				RemediationLink: to.Ptr("Protect your storage accounts from potential threats using virtual network rules as a preferred method instead of IP-based filtering. Disabling IP-based filtering prevents public IPs from accessing your storage accounts."),
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storettas3iw2megtcarm"),
	// 				ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusHealthy),
	// 				ResponsibilityID: to.Ptr("/providers/microsoft.authorization/policydefinitions/2a1a9cdf-e04d-429a-8416-3bfb72a1b26f"),
	// 				Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T05:00:00.000Z"); return t}()),
	// 			},
	// 			{
	// 				Description: to.Ptr(""),
	// 				DisplayName: to.Ptr("Secure transfer to storage accounts should be enabled"),
	// 				RemediationLink: to.Ptr(""),
	// 				ResourceID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storettas3iw2megtcarm"),
	// 				ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusUnhealthy),
	// 				ResponsibilityID: to.Ptr("/providers/Microsoft.Authorization/policyDefinitions/404c3081-a854-4457-ae30-26a93ef643f9"),
	// 				Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T05:00:00.000Z"); return t}()),
	// 		}},
	// 		ResourceIDs: []*string{
	// 			to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storettas3iw2megtcarm")},
	// 			TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T05:00:00.000Z"); return t}()),
	// 		},
	// 	}
}
Output:

func (*ProviderActionsClient) CheckNameAvailability added in v1.0.0

CheckNameAvailability - Check if the given name is available for a report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • body - The content of the action request
  • options - ProviderActionsClientCheckNameAvailabilityOptions contains the optional parameters for the ProviderActionsClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProviderActionsClient().CheckNameAvailability(ctx, armappcomplianceautomation.CheckNameAvailabilityRequest{}, 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.CheckNameAvailabilityResponse = armappcomplianceautomation.CheckNameAvailabilityResponse{
	// 	Message: to.Ptr("An report named 'reportABC' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armappcomplianceautomation.CheckNameAvailabilityReasonAlreadyExists),
	// }
}
Output:

func (*ProviderActionsClient) GetCollectionCount added in v1.0.0

GetCollectionCount - Get the count of reports. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • body - The content of the action request
  • options - ProviderActionsClientGetCollectionCountOptions contains the optional parameters for the ProviderActionsClient.GetCollectionCount method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetCollectionCount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProviderActionsClient().GetCollectionCount(ctx, armappcomplianceautomation.GetCollectionCountRequest{}, 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.GetCollectionCountResponse = armappcomplianceautomation.GetCollectionCountResponse{
	// 	Count: to.Ptr[int32](100),
	// }
}
Output:

func (*ProviderActionsClient) GetOverviewStatus added in v1.0.0

GetOverviewStatus - Get the resource overview status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • body - The content of the action request
  • options - ProviderActionsClientGetOverviewStatusOptions contains the optional parameters for the ProviderActionsClient.GetOverviewStatus method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetOverviewStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProviderActionsClient().GetOverviewStatus(ctx, armappcomplianceautomation.GetOverviewStatusRequest{}, 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.GetOverviewStatusResponse = armappcomplianceautomation.GetOverviewStatusResponse{
	// 	StatusList: []*armappcomplianceautomation.StatusItem{
	// 		{
	// 			StatusName: to.Ptr("Active"),
	// 			StatusValue: to.Ptr("100"),
	// 		},
	// 		{
	// 			StatusName: to.Ptr("Failed"),
	// 			StatusValue: to.Ptr("0"),
	// 		},
	// 		{
	// 			StatusName: to.Ptr("Disabled"),
	// 			StatusValue: to.Ptr("0"),
	// 	}},
	// }
}
Output:

func (*ProviderActionsClient) ListInUseStorageAccounts added in v1.0.0

ListInUseStorageAccounts - List the storage accounts which are in use by related reports If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • body - The content of the action request
  • options - ProviderActionsClientListInUseStorageAccountsOptions contains the optional parameters for the ProviderActionsClient.ListInUseStorageAccounts method.
Example (ListInUseStorageAccountsWithSubscriptions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProviderActionsClient().ListInUseStorageAccounts(ctx, armappcomplianceautomation.ListInUseStorageAccountsRequest{}, 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.ListInUseStorageAccountsResponse = armappcomplianceautomation.ListInUseStorageAccountsResponse{
	// 	StorageAccountList: []*armappcomplianceautomation.StorageInfo{
	// 		{
	// 			AccountName: to.Ptr("SA_name1"),
	// 			Location: to.Ptr("WEST US"),
	// 			ResourceGroup: to.Ptr("tetsRG"),
	// 			SubscriptionID: to.Ptr("0000000-0000-0000-0000-000000000001"),
	// 		},
	// 		{
	// 			AccountName: to.Ptr("SA_name2"),
	// 			Location: to.Ptr("WEST US"),
	// 			ResourceGroup: to.Ptr("tetsRG"),
	// 			SubscriptionID: to.Ptr("0000000-0000-0000-0000-000000000001"),
	// 	}},
	// }
}
Output:

Example (ListInUseStorageAccountsWithoutSubscriptions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ListInUseStorageAccountsWithoutSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProviderActionsClient().ListInUseStorageAccounts(ctx, armappcomplianceautomation.ListInUseStorageAccountsRequest{}, 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.ListInUseStorageAccountsResponse = armappcomplianceautomation.ListInUseStorageAccountsResponse{
	// 	StorageAccountList: []*armappcomplianceautomation.StorageInfo{
	// 		{
	// 			AccountName: to.Ptr("SA_name1"),
	// 			Location: to.Ptr("WEST US"),
	// 			ResourceGroup: to.Ptr("tetsRG"),
	// 			SubscriptionID: to.Ptr("0000000-0000-0000-0000-000000000001"),
	// 		},
	// 		{
	// 			AccountName: to.Ptr("SA_name2"),
	// 			Location: to.Ptr("WEST US"),
	// 			ResourceGroup: to.Ptr("tetsRG"),
	// 			SubscriptionID: to.Ptr("0000000-0000-0000-0000-000000000001"),
	// 	}},
	// }
}
Output:

type ProviderActionsClientBeginOnboardOptions added in v1.0.0

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

ProviderActionsClientBeginOnboardOptions contains the optional parameters for the ProviderActionsClient.BeginOnboard method.

type ProviderActionsClientBeginTriggerEvaluationOptions added in v1.0.0

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

ProviderActionsClientBeginTriggerEvaluationOptions contains the optional parameters for the ProviderActionsClient.BeginTriggerEvaluation method.

type ProviderActionsClientCheckNameAvailabilityOptions added in v1.0.0

type ProviderActionsClientCheckNameAvailabilityOptions struct {
}

ProviderActionsClientCheckNameAvailabilityOptions contains the optional parameters for the ProviderActionsClient.CheckNameAvailability method.

type ProviderActionsClientCheckNameAvailabilityResponse added in v1.0.0

type ProviderActionsClientCheckNameAvailabilityResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

ProviderActionsClientCheckNameAvailabilityResponse contains the response from method ProviderActionsClient.CheckNameAvailability.

type ProviderActionsClientGetCollectionCountOptions added in v1.0.0

type ProviderActionsClientGetCollectionCountOptions struct {
}

ProviderActionsClientGetCollectionCountOptions contains the optional parameters for the ProviderActionsClient.GetCollectionCount method.

type ProviderActionsClientGetCollectionCountResponse added in v1.0.0

type ProviderActionsClientGetCollectionCountResponse struct {
	// The get collection count response.
	GetCollectionCountResponse
}

ProviderActionsClientGetCollectionCountResponse contains the response from method ProviderActionsClient.GetCollectionCount.

type ProviderActionsClientGetOverviewStatusOptions added in v1.0.0

type ProviderActionsClientGetOverviewStatusOptions struct {
}

ProviderActionsClientGetOverviewStatusOptions contains the optional parameters for the ProviderActionsClient.GetOverviewStatus method.

type ProviderActionsClientGetOverviewStatusResponse added in v1.0.0

type ProviderActionsClientGetOverviewStatusResponse struct {
	// The get overview status response.
	GetOverviewStatusResponse
}

ProviderActionsClientGetOverviewStatusResponse contains the response from method ProviderActionsClient.GetOverviewStatus.

type ProviderActionsClientListInUseStorageAccountsOptions added in v1.0.0

type ProviderActionsClientListInUseStorageAccountsOptions struct {
}

ProviderActionsClientListInUseStorageAccountsOptions contains the optional parameters for the ProviderActionsClient.ListInUseStorageAccounts method.

type ProviderActionsClientListInUseStorageAccountsResponse added in v1.0.0

type ProviderActionsClientListInUseStorageAccountsResponse struct {
	// Parameters for listing in use storage accounts operation. If subscription list is null, it will check the user's all subscriptions.
	ListInUseStorageAccountsResponse
}

ProviderActionsClientListInUseStorageAccountsResponse contains the response from method ProviderActionsClient.ListInUseStorageAccounts.

type ProviderActionsClientOnboardResponse added in v1.0.0

type ProviderActionsClientOnboardResponse struct {
	// Success. The response indicates given subscriptions has been onboarded.
	OnboardResponse
}

ProviderActionsClientOnboardResponse contains the response from method ProviderActionsClient.BeginOnboard.

type ProviderActionsClientTriggerEvaluationResponse added in v1.0.0

type ProviderActionsClientTriggerEvaluationResponse struct {
	// Trigger evaluation response.
	TriggerEvaluationResponse
}

ProviderActionsClientTriggerEvaluationResponse contains the response from method ProviderActionsClient.BeginTriggerEvaluation.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Resource provisioning states.

const (
	// ProvisioningStateCanceled - The provision is canceled.
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateCreating - The creation is in progress.
	ProvisioningStateCreating ProvisioningState = "Creating"
	// ProvisioningStateDeleting - The deletion is in progress.
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - The provision is failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateFixing - The fix of the resource in progress.
	ProvisioningStateFixing ProvisioningState = "Fixing"
	// ProvisioningStateSucceeded - The provision is succeeded.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateUpdating - The update of the resource in progress.
	ProvisioningStateUpdating ProvisioningState = "Updating"
	// ProvisioningStateVerifying - The verification of the resource in progress.
	ProvisioningStateVerifying ProvisioningState = "Verifying"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type QuickAssessment added in v1.0.0

type QuickAssessment struct {
	// READ-ONLY; Quick assessment display name.
	Description *string

	// READ-ONLY; Quick assessment display name.
	DisplayName *string

	// READ-ONLY; Link to remediation steps for this quick assessment.
	RemediationLink *string

	// READ-ONLY; Resource id.
	ResourceID *string

	// READ-ONLY; Quick assessment status.
	ResourceStatus *ResourceStatus

	// READ-ONLY; Responsibility id.
	ResponsibilityID *string

	// READ-ONLY; The timestamp of resource creation (UTC).
	Timestamp *time.Time
}

QuickAssessment - A class represent the quick assessment.

func (QuickAssessment) MarshalJSON added in v1.0.0

func (q QuickAssessment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuickAssessment.

func (*QuickAssessment) UnmarshalJSON added in v1.0.0

func (q *QuickAssessment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuickAssessment.

type Recommendation added in v1.0.0

type Recommendation struct {
	// READ-ONLY; The Id of the recommendation.
	RecommendationID *string

	// READ-ONLY; The short name of the recommendation. e.g. "Invalid TLS config"
	RecommendationShortName *string

	// READ-ONLY; List of recommendation solutions.
	RecommendationSolutions []*RecommendationSolution
}

Recommendation - A class represent the recommendation.

func (Recommendation) MarshalJSON added in v1.0.0

func (r Recommendation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Recommendation.

func (*Recommendation) UnmarshalJSON added in v1.0.0

func (r *Recommendation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Recommendation.

type RecommendationSolution added in v1.0.0

type RecommendationSolution struct {
	// READ-ONLY; Indicates whether this solution is the recommended.
	IsRecommendSolution *IsRecommendSolution

	// READ-ONLY; The detail steps of the recommendation solution.
	RecommendationSolutionContent *string

	// READ-ONLY; The index of the recommendation solution.
	RecommendationSolutionIndex *string
}

RecommendationSolution - A class represent the recommendation solution.

func (RecommendationSolution) MarshalJSON added in v1.0.0

func (r RecommendationSolution) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecommendationSolution.

func (*RecommendationSolution) UnmarshalJSON added in v1.0.0

func (r *RecommendationSolution) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationSolution.

type ReportClient

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

ReportClient contains the methods for the Report group. Don't use this type directly, use NewReportClient() instead.

func NewReportClient

func NewReportClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportClient, error)

NewReportClient creates a new instance of ReportClient with the specified values.

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

func (*ReportClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • properties - Parameters for the create or update operation
  • options - ReportClientBeginCreateOrUpdateOptions contains the optional parameters for the ReportClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReportClient().BeginCreateOrUpdate(ctx, "testReportName", armappcomplianceautomation.ReportResource{}, 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.ReportResource = armappcomplianceautomation.ReportResource{
	// 	Name: to.Ptr("testReportName"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.ReportProperties{
	// 		CertRecords: []*armappcomplianceautomation.CertSyncRecord{
	// 			{
	// 				CertificationStatus: to.Ptr("CertIngestion"),
	// 				Controls: []*armappcomplianceautomation.ControlSyncRecord{
	// 					{
	// 						ControlID: to.Ptr("Operational_Security_10"),
	// 						ControlStatus: to.Ptr("Approved"),
	// 				}},
	// 				IngestionStatus: to.Ptr("EvidenceResubmitted"),
	// 				OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001"),
	// 		}},
	// 		ComplianceStatus: &armappcomplianceautomation.ReportComplianceStatus{
	// 			M365: &armappcomplianceautomation.OverviewStatus{
	// 				FailedCount: to.Ptr[int32](0),
	// 				ManualCount: to.Ptr[int32](0),
	// 				PassedCount: to.Ptr[int32](0),
	// 			},
	// 		},
	// 		LastTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 		NextTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 		OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"),
	// 		ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 		Resources: []*armappcomplianceautomation.ResourceMetadata{
	// 			{
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 				ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
	// 				ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 			},
	// 			{
	// 				AccountID: to.Ptr("000000000000"),
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
	// 				ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
	// 				ResourceType: to.Ptr("iam.user"),
	// 		}},
	// 		Status: to.Ptr(armappcomplianceautomation.ReportStatusActive),
	// 		StorageInfo: &armappcomplianceautomation.StorageInfo{
	// 			AccountName: to.Ptr("testStorageAccount"),
	// 			Location: to.Ptr("East US"),
	// 			ResourceGroup: to.Ptr("testResourceGroup"),
	// 			SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		},
	// 		Subscriptions: []*string{
	// 			to.Ptr("00000000-0000-0000-0000-000000000000")},
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			TimeZone: to.Ptr("GMT Standard Time"),
	// 			TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 		},
	// 	}
}
Output:

func (*ReportClient) BeginDelete

BeginDelete - Delete an AppComplianceAutomation report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - ReportClientBeginDeleteOptions contains the optional parameters for the ReportClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReportClient().BeginDelete(ctx, "testReportName", 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 (*ReportClient) BeginFix added in v1.0.0

BeginFix - Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - ReportClientBeginFixOptions contains the optional parameters for the ReportClient.BeginFix method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Fix.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReportClient().BeginFix(ctx, "testReport", 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.ReportFixResult = armappcomplianceautomation.ReportFixResult{
	// 	Reason: to.Ptr(""),
	// 	Result: to.Ptr(armappcomplianceautomation.ResultSucceeded),
	// }
}
Output:

func (*ReportClient) BeginSyncCertRecord added in v1.0.0

BeginSyncCertRecord - Synchronize attestation record from app compliance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • body - Parameters for synchronize certification record operation
  • options - ReportClientBeginSyncCertRecordOptions contains the optional parameters for the ReportClient.BeginSyncCertRecord method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_SyncCertRecord.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReportClient().BeginSyncCertRecord(ctx, "testReportName", armappcomplianceautomation.SyncCertRecordRequest{}, 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.SyncCertRecordResponse = armappcomplianceautomation.SyncCertRecordResponse{
	// 	CertRecord: &armappcomplianceautomation.CertSyncRecord{
	// 		CertificationStatus: to.Ptr("CertIngestion"),
	// 		Controls: []*armappcomplianceautomation.ControlSyncRecord{
	// 		},
	// 		IngestionStatus: to.Ptr("InitialDocumentResubmitted"),
	// 		OfferGUID: to.Ptr("addb13fc-64bf-4005-b693-4c2f094e2187"),
	// 	},
	// }
}
Output:

func (*ReportClient) BeginUpdate

BeginUpdate - Update an exiting AppComplianceAutomation report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • properties - Parameters for the create or update operation
  • options - ReportClientBeginUpdateOptions contains the optional parameters for the ReportClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReportClient().BeginUpdate(ctx, "testReportName", armappcomplianceautomation.ReportResourcePatch{}, 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.ReportResource = armappcomplianceautomation.ReportResource{
	// 	Name: to.Ptr("testReportName"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.ReportProperties{
	// 		CertRecords: []*armappcomplianceautomation.CertSyncRecord{
	// 			{
	// 				CertificationStatus: to.Ptr("CertIngestion"),
	// 				Controls: []*armappcomplianceautomation.ControlSyncRecord{
	// 					{
	// 						ControlID: to.Ptr("Operational_Security_10"),
	// 						ControlStatus: to.Ptr("Approved"),
	// 				}},
	// 				IngestionStatus: to.Ptr("EvidenceResubmitted"),
	// 				OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001"),
	// 		}},
	// 		ComplianceStatus: &armappcomplianceautomation.ReportComplianceStatus{
	// 			M365: &armappcomplianceautomation.OverviewStatus{
	// 				FailedCount: to.Ptr[int32](0),
	// 				ManualCount: to.Ptr[int32](0),
	// 				PassedCount: to.Ptr[int32](0),
	// 			},
	// 		},
	// 		LastTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 		NextTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 		OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"),
	// 		ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 		Resources: []*armappcomplianceautomation.ResourceMetadata{
	// 			{
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 				ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
	// 				ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 			},
	// 			{
	// 				AccountID: to.Ptr("000000000000"),
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
	// 				ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
	// 				ResourceType: to.Ptr("iam.user"),
	// 		}},
	// 		Status: to.Ptr(armappcomplianceautomation.ReportStatusActive),
	// 		StorageInfo: &armappcomplianceautomation.StorageInfo{
	// 			AccountName: to.Ptr("testStorageAccount"),
	// 			Location: to.Ptr("East US"),
	// 			ResourceGroup: to.Ptr("testResourceGroup"),
	// 			SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		},
	// 		Subscriptions: []*string{
	// 			to.Ptr("00000000-0000-0000-0000-000000000000")},
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			TimeZone: to.Ptr("GMT Standard Time"),
	// 			TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 		},
	// 	}
}
Output:

func (*ReportClient) BeginVerify added in v1.0.0

BeginVerify - Verify the AppComplianceAutomation report health status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - ReportClientBeginVerifyOptions contains the optional parameters for the ReportClient.BeginVerify method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_Verify.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewReportClient().BeginVerify(ctx, "testReport", 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.ReportVerificationResult = armappcomplianceautomation.ReportVerificationResult{
	// 	Reason: to.Ptr(""),
	// 	Result: to.Ptr(armappcomplianceautomation.ResultSucceeded),
	// }
}
Output:

func (*ReportClient) Get

func (client *ReportClient) Get(ctx context.Context, reportName string, options *ReportClientGetOptions) (ReportClientGetResponse, error)

Get - Get the AppComplianceAutomation report and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - ReportClientGetOptions contains the optional parameters for the ReportClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportClient().Get(ctx, "testReport", 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.ReportResource = armappcomplianceautomation.ReportResource{
	// 	Name: to.Ptr("testReportName"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.ReportProperties{
	// 		CertRecords: []*armappcomplianceautomation.CertSyncRecord{
	// 			{
	// 				CertificationStatus: to.Ptr("CertIngestion"),
	// 				Controls: []*armappcomplianceautomation.ControlSyncRecord{
	// 					{
	// 						ControlID: to.Ptr("Operational_Security_10"),
	// 						ControlStatus: to.Ptr("Approved"),
	// 				}},
	// 				IngestionStatus: to.Ptr("EvidenceResubmitted"),
	// 				OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001"),
	// 		}},
	// 		ComplianceStatus: &armappcomplianceautomation.ReportComplianceStatus{
	// 			M365: &armappcomplianceautomation.OverviewStatus{
	// 				FailedCount: to.Ptr[int32](0),
	// 				ManualCount: to.Ptr[int32](0),
	// 				PassedCount: to.Ptr[int32](0),
	// 			},
	// 		},
	// 		Errors: []*string{
	// 			to.Ptr("resource-inaccessible")},
	// 			LastTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 			NextTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 			OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"),
	// 			ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 			Resources: []*armappcomplianceautomation.ResourceMetadata{
	// 				{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 					ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
	// 					ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 				},
	// 				{
	// 					AccountID: to.Ptr("000000000000"),
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
	// 					ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
	// 					ResourceType: to.Ptr("iam.user"),
	// 			}},
	// 			Status: to.Ptr(armappcomplianceautomation.ReportStatusFailed),
	// 			StorageInfo: &armappcomplianceautomation.StorageInfo{
	// 				AccountName: to.Ptr("testStorageAccount"),
	// 				Location: to.Ptr("East US"),
	// 				ResourceGroup: to.Ptr("testResourceGroup"),
	// 				SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			},
	// 			Subscriptions: []*string{
	// 				to.Ptr("00000000-0000-0000-0000-000000000000")},
	// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				TimeZone: to.Ptr("GMT Standard Time"),
	// 				TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
	// 			},
	// 		}
}
Output:

func (*ReportClient) GetScopingQuestions added in v1.0.0

GetScopingQuestions - Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, automation removed. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - ReportClientGetScopingQuestionsOptions contains the optional parameters for the ReportClient.GetScopingQuestions method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_GetScopingQuestions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportClient().GetScopingQuestions(ctx, "testReportName", 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.ScopingQuestions = armappcomplianceautomation.ScopingQuestions{
	// 	Questions: []*armappcomplianceautomation.ScopingQuestion{
	// 		{
	// 			InputType: to.Ptr(armappcomplianceautomation.InputTypeBoolean),
	// 			OptionIDs: []*string{
	// 			},
	// 			QuestionID: to.Ptr("DHP_G07_customerDataProcess"),
	// 			Rules: []*armappcomplianceautomation.Rule{
	// 				to.Ptr(armappcomplianceautomation.RuleRequired)},
	// 				ShowSubQuestionsValue: to.Ptr("true"),
	// 			},
	// 			{
	// 				InputType: to.Ptr(armappcomplianceautomation.InputTypeText),
	// 				OptionIDs: []*string{
	// 				},
	// 				QuestionID: to.Ptr("DHP_G04_graphPermissionData"),
	// 				Rules: []*armappcomplianceautomation.Rule{
	// 					to.Ptr(armappcomplianceautomation.RuleRequired),
	// 					to.Ptr(armappcomplianceautomation.RuleCharLength)},
	// 					SuperiorQuestionID: to.Ptr("DHP_G07_customerDataProcess"),
	// 				},
	// 				{
	// 					InputType: to.Ptr(armappcomplianceautomation.InputTypeBoolean),
	// 					OptionIDs: []*string{
	// 					},
	// 					QuestionID: to.Ptr("DHP_G06_customerDataStorage"),
	// 					Rules: []*armappcomplianceautomation.Rule{
	// 						to.Ptr(armappcomplianceautomation.RuleRequired)},
	// 						ShowSubQuestionsValue: to.Ptr("true"),
	// 					},
	// 					{
	// 						InputType: to.Ptr(armappcomplianceautomation.InputTypeText),
	// 						OptionIDs: []*string{
	// 						},
	// 						QuestionID: to.Ptr("DHP_G05_graphPermissionInfo"),
	// 						Rules: []*armappcomplianceautomation.Rule{
	// 							to.Ptr(armappcomplianceautomation.RuleRequired),
	// 							to.Ptr(armappcomplianceautomation.RuleCharLength),
	// 							to.Ptr(armappcomplianceautomation.RulePreventNonEnglishChar)},
	// 							SuperiorQuestionID: to.Ptr("DHP_G06_customerDataStorage"),
	// 						},
	// 						{
	// 							InputType: to.Ptr(armappcomplianceautomation.InputTypeMultiSelectDropdown),
	// 							OptionIDs: []*string{
	// 								to.Ptr("Croatia"),
	// 								to.Ptr("Cuba"),
	// 								to.Ptr("Curaçao"),
	// 								to.Ptr("Cyprus"),
	// 								to.Ptr("Czechia"),
	// 								to.Ptr("Côte d'Ivoire"),
	// 								to.Ptr("Denmark"),
	// 								to.Ptr("Djibouti"),
	// 								to.Ptr("Dominica"),
	// 								to.Ptr("Dominican Republic (the)"),
	// 								to.Ptr("Ecuador"),
	// 								to.Ptr("Egypt")},
	// 								QuestionID: to.Ptr("DHP_G08_storageLocation"),
	// 								Rules: []*armappcomplianceautomation.Rule{
	// 									to.Ptr(armappcomplianceautomation.RuleRequired)},
	// 									SuperiorQuestionID: to.Ptr("DHP_G06_customerDataStorage"),
	// 								},
	// 								{
	// 									InputType: to.Ptr(armappcomplianceautomation.InputType("SingleSelectEnum")),
	// 									OptionIDs: []*string{
	// 									},
	// 									QuestionID: to.Ptr("LEG03_complianceDataTermination"),
	// 									Rules: []*armappcomplianceautomation.Rule{
	// 										to.Ptr(armappcomplianceautomation.RuleRequired)},
	// 										SuperiorQuestionID: to.Ptr("DHP_G06_customerDataStorage"),
	// 								}},
	// 							}
}
Output:

func (*ReportClient) NestedResourceCheckNameAvailability added in v1.0.0

NestedResourceCheckNameAvailability - Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • body - NameAvailabilityRequest object.
  • options - ReportClientNestedResourceCheckNameAvailabilityOptions contains the optional parameters for the ReportClient.NestedResourceCheckNameAvailability method.
Example (ReportEvidenceCheckNameAvailability)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Evidence_Check_Name_Availability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportClient().NestedResourceCheckNameAvailability(ctx, "reportABC", armappcomplianceautomation.CheckNameAvailabilityRequest{}, 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.CheckNameAvailabilityResponse = armappcomplianceautomation.CheckNameAvailabilityResponse{
	// 	Message: to.Ptr("An evidence named 'evidenceABC' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armappcomplianceautomation.CheckNameAvailabilityReasonAlreadyExists),
	// }
}
Output:

Example (ReportSnapshotCheckNameAvailability)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Snapshot_Check_Name_Availability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportClient().NestedResourceCheckNameAvailability(ctx, "reportABC", armappcomplianceautomation.CheckNameAvailabilityRequest{}, 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.CheckNameAvailabilityResponse = armappcomplianceautomation.CheckNameAvailabilityResponse{
	// 	Message: to.Ptr("An snapshot named 'snapshotABC' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armappcomplianceautomation.CheckNameAvailabilityReasonAlreadyExists),
	// }
}
Output:

Example (ReportWebhookCheckNameAvailability)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_NestedResourceCheckNameAvailability_Report_Webhook_Check_Name_Availability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportClient().NestedResourceCheckNameAvailability(ctx, "reportABC", armappcomplianceautomation.CheckNameAvailabilityRequest{}, 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.CheckNameAvailabilityResponse = armappcomplianceautomation.CheckNameAvailabilityResponse{
	// 	Message: to.Ptr("An webhook named 'webhookABC' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armappcomplianceautomation.CheckNameAvailabilityReasonAlreadyExists),
	// }
}
Output:

func (*ReportClient) NewListPager added in v1.0.0

NewListPager - Get the AppComplianceAutomation report list for the tenant.

Generated from API version 2024-06-27

  • options - ReportClientListOptions contains the optional parameters for the ReportClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Report_List.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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewReportClient().NewListPager(&armappcomplianceautomation.ReportClientListOptions{SkipToken: to.Ptr("1"),
		Top:                   to.Ptr[int32](100),
		Select:                nil,
		Filter:                nil,
		Orderby:               nil,
		OfferGUID:             to.Ptr("00000000-0000-0000-0000-000000000000"),
		ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	})
	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.ReportResourceListResult = armappcomplianceautomation.ReportResourceListResult{
		// 	Value: []*armappcomplianceautomation.ReportResource{
		// 		{
		// 			Name: to.Ptr("testReportName"),
		// 			Type: to.Ptr("Microsfot.AppComplianceAutomation/reports"),
		// 			ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName"),
		// 			SystemData: &armappcomplianceautomation.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 			},
		// 			Properties: &armappcomplianceautomation.ReportProperties{
		// 				CertRecords: []*armappcomplianceautomation.CertSyncRecord{
		// 					{
		// 						CertificationStatus: to.Ptr("CertIngestion"),
		// 						Controls: []*armappcomplianceautomation.ControlSyncRecord{
		// 							{
		// 								ControlID: to.Ptr("Operational_Security_10"),
		// 								ControlStatus: to.Ptr("Approved"),
		// 						}},
		// 						IngestionStatus: to.Ptr("EvidenceResubmitted"),
		// 						OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001"),
		// 				}},
		// 				ComplianceStatus: &armappcomplianceautomation.ReportComplianceStatus{
		// 					M365: &armappcomplianceautomation.OverviewStatus{
		// 						FailedCount: to.Ptr[int32](0),
		// 						ManualCount: to.Ptr[int32](0),
		// 						NotApplicableCount: to.Ptr[int32](0),
		// 						PassedCount: to.Ptr[int32](0),
		// 						PendingCount: to.Ptr[int32](0),
		// 					},
		// 				},
		// 				Errors: []*string{
		// 				},
		// 				LastTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
		// 				NextTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
		// 				OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"),
		// 				ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
		// 				Resources: []*armappcomplianceautomation.ResourceMetadata{
		// 					{
		// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
		// 						ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
		// 						ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
		// 					},
		// 					{
		// 						AccountID: to.Ptr("000000000000"),
		// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
		// 						ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
		// 						ResourceType: to.Ptr("iam.user"),
		// 				}},
		// 				Status: to.Ptr(armappcomplianceautomation.ReportStatusActive),
		// 				StorageInfo: &armappcomplianceautomation.StorageInfo{
		// 					AccountName: to.Ptr("testStorageAccount"),
		// 					Location: to.Ptr("East US"),
		// 					ResourceGroup: to.Ptr("testResourceGroup"),
		// 					SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				},
		// 				Subscriptions: []*string{
		// 					to.Ptr("00000000-0000-0000-0000-000000000000")},
		// 					TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					TimeZone: to.Ptr("GMT Standard Time"),
		// 					TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-02T05:00:00.000Z"); return t}()),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type ReportClientBeginCreateOrUpdateOptions

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

ReportClientBeginCreateOrUpdateOptions contains the optional parameters for the ReportClient.BeginCreateOrUpdate method.

type ReportClientBeginDeleteOptions

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

ReportClientBeginDeleteOptions contains the optional parameters for the ReportClient.BeginDelete method.

type ReportClientBeginFixOptions added in v1.0.0

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

ReportClientBeginFixOptions contains the optional parameters for the ReportClient.BeginFix method.

type ReportClientBeginSyncCertRecordOptions added in v1.0.0

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

ReportClientBeginSyncCertRecordOptions contains the optional parameters for the ReportClient.BeginSyncCertRecord method.

type ReportClientBeginUpdateOptions

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

ReportClientBeginUpdateOptions contains the optional parameters for the ReportClient.BeginUpdate method.

type ReportClientBeginVerifyOptions added in v1.0.0

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

ReportClientBeginVerifyOptions contains the optional parameters for the ReportClient.BeginVerify method.

type ReportClientCreateOrUpdateResponse

type ReportClientCreateOrUpdateResponse struct {
	// A class represent an AppComplianceAutomation report resource.
	ReportResource
}

ReportClientCreateOrUpdateResponse contains the response from method ReportClient.BeginCreateOrUpdate.

type ReportClientDeleteResponse

type ReportClientDeleteResponse struct {
}

ReportClientDeleteResponse contains the response from method ReportClient.BeginDelete.

type ReportClientFixResponse added in v1.0.0

type ReportClientFixResponse struct {
	// Report fix result.
	ReportFixResult
}

ReportClientFixResponse contains the response from method ReportClient.BeginFix.

type ReportClientGetOptions

type ReportClientGetOptions struct {
}

ReportClientGetOptions contains the optional parameters for the ReportClient.Get method.

type ReportClientGetResponse

type ReportClientGetResponse struct {
	// A class represent an AppComplianceAutomation report resource.
	ReportResource
}

ReportClientGetResponse contains the response from method ReportClient.Get.

type ReportClientGetScopingQuestionsOptions added in v1.0.0

type ReportClientGetScopingQuestionsOptions struct {
}

ReportClientGetScopingQuestionsOptions contains the optional parameters for the ReportClient.GetScopingQuestions method.

type ReportClientGetScopingQuestionsResponse added in v1.0.0

type ReportClientGetScopingQuestionsResponse struct {
	// Scoping question list.
	ScopingQuestions
}

ReportClientGetScopingQuestionsResponse contains the response from method ReportClient.GetScopingQuestions.

type ReportClientListOptions added in v1.0.0

type ReportClientListOptions struct {
	// The filter to apply on the operation.
	Filter *string

	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// OData order by query option.
	Orderby *string

	// The tenant id of the report creator.
	ReportCreatorTenantID *string

	// OData Select statement. Limits the properties on each entry to just those requested, e.g. ?$select=reportName,id.
	Select *string

	// Skip over when retrieving results.
	SkipToken *string

	// Number of elements to return when retrieving results.
	Top *int32
}

ReportClientListOptions contains the optional parameters for the ReportClient.NewListPager method.

type ReportClientListResponse added in v1.0.0

type ReportClientListResponse struct {
	// The response of a ReportResource list operation.
	ReportResourceListResult
}

ReportClientListResponse contains the response from method ReportClient.NewListPager.

type ReportClientNestedResourceCheckNameAvailabilityOptions added in v1.0.0

type ReportClientNestedResourceCheckNameAvailabilityOptions struct {
}

ReportClientNestedResourceCheckNameAvailabilityOptions contains the optional parameters for the ReportClient.NestedResourceCheckNameAvailability method.

type ReportClientNestedResourceCheckNameAvailabilityResponse added in v1.0.0

type ReportClientNestedResourceCheckNameAvailabilityResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

ReportClientNestedResourceCheckNameAvailabilityResponse contains the response from method ReportClient.NestedResourceCheckNameAvailability.

type ReportClientSyncCertRecordResponse added in v1.0.0

type ReportClientSyncCertRecordResponse struct {
	// Synchronize certification record response.
	SyncCertRecordResponse
}

ReportClientSyncCertRecordResponse contains the response from method ReportClient.BeginSyncCertRecord.

type ReportClientUpdateResponse

type ReportClientUpdateResponse struct {
	// A class represent an AppComplianceAutomation report resource.
	ReportResource
}

ReportClientUpdateResponse contains the response from method ReportClient.BeginUpdate.

type ReportClientVerifyResponse added in v1.0.0

type ReportClientVerifyResponse struct {
	// Report health status verification result.
	ReportVerificationResult
}

ReportClientVerifyResponse contains the response from method ReportClient.BeginVerify.

type ReportComplianceStatus

type ReportComplianceStatus struct {
	// READ-ONLY; The Microsoft 365 certification name.
	M365 *OverviewStatus
}

ReportComplianceStatus - A list which includes all the compliance result for one report.

func (ReportComplianceStatus) MarshalJSON

func (r ReportComplianceStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportComplianceStatus.

func (*ReportComplianceStatus) UnmarshalJSON

func (r *ReportComplianceStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportComplianceStatus.

type ReportFixResult added in v1.0.0

type ReportFixResult struct {
	// READ-ONLY; If the report fix action failed, to indicate the detailed failed reason.
	Reason *string

	// READ-ONLY; Indicates whether the fix action is Succeeded or Failed.
	Result *Result
}

ReportFixResult - Report fix result.

func (ReportFixResult) MarshalJSON added in v1.0.0

func (r ReportFixResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportFixResult.

func (*ReportFixResult) UnmarshalJSON added in v1.0.0

func (r *ReportFixResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportFixResult.

type ReportPatchProperties added in v1.0.0

type ReportPatchProperties struct {
	// A list of comma-separated offerGuids indicates a series of offerGuids that map to the report. For example, "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"
	// and
	// "00000000-0000-0000-0000-000000000003".
	OfferGUID *string

	// List of resource data.
	Resources []*ResourceMetadata

	// The information of 'bring your own storage' binding to the report
	StorageInfo *StorageInfo

	// Report collection trigger time's time zone, the available list can be obtained by executing "Get-TimeZone -ListAvailable"
	// in PowerShell. An example of valid timezone id is "Pacific Standard Time".
	TimeZone *string

	// Report collection trigger time.
	TriggerTime *time.Time

	// READ-ONLY; List of synchronized certification records.
	CertRecords []*CertSyncRecord

	// READ-ONLY; Report compliance status.
	ComplianceStatus *ReportComplianceStatus

	// READ-ONLY; List of report error codes.
	Errors []*string

	// READ-ONLY; Report last collection trigger time.
	LastTriggerTime *time.Time

	// READ-ONLY; Report next collection trigger time.
	NextTriggerTime *time.Time

	// READ-ONLY; Azure lifecycle management
	ProvisioningState *ProvisioningState

	// READ-ONLY; Report status.
	Status *ReportStatus

	// READ-ONLY; List of subscription Ids.
	Subscriptions []*string

	// READ-ONLY; Report's tenant id.
	TenantID *string
}

ReportPatchProperties - Patch Report's properties.

func (ReportPatchProperties) MarshalJSON added in v1.0.0

func (r ReportPatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportPatchProperties.

func (*ReportPatchProperties) UnmarshalJSON added in v1.0.0

func (r *ReportPatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportPatchProperties.

type ReportProperties

type ReportProperties struct {
	// REQUIRED; List of resource data.
	Resources []*ResourceMetadata

	// REQUIRED; Report collection trigger time's time zone, the available list can be obtained by executing "Get-TimeZone -ListAvailable"
	// in PowerShell. An example of valid timezone id is "Pacific Standard Time".
	TimeZone *string

	// REQUIRED; Report collection trigger time.
	TriggerTime *time.Time

	// A list of comma-separated offerGuids indicates a series of offerGuids that map to the report. For example, "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"
	// and
	// "00000000-0000-0000-0000-000000000003".
	OfferGUID *string

	// The information of 'bring your own storage' binding to the report
	StorageInfo *StorageInfo

	// READ-ONLY; List of synchronized certification records.
	CertRecords []*CertSyncRecord

	// READ-ONLY; Report compliance status.
	ComplianceStatus *ReportComplianceStatus

	// READ-ONLY; List of report error codes.
	Errors []*string

	// READ-ONLY; Report last collection trigger time.
	LastTriggerTime *time.Time

	// READ-ONLY; Report next collection trigger time.
	NextTriggerTime *time.Time

	// READ-ONLY; Azure lifecycle management
	ProvisioningState *ProvisioningState

	// READ-ONLY; Report status.
	Status *ReportStatus

	// READ-ONLY; List of subscription Ids.
	Subscriptions []*string

	// READ-ONLY; Report's tenant id.
	TenantID *string
}

ReportProperties - Create Report's properties.

func (ReportProperties) MarshalJSON

func (r ReportProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportProperties.

func (*ReportProperties) UnmarshalJSON

func (r *ReportProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportProperties.

type ReportResource

type ReportResource struct {
	// REQUIRED; Report property.
	Properties *ReportProperties

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

ReportResource - A class represent an AppComplianceAutomation report resource.

func (ReportResource) MarshalJSON

func (r ReportResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportResource.

func (*ReportResource) UnmarshalJSON

func (r *ReportResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportResource.

type ReportResourceListResult added in v1.0.0

type ReportResourceListResult struct {
	// REQUIRED; The ReportResource items on this page
	Value []*ReportResource

	// The link to the next page of items
	NextLink *string
}

ReportResourceListResult - The response of a ReportResource list operation.

func (ReportResourceListResult) MarshalJSON added in v1.0.0

func (r ReportResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportResourceListResult.

func (*ReportResourceListResult) UnmarshalJSON added in v1.0.0

func (r *ReportResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportResourceListResult.

type ReportResourcePatch

type ReportResourcePatch struct {
	// Report property.
	Properties *ReportPatchProperties
}

ReportResourcePatch - A class represent a AppComplianceAutomation report resource update properties.

func (ReportResourcePatch) MarshalJSON

func (r ReportResourcePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportResourcePatch.

func (*ReportResourcePatch) UnmarshalJSON

func (r *ReportResourcePatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportResourcePatch.

type ReportStatus

type ReportStatus string

ReportStatus - Report status.

const (
	// ReportStatusActive - The report is active.
	ReportStatusActive ReportStatus = "Active"
	// ReportStatusDisabled - The report is disabled.
	ReportStatusDisabled ReportStatus = "Disabled"
	// ReportStatusFailed - The report is failed.
	ReportStatusFailed ReportStatus = "Failed"
	// ReportStatusReviewing - The report is under reviewing.
	ReportStatusReviewing ReportStatus = "Reviewing"
)

func PossibleReportStatusValues

func PossibleReportStatusValues() []ReportStatus

PossibleReportStatusValues returns the possible values for the ReportStatus const type.

type ReportVerificationResult added in v1.0.0

type ReportVerificationResult struct {
	// READ-ONLY; If the report verification action failed, to indicate the detailed failed reason.
	Reason *string

	// READ-ONLY; Indicates whether the report verification action is Succeeded or Failed.
	Result *Result
}

ReportVerificationResult - Report health status verification result.

func (ReportVerificationResult) MarshalJSON added in v1.0.0

func (r ReportVerificationResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportVerificationResult.

func (*ReportVerificationResult) UnmarshalJSON added in v1.0.0

func (r *ReportVerificationResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportVerificationResult.

type ResourceItem

type ResourceItem struct {
	// READ-ONLY; The resource group name of this resource.
	ResourceGroup *string

	// READ-ONLY; The resource Id - e.g. "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1".
	ResourceID *string

	// READ-ONLY; The resource type of this resource. e.g. "Microsoft.SignalRService/SignalR"
	ResourceType *string

	// READ-ONLY; The subscription Id of this resource.
	SubscriptionID *string
}

ResourceItem - Resource Id.

func (ResourceItem) MarshalJSON

func (r ResourceItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceItem.

func (*ResourceItem) UnmarshalJSON

func (r *ResourceItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceItem.

type ResourceMetadata

type ResourceMetadata struct {
	// REQUIRED; Resource Id - e.g. "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1".
	ResourceID *string

	// Account Id. For example - the AWS account id.
	AccountID *string

	// Resource kind.
	ResourceKind *string

	// Resource Origin.
	ResourceOrigin *ResourceOrigin

	// Resource type. e.g. "Microsoft.Compute/virtualMachines"
	ResourceType *string
}

ResourceMetadata - Single resource Id's metadata.

func (ResourceMetadata) MarshalJSON

func (r ResourceMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceMetadata.

func (*ResourceMetadata) UnmarshalJSON

func (r *ResourceMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetadata.

type ResourceOrigin added in v1.0.0

type ResourceOrigin string

ResourceOrigin - Resource Origin.

const (
	// ResourceOriginAWS - The resource is from AWS.
	ResourceOriginAWS ResourceOrigin = "AWS"
	// ResourceOriginAzure - The resource is from Azure.
	ResourceOriginAzure ResourceOrigin = "Azure"
	// ResourceOriginGCP - The resource is from GCP.
	ResourceOriginGCP ResourceOrigin = "GCP"
)

func PossibleResourceOriginValues added in v1.0.0

func PossibleResourceOriginValues() []ResourceOrigin

PossibleResourceOriginValues returns the possible values for the ResourceOrigin const type.

type ResourceStatus

type ResourceStatus string

ResourceStatus - Indicates the resource status.

const (
	// ResourceStatusHealthy - The resource is healthy.
	ResourceStatusHealthy ResourceStatus = "Healthy"
	// ResourceStatusUnhealthy - The resource is unhealthy.
	ResourceStatusUnhealthy ResourceStatus = "Unhealthy"
)

func PossibleResourceStatusValues

func PossibleResourceStatusValues() []ResourceStatus

PossibleResourceStatusValues returns the possible values for the ResourceStatus const type.

type Responsibility added in v1.0.0

type Responsibility struct {
	// List of evidence file url.
	EvidenceFiles []*string

	// The count of all failed resources.
	FailedResourceCount *int32

	// The count of all resources.
	TotalResourceCount *int32

	// READ-ONLY; The evidence upload guidance description.
	Guidance *string

	// READ-ONLY; The justification given by the user to clarify the reason.
	Justification *string

	// READ-ONLY; List of recommendation.
	RecommendationList []*Recommendation

	// READ-ONLY; List of resource.
	ResourceList []*ResponsibilityResource

	// READ-ONLY; The description of the customer responsibility.
	ResponsibilityDescription *string

	// READ-ONLY; The supported cloud environment of this customer responsibility.
	ResponsibilityEnvironment *ResponsibilityEnvironment

	// READ-ONLY; The id of the customer responsibility.
	ResponsibilityID *string

	// READ-ONLY; The severity level of this customer responsibility.
	ResponsibilitySeverity *ResponsibilitySeverity

	// READ-ONLY; The status of this customer responsibility.
	ResponsibilityStatus *ResponsibilityStatus

	// READ-ONLY; The title of the customer responsibility.
	ResponsibilityTitle *string

	// READ-ONLY; The type of customer responsibility.
	ResponsibilityType *ResponsibilityType
}

Responsibility - A class represent the customer responsibility.

func (Responsibility) MarshalJSON added in v1.0.0

func (r Responsibility) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Responsibility.

func (*Responsibility) UnmarshalJSON added in v1.0.0

func (r *Responsibility) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Responsibility.

type ResponsibilityEnvironment added in v1.0.0

type ResponsibilityEnvironment string

ResponsibilityEnvironment - Indicates the customer responsibility supported cloud environment.

const (
	// ResponsibilityEnvironmentAWS - The responsibility is supported in AWS.
	ResponsibilityEnvironmentAWS ResponsibilityEnvironment = "AWS"
	// ResponsibilityEnvironmentAzure - The responsibility is supported in Azure.
	ResponsibilityEnvironmentAzure ResponsibilityEnvironment = "Azure"
	// ResponsibilityEnvironmentGCP - The responsibility is supported in GCP.
	ResponsibilityEnvironmentGCP ResponsibilityEnvironment = "GCP"
	// ResponsibilityEnvironmentGeneral - The responsibility is general requirement of all environment.
	ResponsibilityEnvironmentGeneral ResponsibilityEnvironment = "General"
)

func PossibleResponsibilityEnvironmentValues added in v1.0.0

func PossibleResponsibilityEnvironmentValues() []ResponsibilityEnvironment

PossibleResponsibilityEnvironmentValues returns the possible values for the ResponsibilityEnvironment const type.

type ResponsibilityResource added in v1.0.0

type ResponsibilityResource struct {
	// List of recommendation id.
	RecommendationIDs []*string

	// READ-ONLY; Account Id. For example - AWS account Id.
	AccountID *string

	// READ-ONLY; The Id of the resource.
	ResourceID *string

	// READ-ONLY; Resource origin.
	ResourceOrigin *ResourceOrigin

	// READ-ONLY; Resource status.
	ResourceStatus *ResourceStatus

	// READ-ONLY; The status change date for the resource.
	ResourceStatusChangeDate *time.Time

	// READ-ONLY; The type of the resource. e.g. "Microsoft.SignalRService/SignalR"
	ResourceType *string
}

ResponsibilityResource - A class represent the resource.

func (ResponsibilityResource) MarshalJSON added in v1.0.0

func (r ResponsibilityResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResponsibilityResource.

func (*ResponsibilityResource) UnmarshalJSON added in v1.0.0

func (r *ResponsibilityResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResponsibilityResource.

type ResponsibilitySeverity added in v1.0.0

type ResponsibilitySeverity string

ResponsibilitySeverity - Indicates the customer responsibility severity.

const (
	// ResponsibilitySeverityHigh - The responsibility is high severity.
	ResponsibilitySeverityHigh ResponsibilitySeverity = "High"
	// ResponsibilitySeverityLow - The responsibility is low severity.
	ResponsibilitySeverityLow ResponsibilitySeverity = "Low"
	// ResponsibilitySeverityMedium - The responsibility is medium severity.
	ResponsibilitySeverityMedium ResponsibilitySeverity = "Medium"
)

func PossibleResponsibilitySeverityValues added in v1.0.0

func PossibleResponsibilitySeverityValues() []ResponsibilitySeverity

PossibleResponsibilitySeverityValues returns the possible values for the ResponsibilitySeverity const type.

type ResponsibilityStatus added in v1.0.0

type ResponsibilityStatus string

ResponsibilityStatus - Indicates the customer responsibility status.

const (
	// ResponsibilityStatusFailed - The responsibility is failed.
	ResponsibilityStatusFailed ResponsibilityStatus = "Failed"
	// ResponsibilityStatusNotApplicable - The responsibility is not applicable.
	ResponsibilityStatusNotApplicable ResponsibilityStatus = "NotApplicable"
	// ResponsibilityStatusPassed - The responsibility is passed.
	ResponsibilityStatusPassed ResponsibilityStatus = "Passed"
	// ResponsibilityStatusPendingApproval - The responsibility is pending for approval.
	ResponsibilityStatusPendingApproval ResponsibilityStatus = "PendingApproval"
)

func PossibleResponsibilityStatusValues added in v1.0.0

func PossibleResponsibilityStatusValues() []ResponsibilityStatus

PossibleResponsibilityStatusValues returns the possible values for the ResponsibilityStatus const type.

type ResponsibilityType added in v1.0.0

type ResponsibilityType string

ResponsibilityType - Indicates the customer responsibility type.

const (
	// ResponsibilityTypeAutomated - The responsibility is automated.
	ResponsibilityTypeAutomated ResponsibilityType = "Automated"
	// ResponsibilityTypeManual - The responsibility is manual.
	ResponsibilityTypeManual ResponsibilityType = "Manual"
	// ResponsibilityTypeScopedManual - The responsibility is scoped manual.
	ResponsibilityTypeScopedManual ResponsibilityType = "ScopedManual"
)

func PossibleResponsibilityTypeValues added in v1.0.0

func PossibleResponsibilityTypeValues() []ResponsibilityType

PossibleResponsibilityTypeValues returns the possible values for the ResponsibilityType const type.

type Result added in v1.0.0

type Result string

Result - Indicates whether the fix action is Succeeded or Failed.

const (
	// ResultFailed - The result is failed.
	ResultFailed Result = "Failed"
	// ResultSucceeded - The result is succeeded.
	ResultSucceeded Result = "Succeeded"
)

func PossibleResultValues added in v1.0.0

func PossibleResultValues() []Result

PossibleResultValues returns the possible values for the Result const type.

type Rule added in v1.0.0

type Rule string

Rule - Scoping question rule.

const (
	// RuleAzureApplication - The question answer should be an AzureApplication.
	RuleAzureApplication Rule = "AzureApplication"
	// RuleCharLength - The question answer length is limited.
	RuleCharLength Rule = "CharLength"
	// RuleCreditCardPCI - The question answer should be a CreditCardPCI.
	RuleCreditCardPCI Rule = "CreditCardPCI"
	// RuleDomains - The question answer should be domains.
	RuleDomains Rule = "Domains"
	// RuleDynamicDropdown - The question answer should be dynamic dropdown.
	RuleDynamicDropdown Rule = "DynamicDropdown"
	// RulePreventNonEnglishChar - The question answer should prevent non-english char.
	RulePreventNonEnglishChar Rule = "PreventNonEnglishChar"
	// RulePublicSOX - The question answer should be a PublicSOX.
	RulePublicSOX Rule = "PublicSOX"
	// RulePublisherVerification - The question answer should be publisher verification.
	RulePublisherVerification Rule = "PublisherVerification"
	// RuleRequired - The question is required to answer.
	RuleRequired Rule = "Required"
	// RuleURL - The question answer should be an Url.
	RuleURL Rule = "Url"
	// RuleUSPrivacyShield - The question answer should be a UsPrivacyShield.
	RuleUSPrivacyShield Rule = "USPrivacyShield"
	// RuleUrls - The question answer should be Urls.
	RuleUrls Rule = "Urls"
	// RuleValidEmail - The question answer should be a valid email.
	RuleValidEmail Rule = "ValidEmail"
	// RuleValidGUID - The question answer should be a valid guid.
	RuleValidGUID Rule = "ValidGuid"
)

func PossibleRuleValues added in v1.0.0

func PossibleRuleValues() []Rule

PossibleRuleValues returns the possible values for the Rule const type.

type ScopingAnswer added in v1.0.0

type ScopingAnswer struct {
	// REQUIRED; Question answer value list.
	Answers []*string

	// REQUIRED; Question id.
	QuestionID *string
}

ScopingAnswer - Scoping answer.

func (ScopingAnswer) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ScopingAnswer.

func (*ScopingAnswer) UnmarshalJSON added in v1.0.0

func (s *ScopingAnswer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopingAnswer.

type ScopingConfigurationClient added in v1.0.0

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

ScopingConfigurationClient contains the methods for the ScopingConfiguration group. Don't use this type directly, use NewScopingConfigurationClient() instead.

func NewScopingConfigurationClient added in v1.0.0

func NewScopingConfigurationClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopingConfigurationClient, error)

NewScopingConfigurationClient creates a new instance of ScopingConfigurationClient with the specified values.

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

func (*ScopingConfigurationClient) CreateOrUpdate added in v1.0.0

CreateOrUpdate - Get the AppComplianceAutomation scoping configuration of the specific report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • scopingConfigurationName - The scoping configuration of the specific report.
  • properties - Parameters for the create or update operation, this is a singleton resource, so please make sure you're using 'default' as the name.
  • options - ScopingConfigurationClientCreateOrUpdateOptions contains the optional parameters for the ScopingConfigurationClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewScopingConfigurationClient().CreateOrUpdate(ctx, "testReportName", "default", armappcomplianceautomation.ScopingConfigurationResource{}, 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.ScopingConfigurationResource = armappcomplianceautomation.ScopingConfigurationResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppComplianceAutomation/reports/scopingConfigurations"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/scopingConfigurations/default"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.ScopingConfigurationProperties{
	// 		Answers: []*armappcomplianceautomation.ScopingAnswer{
	// 			{
	// 				Answers: []*string{
	// 					to.Ptr("Azure")},
	// 					QuestionID: to.Ptr("GEN20_hostingEnvironment"),
	// 				},
	// 				{
	// 					Answers: []*string{
	// 					},
	// 					QuestionID: to.Ptr("DHP_G07_customerDataProcess"),
	// 				},
	// 				{
	// 					Answers: []*string{
	// 					},
	// 					QuestionID: to.Ptr("Tier2InitSub_serviceCommunicate"),
	// 			}},
	// 		},
	// 	}
}
Output:

func (*ScopingConfigurationClient) Delete added in v1.0.0

Delete - Clean the AppComplianceAutomation scoping configuration of the specific report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • scopingConfigurationName - The scoping configuration of the specific report.
  • options - ScopingConfigurationClientDeleteOptions contains the optional parameters for the ScopingConfigurationClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewScopingConfigurationClient().Delete(ctx, "testReportName", "default", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ScopingConfigurationClient) Get added in v1.0.0

Get - Get the AppComplianceAutomation scoping configuration of the specific report. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • scopingConfigurationName - The scoping configuration of the specific report.
  • options - ScopingConfigurationClientGetOptions contains the optional parameters for the ScopingConfigurationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewScopingConfigurationClient().Get(ctx, "testReportName", "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.ScopingConfigurationResource = armappcomplianceautomation.ScopingConfigurationResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppComplianceAutomation/reports/scopingConfigurations"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/scopingConfigurations/default"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.ScopingConfigurationProperties{
	// 		Answers: []*armappcomplianceautomation.ScopingAnswer{
	// 			{
	// 				Answers: []*string{
	// 					to.Ptr("Azure")},
	// 					QuestionID: to.Ptr("GEN20_hostingEnvironment"),
	// 				},
	// 				{
	// 					Answers: []*string{
	// 					},
	// 					QuestionID: to.Ptr("DHP_G07_customerDataProcess"),
	// 				},
	// 				{
	// 					Answers: []*string{
	// 					},
	// 					QuestionID: to.Ptr("Tier2InitSub_serviceCommunicate"),
	// 			}},
	// 		},
	// 	}
}
Output:

func (*ScopingConfigurationClient) NewListPager added in v1.0.0

NewListPager - Returns a list format of the singleton scopingConfiguration for a specified report.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - ScopingConfigurationClientListOptions contains the optional parameters for the ScopingConfigurationClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/ScopingConfiguration_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewScopingConfigurationClient().NewListPager("testReportName", 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.ScopingConfigurationResourceListResult = armappcomplianceautomation.ScopingConfigurationResourceListResult{
		// 	Value: []*armappcomplianceautomation.ScopingConfigurationResource{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.AppComplianceAutomation/reports/scopingConfigurations"),
		// 			ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/scopingConfigurations/default"),
		// 			SystemData: &armappcomplianceautomation.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 			},
		// 			Properties: &armappcomplianceautomation.ScopingConfigurationProperties{
		// 				Answers: []*armappcomplianceautomation.ScopingAnswer{
		// 					{
		// 						Answers: []*string{
		// 							to.Ptr("Azure")},
		// 							QuestionID: to.Ptr("GEN20_hostingEnvironment"),
		// 						},
		// 						{
		// 							Answers: []*string{
		// 							},
		// 							QuestionID: to.Ptr("DHP_G07_customerDataProcess"),
		// 						},
		// 						{
		// 							Answers: []*string{
		// 							},
		// 							QuestionID: to.Ptr("Tier2InitSub_serviceCommunicate"),
		// 					}},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type ScopingConfigurationClientCreateOrUpdateOptions added in v1.0.0

type ScopingConfigurationClientCreateOrUpdateOptions struct {
}

ScopingConfigurationClientCreateOrUpdateOptions contains the optional parameters for the ScopingConfigurationClient.CreateOrUpdate method.

type ScopingConfigurationClientCreateOrUpdateResponse added in v1.0.0

type ScopingConfigurationClientCreateOrUpdateResponse struct {
	// A class represent an AppComplianceAutomation scoping configuration resource.
	ScopingConfigurationResource
}

ScopingConfigurationClientCreateOrUpdateResponse contains the response from method ScopingConfigurationClient.CreateOrUpdate.

type ScopingConfigurationClientDeleteOptions added in v1.0.0

type ScopingConfigurationClientDeleteOptions struct {
}

ScopingConfigurationClientDeleteOptions contains the optional parameters for the ScopingConfigurationClient.Delete method.

type ScopingConfigurationClientDeleteResponse added in v1.0.0

type ScopingConfigurationClientDeleteResponse struct {
}

ScopingConfigurationClientDeleteResponse contains the response from method ScopingConfigurationClient.Delete.

type ScopingConfigurationClientGetOptions added in v1.0.0

type ScopingConfigurationClientGetOptions struct {
}

ScopingConfigurationClientGetOptions contains the optional parameters for the ScopingConfigurationClient.Get method.

type ScopingConfigurationClientGetResponse added in v1.0.0

type ScopingConfigurationClientGetResponse struct {
	// A class represent an AppComplianceAutomation scoping configuration resource.
	ScopingConfigurationResource
}

ScopingConfigurationClientGetResponse contains the response from method ScopingConfigurationClient.Get.

type ScopingConfigurationClientListOptions added in v1.0.0

type ScopingConfigurationClientListOptions struct {
}

ScopingConfigurationClientListOptions contains the optional parameters for the ScopingConfigurationClient.NewListPager method.

type ScopingConfigurationClientListResponse added in v1.0.0

type ScopingConfigurationClientListResponse struct {
	// The response of a ScopingConfigurationResource list operation.
	ScopingConfigurationResourceListResult
}

ScopingConfigurationClientListResponse contains the response from method ScopingConfigurationClient.NewListPager.

type ScopingConfigurationProperties added in v1.0.0

type ScopingConfigurationProperties struct {
	// List of scoping question answers.
	Answers []*ScopingAnswer

	// READ-ONLY; Azure lifecycle management
	ProvisioningState *ProvisioningState
}

ScopingConfigurationProperties - ScopingConfiguration's properties.

func (ScopingConfigurationProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ScopingConfigurationProperties.

func (*ScopingConfigurationProperties) UnmarshalJSON added in v1.0.0

func (s *ScopingConfigurationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopingConfigurationProperties.

type ScopingConfigurationResource added in v1.0.0

type ScopingConfigurationResource struct {
	// REQUIRED; ScopingConfiguration property.
	Properties *ScopingConfigurationProperties

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

ScopingConfigurationResource - A class represent an AppComplianceAutomation scoping configuration resource.

func (ScopingConfigurationResource) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ScopingConfigurationResource.

func (*ScopingConfigurationResource) UnmarshalJSON added in v1.0.0

func (s *ScopingConfigurationResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopingConfigurationResource.

type ScopingConfigurationResourceListResult added in v1.0.0

type ScopingConfigurationResourceListResult struct {
	// REQUIRED; The ScopingConfigurationResource items on this page
	Value []*ScopingConfigurationResource

	// The link to the next page of items
	NextLink *string
}

ScopingConfigurationResourceListResult - The response of a ScopingConfigurationResource list operation.

func (ScopingConfigurationResourceListResult) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ScopingConfigurationResourceListResult.

func (*ScopingConfigurationResourceListResult) UnmarshalJSON added in v1.0.0

func (s *ScopingConfigurationResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopingConfigurationResourceListResult.

type ScopingQuestion added in v1.0.0

type ScopingQuestion struct {
	// READ-ONLY; Input type of the question answer.
	InputType *InputType

	// READ-ONLY; Option id list.
	OptionIDs []*string

	// READ-ONLY; Question id.
	QuestionID *string

	// READ-ONLY; The rule of the question.
	Rules []*Rule

	// READ-ONLY; The answer value to show the sub questions.
	ShowSubQuestionsValue *string

	// READ-ONLY; Superior question id.
	SuperiorQuestionID *string
}

ScopingQuestion - The definition of a scoping question.

func (ScopingQuestion) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ScopingQuestion.

func (*ScopingQuestion) UnmarshalJSON added in v1.0.0

func (s *ScopingQuestion) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopingQuestion.

type ScopingQuestions added in v1.0.0

type ScopingQuestions struct {
	// List of scoping questions.
	Questions []*ScopingQuestion
}

ScopingQuestions - Scoping question list.

func (ScopingQuestions) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ScopingQuestions.

func (*ScopingQuestions) UnmarshalJSON added in v1.0.0

func (s *ScopingQuestions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScopingQuestions.

type SendAllEvents added in v1.0.0

type SendAllEvents string

SendAllEvents - whether to send notification under any event.

const (
	// SendAllEventsFalse - No need to send notification under any event.
	SendAllEventsFalse SendAllEvents = "false"
	// SendAllEventsTrue - Need send notification under any event.
	SendAllEventsTrue SendAllEvents = "true"
)

func PossibleSendAllEventsValues added in v1.0.0

func PossibleSendAllEventsValues() []SendAllEvents

PossibleSendAllEventsValues returns the possible values for the SendAllEvents const type.

type SnapshotClient

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

SnapshotClient contains the methods for the Snapshot group. Don't use this type directly, use NewSnapshotClient() instead.

func NewSnapshotClient

func NewSnapshotClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotClient, error)

NewSnapshotClient creates a new instance of SnapshotClient with the specified values.

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

func (*SnapshotClient) BeginDownload

BeginDownload - Download compliance needs from snapshot, like: Compliance Report, Resource List. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • snapshotName - Snapshot Name.
  • body - Parameters for the query operation
  • options - SnapshotClientBeginDownloadOptions contains the optional parameters for the SnapshotClient.BeginDownload method.
Example (SnapshotDownloadComplianceDetailedPdfReport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Detailed_Pdf_Report.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSnapshotClient().BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{}, 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.DownloadResponse = armappcomplianceautomation.DownloadResponse{
	// 	ComplianceDetailedPDFReport: &armappcomplianceautomation.DownloadResponseComplianceDetailedPDFReport{
	// 		SasURI: to.Ptr("this is a uri"),
	// 	},
	// }
}
Output:

Example (SnapshotDownloadCompliancePdfReport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Pdf_Report.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSnapshotClient().BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{}, 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.DownloadResponse = armappcomplianceautomation.DownloadResponse{
	// 	CompliancePDFReport: &armappcomplianceautomation.DownloadResponseCompliancePDFReport{
	// 		SasURI: to.Ptr("this is uri of report"),
	// 	},
	// }
}
Output:

Example (SnapshotDownloadComplianceReport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Compliance_Report.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSnapshotClient().BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{}, 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.DownloadResponse = armappcomplianceautomation.DownloadResponse{
	// 	ComplianceReport: []*armappcomplianceautomation.ComplianceReportItem{
	// 		{
	// 			CategoryName: to.Ptr("Data Security & Privacy"),
	// 			ControlFamilyName: to.Ptr("Incident Response"),
	// 			ControlID: to.Ptr("Operational_Security_75"),
	// 			ControlName: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
	// 			ControlStatus: to.Ptr(armappcomplianceautomation.ControlStatusPassed),
	// 			ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 			ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
	// 			ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusHealthy),
	// 			ResourceStatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T16:17:20.150Z"); return t}()),
	// 			ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 			ResponsibilityDescription: to.Ptr("Restrict access to the Kubernetes Service Management API by granting API access only to IP addresses in specific ranges. It is recommended to limit access to authorized IP ranges to ensure that only applications from allowed networks can access the cluster."),
	// 			ResponsibilityTitle: to.Ptr("Authorized IP ranges should be defined on Kubernetes Services"),
	// 	}},
	// }
}
Output:

Example (SnapshotDownloadResourceList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_Download_Snapshot_Download_Resource_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSnapshotClient().BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{}, 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.DownloadResponse = armappcomplianceautomation.DownloadResponse{
	// 	ResourceList: []*armappcomplianceautomation.ResourceItem{
	// 		{
	// 			ResourceGroup: to.Ptr("myResourceGroup"),
	// 			ResourceID: to.Ptr("mySignalRService"),
	// 			ResourceType: to.Ptr("SignalR"),
	// 			SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	}},
	// }
}
Output:

func (*SnapshotClient) Get

func (client *SnapshotClient) Get(ctx context.Context, reportName string, snapshotName string, options *SnapshotClientGetOptions) (SnapshotClientGetResponse, error)

Get - Get the AppComplianceAutomation snapshot and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • snapshotName - Snapshot Name.
  • options - SnapshotClientGetOptions contains the optional parameters for the SnapshotClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSnapshotClient().Get(ctx, "testReportName", "testSnapshot", 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.SnapshotResource = armappcomplianceautomation.SnapshotResource{
	// 	Name: to.Ptr("testSnapshot"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/snapshots"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/snapshots/testSnapshot"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.SnapshotProperties{
	// 		ComplianceResults: []*armappcomplianceautomation.ComplianceResult{
	// 			{
	// 				Categories: []*armappcomplianceautomation.Category{
	// 					{
	// 						CategoryName: to.Ptr("Operational Security"),
	// 						CategoryStatus: to.Ptr(armappcomplianceautomation.CategoryStatusPassed),
	// 						ControlFamilies: []*armappcomplianceautomation.ControlFamily{
	// 							{
	// 								ControlFamilyName: to.Ptr("Incident Response"),
	// 								ControlFamilyStatus: to.Ptr(armappcomplianceautomation.ControlFamilyStatusPassed),
	// 								Controls: []*armappcomplianceautomation.Control{
	// 									{
	// 										ControlDescription: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
	// 										ControlDescriptionHyperLink: to.Ptr("https://aka.ms/acat/m365cert/operational/control73"),
	// 										ControlFullName: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
	// 										ControlID: to.Ptr("Operational_Security_75"),
	// 										ControlName: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
	// 										ControlStatus: to.Ptr(armappcomplianceautomation.ControlStatusPassed),
	// 										Responsibilities: []*armappcomplianceautomation.Responsibility{
	// 											{
	// 												EvidenceFiles: []*string{
	// 													to.Ptr("https://management.azure.com/providers/Microsoft.AppComplianceAutomation/reports/reportABC/fileName?api-version=2024-06-27")},
	// 													FailedResourceCount: to.Ptr[int32](0),
	// 													Guidance: to.Ptr("Please upload the screen capture file to ACAT service."),
	// 													Justification: to.Ptr("Here is my evidence files"),
	// 													RecommendationList: []*armappcomplianceautomation.Recommendation{
	// 														{
	// 															RecommendationID: to.Ptr("failed_reason_1"),
	// 															RecommendationShortName: to.Ptr("Invalid TLS Config"),
	// 															RecommendationSolutions: []*armappcomplianceautomation.RecommendationSolution{
	// 																{
	// 																	IsRecommendSolution: to.Ptr(armappcomplianceautomation.IsRecommendSolutionTrue),
	// 																	RecommendationSolutionContent: to.Ptr("Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities"),
	// 																	RecommendationSolutionIndex: to.Ptr("1"),
	// 															}},
	// 														},
	// 														{
	// 															RecommendationID: to.Ptr("failed_reason_2"),
	// 															RecommendationShortName: to.Ptr("Invalid AWS TLS Config"),
	// 															RecommendationSolutions: []*armappcomplianceautomation.RecommendationSolution{
	// 																{
	// 																	IsRecommendSolution: to.Ptr(armappcomplianceautomation.IsRecommendSolutionTrue),
	// 																	RecommendationSolutionContent: to.Ptr("Open the AWS related service, and set its TLS version to 1.2 or higher version."),
	// 																	RecommendationSolutionIndex: to.Ptr("1"),
	// 															}},
	// 													}},
	// 													ResourceList: []*armappcomplianceautomation.ResponsibilityResource{
	// 														{
	// 															RecommendationIDs: []*string{
	// 																to.Ptr("failed_reason_1")},
	// 																ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 																ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
	// 																ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusUnhealthy),
	// 																ResourceStatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T16:17:20.150Z"); return t}()),
	// 																ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 															},
	// 															{
	// 																AccountID: to.Ptr("000000000000"),
	// 																RecommendationIDs: []*string{
	// 																	to.Ptr("failed_reason_2")},
	// 																	ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
	// 																	ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
	// 																	ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusUnhealthy),
	// 																	ResourceStatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T16:17:20.150Z"); return t}()),
	// 																	ResourceType: to.Ptr("iam.user"),
	// 															}},
	// 															ResponsibilityDescription: to.Ptr("Restrict access to the Kubernetes Service Management API by granting API access only to IP addresses in specific ranges. It is recommended to limit access to authorized IP ranges to ensure that only applications from allowed networks can access the cluster."),
	// 															ResponsibilityEnvironment: to.Ptr(armappcomplianceautomation.ResponsibilityEnvironmentAzure),
	// 															ResponsibilityID: to.Ptr("authorized_ip_ranges_should_be_defined_on_kubernetes_services"),
	// 															ResponsibilitySeverity: to.Ptr(armappcomplianceautomation.ResponsibilitySeverityHigh),
	// 															ResponsibilityStatus: to.Ptr(armappcomplianceautomation.ResponsibilityStatusPassed),
	// 															ResponsibilityTitle: to.Ptr("Authorized IP ranges should be defined on Kubernetes Services"),
	// 															ResponsibilityType: to.Ptr(armappcomplianceautomation.ResponsibilityTypeAutomated),
	// 															TotalResourceCount: to.Ptr[int32](1),
	// 													}},
	// 											}},
	// 									}},
	// 							}},
	// 							ComplianceName: to.Ptr("M365"),
	// 					}},
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:33:59.160Z"); return t}()),
	// 					ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 					ReportProperties: &armappcomplianceautomation.ReportProperties{
	// 						CertRecords: []*armappcomplianceautomation.CertSyncRecord{
	// 							{
	// 								CertificationStatus: to.Ptr("CertIngestion"),
	// 								Controls: []*armappcomplianceautomation.ControlSyncRecord{
	// 									{
	// 										ControlID: to.Ptr("Operational_Security_10"),
	// 										ControlStatus: to.Ptr("Approved"),
	// 								}},
	// 								IngestionStatus: to.Ptr("EvidenceResubmitted"),
	// 								OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001"),
	// 						}},
	// 						ComplianceStatus: &armappcomplianceautomation.ReportComplianceStatus{
	// 							M365: &armappcomplianceautomation.OverviewStatus{
	// 								FailedCount: to.Ptr[int32](0),
	// 								ManualCount: to.Ptr[int32](0),
	// 								PassedCount: to.Ptr[int32](0),
	// 							},
	// 						},
	// 						Errors: []*string{
	// 						},
	// 						LastTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:00:00.000Z"); return t}()),
	// 						NextTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:00:00.000Z"); return t}()),
	// 						OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"),
	// 						ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 						Resources: []*armappcomplianceautomation.ResourceMetadata{
	// 							{
	// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
	// 								ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
	// 								ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
	// 							},
	// 							{
	// 								AccountID: to.Ptr("000000000000"),
	// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
	// 								ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
	// 								ResourceType: to.Ptr("iam.user"),
	// 						}},
	// 						Status: to.Ptr(armappcomplianceautomation.ReportStatusActive),
	// 						StorageInfo: &armappcomplianceautomation.StorageInfo{
	// 							AccountName: to.Ptr("testStorageAccount"),
	// 							Location: to.Ptr("East US"),
	// 							ResourceGroup: to.Ptr("testResourceGroup"),
	// 							SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						},
	// 						Subscriptions: []*string{
	// 							to.Ptr("00000000-0000-0000-0000-000000000000")},
	// 							TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 							TimeZone: to.Ptr("GMT Standard Time"),
	// 							TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:00:00.000Z"); return t}()),
	// 						},
	// 						ReportSystemData: &armappcomplianceautomation.SystemData{
	// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 							CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 							CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 							LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 							LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 						},
	// 						SnapshotName: to.Ptr("testSnapshot"),
	// 					},
	// 				}
}
Output:

func (*SnapshotClient) NewListPager added in v1.0.0

func (client *SnapshotClient) NewListPager(reportName string, options *SnapshotClientListOptions) *runtime.Pager[SnapshotClientListResponse]

NewListPager - Get the AppComplianceAutomation snapshot list.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - SnapshotClientListOptions contains the optional parameters for the SnapshotClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Snapshot_List.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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSnapshotClient().NewListPager("testReportName", &armappcomplianceautomation.SnapshotClientListOptions{SkipToken: to.Ptr("1"),
		Top:                   to.Ptr[int32](100),
		Select:                nil,
		Filter:                nil,
		Orderby:               nil,
		OfferGUID:             to.Ptr("00000000-0000-0000-0000-000000000001"),
		ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	})
	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.SnapshotResourceListResult = armappcomplianceautomation.SnapshotResourceListResult{
		// 	Value: []*armappcomplianceautomation.SnapshotResource{
		// 		{
		// 			Name: to.Ptr("testSnapshot"),
		// 			Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/snapshots"),
		// 			ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/snapshots/testSnapshot"),
		// 			SystemData: &armappcomplianceautomation.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 			},
		// 			Properties: &armappcomplianceautomation.SnapshotProperties{
		// 				ComplianceResults: []*armappcomplianceautomation.ComplianceResult{
		// 					{
		// 						Categories: []*armappcomplianceautomation.Category{
		// 							{
		// 								CategoryName: to.Ptr("Operational Security"),
		// 								CategoryStatus: to.Ptr(armappcomplianceautomation.CategoryStatusPassed),
		// 								ControlFamilies: []*armappcomplianceautomation.ControlFamily{
		// 									{
		// 										ControlFamilyName: to.Ptr("Incident Response"),
		// 										ControlFamilyStatus: to.Ptr(armappcomplianceautomation.ControlFamilyStatusPassed),
		// 										Controls: []*armappcomplianceautomation.Control{
		// 											{
		// 												ControlDescription: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
		// 												ControlDescriptionHyperLink: to.Ptr("https://aka.ms/acat/m365cert/operational/control73"),
		// 												ControlFullName: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
		// 												ControlID: to.Ptr("Operational_Security_75"),
		// 												ControlName: to.Ptr("Provide demonstrable evidence that all member of the incident response team have completed annual training or a table top exercise"),
		// 												ControlStatus: to.Ptr(armappcomplianceautomation.ControlStatusPassed),
		// 												Responsibilities: []*armappcomplianceautomation.Responsibility{
		// 													{
		// 														EvidenceFiles: []*string{
		// 															to.Ptr("https://management.azure.com/providers/Microsoft.AppComplianceAutomation/reports/reportABC/fileName?api-version=2024-06-27")},
		// 															FailedResourceCount: to.Ptr[int32](0),
		// 															Guidance: to.Ptr("Please upload the screen capture file to ACAT service."),
		// 															Justification: to.Ptr("Here is my evidence files"),
		// 															RecommendationList: []*armappcomplianceautomation.Recommendation{
		// 																{
		// 																	RecommendationID: to.Ptr("failed_reason_1"),
		// 																	RecommendationShortName: to.Ptr("Invalid TLS Config"),
		// 																	RecommendationSolutions: []*armappcomplianceautomation.RecommendationSolution{
		// 																		{
		// 																			IsRecommendSolution: to.Ptr(armappcomplianceautomation.IsRecommendSolutionTrue),
		// 																			RecommendationSolutionContent: to.Ptr("Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities"),
		// 																			RecommendationSolutionIndex: to.Ptr("1"),
		// 																	}},
		// 																},
		// 																{
		// 																	RecommendationID: to.Ptr("failed_reason_2"),
		// 																	RecommendationShortName: to.Ptr("Invalid AWS TLS Config"),
		// 																	RecommendationSolutions: []*armappcomplianceautomation.RecommendationSolution{
		// 																		{
		// 																			IsRecommendSolution: to.Ptr(armappcomplianceautomation.IsRecommendSolutionTrue),
		// 																			RecommendationSolutionContent: to.Ptr("Open the AWS related service, and set its TLS version to 1.2 or higher version."),
		// 																			RecommendationSolutionIndex: to.Ptr("1"),
		// 																	}},
		// 															}},
		// 															ResourceList: []*armappcomplianceautomation.ResponsibilityResource{
		// 																{
		// 																	RecommendationIDs: []*string{
		// 																		to.Ptr("failed_reason_1")},
		// 																		ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
		// 																		ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
		// 																		ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusUnhealthy),
		// 																		ResourceStatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T16:17:20.150Z"); return t}()),
		// 																		ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
		// 																	},
		// 																	{
		// 																		AccountID: to.Ptr("000000000000"),
		// 																		RecommendationIDs: []*string{
		// 																			to.Ptr("failed_reason_2")},
		// 																			ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
		// 																			ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
		// 																			ResourceStatus: to.Ptr(armappcomplianceautomation.ResourceStatusUnhealthy),
		// 																			ResourceStatusChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-12T16:17:20.150Z"); return t}()),
		// 																			ResourceType: to.Ptr("iam.user"),
		// 																	}},
		// 																	ResponsibilityDescription: to.Ptr("Restrict access to the Kubernetes Service Management API by granting API access only to IP addresses in specific ranges. It is recommended to limit access to authorized IP ranges to ensure that only applications from allowed networks can access the cluster."),
		// 																	ResponsibilityEnvironment: to.Ptr(armappcomplianceautomation.ResponsibilityEnvironmentAzure),
		// 																	ResponsibilityID: to.Ptr("authorized_ip_ranges_should_be_defined_on_kubernetes_services"),
		// 																	ResponsibilitySeverity: to.Ptr(armappcomplianceautomation.ResponsibilitySeverityHigh),
		// 																	ResponsibilityStatus: to.Ptr(armappcomplianceautomation.ResponsibilityStatusPassed),
		// 																	ResponsibilityTitle: to.Ptr("Authorized IP ranges should be defined on Kubernetes Services"),
		// 																	ResponsibilityType: to.Ptr(armappcomplianceautomation.ResponsibilityTypeAutomated),
		// 																	TotalResourceCount: to.Ptr[int32](1),
		// 															}},
		// 													}},
		// 											}},
		// 									}},
		// 									ComplianceName: to.Ptr("M365"),
		// 							}},
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:33:59.160Z"); return t}()),
		// 							ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
		// 							ReportProperties: &armappcomplianceautomation.ReportProperties{
		// 								CertRecords: []*armappcomplianceautomation.CertSyncRecord{
		// 									{
		// 										CertificationStatus: to.Ptr("CertIngestion"),
		// 										Controls: []*armappcomplianceautomation.ControlSyncRecord{
		// 											{
		// 												ControlID: to.Ptr("Operational_Security_10"),
		// 												ControlStatus: to.Ptr("Approved"),
		// 										}},
		// 										IngestionStatus: to.Ptr("EvidenceResubmitted"),
		// 										OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001"),
		// 								}},
		// 								ComplianceStatus: &armappcomplianceautomation.ReportComplianceStatus{
		// 									M365: &armappcomplianceautomation.OverviewStatus{
		// 										FailedCount: to.Ptr[int32](0),
		// 										ManualCount: to.Ptr[int32](0),
		// 										NotApplicableCount: to.Ptr[int32](0),
		// 										PassedCount: to.Ptr[int32](0),
		// 										PendingCount: to.Ptr[int32](0),
		// 									},
		// 								},
		// 								Errors: []*string{
		// 								},
		// 								LastTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:00:00.000Z"); return t}()),
		// 								NextTriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:00:00.000Z"); return t}()),
		// 								OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"),
		// 								ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
		// 								Resources: []*armappcomplianceautomation.ResourceMetadata{
		// 									{
		// 										ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService"),
		// 										ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAzure),
		// 										ResourceType: to.Ptr("Microsoft.SignalRService/SignalR"),
		// 									},
		// 									{
		// 										AccountID: to.Ptr("000000000000"),
		// 										ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acat-aws/providers/microsoft.security/securityconnectors/acatawsconnector/securityentitydata/aws-iam-user-testuser"),
		// 										ResourceOrigin: to.Ptr(armappcomplianceautomation.ResourceOriginAWS),
		// 										ResourceType: to.Ptr("iam.user"),
		// 								}},
		// 								Status: to.Ptr(armappcomplianceautomation.ReportStatusActive),
		// 								StorageInfo: &armappcomplianceautomation.StorageInfo{
		// 									AccountName: to.Ptr("testStorageAccount"),
		// 									Location: to.Ptr("East US"),
		// 									ResourceGroup: to.Ptr("testResourceGroup"),
		// 									SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 								},
		// 								Subscriptions: []*string{
		// 									to.Ptr("00000000-0000-0000-0000-000000000000")},
		// 									TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 									TimeZone: to.Ptr("GMT Standard Time"),
		// 									TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T15:00:00.000Z"); return t}()),
		// 								},
		// 								ReportSystemData: &armappcomplianceautomation.SystemData{
		// 									CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 									CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 									CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 									LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 									LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 									LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 								},
		// 								SnapshotName: to.Ptr("testSnapshot"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

type SnapshotClientBeginDownloadOptions

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

SnapshotClientBeginDownloadOptions contains the optional parameters for the SnapshotClient.BeginDownload method.

type SnapshotClientDownloadResponse

type SnapshotClientDownloadResponse struct {
	// Object that includes all the possible response for the download operation.
	DownloadResponse
}

SnapshotClientDownloadResponse contains the response from method SnapshotClient.BeginDownload.

type SnapshotClientGetOptions

type SnapshotClientGetOptions struct {
}

SnapshotClientGetOptions contains the optional parameters for the SnapshotClient.Get method.

type SnapshotClientGetResponse

type SnapshotClientGetResponse struct {
	// A class represent a AppComplianceAutomation snapshot resource.
	SnapshotResource
}

SnapshotClientGetResponse contains the response from method SnapshotClient.Get.

type SnapshotClientListOptions added in v1.0.0

type SnapshotClientListOptions struct {
	// The filter to apply on the operation.
	Filter *string

	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// OData order by query option.
	Orderby *string

	// The tenant id of the report creator.
	ReportCreatorTenantID *string

	// OData Select statement. Limits the properties on each entry to just those requested, e.g. ?$select=reportName,id.
	Select *string

	// Skip over when retrieving results.
	SkipToken *string

	// Number of elements to return when retrieving results.
	Top *int32
}

SnapshotClientListOptions contains the optional parameters for the SnapshotClient.NewListPager method.

type SnapshotClientListResponse added in v1.0.0

type SnapshotClientListResponse struct {
	// The response of a SnapshotResource list operation.
	SnapshotResourceListResult
}

SnapshotClientListResponse contains the response from method SnapshotClient.NewListPager.

type SnapshotDownloadRequest

type SnapshotDownloadRequest struct {
	// REQUIRED; Indicates the download type.
	DownloadType *DownloadType

	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// Tenant id.
	ReportCreatorTenantID *string
}

SnapshotDownloadRequest - Snapshot's download request.

func (SnapshotDownloadRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SnapshotDownloadRequest.

func (*SnapshotDownloadRequest) UnmarshalJSON

func (s *SnapshotDownloadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotDownloadRequest.

type SnapshotProperties

type SnapshotProperties struct {
	// READ-ONLY; List of compliance results.
	ComplianceResults []*ComplianceResult

	// READ-ONLY; The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// READ-ONLY; Azure lifecycle management
	ProvisioningState *ProvisioningState

	// READ-ONLY; The report essential info.
	ReportProperties *ReportProperties

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

	// READ-ONLY; Snapshot name.
	SnapshotName *string
}

SnapshotProperties - Snapshot's properties.

func (SnapshotProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SnapshotProperties.

func (*SnapshotProperties) UnmarshalJSON

func (s *SnapshotProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties.

type SnapshotResource

type SnapshotResource struct {
	// Snapshot's property.
	Properties *SnapshotProperties

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

SnapshotResource - A class represent a AppComplianceAutomation snapshot resource.

func (SnapshotResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SnapshotResource.

func (*SnapshotResource) UnmarshalJSON

func (s *SnapshotResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotResource.

type SnapshotResourceListResult added in v1.0.0

type SnapshotResourceListResult struct {
	// REQUIRED; The SnapshotResource items on this page
	Value []*SnapshotResource

	// The link to the next page of items
	NextLink *string
}

SnapshotResourceListResult - The response of a SnapshotResource list operation.

func (SnapshotResourceListResult) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type SnapshotResourceListResult.

func (*SnapshotResourceListResult) UnmarshalJSON added in v1.0.0

func (s *SnapshotResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotResourceListResult.

type StatusItem added in v1.0.0

type StatusItem struct {
	// Status name - e.g. "Active", "Failed".
	StatusName *string

	// Status value. e.g. "100", or "100%".
	StatusValue *string
}

StatusItem - Single status.

func (StatusItem) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type StatusItem.

func (*StatusItem) UnmarshalJSON added in v1.0.0

func (s *StatusItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StatusItem.

type StorageInfo added in v1.0.0

type StorageInfo struct {
	// 'bring your own storage' account name
	AccountName *string

	// The region of 'bring your own storage' account
	Location *string

	// The resourceGroup which 'bring your own storage' account belongs to
	ResourceGroup *string

	// The subscription id which 'bring your own storage' account belongs to
	SubscriptionID *string
}

StorageInfo - The information of 'bring your own storage' account binding to the report

func (StorageInfo) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type StorageInfo.

func (*StorageInfo) UnmarshalJSON added in v1.0.0

func (s *StorageInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageInfo.

type SyncCertRecordRequest added in v1.0.0

type SyncCertRecordRequest struct {
	// REQUIRED; certification record to be synchronized.
	CertRecord *CertSyncRecord
}

SyncCertRecordRequest - Synchronize certification record request.

func (SyncCertRecordRequest) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type SyncCertRecordRequest.

func (*SyncCertRecordRequest) UnmarshalJSON added in v1.0.0

func (s *SyncCertRecordRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncCertRecordRequest.

type SyncCertRecordResponse added in v1.0.0

type SyncCertRecordResponse struct {
	// certification record synchronized.
	CertRecord *CertSyncRecord
}

SyncCertRecordResponse - Synchronize certification record response.

func (SyncCertRecordResponse) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type SyncCertRecordResponse.

func (*SyncCertRecordResponse) UnmarshalJSON added in v1.0.0

func (s *SyncCertRecordResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncCertRecordResponse.

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 TriggerEvaluationProperty added in v1.0.0

type TriggerEvaluationProperty struct {
	// List of quick assessments
	QuickAssessments []*QuickAssessment

	// List of resource ids to be evaluated
	ResourceIDs []*string

	// READ-ONLY; The time when the evaluation is end.
	EvaluationEndTime *time.Time

	// READ-ONLY; The time when the evaluation is triggered.
	TriggerTime *time.Time
}

TriggerEvaluationProperty - Trigger evaluation response.

func (TriggerEvaluationProperty) MarshalJSON added in v1.0.0

func (t TriggerEvaluationProperty) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TriggerEvaluationProperty.

func (*TriggerEvaluationProperty) UnmarshalJSON added in v1.0.0

func (t *TriggerEvaluationProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TriggerEvaluationProperty.

type TriggerEvaluationRequest added in v1.0.0

type TriggerEvaluationRequest struct {
	// REQUIRED; List of resource ids to be evaluated
	ResourceIDs []*string
}

TriggerEvaluationRequest - Trigger evaluation request.

func (TriggerEvaluationRequest) MarshalJSON added in v1.0.0

func (t TriggerEvaluationRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TriggerEvaluationRequest.

func (*TriggerEvaluationRequest) UnmarshalJSON added in v1.0.0

func (t *TriggerEvaluationRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TriggerEvaluationRequest.

type TriggerEvaluationResponse added in v1.0.0

type TriggerEvaluationResponse struct {
	// trigger evaluation property.
	Properties *TriggerEvaluationProperty
}

TriggerEvaluationResponse - Trigger evaluation response.

func (TriggerEvaluationResponse) MarshalJSON added in v1.0.0

func (t TriggerEvaluationResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TriggerEvaluationResponse.

func (*TriggerEvaluationResponse) UnmarshalJSON added in v1.0.0

func (t *TriggerEvaluationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TriggerEvaluationResponse.

type UpdateWebhookKey added in v1.0.0

type UpdateWebhookKey string

UpdateWebhookKey - whether to update webhookKey.

const (
	// UpdateWebhookKeyFalse - No need to update the webhook key.
	UpdateWebhookKeyFalse UpdateWebhookKey = "false"
	// UpdateWebhookKeyTrue - Need update the webhook key.
	UpdateWebhookKeyTrue UpdateWebhookKey = "true"
)

func PossibleUpdateWebhookKeyValues added in v1.0.0

func PossibleUpdateWebhookKeyValues() []UpdateWebhookKey

PossibleUpdateWebhookKeyValues returns the possible values for the UpdateWebhookKey const type.

type WebhookClient added in v1.0.0

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

WebhookClient contains the methods for the Webhook group. Don't use this type directly, use NewWebhookClient() instead.

func NewWebhookClient added in v1.0.0

func NewWebhookClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*WebhookClient, error)

NewWebhookClient creates a new instance of WebhookClient with the specified values.

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

func (*WebhookClient) CreateOrUpdate added in v1.0.0

func (client *WebhookClient) CreateOrUpdate(ctx context.Context, reportName string, webhookName string, properties WebhookResource, options *WebhookClientCreateOrUpdateOptions) (WebhookClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • webhookName - Webhook Name.
  • properties - Parameters for the create or update operation
  • options - WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWebhookClient().CreateOrUpdate(ctx, "testReportName", "testWebhookName", armappcomplianceautomation.WebhookResource{}, 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.WebhookResource = armappcomplianceautomation.WebhookResource{
	// 	Name: to.Ptr("testWebhookName"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/webhooks"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/webhooks/testWebhookName"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.WebhookProperties{
	// 		ContentType: to.Ptr(armappcomplianceautomation.ContentTypeApplicationJSON),
	// 		DeliveryStatus: to.Ptr(armappcomplianceautomation.DeliveryStatusSucceeded),
	// 		EnableSSLVerification: to.Ptr(armappcomplianceautomation.EnableSSLVerificationTrue),
	// 		Events: []*armappcomplianceautomation.NotificationEvent{
	// 			to.Ptr(armappcomplianceautomation.NotificationEventGenerateSnapshotFailed)},
	// 			PayloadURL: to.Ptr("https://example.com"),
	// 			ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 			SendAllEvents: to.Ptr(armappcomplianceautomation.SendAllEventsFalse),
	// 			Status: to.Ptr(armappcomplianceautomation.WebhookStatusEnabled),
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			WebhookID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			WebhookKeyEnabled: to.Ptr(armappcomplianceautomation.WebhookKeyEnabledTrue),
	// 		},
	// 	}
}
Output:

func (*WebhookClient) Delete added in v1.0.0

func (client *WebhookClient) Delete(ctx context.Context, reportName string, webhookName string, options *WebhookClientDeleteOptions) (WebhookClientDeleteResponse, error)

Delete - Delete an AppComplianceAutomation webhook. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • webhookName - Webhook Name.
  • options - WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWebhookClient().Delete(ctx, "testReportName", "testWebhookName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WebhookClient) Get added in v1.0.0

func (client *WebhookClient) Get(ctx context.Context, reportName string, webhookName string, options *WebhookClientGetOptions) (WebhookClientGetResponse, error)

Get - Get the AppComplianceAutomation webhook and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • webhookName - Webhook Name.
  • options - WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWebhookClient().Get(ctx, "testReportName", "testWebhookName", 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.WebhookResource = armappcomplianceautomation.WebhookResource{
	// 	Name: to.Ptr("testWebhookName"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/webhooks"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/webhooks/testWebhookName"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.WebhookProperties{
	// 		ContentType: to.Ptr(armappcomplianceautomation.ContentTypeApplicationJSON),
	// 		DeliveryStatus: to.Ptr(armappcomplianceautomation.DeliveryStatusSucceeded),
	// 		EnableSSLVerification: to.Ptr(armappcomplianceautomation.EnableSSLVerificationTrue),
	// 		Events: []*armappcomplianceautomation.NotificationEvent{
	// 			to.Ptr(armappcomplianceautomation.NotificationEventGenerateSnapshotFailed)},
	// 			PayloadURL: to.Ptr("https://example.com"),
	// 			ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 			SendAllEvents: to.Ptr(armappcomplianceautomation.SendAllEventsFalse),
	// 			Status: to.Ptr(armappcomplianceautomation.WebhookStatusEnabled),
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			WebhookID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			WebhookKeyEnabled: to.Ptr(armappcomplianceautomation.WebhookKeyEnabledTrue),
	// 		},
	// 	}
}
Output:

func (*WebhookClient) NewListPager added in v1.0.0

func (client *WebhookClient) NewListPager(reportName string, options *WebhookClientListOptions) *runtime.Pager[WebhookClientListResponse]

NewListPager - Get the AppComplianceAutomation webhook list.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • options - WebhookClientListOptions contains the optional parameters for the WebhookClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_List.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/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWebhookClient().NewListPager("testReportName", &armappcomplianceautomation.WebhookClientListOptions{SkipToken: to.Ptr("1"),
		Top:                   to.Ptr[int32](100),
		Select:                nil,
		Filter:                nil,
		Orderby:               nil,
		OfferGUID:             nil,
		ReportCreatorTenantID: 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.WebhookResourceListResult = armappcomplianceautomation.WebhookResourceListResult{
		// 	Value: []*armappcomplianceautomation.WebhookResource{
		// 		{
		// 			Name: to.Ptr("testWebhookName"),
		// 			Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/webhooks"),
		// 			ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/snapshots/testWebhookName"),
		// 			SystemData: &armappcomplianceautomation.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
		// 			},
		// 			Properties: &armappcomplianceautomation.WebhookProperties{
		// 				ContentType: to.Ptr(armappcomplianceautomation.ContentTypeApplicationJSON),
		// 				DeliveryStatus: to.Ptr(armappcomplianceautomation.DeliveryStatusSucceeded),
		// 				EnableSSLVerification: to.Ptr(armappcomplianceautomation.EnableSSLVerificationTrue),
		// 				Events: []*armappcomplianceautomation.NotificationEvent{
		// 					to.Ptr(armappcomplianceautomation.NotificationEventGenerateSnapshotFailed)},
		// 					PayloadURL: to.Ptr("https://example.com"),
		// 					ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
		// 					SendAllEvents: to.Ptr(armappcomplianceautomation.SendAllEventsFalse),
		// 					Status: to.Ptr(armappcomplianceautomation.WebhookStatusEnabled),
		// 					TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					WebhookID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					WebhookKeyEnabled: to.Ptr(armappcomplianceautomation.WebhookKeyEnabledFalse),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WebhookClient) Update added in v1.0.0

func (client *WebhookClient) Update(ctx context.Context, reportName string, webhookName string, properties WebhookResourcePatch, options *WebhookClientUpdateOptions) (WebhookClientUpdateResponse, error)

Update - Update an exiting AppComplianceAutomation webhook. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-06-27

  • reportName - Report Name.
  • webhookName - Webhook Name.
  • properties - Parameters for the create or update operation
  • options - WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/stable/2024-06-27/examples/Webhook_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcomplianceautomation.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWebhookClient().Update(ctx, "testReportName", "testWebhookName", armappcomplianceautomation.WebhookResourcePatch{}, 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.WebhookResource = armappcomplianceautomation.WebhookResource{
	// 	Name: to.Ptr("testWebhookName"),
	// 	Type: to.Ptr("Microsfot.AppComplianceAutomation/reports/webhooks"),
	// 	ID: to.Ptr("/provider/Microsfot.AppComplianceAutomation/reports/testReportName/testWebhookName"),
	// 	SystemData: &armappcomplianceautomation.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		CreatedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		CreatedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-14T22:34:55.449Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		LastModifiedByType: to.Ptr(armappcomplianceautomation.CreatedByTypeUser),
	// 	},
	// 	Properties: &armappcomplianceautomation.WebhookProperties{
	// 		ContentType: to.Ptr(armappcomplianceautomation.ContentTypeApplicationJSON),
	// 		DeliveryStatus: to.Ptr(armappcomplianceautomation.DeliveryStatusSucceeded),
	// 		EnableSSLVerification: to.Ptr(armappcomplianceautomation.EnableSSLVerificationTrue),
	// 		Events: []*armappcomplianceautomation.NotificationEvent{
	// 			to.Ptr(armappcomplianceautomation.NotificationEventGenerateSnapshotFailed)},
	// 			PayloadURL: to.Ptr("https://example.com"),
	// 			ProvisioningState: to.Ptr(armappcomplianceautomation.ProvisioningStateSucceeded),
	// 			SendAllEvents: to.Ptr(armappcomplianceautomation.SendAllEventsFalse),
	// 			Status: to.Ptr(armappcomplianceautomation.WebhookStatusEnabled),
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			WebhookID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			WebhookKeyEnabled: to.Ptr(armappcomplianceautomation.WebhookKeyEnabledTrue),
	// 		},
	// 	}
}
Output:

type WebhookClientCreateOrUpdateOptions added in v1.0.0

type WebhookClientCreateOrUpdateOptions struct {
}

WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method.

type WebhookClientCreateOrUpdateResponse added in v1.0.0

type WebhookClientCreateOrUpdateResponse struct {
	// A class represent an AppComplianceAutomation webhook resource.
	WebhookResource
}

WebhookClientCreateOrUpdateResponse contains the response from method WebhookClient.CreateOrUpdate.

type WebhookClientDeleteOptions added in v1.0.0

type WebhookClientDeleteOptions struct {
}

WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method.

type WebhookClientDeleteResponse added in v1.0.0

type WebhookClientDeleteResponse struct {
}

WebhookClientDeleteResponse contains the response from method WebhookClient.Delete.

type WebhookClientGetOptions added in v1.0.0

type WebhookClientGetOptions struct {
}

WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method.

type WebhookClientGetResponse added in v1.0.0

type WebhookClientGetResponse struct {
	// A class represent an AppComplianceAutomation webhook resource.
	WebhookResource
}

WebhookClientGetResponse contains the response from method WebhookClient.Get.

type WebhookClientListOptions added in v1.0.0

type WebhookClientListOptions struct {
	// The filter to apply on the operation.
	Filter *string

	// The offerGuid which mapping to the reports.
	OfferGUID *string

	// OData order by query option.
	Orderby *string

	// The tenant id of the report creator.
	ReportCreatorTenantID *string

	// OData Select statement. Limits the properties on each entry to just those requested, e.g. ?$select=reportName,id.
	Select *string

	// Skip over when retrieving results.
	SkipToken *string

	// Number of elements to return when retrieving results.
	Top *int32
}

WebhookClientListOptions contains the optional parameters for the WebhookClient.NewListPager method.

type WebhookClientListResponse added in v1.0.0

type WebhookClientListResponse struct {
	// The response of a WebhookResource list operation.
	WebhookResourceListResult
}

WebhookClientListResponse contains the response from method WebhookClient.NewListPager.

type WebhookClientUpdateOptions added in v1.0.0

type WebhookClientUpdateOptions struct {
}

WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method.

type WebhookClientUpdateResponse added in v1.0.0

type WebhookClientUpdateResponse struct {
	// A class represent an AppComplianceAutomation webhook resource.
	WebhookResource
}

WebhookClientUpdateResponse contains the response from method WebhookClient.Update.

type WebhookKeyEnabled added in v1.0.0

type WebhookKeyEnabled string

WebhookKeyEnabled - whether webhookKey is enabled.

const (
	// WebhookKeyEnabledFalse - The webhookKey is not enabled.
	WebhookKeyEnabledFalse WebhookKeyEnabled = "false"
	// WebhookKeyEnabledTrue - The webhookKey is enabled.
	WebhookKeyEnabledTrue WebhookKeyEnabled = "true"
)

func PossibleWebhookKeyEnabledValues added in v1.0.0

func PossibleWebhookKeyEnabledValues() []WebhookKeyEnabled

PossibleWebhookKeyEnabledValues returns the possible values for the WebhookKeyEnabled const type.

type WebhookProperties added in v1.0.0

type WebhookProperties struct {
	// content type
	ContentType *ContentType

	// whether to enable ssl verification
	EnableSSLVerification *EnableSSLVerification

	// under which event notification should be sent.
	Events []*NotificationEvent

	// webhook payload url
	PayloadURL *string

	// whether to send notification under any event.
	SendAllEvents *SendAllEvents

	// Webhook status.
	Status *WebhookStatus

	// whether to update webhookKey.
	UpdateWebhookKey *UpdateWebhookKey

	// webhook secret token. If not set, this field value is null; otherwise, please set a string value.
	WebhookKey *string

	// READ-ONLY; webhook deliveryStatus
	DeliveryStatus *DeliveryStatus

	// READ-ONLY; Azure Resource Provisioning State
	ProvisioningState *ProvisioningState

	// READ-ONLY; Tenant id.
	TenantID *string

	// READ-ONLY; Webhook id in database.
	WebhookID *string

	// READ-ONLY; whether webhookKey is enabled.
	WebhookKeyEnabled *WebhookKeyEnabled
}

WebhookProperties - Webhook properties.

func (WebhookProperties) MarshalJSON added in v1.0.0

func (w WebhookProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebhookProperties.

func (*WebhookProperties) UnmarshalJSON added in v1.0.0

func (w *WebhookProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebhookProperties.

type WebhookResource added in v1.0.0

type WebhookResource struct {
	// REQUIRED; Webhook property.
	Properties *WebhookProperties

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

WebhookResource - A class represent an AppComplianceAutomation webhook resource.

func (WebhookResource) MarshalJSON added in v1.0.0

func (w WebhookResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebhookResource.

func (*WebhookResource) UnmarshalJSON added in v1.0.0

func (w *WebhookResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebhookResource.

type WebhookResourceListResult added in v1.0.0

type WebhookResourceListResult struct {
	// REQUIRED; The WebhookResource items on this page
	Value []*WebhookResource

	// The link to the next page of items
	NextLink *string
}

WebhookResourceListResult - The response of a WebhookResource list operation.

func (WebhookResourceListResult) MarshalJSON added in v1.0.0

func (w WebhookResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebhookResourceListResult.

func (*WebhookResourceListResult) UnmarshalJSON added in v1.0.0

func (w *WebhookResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebhookResourceListResult.

type WebhookResourcePatch added in v1.0.0

type WebhookResourcePatch struct {
	// Webhook property.
	Properties *WebhookProperties
}

WebhookResourcePatch - A class represent a AppComplianceAutomation webhook resource update properties.

func (WebhookResourcePatch) MarshalJSON added in v1.0.0

func (w WebhookResourcePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebhookResourcePatch.

func (*WebhookResourcePatch) UnmarshalJSON added in v1.0.0

func (w *WebhookResourcePatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebhookResourcePatch.

type WebhookStatus added in v1.0.0

type WebhookStatus string

WebhookStatus - Webhook status.

const (
	// WebhookStatusDisabled - The webhook is disabled.
	WebhookStatusDisabled WebhookStatus = "Disabled"
	// WebhookStatusEnabled - The webhook is enabled.
	WebhookStatusEnabled WebhookStatus = "Enabled"
)

func PossibleWebhookStatusValues added in v1.0.0

func PossibleWebhookStatusValues() []WebhookStatus

PossibleWebhookStatusValues returns the possible values for the WebhookStatus const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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