Documentation ¶
Index ¶
- type ActionType
- type Assessment
- type AssessmentResource
- type AssessmentSeverity
- type Category
- type CategoryStatus
- type CategoryType
- type ComplianceReportItem
- type ComplianceResult
- type ComplianceState
- type Control
- type ControlFamily
- type ControlFamilyStatus
- type ControlFamilyType
- type ControlStatus
- type ControlType
- type CreatedByType
- type DownloadResponse
- type DownloadResponseComplianceDetailedPDFReport
- type DownloadResponseCompliancePDFReport
- type DownloadType
- type IsPass
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type OverviewStatus
- type ProvisioningState
- type ReportClient
- func (client *ReportClient) BeginCreateOrUpdate(ctx context.Context, reportName string, parameters ReportResource, ...) (*runtime.Poller[ReportClientCreateOrUpdateResponse], error)
- func (client *ReportClient) BeginDelete(ctx context.Context, reportName string, ...) (*runtime.Poller[ReportClientDeleteResponse], error)
- func (client *ReportClient) BeginUpdate(ctx context.Context, reportName string, parameters ReportResourcePatch, ...) (*runtime.Poller[ReportClientUpdateResponse], error)
- func (client *ReportClient) Get(ctx context.Context, reportName string, options *ReportClientGetOptions) (ReportClientGetResponse, error)
- type ReportClientBeginCreateOrUpdateOptions
- type ReportClientBeginDeleteOptions
- type ReportClientBeginUpdateOptions
- type ReportClientCreateOrUpdateResponse
- type ReportClientDeleteResponse
- type ReportClientGetOptions
- type ReportClientGetResponse
- type ReportClientUpdateResponse
- type ReportComplianceStatus
- type ReportProperties
- type ReportResource
- type ReportResourceList
- type ReportResourcePatch
- type ReportStatus
- type ReportsClient
- type ReportsClientListOptions
- type ReportsClientListResponse
- type ResourceItem
- type ResourceMetadata
- type ResourceStatus
- type SnapshotClient
- func (client *SnapshotClient) BeginDownload(ctx context.Context, reportName string, snapshotName string, ...) (*runtime.Poller[SnapshotClientDownloadResponse], error)
- func (client *SnapshotClient) Get(ctx context.Context, reportName string, snapshotName string, ...) (SnapshotClientGetResponse, error)
- type SnapshotClientBeginDownloadOptions
- type SnapshotClientDownloadResponse
- type SnapshotClientGetOptions
- type SnapshotClientGetResponse
- type SnapshotDownloadRequest
- type SnapshotProperties
- type SnapshotResource
- type SnapshotResourceList
- type SnapshotsClient
- type SnapshotsClientListOptions
- type SnapshotsClientListResponse
- type SystemData
Examples ¶
- OperationsClient.NewListPager
- ReportClient.BeginCreateOrUpdate
- ReportClient.BeginDelete
- ReportClient.BeginUpdate
- ReportClient.Get
- ReportsClient.NewListPager
- SnapshotClient.BeginDownload (SnapshotDownloadComplianceDetailedPdfReport)
- SnapshotClient.BeginDownload (SnapshotDownloadCompliancePdfReport)
- SnapshotClient.BeginDownload (SnapshotDownloadComplianceReport)
- SnapshotClient.BeginDownload (SnapshotDownloadResourceList)
- SnapshotClient.Get
- SnapshotsClient.NewListPager
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 Assessment ¶
type Assessment struct { // READ-ONLY; The description of the assessment. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Indicates whether all the resource(s) are compliant. IsPass *IsPass `json:"isPass,omitempty" azure:"ro"` // READ-ONLY; The name of the assessment. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The policy id mapping to this assessment. PolicyID *string `json:"policyId,omitempty" azure:"ro"` // READ-ONLY; The remediation of the assessment. Remediation *string `json:"remediation,omitempty" azure:"ro"` // READ-ONLY; List of resource assessments. ResourceList []*AssessmentResource `json:"resourceList,omitempty" azure:"ro"` // READ-ONLY; The severity level of this assessment. Severity *AssessmentSeverity `json:"severity,omitempty" azure:"ro"` }
Assessment - A class represent the assessment.
func (Assessment) MarshalJSON ¶
func (a Assessment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Assessment.
func (*Assessment) UnmarshalJSON ¶
func (a *Assessment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Assessment.
type AssessmentResource ¶
type AssessmentResource struct { // READ-ONLY; The reason for the N/A resource. Reason *string `json:"reason,omitempty" azure:"ro"` // READ-ONLY; The Id of the resource. ResourceID *string `json:"resourceId,omitempty" azure:"ro"` // READ-ONLY; Resource status. ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty" azure:"ro"` // READ-ONLY; The status change date for the resource. For unavailable date, set it as N/A. StatusChangeDate *string `json:"statusChangeDate,omitempty" azure:"ro"` }
AssessmentResource - A class represent the assessment resource.
func (AssessmentResource) MarshalJSON ¶
func (a AssessmentResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AssessmentResource.
func (*AssessmentResource) UnmarshalJSON ¶
func (a *AssessmentResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AssessmentResource.
type AssessmentSeverity ¶
type AssessmentSeverity string
AssessmentSeverity - Indicates the assessment severity.
const ( AssessmentSeverityHigh AssessmentSeverity = "High" AssessmentSeverityLow AssessmentSeverity = "Low" AssessmentSeverityMedium AssessmentSeverity = "Medium" )
func PossibleAssessmentSeverityValues ¶
func PossibleAssessmentSeverityValues() []AssessmentSeverity
PossibleAssessmentSeverityValues returns the possible values for the AssessmentSeverity const type.
type Category ¶
type Category struct { // READ-ONLY; The name of the compliance category. e.g. "Operational Security" CategoryName *string `json:"categoryName,omitempty" azure:"ro"` // READ-ONLY; Category status. CategoryStatus *CategoryStatus `json:"categoryStatus,omitempty" azure:"ro"` // READ-ONLY; The category type CategoryType *CategoryType `json:"categoryType,omitempty" azure:"ro"` // READ-ONLY; List of control families. ControlFamilies []*ControlFamily `json:"controlFamilies,omitempty" azure:"ro"` }
Category - A class represent the compliance category.
func (Category) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Category.
func (*Category) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Category.
type CategoryStatus ¶
type CategoryStatus string
CategoryStatus - Indicates the category status.
const ( CategoryStatusHealthy CategoryStatus = "Healthy" CategoryStatusUnhealthy CategoryStatus = "Unhealthy" )
func PossibleCategoryStatusValues ¶
func PossibleCategoryStatusValues() []CategoryStatus
PossibleCategoryStatusValues returns the possible values for the CategoryStatus const type.
type CategoryType ¶
type CategoryType string
CategoryType - Indicates the compliance category type.
const ( CategoryTypeFullyAutomated CategoryType = "FullyAutomated" CategoryTypeManual CategoryType = "Manual" CategoryTypePartiallyAutomated CategoryType = "PartiallyAutomated" )
func PossibleCategoryTypeValues ¶
func PossibleCategoryTypeValues() []CategoryType
PossibleCategoryTypeValues returns the possible values for the CategoryType const type.
type ComplianceReportItem ¶
type ComplianceReportItem struct { // READ-ONLY; The category name. CategoryName *string `json:"categoryName,omitempty" azure:"ro"` // READ-ONLY; The compliance result's status. ComplianceState *ComplianceState `json:"complianceState,omitempty" azure:"ro"` // READ-ONLY; The control Id - e.g. "1". ControlID *string `json:"controlId,omitempty" azure:"ro"` // READ-ONLY; The control name. ControlName *string `json:"controlName,omitempty" azure:"ro"` // READ-ONLY; The control type. ControlType *ControlType `json:"controlType,omitempty" azure:"ro"` // READ-ONLY; The policy's detail description. PolicyDescription *string `json:"policyDescription,omitempty" azure:"ro"` // READ-ONLY; The policy's display name. PolicyDisplayName *string `json:"policyDisplayName,omitempty" azure:"ro"` // READ-ONLY; The compliance result mapped policy Id. PolicyID *string `json:"policyId,omitempty" azure:"ro"` // READ-ONLY; The compliance result mapped resource group. ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` // READ-ONLY; The compliance result mapped resource Id - e.g. "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1". ResourceID *string `json:"resourceId,omitempty" azure:"ro"` // READ-ONLY; The compliance result mapped resource type. ResourceType *string `json:"resourceType,omitempty" azure:"ro"` // READ-ONLY; The compliance result last changed date - e.g. "2022-10-24T02:55:16.3274379Z". For unavailable date, set it // as "N/A". StatusChangeDate *string `json:"statusChangeDate,omitempty" azure:"ro"` // READ-ONLY; The compliance result mapped subscription Id. SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` }
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 `json:"categories,omitempty" azure:"ro"` // READ-ONLY; The name of the compliance. e.g. "M365" ComplianceName *string `json:"complianceName,omitempty" azure:"ro"` }
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 ComplianceState ¶
type ComplianceState string
ComplianceState - The compliance result's status.
const ( ComplianceStateHealthy ComplianceState = "Healthy" ComplianceStateUnhealthy ComplianceState = "Unhealthy" )
func PossibleComplianceStateValues ¶
func PossibleComplianceStateValues() []ComplianceState
PossibleComplianceStateValues returns the possible values for the ComplianceState const type.
type Control ¶
type Control struct { // READ-ONLY; List of assessments. Assessments []*Assessment `json:"assessments,omitempty" azure:"ro"` // READ-ONLY; The control's description ControlDescription *string `json:"controlDescription,omitempty" azure:"ro"` // READ-ONLY; The hyper link to the control's description'. ControlDescriptionHyperLink *string `json:"controlDescriptionHyperLink,omitempty" azure:"ro"` // READ-ONLY; The full name of the control. e.g. "Validate that unsupported operating systems and software components are // not in use." ControlFullName *string `json:"controlFullName,omitempty" azure:"ro"` // READ-ONLY; The Id of the control. e.g. "Operational Security#10" ControlID *string `json:"controlId,omitempty" azure:"ro"` // READ-ONLY; The short name of the control. e.g. "Unsupported OS and Software." ControlShortName *string `json:"controlShortName,omitempty" azure:"ro"` // READ-ONLY; Control status. ControlStatus *ControlStatus `json:"controlStatus,omitempty" azure:"ro"` // READ-ONLY; The control type ControlType *ControlType `json:"controlType,omitempty" azure:"ro"` }
Control - A class represent the control.
func (Control) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Control.
func (*Control) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Control.
type ControlFamily ¶
type ControlFamily struct { // READ-ONLY; List of controls. Controls []*Control `json:"controls,omitempty" azure:"ro"` // READ-ONLY; The name of the control family. e.g. "Malware Protection - Anti-Virus" FamilyName *string `json:"familyName,omitempty" azure:"ro"` // READ-ONLY; Control family status. FamilyStatus *ControlFamilyStatus `json:"familyStatus,omitempty" azure:"ro"` // READ-ONLY; The control family type FamilyType *ControlFamilyType `json:"familyType,omitempty" azure:"ro"` }
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 ( ControlFamilyStatusHealthy ControlFamilyStatus = "Healthy" ControlFamilyStatusUnhealthy ControlFamilyStatus = "Unhealthy" )
func PossibleControlFamilyStatusValues ¶
func PossibleControlFamilyStatusValues() []ControlFamilyStatus
PossibleControlFamilyStatusValues returns the possible values for the ControlFamilyStatus const type.
type ControlFamilyType ¶
type ControlFamilyType string
ControlFamilyType - Indicates the control family type.
const ( ControlFamilyTypeFullyAutomated ControlFamilyType = "FullyAutomated" ControlFamilyTypeManual ControlFamilyType = "Manual" ControlFamilyTypePartiallyAutomated ControlFamilyType = "PartiallyAutomated" )
func PossibleControlFamilyTypeValues ¶
func PossibleControlFamilyTypeValues() []ControlFamilyType
PossibleControlFamilyTypeValues returns the possible values for the ControlFamilyType const type.
type ControlStatus ¶
type ControlStatus string
ControlStatus - Indicates the control status.
const ( ControlStatusFailed ControlStatus = "Failed" ControlStatusNotApplicable ControlStatus = "NotApplicable" ControlStatusPassed ControlStatus = "Passed" )
func PossibleControlStatusValues ¶
func PossibleControlStatusValues() []ControlStatus
PossibleControlStatusValues returns the possible values for the ControlStatus const type.
type ControlType ¶
type ControlType string
ControlType - Indicates the control type.
const ( ControlTypeFullyAutomated ControlType = "FullyAutomated" ControlTypeManual ControlType = "Manual" ControlTypePartiallyAutomated ControlType = "PartiallyAutomated" )
func PossibleControlTypeValues ¶
func PossibleControlTypeValues() []ControlType
PossibleControlTypeValues returns the possible values for the ControlType const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DownloadResponse ¶
type DownloadResponse struct { // READ-ONLY; compliance detailed pdf report ComplianceDetailedPDFReport *DownloadResponseComplianceDetailedPDFReport `json:"complianceDetailedPdfReport,omitempty" azure:"ro"` // READ-ONLY; compliance pdf report CompliancePDFReport *DownloadResponseCompliancePDFReport `json:"compliancePdfReport,omitempty" azure:"ro"` // READ-ONLY; List of the compliance result ComplianceReport []*ComplianceReportItem `json:"complianceReport,omitempty" azure:"ro"` // READ-ONLY; List of the reports ResourceList []*ResourceItem `json:"resourceList,omitempty" azure:"ro"` }
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; uri of compliance detailed pdf report SasURI *string `json:"sasUri,omitempty" azure:"ro"` }
DownloadResponseComplianceDetailedPDFReport - compliance detailed pdf report
func (DownloadResponseComplianceDetailedPDFReport) MarshalJSON ¶
func (d DownloadResponseComplianceDetailedPDFReport) MarshalJSON() ([]byte, error)
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; uri of compliance pdf report SasURI *string `json:"sasUri,omitempty" azure:"ro"` }
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 DownloadType = "ComplianceDetailedPdfReport" DownloadTypeCompliancePDFReport DownloadType = "CompliancePdfReport" DownloadTypeComplianceReport DownloadType = "ComplianceReport" DownloadTypeResourceList DownloadType = "ResourceList" )
func PossibleDownloadTypeValues ¶
func PossibleDownloadTypeValues() []DownloadType
PossibleDownloadTypeValues returns the possible values for the DownloadType const type.
type IsPass ¶
type IsPass string
IsPass - Indicates whether all the resource(s) are compliant.
func PossibleIsPassValues ¶
func PossibleIsPassValues() []IsPass
PossibleIsPassValues returns the possible values for the IsPass const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay `json:"display,omitempty"` // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType `json:"actionType,omitempty" azure:"ro"` // 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 `json:"isDataAction,omitempty" azure:"ro"` // 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 `json:"name,omitempty" azure:"ro"` // 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 `json:"origin,omitempty" azure:"ro"` }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
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 `json:"description,omitempty" azure:"ro"` // 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 `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string `json:"resource,omitempty" azure:"ro"` }
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of operations supported by the resource provider Value []*Operation `json:"value,omitempty" azure:"ro"` }
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. Generated from API version 2022-11-16-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/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() client, err := armappcomplianceautomation.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
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"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type OverviewStatus ¶
type OverviewStatus struct { // The count of all failed full automation control. FailedCount *int32 `json:"failedCount,omitempty"` // The count of all manual control. ManualCount *int32 `json:"manualCount,omitempty"` // The count of all passed full automation control. PassedCount *int32 `json:"passedCount,omitempty"` }
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 ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Resource provisioning states.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type 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 ¶
func (client *ReportClient) BeginCreateOrUpdate(ctx context.Context, reportName string, parameters ReportResource, options *ReportClientBeginCreateOrUpdateOptions) (*runtime.Poller[ReportClientCreateOrUpdateResponse], error)
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 2022-11-16-preview reportName - Report Name. parameters - 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/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Report_CreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armappcomplianceautomation.NewReportClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testReportName", armappcomplianceautomation.ReportResource{ Properties: &armappcomplianceautomation.ReportProperties{ OfferGUID: to.Ptr("0000"), Resources: []*armappcomplianceautomation.ResourceMetadata{ { ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }}, TimeZone: to.Ptr("GMT Standard Time"), TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T05:11:56.197Z"); return t }()), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ReportClient) BeginDelete ¶
func (client *ReportClient) BeginDelete(ctx context.Context, reportName string, options *ReportClientBeginDeleteOptions) (*runtime.Poller[ReportClientDeleteResponse], error)
BeginDelete - Delete an AppComplianceAutomation report. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-11-16-preview 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/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/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() client, err := armappcomplianceautomation.NewReportClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) BeginUpdate ¶
func (client *ReportClient) BeginUpdate(ctx context.Context, reportName string, parameters ReportResourcePatch, options *ReportClientBeginUpdateOptions) (*runtime.Poller[ReportClientUpdateResponse], error)
BeginUpdate - Update an exiting AppComplianceAutomation report. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-11-16-preview reportName - Report Name. parameters - 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/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Report_Update.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armappcomplianceautomation.NewReportClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testReportName", armappcomplianceautomation.ReportResourcePatch{ Properties: &armappcomplianceautomation.ReportProperties{ OfferGUID: to.Ptr("0000"), Resources: []*armappcomplianceautomation.ResourceMetadata{ { ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }}, TimeZone: to.Ptr("GMT Standard Time"), TriggerTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-04T05:11:56.197Z"); return t }()), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
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 2022-11-16-preview 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/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/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() client, err := armappcomplianceautomation.NewReportClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testReport", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 ReportClientBeginUpdateOptions ¶
type ReportClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReportClientBeginUpdateOptions contains the optional parameters for the ReportClient.BeginUpdate method.
type ReportClientCreateOrUpdateResponse ¶
type ReportClientCreateOrUpdateResponse struct {
ReportResource
}
ReportClientCreateOrUpdateResponse contains the response from method ReportClient.CreateOrUpdate.
type ReportClientDeleteResponse ¶
type ReportClientDeleteResponse struct { }
ReportClientDeleteResponse contains the response from method ReportClient.Delete.
type ReportClientGetOptions ¶
type ReportClientGetOptions struct { }
ReportClientGetOptions contains the optional parameters for the ReportClient.Get method.
type ReportClientGetResponse ¶
type ReportClientGetResponse struct {
ReportResource
}
ReportClientGetResponse contains the response from method ReportClient.Get.
type ReportClientUpdateResponse ¶
type ReportClientUpdateResponse struct {
ReportResource
}
ReportClientUpdateResponse contains the response from method ReportClient.Update.
type ReportComplianceStatus ¶
type ReportComplianceStatus struct { // The Microsoft 365 certification name. M365 *OverviewStatus `json:"m365,omitempty"` }
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 ReportProperties ¶
type ReportProperties struct { // REQUIRED; List of resource data. Resources []*ResourceMetadata `json:"resources,omitempty"` // 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 `json:"timeZone,omitempty"` // REQUIRED; Report collection trigger time. TriggerTime *time.Time `json:"triggerTime,omitempty"` // Report offer Guid. OfferGUID *string `json:"offerGuid,omitempty"` // READ-ONLY; Report compliance status. ComplianceStatus *ReportComplianceStatus `json:"complianceStatus,omitempty" azure:"ro"` // READ-ONLY; Report id in database. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Report last collection trigger time. LastTriggerTime *time.Time `json:"lastTriggerTime,omitempty" azure:"ro"` // READ-ONLY; Report next collection trigger time. NextTriggerTime *time.Time `json:"nextTriggerTime,omitempty" azure:"ro"` // READ-ONLY; Azure lifecycle management ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Report name. ReportName *string `json:"reportName,omitempty" azure:"ro"` // READ-ONLY; Report status. Status *ReportStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; List of subscription Ids. Subscriptions []*string `json:"subscriptions,omitempty" azure:"ro"` // READ-ONLY; Report's tenant id. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ReportProperties - 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 `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
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 ReportResourceList ¶
type ReportResourceList struct { // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. NextLink *string `json:"nextLink,omitempty"` // READ-ONLY; List of the reports Value []*ReportResource `json:"value,omitempty" azure:"ro"` }
ReportResourceList - Object that includes an array of resources and a possible link for next set.
func (ReportResourceList) MarshalJSON ¶
func (r ReportResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReportResourceList.
func (*ReportResourceList) UnmarshalJSON ¶
func (r *ReportResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReportResourceList.
type ReportResourcePatch ¶
type ReportResourcePatch struct { // Report property. Properties *ReportProperties `json:"properties,omitempty"` }
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 ReportStatus = "Active" ReportStatusDisabled ReportStatus = "Disabled" ReportStatusFailed ReportStatus = "Failed" )
func PossibleReportStatusValues ¶
func PossibleReportStatusValues() []ReportStatus
PossibleReportStatusValues returns the possible values for the ReportStatus const type.
type ReportsClient ¶
type ReportsClient struct {
// contains filtered or unexported fields
}
ReportsClient contains the methods for the Reports group. Don't use this type directly, use NewReportsClient() instead.
func NewReportsClient ¶
func NewReportsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error)
NewReportsClient creates a new instance of ReportsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ReportsClient) NewListPager ¶
func (client *ReportsClient) NewListPager(options *ReportsClientListOptions) *runtime.Pager[ReportsClientListResponse]
NewListPager - Get the AppComplianceAutomation report list for the tenant. Generated from API version 2022-11-16-preview options - ReportsClientListOptions contains the optional parameters for the ReportsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Reports_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() client, err := armappcomplianceautomation.NewReportsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(&armappcomplianceautomation.ReportsClientListOptions{SkipToken: to.Ptr("1"), Top: to.Ptr[int32](100), Select: nil, OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000000"), ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ReportsClientListOptions ¶
type ReportsClientListOptions struct { // The offerGuid which mapping to the reports. OfferGUID *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 }
ReportsClientListOptions contains the optional parameters for the ReportsClient.List method.
type ReportsClientListResponse ¶
type ReportsClientListResponse struct {
ReportResourceList
}
ReportsClientListResponse contains the response from method ReportsClient.List.
type ResourceItem ¶
type ResourceItem struct { // READ-ONLY; The resource group name of this resource. ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` // READ-ONLY; The resource Id - e.g. "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1". ResourceID *string `json:"resourceId,omitempty" azure:"ro"` // READ-ONLY; The resource type of this resource. ResourceType *string `json:"resourceType,omitempty" azure:"ro"` // READ-ONLY; The subscription Id of this resource. SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` }
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 `json:"resourceId,omitempty"` // Resource kind. ResourceKind *string `json:"resourceKind,omitempty"` // Resource name. ResourceName *string `json:"resourceName,omitempty"` // Resource type. ResourceType *string `json:"resourceType,omitempty"` // Resource's tag type. Tags map[string]*string `json:"tags,omitempty"` }
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 ResourceStatus ¶
type ResourceStatus string
ResourceStatus - Indicates the resource status.
const ( ResourceStatusHealthy ResourceStatus = "Healthy" ResourceStatusNotApplicable ResourceStatus = "NotApplicable" ResourceStatusUnhealthy ResourceStatus = "Unhealthy" )
func PossibleResourceStatusValues ¶
func PossibleResourceStatusValues() []ResourceStatus
PossibleResourceStatusValues returns the possible values for the ResourceStatus 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 ¶
func (client *SnapshotClient) BeginDownload(ctx context.Context, reportName string, snapshotName string, parameters SnapshotDownloadRequest, options *SnapshotClientBeginDownloadOptions) (*runtime.Poller[SnapshotClientDownloadResponse], error)
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 2022-11-16-preview reportName - Report Name. snapshotName - Snapshot Name. parameters - 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/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_ComplianceDetailedPdfReport_Download.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() client, err := armappcomplianceautomation.NewSnapshotClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{ DownloadType: to.Ptr(armappcomplianceautomation.DownloadTypeComplianceDetailedPDFReport), OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000000"), ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
Example (SnapshotDownloadCompliancePdfReport) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_CompliancePdfReport_Download.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() client, err := armappcomplianceautomation.NewSnapshotClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{ DownloadType: to.Ptr(armappcomplianceautomation.DownloadTypeCompliancePDFReport), OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000000"), ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
Example (SnapshotDownloadComplianceReport) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_ComplianceReport_Download.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() client, err := armappcomplianceautomation.NewSnapshotClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{ DownloadType: to.Ptr(armappcomplianceautomation.DownloadTypeComplianceReport), OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000000"), ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
Example (SnapshotDownloadResourceList) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_ResourceList_Download.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() client, err := armappcomplianceautomation.NewSnapshotClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownload(ctx, "testReportName", "testSnapshotName", armappcomplianceautomation.SnapshotDownloadRequest{ DownloadType: to.Ptr(armappcomplianceautomation.DownloadTypeResourceList), OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000000"), ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
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 2022-11-16-preview 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/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/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() client, err := armappcomplianceautomation.NewSnapshotClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testReportName", "testSnapshot", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 {
DownloadResponse
}
SnapshotClientDownloadResponse contains the response from method SnapshotClient.Download.
type SnapshotClientGetOptions ¶
type SnapshotClientGetOptions struct { }
SnapshotClientGetOptions contains the optional parameters for the SnapshotClient.Get method.
type SnapshotClientGetResponse ¶
type SnapshotClientGetResponse struct {
SnapshotResource
}
SnapshotClientGetResponse contains the response from method SnapshotClient.Get.
type SnapshotDownloadRequest ¶
type SnapshotDownloadRequest struct { // REQUIRED; Indicates the download type. DownloadType *DownloadType `json:"downloadType,omitempty"` // The offerGuid which mapping to the reports. OfferGUID *string `json:"offerGuid,omitempty"` // Tenant id. ReportCreatorTenantID *string `json:"reportCreatorTenantId,omitempty"` }
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 `json:"complianceResults,omitempty" azure:"ro"` // READ-ONLY; The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` // READ-ONLY; Snapshot id in the database. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Azure lifecycle management ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The report essential info. ReportProperties *ReportProperties `json:"reportProperties,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. ReportSystemData *SystemData `json:"reportSystemData,omitempty" azure:"ro"` // READ-ONLY; Snapshot name. SnapshotName *string `json:"snapshotName,omitempty" azure:"ro"` }
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 { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Snapshot's property'. Properties *SnapshotProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
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 SnapshotResourceList ¶
type SnapshotResourceList struct { // The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use. NextLink *string `json:"nextLink,omitempty"` // READ-ONLY; List of the snapshots Value []*SnapshotResource `json:"value,omitempty" azure:"ro"` }
SnapshotResourceList - Object that includes an array of resources and a possible link for next set.
func (SnapshotResourceList) MarshalJSON ¶
func (s SnapshotResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SnapshotResourceList.
func (*SnapshotResourceList) UnmarshalJSON ¶
func (s *SnapshotResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotResourceList.
type SnapshotsClient ¶
type SnapshotsClient struct {
// contains filtered or unexported fields
}
SnapshotsClient contains the methods for the Snapshots group. Don't use this type directly, use NewSnapshotsClient() instead.
func NewSnapshotsClient ¶
func NewSnapshotsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotsClient, error)
NewSnapshotsClient creates a new instance of SnapshotsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*SnapshotsClient) NewListPager ¶
func (client *SnapshotsClient) NewListPager(reportName string, options *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse]
NewListPager - Get the AppComplianceAutomation snapshot list. Generated from API version 2022-11-16-preview reportName - Report Name. options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshots_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() client, err := armappcomplianceautomation.NewSnapshotsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("testReportName", &armappcomplianceautomation.SnapshotsClientListOptions{SkipToken: to.Ptr("1"), Top: to.Ptr[int32](100), Select: nil, ReportCreatorTenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), OfferGUID: to.Ptr("00000000-0000-0000-0000-000000000000"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type SnapshotsClientListOptions ¶
type SnapshotsClientListOptions struct { // The offerGuid which mapping to the reports. OfferGUID *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 }
SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.List method.
type SnapshotsClientListResponse ¶
type SnapshotsClientListResponse struct {
SnapshotResourceList
}
SnapshotsClientListResponse contains the response from method SnapshotsClient.List.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.