package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev

# README

github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/diagnostics Documentation

The diagnostics SDK allows for interaction with the Azure Resource Manager Service web (API Version 2023-12-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/diagnostics"

Client Initialization

client := diagnostics.NewDiagnosticsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DiagnosticsClient.ExecuteSiteAnalysis

ctx := context.TODO()
id := diagnostics.NewAnalysisID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue", "analysisValue")

read, err := client.ExecuteSiteAnalysis(ctx, id, diagnostics.DefaultExecuteSiteAnalysisOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.ExecuteSiteAnalysisSlot

ctx := context.TODO()
id := diagnostics.NewDiagnosticAnalysisID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue", "analysisValue")

read, err := client.ExecuteSiteAnalysisSlot(ctx, id, diagnostics.DefaultExecuteSiteAnalysisSlotOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.ExecuteSiteDetector

ctx := context.TODO()
id := diagnostics.NewDiagnosticDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue", "detectorValue")

read, err := client.ExecuteSiteDetector(ctx, id, diagnostics.DefaultExecuteSiteDetectorOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.ExecuteSiteDetectorSlot

ctx := context.TODO()
id := diagnostics.NewSlotDiagnosticDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue", "detectorValue")

read, err := client.ExecuteSiteDetectorSlot(ctx, id, diagnostics.DefaultExecuteSiteDetectorSlotOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetHostingEnvironmentDetectorResponse

ctx := context.TODO()
id := diagnostics.NewHostingEnvironmentDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostingEnvironmentValue", "detectorValue")

read, err := client.GetHostingEnvironmentDetectorResponse(ctx, id, diagnostics.DefaultGetHostingEnvironmentDetectorResponseOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteAnalysis

ctx := context.TODO()
id := diagnostics.NewAnalysisID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue", "analysisValue")

read, err := client.GetSiteAnalysis(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteAnalysisSlot

ctx := context.TODO()
id := diagnostics.NewDiagnosticAnalysisID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue", "analysisValue")

read, err := client.GetSiteAnalysisSlot(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteDetector

ctx := context.TODO()
id := diagnostics.NewDiagnosticDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue", "detectorValue")

read, err := client.GetSiteDetector(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteDetectorResponse

ctx := context.TODO()
id := diagnostics.NewDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "detectorValue")

read, err := client.GetSiteDetectorResponse(ctx, id, diagnostics.DefaultGetSiteDetectorResponseOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteDetectorResponseSlot

ctx := context.TODO()
id := diagnostics.NewSlotDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "detectorValue")

read, err := client.GetSiteDetectorResponseSlot(ctx, id, diagnostics.DefaultGetSiteDetectorResponseSlotOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteDetectorSlot

ctx := context.TODO()
id := diagnostics.NewSlotDiagnosticDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue", "detectorValue")

read, err := client.GetSiteDetectorSlot(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteDiagnosticCategory

ctx := context.TODO()
id := diagnostics.NewDiagnosticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue")

read, err := client.GetSiteDiagnosticCategory(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.GetSiteDiagnosticCategorySlot

ctx := context.TODO()
id := diagnostics.NewSlotDiagnosticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue")

read, err := client.GetSiteDiagnosticCategorySlot(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DiagnosticsClient.ListHostingEnvironmentDetectorResponses

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

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

Example Usage: DiagnosticsClient.ListSiteAnalyses

ctx := context.TODO()
id := diagnostics.NewDiagnosticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue")

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

Example Usage: DiagnosticsClient.ListSiteAnalysesSlot

ctx := context.TODO()
id := diagnostics.NewSlotDiagnosticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue")

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

Example Usage: DiagnosticsClient.ListSiteDetectorResponses

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

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

Example Usage: DiagnosticsClient.ListSiteDetectorResponsesSlot

ctx := context.TODO()
id := diagnostics.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue")

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

Example Usage: DiagnosticsClient.ListSiteDetectors

ctx := context.TODO()
id := diagnostics.NewDiagnosticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "diagnosticValue")

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

Example Usage: DiagnosticsClient.ListSiteDetectorsSlot

ctx := context.TODO()
id := diagnostics.NewSlotDiagnosticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue", "diagnosticValue")

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

Example Usage: DiagnosticsClient.ListSiteDiagnosticCategories

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

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

Example Usage: DiagnosticsClient.ListSiteDiagnosticCategoriesSlot

ctx := context.TODO()
id := diagnostics.NewSlotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "siteValue", "slotValue")

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