armselfhelp

package module
v2.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 14 Imported by: 0

README

Azure Selfhelp Module for Go

PkgGoDev

The armselfhelp module provides operations for working with Azure Selfhelp.

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

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp/v2

Authorization

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

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 Selfhelp 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 AggregationType

type AggregationType string

AggregationType - Allowed values are Sum, Avg, Count, Min, Max. Default is Sum

const (
	AggregationTypeAvg   AggregationType = "Avg"
	AggregationTypeCount AggregationType = "Count"
	AggregationTypeMax   AggregationType = "Max"
	AggregationTypeMin   AggregationType = "Min"
	AggregationTypeSum   AggregationType = "Sum"
)

func PossibleAggregationTypeValues

func PossibleAggregationTypeValues() []AggregationType

PossibleAggregationTypeValues returns the possible values for the AggregationType const type.

type AutomatedCheckResult

type AutomatedCheckResult struct {
	// Insight Article Content
	Result *string

	// Status for automated check result
	Status *string

	// Type of Result.
	Type *AutomatedCheckResultType

	// Version for automated check result
	Version *string
}

AutomatedCheckResult - Only for AutomatedStep type

func (AutomatedCheckResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AutomatedCheckResult.

func (*AutomatedCheckResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AutomatedCheckResult.

type AutomatedCheckResultType

type AutomatedCheckResultType string

AutomatedCheckResultType - Type of Result.

const (
	AutomatedCheckResultTypeError       AutomatedCheckResultType = "Error"
	AutomatedCheckResultTypeInformation AutomatedCheckResultType = "Information"
	AutomatedCheckResultTypeSuccess     AutomatedCheckResultType = "Success"
	AutomatedCheckResultTypeWarning     AutomatedCheckResultType = "Warning"
)

func PossibleAutomatedCheckResultTypeValues

func PossibleAutomatedCheckResultTypeValues() []AutomatedCheckResultType

PossibleAutomatedCheckResultTypeValues returns the possible values for the AutomatedCheckResultType const type.

type CheckNameAvailabilityClient

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

CheckNameAvailabilityClient contains the methods for the CheckNameAvailability group. Don't use this type directly, use NewCheckNameAvailabilityClient() instead.

func NewCheckNameAvailabilityClient

func NewCheckNameAvailabilityClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckNameAvailabilityClient, error)

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient with the specified values.

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

func (*CheckNameAvailabilityClient) Post

Post - This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • options - CheckNameAvailabilityClientPostOptions contains the optional parameters for the CheckNameAvailabilityClient.Post method.
Example (ExampleWhenNameIsAvailableForADiagnosticResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckNameAvailabilityClient().Post(ctx, "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", &armselfhelp.CheckNameAvailabilityClientPostOptions{CheckNameAvailabilityRequest: &armselfhelp.CheckNameAvailabilityRequest{
	Name: to.Ptr("sampleName"),
	Type: to.Ptr("Microsoft.Help/diagnostics"),
},
})
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 = armselfhelp.CheckNameAvailabilityResponse{
// 	NameAvailable: to.Ptr(true),
// }
Output:

Example (ExampleWhenNameIsNotAvailableForADiagnosticResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckNameAvailabilityClient().Post(ctx, "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", &armselfhelp.CheckNameAvailabilityClientPostOptions{CheckNameAvailabilityRequest: &armselfhelp.CheckNameAvailabilityRequest{
	Name: to.Ptr("sampleName"),
	Type: to.Ptr("Microsoft.Help/diagnostics"),
},
})
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 = armselfhelp.CheckNameAvailabilityResponse{
// 	Message: to.Ptr("Name not available"),
// 	NameAvailable: to.Ptr(false),
// 	Reason: to.Ptr("Name is already in use"),
// }
Output:

type CheckNameAvailabilityClientPostOptions

type CheckNameAvailabilityClientPostOptions struct {
	// The required parameters for availability check.
	CheckNameAvailabilityRequest *CheckNameAvailabilityRequest
}

CheckNameAvailabilityClientPostOptions contains the optional parameters for the CheckNameAvailabilityClient.Post method.

type CheckNameAvailabilityClientPostResponse

type CheckNameAvailabilityClientPostResponse struct {
	// Response for whether the requested resource name is available or not.
	CheckNameAvailabilityResponse
}

CheckNameAvailabilityClientPostResponse contains the response from method CheckNameAvailabilityClient.Post.

type CheckNameAvailabilityRequest

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

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.

func (*CheckNameAvailabilityRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.

type CheckNameAvailabilityResponse

type CheckNameAvailabilityResponse struct {
	// Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false.
	Message *string

	// Returns true or false depending on the availability of the name
	NameAvailable *bool

	// Reason for why value is not available. This field is returned if nameAvailable is false.
	Reason *string
}

CheckNameAvailabilityResponse - Response for whether the requested resource name is available or not.

func (CheckNameAvailabilityResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.

func (*CheckNameAvailabilityResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.

type ClassificationService

type ClassificationService struct {
	// List of applicable ARM resource types for this service.
	ResourceTypes []*string

	// READ-ONLY; Localized name of the azure service.
	DisplayName *string

	// READ-ONLY; Azure resource Id of the service.
	ServiceID *string
}

ClassificationService - Service Classification result object.

func (ClassificationService) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClassificationService.

func (*ClassificationService) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClassificationService.

type ClientFactory

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

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

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

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewCheckNameAvailabilityClient

func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient.

func (*ClientFactory) NewDiagnosticsClient

func (c *ClientFactory) NewDiagnosticsClient() *DiagnosticsClient

NewDiagnosticsClient creates a new instance of DiagnosticsClient.

func (*ClientFactory) NewDiscoverySolutionClient

func (c *ClientFactory) NewDiscoverySolutionClient() *DiscoverySolutionClient

NewDiscoverySolutionClient creates a new instance of DiscoverySolutionClient.

func (*ClientFactory) NewDiscoverySolutionNLPSubscriptionScopeClient

func (c *ClientFactory) NewDiscoverySolutionNLPSubscriptionScopeClient() *DiscoverySolutionNLPSubscriptionScopeClient

NewDiscoverySolutionNLPSubscriptionScopeClient creates a new instance of DiscoverySolutionNLPSubscriptionScopeClient.

func (*ClientFactory) NewDiscoverySolutionNLPTenantScopeClient

func (c *ClientFactory) NewDiscoverySolutionNLPTenantScopeClient() *DiscoverySolutionNLPTenantScopeClient

NewDiscoverySolutionNLPTenantScopeClient creates a new instance of DiscoverySolutionNLPTenantScopeClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSimplifiedSolutionsClient

func (c *ClientFactory) NewSimplifiedSolutionsClient() *SimplifiedSolutionsClient

NewSimplifiedSolutionsClient creates a new instance of SimplifiedSolutionsClient.

func (*ClientFactory) NewSolutionClient

func (c *ClientFactory) NewSolutionClient() *SolutionClient

NewSolutionClient creates a new instance of SolutionClient.

func (*ClientFactory) NewSolutionSelfHelpClient

func (c *ClientFactory) NewSolutionSelfHelpClient() *SolutionSelfHelpClient

NewSolutionSelfHelpClient creates a new instance of SolutionSelfHelpClient.

func (*ClientFactory) NewTroubleshootersClient

func (c *ClientFactory) NewTroubleshootersClient() *TroubleshootersClient

NewTroubleshootersClient creates a new instance of TroubleshootersClient.

type Confidence

type Confidence string

Confidence - Confidence of the search result.

const (
	ConfidenceHigh   Confidence = "High"
	ConfidenceLow    Confidence = "Low"
	ConfidenceMedium Confidence = "Medium"
)

func PossibleConfidenceValues

func PossibleConfidenceValues() []Confidence

PossibleConfidenceValues returns the possible values for the Confidence const type.

type ContinueRequestBody

type ContinueRequestBody struct {
	Responses []*TroubleshooterResponse

	// Unique id of the result.
	StepID *string
}

ContinueRequestBody - Troubleshooter ContinueRequest body.

func (ContinueRequestBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContinueRequestBody.

func (*ContinueRequestBody) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContinueRequestBody.

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 Diagnostic

type Diagnostic struct {
	// Error definition.
	Error *Error

	// The problems (if any) detected by this insight.
	Insights []*Insight

	// Solution Id
	SolutionID *string

	// Denotes the status of the diagnostic resource.
	Status *Status
}

Diagnostic - Properties returned with in an insight.

func (Diagnostic) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Diagnostic.

func (*Diagnostic) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Diagnostic.

type DiagnosticInvocation

type DiagnosticInvocation struct {
	// Additional parameters required to invoke the solutionId.
	AdditionalParameters map[string]*string

	// Solution Id to invoke.
	SolutionID *string
}

DiagnosticInvocation - Solution Invocation with additional params needed for invocation.

func (DiagnosticInvocation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticInvocation.

func (*DiagnosticInvocation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticInvocation.

type DiagnosticProvisioningState

type DiagnosticProvisioningState string

DiagnosticProvisioningState - Status of diagnostic provisioning.

const (
	// DiagnosticProvisioningStateCanceled - When Diagnostic request gets canceled.
	DiagnosticProvisioningStateCanceled DiagnosticProvisioningState = "Canceled"
	// DiagnosticProvisioningStateFailed - All Diagnostics failed to run.
	DiagnosticProvisioningStateFailed DiagnosticProvisioningState = "Failed"
	// DiagnosticProvisioningStatePartialComplete - Some Diagnostics are still running or failed.
	DiagnosticProvisioningStatePartialComplete DiagnosticProvisioningState = "PartialComplete"
	// DiagnosticProvisioningStateRunning - All Diagnostics are still running.
	DiagnosticProvisioningStateRunning DiagnosticProvisioningState = "Running"
	// DiagnosticProvisioningStateSucceeded - All Diagnostics in the Batch succeeded.
	DiagnosticProvisioningStateSucceeded DiagnosticProvisioningState = "Succeeded"
)

func PossibleDiagnosticProvisioningStateValues

func PossibleDiagnosticProvisioningStateValues() []DiagnosticProvisioningState

PossibleDiagnosticProvisioningStateValues returns the possible values for the DiagnosticProvisioningState const type.

type DiagnosticResource

type DiagnosticResource struct {
	// Diagnostic Resource properties.
	Properties *DiagnosticResourceProperties

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

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

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

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

DiagnosticResource - Diagnostic resource

func (DiagnosticResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticResource.

func (*DiagnosticResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticResource.

type DiagnosticResourceProperties

type DiagnosticResourceProperties struct {
	// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics
	// results
	GlobalParameters map[string]*string

	// SolutionIds that are needed to be invoked.
	Insights []*DiagnosticInvocation

	// READ-ONLY; Diagnostic Request Accepted time.
	AcceptedAt *string

	// READ-ONLY; Array of Diagnostics.
	Diagnostics []*Diagnostic

	// READ-ONLY; Status of diagnostic provisioning.
	ProvisioningState *DiagnosticProvisioningState
}

DiagnosticResourceProperties - Diagnostic resource properties.

func (DiagnosticResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticResourceProperties.

func (*DiagnosticResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticResourceProperties.

type DiagnosticsClient

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

DiagnosticsClient contains the methods for the Diagnostics group. Don't use this type directly, use NewDiagnosticsClient() instead.

func NewDiagnosticsClient

func NewDiagnosticsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticsClient, error)

NewDiagnosticsClient creates a new instance of DiagnosticsClient with the specified values.

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

func (*DiagnosticsClient) BeginCreate

func (client *DiagnosticsClient) BeginCreate(ctx context.Context, scope string, diagnosticsResourceName string, diagnosticResourceRequest DiagnosticResource, options *DiagnosticsClientBeginCreateOptions) (*runtime.Poller[DiagnosticsClientCreateResponse], error)

BeginCreate - Creates a diagnostic for the specific resource using solutionId from discovery solutions. Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • diagnosticsResourceName - Unique resource name for insight resources
  • diagnosticResourceRequest - The required request body for this insightResource invocation.
  • options - DiagnosticsClientBeginCreateOptions contains the optional parameters for the DiagnosticsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/CreateDiagnosticForKeyVaultResource.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDiagnosticsClient().BeginCreate(ctx, "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", "VMNotWorkingInsight", armselfhelp.DiagnosticResource{}, 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.DiagnosticResource = armselfhelp.DiagnosticResource{
// 	Name: to.Ptr("Microsoft.Help/diagnostics"),
// 	Type: to.Ptr("VMNotWorkingInsight"),
// 	ID: to.Ptr("/subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/diagnostics/VMNotWorkingInsight"),
// 	Properties: &armselfhelp.DiagnosticResourceProperties{
// 		AcceptedAt: to.Ptr("2023-03-10T03:04:40Z"),
// 		Diagnostics: []*armselfhelp.Diagnostic{
// 			{
// 				Error: &armselfhelp.Error{
// 					Code: to.Ptr("errorCode"),
// 					Message: to.Ptr("errorMessage"),
// 				},
// 				Insights: []*armselfhelp.Insight{
// 					{
// 						ID: to.Ptr("InsightArticleId"),
// 						ImportanceLevel: to.Ptr(armselfhelp.ImportanceLevelCritical),
// 						Results: to.Ptr("Article Content"),
// 						Title: to.Ptr("An example title for an Insight"),
// 				}},
// 				SolutionID: to.Ptr("sampleSolutionId"),
// 				Status: to.Ptr(armselfhelp.StatusSucceeded),
// 		}},
// 		ProvisioningState: to.Ptr(armselfhelp.DiagnosticProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DiagnosticsClient) Get

func (client *DiagnosticsClient) Get(ctx context.Context, scope string, diagnosticsResourceName string, options *DiagnosticsClientGetOptions) (DiagnosticsClientGetResponse, error)

Get - Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • diagnosticsResourceName - Unique resource name for insight resources
  • options - DiagnosticsClientGetOptions contains the optional parameters for the DiagnosticsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/GetDiagnosticForKeyVaultResource.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDiagnosticsClient().Get(ctx, "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", "VMNotWorkingInsight", 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.DiagnosticResource = armselfhelp.DiagnosticResource{
// 	Name: to.Ptr("Microsoft.Help/diagnostics"),
// 	Type: to.Ptr("VMNotWorkingInsight"),
// 	ID: to.Ptr("/subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/diagnostics/VMNotWorkingInsight"),
// 	Properties: &armselfhelp.DiagnosticResourceProperties{
// 		AcceptedAt: to.Ptr("2023-03-10T03:04:40Z"),
// 		Diagnostics: []*armselfhelp.Diagnostic{
// 			{
// 				Error: &armselfhelp.Error{
// 					Code: to.Ptr("errorCode"),
// 					Message: to.Ptr("errorMessage"),
// 				},
// 				Insights: []*armselfhelp.Insight{
// 					{
// 						ID: to.Ptr("InsightArticleId"),
// 						ImportanceLevel: to.Ptr(armselfhelp.ImportanceLevelCritical),
// 						Results: to.Ptr("Article Content"),
// 						Title: to.Ptr("An example title for an Insight"),
// 				}},
// 				SolutionID: to.Ptr("sampleSolutionId"),
// 				Status: to.Ptr(armselfhelp.StatusSucceeded),
// 		}},
// 		ProvisioningState: to.Ptr(armselfhelp.DiagnosticProvisioningStateSucceeded),
// 	},
// }
Output:

type DiagnosticsClientBeginCreateOptions

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

DiagnosticsClientBeginCreateOptions contains the optional parameters for the DiagnosticsClient.BeginCreate method.

type DiagnosticsClientCreateResponse

type DiagnosticsClientCreateResponse struct {
	// Diagnostic resource
	DiagnosticResource
}

DiagnosticsClientCreateResponse contains the response from method DiagnosticsClient.BeginCreate.

type DiagnosticsClientGetOptions

type DiagnosticsClientGetOptions struct {
}

DiagnosticsClientGetOptions contains the optional parameters for the DiagnosticsClient.Get method.

type DiagnosticsClientGetResponse

type DiagnosticsClientGetResponse struct {
	// Diagnostic resource
	DiagnosticResource
}

DiagnosticsClientGetResponse contains the response from method DiagnosticsClient.Get.

type DiscoveryNlpRequest

type DiscoveryNlpRequest struct {
	// REQUIRED; Natural language description of the issue.
	IssueSummary *string

	// Additional information in the form of a string.
	AdditionalContext *string

	// ARM resource Id of the resource that is having the issue.
	ResourceID *string

	// ARM service Id of the service that is having the issue. For more information on service Id see https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP.
	ServiceID *string
}

DiscoveryNlpRequest - Discover NLP request.

func (DiscoveryNlpRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiscoveryNlpRequest.

func (*DiscoveryNlpRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveryNlpRequest.

type DiscoveryNlpResponse

type DiscoveryNlpResponse struct {
	// The list of solution metadata.
	Value []*SolutionNlpMetadataResource
}

DiscoveryNlpResponse - Successfully fetched list of solution metadata.

func (DiscoveryNlpResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiscoveryNlpResponse.

func (*DiscoveryNlpResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveryNlpResponse.

type DiscoveryResponse

type DiscoveryResponse struct {
	// The link used to get the next page of solution metadata.
	NextLink *string

	// The list of metadata.
	Value []*SolutionMetadataResource
}

DiscoveryResponse - Discovery response.

func (DiscoveryResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiscoveryResponse.

func (*DiscoveryResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveryResponse.

type DiscoverySolutionClient

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

DiscoverySolutionClient contains the methods for the DiscoverySolution group. Don't use this type directly, use NewDiscoverySolutionClient() instead.

func NewDiscoverySolutionClient

func NewDiscoverySolutionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DiscoverySolutionClient, error)

NewDiscoverySolutionClient creates a new instance of DiscoverySolutionClient with the specified values.

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

func (*DiscoverySolutionClient) NewListPager

NewListPager - Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using problemClassification API [https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP]) AND resourceUri or resourceType. Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. Required Input : problemClassificationId (Use the problemClassification API [https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP]) Optional input: resourceUri OR resource Type Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API.

Generated from API version 2024-03-01-preview

  • options - DiscoverySolutionClientListOptions contains the optional parameters for the DiscoverySolutionClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListDiscoverySolutionsAtTenantScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDiscoverySolutionClient().NewListPager(&armselfhelp.DiscoverySolutionClientListOptions{Filter: to.Ptr("ProblemClassificationId eq 'SampleProblemClassificationId1'"),
	Skiptoken: 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.DiscoveryResponse = armselfhelp.DiscoveryResponse{
	// 	Value: []*armselfhelp.SolutionMetadataResource{
	// 		{
	// 			Name: to.Ptr("SampleProblemClassificationId1"),
	// 			Type: to.Ptr("Microsoft.Help/discoverySolutions"),
	// 			ID: to.Ptr("/providers/microsoft.help/discoverySolutions/SampleProblemClassificationId1"),
	// 			Properties: &armselfhelp.Solutions{
	// 				Solutions: []*armselfhelp.SolutionMetadataProperties{
	// 					{
	// 						Description: to.Ptr("This is an azure solution to troubleshoot subscription issues."),
	// 						RequiredInputs: []*string{
	// 							to.Ptr("SubscriptionId")},
	// 							SolutionID: to.Ptr("SampleSolutionId1"),
	// 							SolutionType: to.Ptr(armselfhelp.SolutionTypeDiagnostics),
	// 					}},
	// 				},
	// 		}},
	// 	}
}
Output:

type DiscoverySolutionClientListOptions

type DiscoverySolutionClientListOptions struct {
	// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType'
	// filters. The $filter
	// [https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter] supports only 'and', 'or' and 'eq' operators. Example:
	// $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'
	Filter *string

	// Skiptoken is only used if a previous operation returned a partial result.
	Skiptoken *string
}

DiscoverySolutionClientListOptions contains the optional parameters for the DiscoverySolutionClient.NewListPager method.

type DiscoverySolutionClientListResponse

type DiscoverySolutionClientListResponse struct {
	// Discovery response.
	DiscoveryResponse
}

DiscoverySolutionClientListResponse contains the response from method DiscoverySolutionClient.NewListPager.

type DiscoverySolutionNLPSubscriptionScopeClient

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

DiscoverySolutionNLPSubscriptionScopeClient contains the methods for the DiscoverySolutionNLPSubscriptionScope group. Don't use this type directly, use NewDiscoverySolutionNLPSubscriptionScopeClient() instead.

func NewDiscoverySolutionNLPSubscriptionScopeClient

func NewDiscoverySolutionNLPSubscriptionScopeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiscoverySolutionNLPSubscriptionScopeClient, error)

NewDiscoverySolutionNLPSubscriptionScopeClient creates a new instance of DiscoverySolutionNLPSubscriptionScopeClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DiscoverySolutionNLPSubscriptionScopeClient) Post

Post - Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • options - DiscoverySolutionNLPSubscriptionScopeClientPostOptions contains the optional parameters for the DiscoverySolutionNLPSubscriptionScopeClient.Post method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtSubscriptionScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDiscoverySolutionNLPSubscriptionScopeClient().Post(ctx, &armselfhelp.DiscoverySolutionNLPSubscriptionScopeClientPostOptions{DiscoverSolutionRequest: &armselfhelp.DiscoveryNlpRequest{
	IssueSummary: to.Ptr("how to retrieve certs from deleted keyvault."),
	ResourceID:   to.Ptr("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"),
	ServiceID:    to.Ptr("0d0fcd2e-c4fd-4349-8497-200edb39s3ca"),
},
})
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.DiscoveryNlpResponse = armselfhelp.DiscoveryNlpResponse{
// 	Value: []*armselfhelp.SolutionNlpMetadataResource{
// 		{
// 			Name: to.Ptr("SampleProblemClassificationId1"),
// 			Type: to.Ptr("Microsoft.Help/discoverySolutions"),
// 			ID: to.Ptr("/subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/providers/Microsoft.Help/discoverSolutions/SampleProblemClassificationId1"),
// 			Properties: &armselfhelp.NlpSolutions{
// 				ProblemClassificationID: to.Ptr("SampleProblemClassificationId1"),
// 				ProblemDescription: to.Ptr("SampleDescription1"),
// 				ProblemTitle: to.Ptr("SampleTitle1"),
// 				RelatedServices: []*armselfhelp.ClassificationService{
// 					{
// 						DisplayName: to.Ptr("SQL Server in VM - Linux"),
// 						ResourceTypes: []*string{
// 							to.Ptr("MICROSOFT.CLASSICCOMPUTE/VIRTUALMACHINES"),
// 							to.Ptr("MICROSOFT.COMPUTE/VIRTUALMACHINES")},
// 							ServiceID: to.Ptr("/providers/Microsoft.Support/services/40ef020e-8ae7-8d57-b538-9153c47cee69"),
// 					}},
// 					ServiceID: to.Ptr("SampleServiceId1"),
// 					Solutions: []*armselfhelp.SolutionMetadataProperties{
// 						{
// 							Description: to.Ptr("This is an azure solution to troubleshoot subscription issues."),
// 							RequiredInputs: []*string{
// 								to.Ptr("SubscriptionId")},
// 								SolutionID: to.Ptr("SampleSolutionId1"),
// 								SolutionType: to.Ptr(armselfhelp.SolutionTypeDiagnostics),
// 							},
// 							{
// 								Description: to.Ptr("This is an azure solution to troubleshoot keyvault resource."),
// 								RequiredInputs: []*string{
// 									to.Ptr("SubscriptionId")},
// 									SolutionID: to.Ptr("SampleSolutionId2"),
// 									SolutionType: to.Ptr(armselfhelp.SolutionTypeSolutions),
// 							}},
// 						},
// 				}},
// 			}
Output:

type DiscoverySolutionNLPSubscriptionScopeClientPostOptions

type DiscoverySolutionNLPSubscriptionScopeClientPostOptions struct {
	// Request body for discovering solutions using NLP.
	DiscoverSolutionRequest *DiscoveryNlpRequest
}

DiscoverySolutionNLPSubscriptionScopeClientPostOptions contains the optional parameters for the DiscoverySolutionNLPSubscriptionScopeClient.Post method.

type DiscoverySolutionNLPSubscriptionScopeClientPostResponse

type DiscoverySolutionNLPSubscriptionScopeClientPostResponse struct {
	// Successfully fetched list of solution metadata.
	DiscoveryNlpResponse
}

DiscoverySolutionNLPSubscriptionScopeClientPostResponse contains the response from method DiscoverySolutionNLPSubscriptionScopeClient.Post.

type DiscoverySolutionNLPTenantScopeClient

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

DiscoverySolutionNLPTenantScopeClient contains the methods for the DiscoverySolutionNLPTenantScope group. Don't use this type directly, use NewDiscoverySolutionNLPTenantScopeClient() instead.

func NewDiscoverySolutionNLPTenantScopeClient

func NewDiscoverySolutionNLPTenantScopeClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DiscoverySolutionNLPTenantScopeClient, error)

NewDiscoverySolutionNLPTenantScopeClient creates a new instance of DiscoverySolutionNLPTenantScopeClient with the specified values.

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

func (*DiscoverySolutionNLPTenantScopeClient) Post

Post - Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • options - DiscoverySolutionNLPTenantScopeClientPostOptions contains the optional parameters for the DiscoverySolutionNLPTenantScopeClient.Post method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtTenantScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDiscoverySolutionNLPTenantScopeClient().Post(ctx, &armselfhelp.DiscoverySolutionNLPTenantScopeClientPostOptions{DiscoverSolutionRequest: &armselfhelp.DiscoveryNlpRequest{
	IssueSummary: to.Ptr("how to retrieve certs from deleted keyvault."),
	ResourceID:   to.Ptr("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"),
	ServiceID:    to.Ptr("0d0fcd2e-c4fd-4349-8497-200edb39s3ca"),
},
})
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.DiscoveryNlpResponse = armselfhelp.DiscoveryNlpResponse{
// 	Value: []*armselfhelp.SolutionNlpMetadataResource{
// 		{
// 			Name: to.Ptr("SampleProblemClassificationId1"),
// 			Type: to.Ptr("Microsoft.Help/discoverySolutions"),
// 			ID: to.Ptr("/subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/providers/Microsoft.Help/discoverSolutions/SampleProblemClassificationId1"),
// 			Properties: &armselfhelp.NlpSolutions{
// 				ProblemClassificationID: to.Ptr("SampleProblemClassificationId1"),
// 				ProblemDescription: to.Ptr("SampleDescription1"),
// 				ProblemTitle: to.Ptr("SampleTitle1"),
// 				RelatedServices: []*armselfhelp.ClassificationService{
// 					{
// 						DisplayName: to.Ptr("SQL Server in VM - Linux"),
// 						ResourceTypes: []*string{
// 							to.Ptr("MICROSOFT.CLASSICCOMPUTE/VIRTUALMACHINES"),
// 							to.Ptr("MICROSOFT.COMPUTE/VIRTUALMACHINES")},
// 							ServiceID: to.Ptr("/providers/Microsoft.Support/services/40ef020e-8ae7-8d57-b538-9153c47cee69"),
// 					}},
// 					ServiceID: to.Ptr("SampleServiceId1"),
// 					Solutions: []*armselfhelp.SolutionMetadataProperties{
// 						{
// 							Description: to.Ptr("This is an azure solution to troubleshoot subscription issues."),
// 							RequiredInputs: []*string{
// 								to.Ptr("SubscriptionId")},
// 								SolutionID: to.Ptr("SampleSolutionId1"),
// 								SolutionType: to.Ptr(armselfhelp.SolutionTypeDiagnostics),
// 							},
// 							{
// 								Description: to.Ptr("This is an azure solution to troubleshoot keyvault resource."),
// 								RequiredInputs: []*string{
// 									to.Ptr("SubscriptionId")},
// 									SolutionID: to.Ptr("SampleSolutionId2"),
// 									SolutionType: to.Ptr(armselfhelp.SolutionTypeSolutions),
// 							}},
// 						},
// 				}},
// 			}
Output:

type DiscoverySolutionNLPTenantScopeClientPostOptions

type DiscoverySolutionNLPTenantScopeClientPostOptions struct {
	// Request body for discovering solutions using NLP.
	DiscoverSolutionRequest *DiscoveryNlpRequest
}

DiscoverySolutionNLPTenantScopeClientPostOptions contains the optional parameters for the DiscoverySolutionNLPTenantScopeClient.Post method.

type DiscoverySolutionNLPTenantScopeClientPostResponse

type DiscoverySolutionNLPTenantScopeClientPostResponse struct {
	// Successfully fetched list of solution metadata.
	DiscoveryNlpResponse
}

DiscoverySolutionNLPTenantScopeClientPostResponse contains the response from method DiscoverySolutionNLPTenantScopeClient.Post.

type Error

type Error struct {
	// An array of additional nested error response info objects, as described by this contract.
	Details []*Error

	// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string

	// READ-ONLY; Description of the error.
	Message *string

	// READ-ONLY; Service specific error type which serves as additional context for the error herein.
	Type *string
}

Error definition.

func (Error) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Error.

func (*Error) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Error.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ExecutionStatus

type ExecutionStatus string

ExecutionStatus - Status of Troubleshooter Step execution.

const (
	// ExecutionStatusFailed - Step execution failed
	ExecutionStatusFailed ExecutionStatus = "Failed"
	// ExecutionStatusRunning - Step execution running
	ExecutionStatusRunning ExecutionStatus = "Running"
	// ExecutionStatusSuccess - Step execution succeeded.
	ExecutionStatusSuccess ExecutionStatus = "Success"
	// ExecutionStatusWarning - Step execution warning
	ExecutionStatusWarning ExecutionStatus = "Warning"
)

func PossibleExecutionStatusValues

func PossibleExecutionStatusValues() []ExecutionStatus

PossibleExecutionStatusValues returns the possible values for the ExecutionStatus const type.

type Filter

type Filter struct {
	// Filter name
	Name *string

	// Filter operator
	Operator *string

	// Filter values
	Values *string
}

Filter criterion

func (Filter) MarshalJSON

func (f Filter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Filter.

func (*Filter) UnmarshalJSON

func (f *Filter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Filter.

type FilterGroup

type FilterGroup struct {
	// List of filters
	Filter []*Filter
}

FilterGroup - Filter group

func (FilterGroup) MarshalJSON

func (f FilterGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilterGroup.

func (*FilterGroup) UnmarshalJSON

func (f *FilterGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FilterGroup.

type ImportanceLevel

type ImportanceLevel string

ImportanceLevel - Importance level of the insight.

const (
	// ImportanceLevelCritical - A critical insight has been found after running the diagnostic.
	ImportanceLevelCritical ImportanceLevel = "Critical"
	// ImportanceLevelInformation - An information insight has been found after running the diagnostic.
	ImportanceLevelInformation ImportanceLevel = "Information"
	// ImportanceLevelWarning - A warning insight has been found after running the diagnostic.
	ImportanceLevelWarning ImportanceLevel = "Warning"
)

func PossibleImportanceLevelValues

func PossibleImportanceLevelValues() []ImportanceLevel

PossibleImportanceLevelValues returns the possible values for the ImportanceLevel const type.

type Insight

type Insight struct {
	// Article id.
	ID *string

	// Importance level of the insight.
	ImportanceLevel *ImportanceLevel

	// Detailed result content.
	Results *string

	// This insight's title.
	Title *string
}

Insight - Detailed insights(s) obtained via the invocation of an insight diagnostic

func (Insight) MarshalJSON

func (i Insight) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Insight.

func (*Insight) UnmarshalJSON

func (i *Insight) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Insight.

type MetricsBasedChart

type MetricsBasedChart struct {
	// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum
	AggregationType *AggregationType

	// Filter group
	FilterGroup *FilterGroup

	// Chart name
	Name *string

	// Place holder used in HTML Content replace control with the content
	ReplacementKey *string

	// Time span duration
	TimeSpanDuration *string

	// Chart title
	Title *string
}

MetricsBasedChart - Solutions metrics based chart

func (MetricsBasedChart) MarshalJSON

func (m MetricsBasedChart) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricsBasedChart.

func (*MetricsBasedChart) UnmarshalJSON

func (m *MetricsBasedChart) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsBasedChart.

type Name

type Name string

Name - Trigger criterion name.

const (
	NameProblemClassificationID Name = "ProblemClassificationId"
	NameReplacementKey          Name = "ReplacementKey"
	NameSolutionID              Name = "SolutionId"
)

func PossibleNameValues

func PossibleNameValues() []Name

PossibleNameValues returns the possible values for the Name const type.

type NlpSolutions

type NlpSolutions struct {
	// Id of the ProblemClassification (https://learn.microsoft.com/en-us/rest/api/support/problem-classifications?view=rest-support-2020-04-01)
	// that may be used to create a support ticket.
	ProblemClassificationID *string

	// Description of the problem classification.
	ProblemDescription *string

	// Title of the problem classification.
	ProblemTitle *string

	// The set of services that are most likely related to the request. If relatedServices is included in the response then solutions
	// may not be discovered until the client calls a second time specifying one
	// of the service Ids in the relatedServices object.
	RelatedServices []*ClassificationService

	// Id of the service (https://learn.microsoft.com/en-us/rest/api/support/services?view=rest-support-2020-04-01) that may be
	// used to create a support ticket.
	ServiceID *string

	// The list of solution metadata.
	Solutions []*SolutionMetadataProperties
}

NlpSolutions - Nlp metadata.

func (NlpSolutions) MarshalJSON

func (n NlpSolutions) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NlpSolutions.

func (*NlpSolutions) UnmarshalJSON

func (n *NlpSolutions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NlpSolutions.

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 - Returns list of operations.

Generated from API version 2024-03-01-preview

  • 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/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListOperations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", 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 = armselfhelp.OperationListResult{
	// 	Value: []*armselfhelp.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.Help/diagnostics/read"),
	// 			Display: &armselfhelp.OperationDisplay{
	// 				Description: to.Ptr("Created and Reads a diagnostic resource to troubleshoot an issue with a resource."),
	// 				Operation: to.Ptr("Create/Read a Diagnostic"),
	// 				Provider: to.Ptr("Microsoft.Diagnostics"),
	// 				Resource: to.Ptr("Diagnostics"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.Help/discoverySolutions/read"),
	// 			Display: &armselfhelp.OperationDisplay{
	// 				Description: to.Ptr("Returns list of solutions based on ResourceType or ProblemClassficationId"),
	// 				Operation: to.Ptr("List of available solutions."),
	// 				Provider: to.Ptr("Microsoft.Help"),
	// 				Resource: to.Ptr("DiscoverySolutions"),
	// 			},
	// 			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 QuestionContentType

type QuestionContentType string

QuestionContentType - Default is Text.

const (
	QuestionContentTypeHTML     QuestionContentType = "Html"
	QuestionContentTypeMarkdown QuestionContentType = "Markdown"
	QuestionContentTypeText     QuestionContentType = "Text"
)

func PossibleQuestionContentTypeValues

func PossibleQuestionContentTypeValues() []QuestionContentType

PossibleQuestionContentTypeValues returns the possible values for the QuestionContentType const type.

type QuestionType

type QuestionType string

QuestionType - Type of Question

const (
	// QuestionTypeDateTimePicker - DateTime Picker
	QuestionTypeDateTimePicker QuestionType = "DateTimePicker"
	// QuestionTypeDropdown - SingleChoice dropdown.
	QuestionTypeDropdown QuestionType = "Dropdown"
	// QuestionTypeMultiLineInfoBox - MultiLineInfoBox
	QuestionTypeMultiLineInfoBox QuestionType = "MultiLineInfoBox"
	// QuestionTypeMultiSelect - Multi Select
	QuestionTypeMultiSelect QuestionType = "MultiSelect"
	// QuestionTypeRadioButton - SingleChoice radio button
	QuestionTypeRadioButton QuestionType = "RadioButton"
	// QuestionTypeTextInput - Text Input
	QuestionTypeTextInput QuestionType = "TextInput"
)

func PossibleQuestionTypeValues

func PossibleQuestionTypeValues() []QuestionType

PossibleQuestionTypeValues returns the possible values for the QuestionType const type.

type ReplacementMaps

type ReplacementMaps struct {
	// Solution diagnostics results.
	Diagnostics []*SolutionsDiagnostic

	// Solution metrics based charts
	MetricsBasedCharts []*MetricsBasedChart

	// Solutions Troubleshooters
	Troubleshooters []*SolutionsTroubleshooters

	// Group of Videos
	VideoGroups []*VideoGroup

	// Video solutions, which have the power to engage the customer by stimulating their senses
	Videos []*Video

	// Solution AzureKB results
	WebResults []*WebResult
}

ReplacementMaps - Solution replacement maps.

func (ReplacementMaps) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReplacementMaps.

func (*ReplacementMaps) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReplacementMaps.

type ReplacementMapsSelfHelp

type ReplacementMapsSelfHelp struct {
	// Group of Videos
	VideoGroups []*VideoGroup

	// Video solutions, which have the power to engage the customer by stimulating their senses
	Videos []*Video

	// Solution AzureKB results
	WebResults []*WebResult
}

ReplacementMapsSelfHelp - Solution replacement maps.

func (ReplacementMapsSelfHelp) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReplacementMapsSelfHelp.

func (*ReplacementMapsSelfHelp) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReplacementMapsSelfHelp.

type ResponseOption

type ResponseOption struct {
	// Unique string.
	Key *string

	// Option description
	Value *string
}

ResponseOption - The status of the resource.

func (ResponseOption) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResponseOption.

func (*ResponseOption) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResponseOption.

type ResponseValidationProperties

type ResponseValidationProperties struct {
	// Default True
	IsRequired *bool

	// Max text input (open Ended Text).
	MaxLength *int64

	// Regex used for the input validation.
	Regex *string

	// Validation Error Message.
	ValidationErrorMessage *string

	// Validation scope
	ValidationScope *ValidationScope
}

ResponseValidationProperties - Troubleshooter step input response validation properties

func (ResponseValidationProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResponseValidationProperties.

func (*ResponseValidationProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResponseValidationProperties.

type RestartTroubleshooterResponse

type RestartTroubleshooterResponse struct {
	// READ-ONLY; Updated TroubleshooterResource Name .
	TroubleshooterResourceName *string
}

RestartTroubleshooterResponse - Troubleshooter restart response

func (RestartTroubleshooterResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RestartTroubleshooterResponse.

func (*RestartTroubleshooterResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RestartTroubleshooterResponse.

type ResultType

type ResultType string

ResultType - Result type of the search result.

const (
	ResultTypeCommunity     ResultType = "Community"
	ResultTypeDocumentation ResultType = "Documentation"
)

func PossibleResultTypeValues

func PossibleResultTypeValues() []ResultType

PossibleResultTypeValues returns the possible values for the ResultType const type.

type SearchResult

type SearchResult struct {
	// Confidence of the search result.
	Confidence *Confidence

	// Content of the search result.
	Content *string

	// Link to the document.
	Link *string

	// rank of the search result
	Rank *int32

	// Result type of the search result.
	ResultType *ResultType

	// Unique id of the result.
	SolutionID *string

	// Source of the search result.
	Source *string

	// Title of the search result.
	Title *string
}

SearchResult - Details of an AzureKB search result.

func (SearchResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SearchResult.

func (*SearchResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SearchResult.

type Section

type Section struct {
	// Solution sections content.
	Content *string

	// Solution replacement maps.
	ReplacementMaps *ReplacementMaps

	// Solution sections title.
	Title *string
}

Section - Part of the solution and are dividers in the solution rendering.

func (Section) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Section.

func (*Section) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Section.

type SectionSelfHelp

type SectionSelfHelp struct {
	// Solution sections content.
	Content *string

	// Solution replacement maps.
	ReplacementMaps *ReplacementMapsSelfHelp

	// Solution sections title.
	Title *string
}

SectionSelfHelp - Part of the solution and are dividers in the solution rendering.

func (SectionSelfHelp) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SectionSelfHelp.

func (*SectionSelfHelp) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SectionSelfHelp.

type SimplifiedSolutionsClient

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

SimplifiedSolutionsClient contains the methods for the SimplifiedSolutions group. Don't use this type directly, use NewSimplifiedSolutionsClient() instead.

func NewSimplifiedSolutionsClient

func NewSimplifiedSolutionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SimplifiedSolutionsClient, error)

NewSimplifiedSolutionsClient creates a new instance of SimplifiedSolutionsClient with the specified values.

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

func (*SimplifiedSolutionsClient) BeginCreate

func (client *SimplifiedSolutionsClient) BeginCreate(ctx context.Context, scope string, simplifiedSolutionsResourceName string, simplifiedSolutionsRequestBody SimplifiedSolutionsResource, options *SimplifiedSolutionsClientBeginCreateOptions) (*runtime.Poller[SimplifiedSolutionsClientCreateResponse], error)

BeginCreate - Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. Simplified Solutions API makes the consumption of solutions APIs easier while still providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't have to worry about stitching together the article using replacement maps and can use the content in the API response to directly render as HTML content. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • simplifiedSolutionsResourceName - Simplified Solutions Resource Name.
  • simplifiedSolutionsRequestBody - The required request body for simplified Solutions resource creation.
  • options - SimplifiedSolutionsClientBeginCreateOptions contains the optional parameters for the SimplifiedSolutionsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/SimplifiedSolutions_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSimplifiedSolutionsClient().BeginCreate(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "simplifiedSolutionsResourceName1", armselfhelp.SimplifiedSolutionsResource{
	Properties: &armselfhelp.SimplifiedSolutionsResourceProperties{
		Parameters: map[string]*string{
			"resourceUri": to.Ptr("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"),
		},
		SolutionID: to.Ptr("sampleSolutionId"),
	},
}, 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.SimplifiedSolutionsResource = armselfhelp.SimplifiedSolutionsResource{
// 	Name: to.Ptr("simplifiedSolutionsResourceName1"),
// 	Type: to.Ptr("Microsoft.Help/simplifiedSolutions"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/solutions/SolutionResourceName1"),
// 	Properties: &armselfhelp.SimplifiedSolutionsResourceProperties{
// 		Content: to.Ptr("<p>sample content</p>"),
// 		ProvisioningState: to.Ptr(armselfhelp.SolutionProvisioningStateSucceeded),
// 		SolutionID: to.Ptr("sampleSolutionId"),
// 		Title: to.Ptr("RBAC Authentication Common Solutions"),
// 	},
// }
Output:

func (*SimplifiedSolutionsClient) Get

func (client *SimplifiedSolutionsClient) Get(ctx context.Context, scope string, simplifiedSolutionsResourceName string, options *SimplifiedSolutionsClientGetOptions) (SimplifiedSolutionsClientGetResponse, error)

Get - Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • simplifiedSolutionsResourceName - Simplified Solutions Resource Name.
  • options - SimplifiedSolutionsClientGetOptions contains the optional parameters for the SimplifiedSolutionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/SimplifiedSolutions_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSimplifiedSolutionsClient().Get(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "simplifiedSolutionsResourceName1", 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.SimplifiedSolutionsResource = armselfhelp.SimplifiedSolutionsResource{
// 	Name: to.Ptr("simplifiedSolutionsResourceName1"),
// 	Type: to.Ptr("Microsoft.Help/simplifiedSolutions"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/solutions/SolutionResource1"),
// 	Properties: &armselfhelp.SimplifiedSolutionsResourceProperties{
// 		Content: to.Ptr("<p>Sample content</p>"),
// 		ProvisioningState: to.Ptr(armselfhelp.SolutionProvisioningStateSucceeded),
// 		SolutionID: to.Ptr("sampleSolutionId1"),
// 		Title: to.Ptr("RBAC Authentication Common Solutions"),
// 	},
// }
Output:

type SimplifiedSolutionsClientBeginCreateOptions

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

SimplifiedSolutionsClientBeginCreateOptions contains the optional parameters for the SimplifiedSolutionsClient.BeginCreate method.

type SimplifiedSolutionsClientCreateResponse

type SimplifiedSolutionsClientCreateResponse struct {
	// Simplified Solutions response.
	SimplifiedSolutionsResource
}

SimplifiedSolutionsClientCreateResponse contains the response from method SimplifiedSolutionsClient.BeginCreate.

type SimplifiedSolutionsClientGetOptions

type SimplifiedSolutionsClientGetOptions struct {
}

SimplifiedSolutionsClientGetOptions contains the optional parameters for the SimplifiedSolutionsClient.Get method.

type SimplifiedSolutionsClientGetResponse

type SimplifiedSolutionsClientGetResponse struct {
	// Simplified Solutions response.
	SimplifiedSolutionsResource
}

SimplifiedSolutionsClientGetResponse contains the response from method SimplifiedSolutionsClient.Get.

type SimplifiedSolutionsResource

type SimplifiedSolutionsResource struct {
	// Simplified Solutions result
	Properties *SimplifiedSolutionsResourceProperties

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

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

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

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

SimplifiedSolutionsResource - Simplified Solutions response.

func (SimplifiedSolutionsResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SimplifiedSolutionsResource.

func (*SimplifiedSolutionsResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SimplifiedSolutionsResource.

type SimplifiedSolutionsResourceProperties

type SimplifiedSolutionsResourceProperties struct {
	// Client input parameters to run Simplified Solutions
	Parameters map[string]*string

	// Solution Id to identify single Simplified Solution.
	SolutionID *string

	// READ-ONLY; Additional parameter response for Simplified Solutions
	Appendix map[string]*string

	// READ-ONLY; The HTML content that needs to be rendered and shown to customer.
	Content *string

	// READ-ONLY; Status of Simplified Solution provisioning.
	ProvisioningState *SolutionProvisioningState

	// READ-ONLY; The title.
	Title *string
}

SimplifiedSolutionsResourceProperties - Simplified Solutions result

func (SimplifiedSolutionsResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SimplifiedSolutionsResourceProperties.

func (*SimplifiedSolutionsResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SimplifiedSolutionsResourceProperties.

type SolutionClient

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

SolutionClient contains the methods for the Solution group. Don't use this type directly, use NewSolutionClient() instead.

func NewSolutionClient

func NewSolutionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SolutionClient, error)

NewSolutionClient creates a new instance of SolutionClient with the specified values.

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

func (*SolutionClient) BeginCreate

func (client *SolutionClient) BeginCreate(ctx context.Context, scope string, solutionResourceName string, solutionRequestBody SolutionResource, options *SolutionClientBeginCreateOptions) (*runtime.Poller[SolutionClientCreateResponse], error)

BeginCreate - Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass: (1.) Dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations. (2.) Rich instructional video tutorials and illustrative diagrams and images. (3.) Thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • solutionResourceName - Solution resource Name.
  • solutionRequestBody - The required request body for this solution resource creation.
  • options - SolutionClientBeginCreateOptions contains the optional parameters for the SolutionClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSolutionClient().BeginCreate(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResourceName1", armselfhelp.SolutionResource{
	Properties: &armselfhelp.SolutionResourceProperties{
		Parameters: map[string]*string{
			"resourceUri": to.Ptr("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"),
		},
		TriggerCriteria: []*armselfhelp.TriggerCriterion{
			{
				Name:  to.Ptr(armselfhelp.NameSolutionID),
				Value: to.Ptr("SolutionId1"),
			}},
	},
}, 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.SolutionResource = armselfhelp.SolutionResource{
// 	Name: to.Ptr("SolutionResourceName1"),
// 	Type: to.Ptr("Microsoft.Help/solutions"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/solutions/SolutionResourceName1"),
// 	Properties: &armselfhelp.SolutionResourceProperties{
// 		Content: to.Ptr("<p>sample content</p>"),
// 		ProvisioningState: to.Ptr(armselfhelp.SolutionProvisioningStateSucceeded),
// 		ReplacementMaps: &armselfhelp.ReplacementMaps{
// 			Diagnostics: []*armselfhelp.SolutionsDiagnostic{
// 				{
// 					Insights: []*armselfhelp.Insight{
// 						{
// 							ID: to.Ptr("InsightArticleId"),
// 							ImportanceLevel: to.Ptr(armselfhelp.ImportanceLevelCritical),
// 							Results: to.Ptr("Article Content"),
// 							Title: to.Ptr("An example title for an Insight"),
// 					}},
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					SolutionID: to.Ptr("sampleSolutionId1"),
// 					Status: to.Ptr(armselfhelp.StatusSucceeded),
// 					StatusDetails: to.Ptr(""),
// 				},
// 				{
// 					Insights: []*armselfhelp.Insight{
// 					},
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					RequiredParameters: []*string{
// 						to.Ptr("parameter1"),
// 						to.Ptr("parameter2")},
// 						SolutionID: to.Ptr("sampleSolutionId2"),
// 						Status: to.Ptr(armselfhelp.StatusFailed),
// 						StatusDetails: to.Ptr(""),
// 					},
// 					{
// 						Insights: []*armselfhelp.Insight{
// 						},
// 						ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 						RequiredParameters: []*string{
// 							to.Ptr("parameter1"),
// 							to.Ptr("parameter2")},
// 							SolutionID: to.Ptr("sampleSolutionId3"),
// 							Status: to.Ptr(armselfhelp.StatusFailed),
// 							StatusDetails: to.Ptr("Timeout text authored in Solution article "),
// 						},
// 						{
// 							Insights: []*armselfhelp.Insight{
// 							},
// 							ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 							RequiredParameters: []*string{
// 								to.Ptr("parameter1"),
// 								to.Ptr("parameter2")},
// 								SolutionID: to.Ptr("sampleSolutionId4"),
// 								Status: to.Ptr(armselfhelp.StatusFailed),
// 								StatusDetails: to.Ptr("Sample status details"),
// 						}},
// 						MetricsBasedCharts: []*armselfhelp.MetricsBasedChart{
// 							{
// 								Name: to.Ptr("CPU_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("CPU Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("memory_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("Memory Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("io_consumption_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("IOPS Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("active_connections"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("Active Connections in the last one day"),
// 						}},
// 						VideoGroups: []*armselfhelp.VideoGroup{
// 							{
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								Videos: []*armselfhelp.VideoGroupVideo{
// 									{
// 										Src: to.Ptr("sampleLink"),
// 										Title: to.Ptr("widthtest"),
// 								}},
// 						}},
// 						Videos: []*armselfhelp.Video{
// 							{
// 								Src: to.Ptr("sampleLink"),
// 								Title: to.Ptr("CI - CD with Azure DevOps"),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 						}},
// 						WebResults: []*armselfhelp.WebResult{
// 							{
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								SearchResults: []*armselfhelp.SearchResult{
// 									{
// 										Confidence: to.Ptr(armselfhelp.ConfidenceHigh),
// 										Content: to.Ptr("I sysprep a VM and now I cannot connect to it via <b>RDP</b>"),
// 										Link: to.Ptr("sampleLink"),
// 										Rank: to.Ptr[int32](1),
// 										ResultType: to.Ptr(armselfhelp.ResultTypeCommunity),
// 										SolutionID: to.Ptr("sampleSolutionId"),
// 										Source: to.Ptr("sampleSource"),
// 										Title: to.Ptr("Cannot RDP VM after SysPrep"),
// 								}},
// 						}},
// 					},
// 					Sections: []*armselfhelp.Section{
// 						{
// 							Content: to.Ptr("<p>sample content</p>"),
// 							ReplacementMaps: &armselfhelp.ReplacementMaps{
// 							},
// 							Title: to.Ptr("RBAC Authentication Common Solutions"),
// 					}},
// 					SolutionID: to.Ptr("sampleSolutionId"),
// 					Title: to.Ptr("RBAC Authentication Common Solutions"),
// 				},
// 			}
Output:

func (*SolutionClient) BeginUpdate

func (client *SolutionClient) BeginUpdate(ctx context.Context, scope string, solutionResourceName string, solutionPatchRequestBody SolutionPatchRequestBody, options *SolutionClientBeginUpdateOptions) (*runtime.Poller[SolutionClientUpdateResponse], error)

BeginUpdate - Update the requiredInputs or additional information needed to execute the solution If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • solutionResourceName - Solution resource Name.
  • solutionPatchRequestBody - The required request body for updating a solution resource.
  • options - SolutionClientBeginUpdateOptions contains the optional parameters for the SolutionClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSolutionClient().BeginUpdate(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResourceName1", armselfhelp.SolutionPatchRequestBody{}, 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.SolutionResource = armselfhelp.SolutionResource{
// 	Name: to.Ptr("SolutionResourceName1"),
// 	Type: to.Ptr("Microsoft.Help/solutions"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/solutions/SolutionResourceName1"),
// 	Properties: &armselfhelp.SolutionResourceProperties{
// 		Content: to.Ptr("<p>sample content</p>"),
// 		ProvisioningState: to.Ptr(armselfhelp.SolutionProvisioningStateSucceeded),
// 		ReplacementMaps: &armselfhelp.ReplacementMaps{
// 			Diagnostics: []*armselfhelp.SolutionsDiagnostic{
// 				{
// 					Insights: []*armselfhelp.Insight{
// 						{
// 							ID: to.Ptr("InsightArticleId"),
// 							ImportanceLevel: to.Ptr(armselfhelp.ImportanceLevelCritical),
// 							Results: to.Ptr("Article Content"),
// 							Title: to.Ptr("An example title for an Insight"),
// 					}},
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					SolutionID: to.Ptr("sampleSolutionId1"),
// 					Status: to.Ptr(armselfhelp.StatusSucceeded),
// 					StatusDetails: to.Ptr(""),
// 				},
// 				{
// 					Insights: []*armselfhelp.Insight{
// 					},
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					RequiredParameters: []*string{
// 						to.Ptr("parameter1"),
// 						to.Ptr("parameter2")},
// 						SolutionID: to.Ptr("sampleSolutionId2"),
// 						Status: to.Ptr(armselfhelp.StatusFailed),
// 						StatusDetails: to.Ptr(""),
// 					},
// 					{
// 						Insights: []*armselfhelp.Insight{
// 						},
// 						ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 						RequiredParameters: []*string{
// 							to.Ptr("parameter1"),
// 							to.Ptr("parameter2")},
// 							SolutionID: to.Ptr("sampleSolutionId3"),
// 							Status: to.Ptr(armselfhelp.StatusFailed),
// 							StatusDetails: to.Ptr("Timeout text authored in Solution article "),
// 						},
// 						{
// 							Insights: []*armselfhelp.Insight{
// 							},
// 							ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 							RequiredParameters: []*string{
// 								to.Ptr("parameter1"),
// 								to.Ptr("parameter2")},
// 								SolutionID: to.Ptr("sampleSolutionId4"),
// 								Status: to.Ptr(armselfhelp.StatusFailed),
// 								StatusDetails: to.Ptr("Sample status details"),
// 						}},
// 						MetricsBasedCharts: []*armselfhelp.MetricsBasedChart{
// 							{
// 								Name: to.Ptr("CPU_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("CPU Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("memory_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("Memory Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("io_consumption_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("IOPS Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("active_connections"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("Active Connections in the last one day"),
// 						}},
// 						VideoGroups: []*armselfhelp.VideoGroup{
// 							{
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								Videos: []*armselfhelp.VideoGroupVideo{
// 									{
// 										Src: to.Ptr("sampleLink"),
// 										Title: to.Ptr("widthtest"),
// 								}},
// 						}},
// 						Videos: []*armselfhelp.Video{
// 							{
// 								Src: to.Ptr("sampleLink"),
// 								Title: to.Ptr("CI - CD with Azure DevOps"),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 						}},
// 						WebResults: []*armselfhelp.WebResult{
// 							{
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								SearchResults: []*armselfhelp.SearchResult{
// 									{
// 										Confidence: to.Ptr(armselfhelp.ConfidenceHigh),
// 										Content: to.Ptr("I sysprep a VM and now I cannot connect to it via <b>RDP</b>"),
// 										Link: to.Ptr("sampleLink"),
// 										Rank: to.Ptr[int32](1),
// 										ResultType: to.Ptr(armselfhelp.ResultTypeCommunity),
// 										SolutionID: to.Ptr("sampleSolutionId"),
// 										Source: to.Ptr("sampleSource"),
// 										Title: to.Ptr("Cannot RDP VM after SysPrep"),
// 								}},
// 						}},
// 					},
// 					Sections: []*armselfhelp.Section{
// 						{
// 							Content: to.Ptr("<p>sample content</p>"),
// 							ReplacementMaps: &armselfhelp.ReplacementMaps{
// 							},
// 							Title: to.Ptr("RBAC Authentication Common Solutions"),
// 					}},
// 					SolutionID: to.Ptr("sampleSolutionId"),
// 					Title: to.Ptr("RBAC Authentication Common Solutions"),
// 				},
// 			}
Output:

func (*SolutionClient) Get

func (client *SolutionClient) Get(ctx context.Context, scope string, solutionResourceName string, options *SolutionClientGetOptions) (SolutionClientGetResponse, error)

Get - Get the solution using the applicable solutionResourceName while creating the solution. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • solutionResourceName - Solution resource Name.
  • options - SolutionClientGetOptions contains the optional parameters for the SolutionClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSolutionClient().Get(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResource1", 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.SolutionResource = armselfhelp.SolutionResource{
// 	Name: to.Ptr("SolutionResource1"),
// 	Type: to.Ptr("Microsoft.Help/solutions"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/solutions/SolutionResource1"),
// 	Properties: &armselfhelp.SolutionResourceProperties{
// 		Content: to.Ptr("<p>Sample content</p>"),
// 		ProvisioningState: to.Ptr(armselfhelp.SolutionProvisioningStateSucceeded),
// 		ReplacementMaps: &armselfhelp.ReplacementMaps{
// 			Diagnostics: []*armselfhelp.SolutionsDiagnostic{
// 				{
// 					Insights: []*armselfhelp.Insight{
// 						{
// 							ID: to.Ptr("InsightArticleId"),
// 							ImportanceLevel: to.Ptr(armselfhelp.ImportanceLevelCritical),
// 							Results: to.Ptr("Article Content"),
// 							Title: to.Ptr("An example title for an Insight"),
// 					}},
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					SolutionID: to.Ptr("sampleSolutionId3"),
// 					Status: to.Ptr(armselfhelp.StatusSucceeded),
// 					StatusDetails: to.Ptr(""),
// 				},
// 				{
// 					Insights: []*armselfhelp.Insight{
// 					},
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					RequiredParameters: []*string{
// 						to.Ptr("parameter1"),
// 						to.Ptr("parameter2")},
// 						SolutionID: to.Ptr("sampleSolutionId4"),
// 						Status: to.Ptr(armselfhelp.StatusSucceeded),
// 						StatusDetails: to.Ptr(""),
// 					},
// 					{
// 						Insights: []*armselfhelp.Insight{
// 						},
// 						ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 						RequiredParameters: []*string{
// 							to.Ptr("parameter1"),
// 							to.Ptr("parameter2")},
// 							SolutionID: to.Ptr("sampleSolutionId5"),
// 							Status: to.Ptr(armselfhelp.StatusFailed),
// 							StatusDetails: to.Ptr("Timeout text authored in Solution article "),
// 						},
// 						{
// 							Insights: []*armselfhelp.Insight{
// 							},
// 							ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 							RequiredParameters: []*string{
// 								to.Ptr("parameter1"),
// 								to.Ptr("parameter2")},
// 								SolutionID: to.Ptr("sampleSolutionId6"),
// 								Status: to.Ptr(armselfhelp.StatusFailed),
// 								StatusDetails: to.Ptr("Some text "),
// 						}},
// 						MetricsBasedCharts: []*armselfhelp.MetricsBasedChart{
// 							{
// 								Name: to.Ptr("CPU_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("CPU Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("memory_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("Memory Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("io_consumption_percent"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("IOPS Usage in the last one day"),
// 							},
// 							{
// 								Name: to.Ptr("active_connections"),
// 								AggregationType: to.Ptr(armselfhelp.AggregationTypeMax),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								TimeSpanDuration: to.Ptr("1d"),
// 								Title: to.Ptr("Active Connections in the last one day"),
// 						}},
// 						VideoGroups: []*armselfhelp.VideoGroup{
// 							{
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								Videos: []*armselfhelp.VideoGroupVideo{
// 									{
// 										Src: to.Ptr("sampleVideoSource2"),
// 										Title: to.Ptr("widthtest"),
// 								}},
// 						}},
// 						Videos: []*armselfhelp.Video{
// 							{
// 								Src: to.Ptr("sampleVideoSource"),
// 								Title: to.Ptr("CI - CD with Azure DevOps"),
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 						}},
// 						WebResults: []*armselfhelp.WebResult{
// 							{
// 								ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 								SearchResults: []*armselfhelp.SearchResult{
// 									{
// 										Confidence: to.Ptr(armselfhelp.ConfidenceHigh),
// 										Content: to.Ptr("I sysprep a VM and now I cannot connect to it via <b>RDP</b>"),
// 										Link: to.Ptr("sampleLink"),
// 										Rank: to.Ptr[int32](1),
// 										ResultType: to.Ptr(armselfhelp.ResultTypeCommunity),
// 										SolutionID: to.Ptr("sampleSolutionId2"),
// 										Source: to.Ptr("sampleSource"),
// 										Title: to.Ptr("Cannot RDP VM after SysPrep"),
// 								}},
// 						}},
// 					},
// 					Sections: []*armselfhelp.Section{
// 						{
// 							Content: to.Ptr("<p>sample content</p>"),
// 							ReplacementMaps: &armselfhelp.ReplacementMaps{
// 							},
// 							Title: to.Ptr("RBAC Authentication Common Solutions"),
// 					}},
// 					SolutionID: to.Ptr("sampleSolutionId1"),
// 					Title: to.Ptr("RBAC Authentication Common Solutions"),
// 				},
// 			}
Output:

func (*SolutionClient) WarmUp

func (client *SolutionClient) WarmUp(ctx context.Context, scope string, solutionResourceName string, options *SolutionClientWarmUpOptions) (SolutionClientWarmUpResponse, error)

WarmUp - Warm up the solution resource by preloading asynchronous diagnostics results into cache If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • solutionResourceName - Solution resource Name.
  • options - SolutionClientWarmUpOptions contains the optional parameters for the SolutionClient.WarmUp method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewSolutionClient().WarmUp(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResourceName1", &armselfhelp.SolutionClientWarmUpOptions{SolutionWarmUpRequestBody: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type SolutionClientBeginCreateOptions

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

SolutionClientBeginCreateOptions contains the optional parameters for the SolutionClient.BeginCreate method.

type SolutionClientBeginUpdateOptions

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

SolutionClientBeginUpdateOptions contains the optional parameters for the SolutionClient.BeginUpdate method.

type SolutionClientCreateResponse

type SolutionClientCreateResponse struct {
	// Solution response.
	SolutionResource
}

SolutionClientCreateResponse contains the response from method SolutionClient.BeginCreate.

type SolutionClientGetOptions

type SolutionClientGetOptions struct {
}

SolutionClientGetOptions contains the optional parameters for the SolutionClient.Get method.

type SolutionClientGetResponse

type SolutionClientGetResponse struct {
	// Solution response.
	SolutionResource
}

SolutionClientGetResponse contains the response from method SolutionClient.Get.

type SolutionClientUpdateResponse

type SolutionClientUpdateResponse struct {
	// Solution response.
	SolutionResource
}

SolutionClientUpdateResponse contains the response from method SolutionClient.BeginUpdate.

type SolutionClientWarmUpOptions

type SolutionClientWarmUpOptions struct {
	// The required request body for warming up a solution resource.
	SolutionWarmUpRequestBody *SolutionWarmUpRequestBody
}

SolutionClientWarmUpOptions contains the optional parameters for the SolutionClient.WarmUp method.

type SolutionClientWarmUpResponse

type SolutionClientWarmUpResponse struct {
}

SolutionClientWarmUpResponse contains the response from method SolutionClient.WarmUp.

type SolutionMetadataProperties

type SolutionMetadataProperties struct {
	// Solution Id.
	SolutionID *string

	// READ-ONLY; A detailed description of solution.
	Description *string

	// READ-ONLY; Required parameters for invoking this particular solution.
	RequiredInputs []*string

	// READ-ONLY; Solution Type.
	SolutionType *SolutionType
}

SolutionMetadataProperties - Metadata Properties

func (SolutionMetadataProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionMetadataProperties.

func (*SolutionMetadataProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionMetadataProperties.

type SolutionMetadataResource

type SolutionMetadataResource struct {
	// Solution metadata Resource properties.
	Properties *Solutions

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

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

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

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

SolutionMetadataResource - Metadata resource

func (SolutionMetadataResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionMetadataResource.

func (*SolutionMetadataResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionMetadataResource.

type SolutionNlpMetadataResource

type SolutionNlpMetadataResource struct {
	// Solution metadata Resource properties.
	Properties *NlpSolutions

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

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

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

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

SolutionNlpMetadataResource - Nlp Metadata resource

func (SolutionNlpMetadataResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionNlpMetadataResource.

func (*SolutionNlpMetadataResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionNlpMetadataResource.

type SolutionPatchRequestBody

type SolutionPatchRequestBody struct {
	// Solution result
	Properties *SolutionResourceProperties
}

SolutionPatchRequestBody - Solution PatchRequest body

func (SolutionPatchRequestBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionPatchRequestBody.

func (*SolutionPatchRequestBody) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionPatchRequestBody.

type SolutionProvisioningState

type SolutionProvisioningState string

SolutionProvisioningState - Status of solution provisioning.

const (
	// SolutionProvisioningStateCanceled - When Solutions request gets canceled.
	SolutionProvisioningStateCanceled SolutionProvisioningState = "Canceled"
	// SolutionProvisioningStateFailed - All Solutions failed to run.
	SolutionProvisioningStateFailed SolutionProvisioningState = "Failed"
	// SolutionProvisioningStatePartialComplete - Some Solutions are still running or failed.
	SolutionProvisioningStatePartialComplete SolutionProvisioningState = "PartialComplete"
	// SolutionProvisioningStateRunning - All Solutions are still running.
	SolutionProvisioningStateRunning SolutionProvisioningState = "Running"
	// SolutionProvisioningStateSucceeded - All Solutions in the Batch succeeded.
	SolutionProvisioningStateSucceeded SolutionProvisioningState = "Succeeded"
)

func PossibleSolutionProvisioningStateValues

func PossibleSolutionProvisioningStateValues() []SolutionProvisioningState

PossibleSolutionProvisioningStateValues returns the possible values for the SolutionProvisioningState const type.

type SolutionResource

type SolutionResource struct {
	// Solution result
	Properties *SolutionResourceProperties

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

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

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

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

SolutionResource - Solution response.

func (SolutionResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionResource.

func (*SolutionResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionResource.

type SolutionResourceProperties

type SolutionResourceProperties struct {
	// Client input parameters to run Solution
	Parameters map[string]*string

	// Solution request trigger criteria
	TriggerCriteria []*TriggerCriterion

	// READ-ONLY; The HTML content that needs to be rendered and shown to customer.
	Content *string

	// READ-ONLY; Status of solution provisioning.
	ProvisioningState *SolutionProvisioningState

	// READ-ONLY; Solution replacement maps.
	ReplacementMaps *ReplacementMaps

	// READ-ONLY; List of section object.
	Sections []*Section

	// READ-ONLY; Solution Id to identify single solution.
	SolutionID *string

	// READ-ONLY; The title.
	Title *string
}

SolutionResourceProperties - Solution result

func (SolutionResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionResourceProperties.

func (*SolutionResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionResourceProperties.

type SolutionResourceSelfHelp

type SolutionResourceSelfHelp struct {
	// Solution result
	Properties *SolutionsResourcePropertiesSelfHelp

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

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

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

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

SolutionResourceSelfHelp - Self Help Solution response.

func (SolutionResourceSelfHelp) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionResourceSelfHelp.

func (*SolutionResourceSelfHelp) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionResourceSelfHelp.

type SolutionSelfHelpClient

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

SolutionSelfHelpClient contains the methods for the SolutionSelfHelp group. Don't use this type directly, use NewSolutionSelfHelpClient() instead.

func NewSolutionSelfHelpClient

func NewSolutionSelfHelpClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*SolutionSelfHelpClient, error)

NewSolutionSelfHelpClient creates a new instance of SolutionSelfHelpClient with the specified values.

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

func (*SolutionSelfHelpClient) Get

Get - Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video tutorials, links and guides to public documentation related to a specific problem that enables users to troubleshoot Azure issues. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/SelfHelpSolution_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSolutionSelfHelpClient().Get(ctx, "SolutionId1", 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.SolutionResourceSelfHelp = armselfhelp.SolutionResourceSelfHelp{
// 	Name: to.Ptr("SolutionId1"),
// 	Type: to.Ptr("Microsoft.Help/SelfHelp"),
// 	ID: to.Ptr("/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/selfHelp/SolutionId1"),
// 	Properties: &armselfhelp.SolutionsResourcePropertiesSelfHelp{
// 		Content: to.Ptr("<p>sample content</p>"),
// 		ReplacementMaps: &armselfhelp.ReplacementMapsSelfHelp{
// 			VideoGroups: []*armselfhelp.VideoGroup{
// 				{
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					Videos: []*armselfhelp.VideoGroupVideo{
// 						{
// 							Src: to.Ptr("sampleLink"),
// 							Title: to.Ptr("widthtest"),
// 					}},
// 			}},
// 			Videos: []*armselfhelp.Video{
// 				{
// 					Src: to.Ptr("sampleLink"),
// 					Title: to.Ptr("CI - CD with Azure DevOps"),
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 			}},
// 			WebResults: []*armselfhelp.WebResult{
// 				{
// 					ReplacementKey: to.Ptr("<!--12345678-BBBb-cCCCC-0000-123456789012-->"),
// 					SearchResults: []*armselfhelp.SearchResult{
// 						{
// 							Confidence: to.Ptr(armselfhelp.ConfidenceHigh),
// 							Content: to.Ptr("I sysprep a VM and now I cannot connect to it via <b>RDP</b>"),
// 							Link: to.Ptr("sampleLink"),
// 							Rank: to.Ptr[int32](1),
// 							ResultType: to.Ptr(armselfhelp.ResultTypeCommunity),
// 							SolutionID: to.Ptr("SolutionId1"),
// 							Source: to.Ptr("sampleSource"),
// 							Title: to.Ptr("Cannot RDP VM after SysPrep"),
// 					}},
// 			}},
// 		},
// 		Sections: []*armselfhelp.SectionSelfHelp{
// 			{
// 				Content: to.Ptr("<p>sample content</p>"),
// 				ReplacementMaps: &armselfhelp.ReplacementMapsSelfHelp{
// 				},
// 				Title: to.Ptr("RBAC Authentication Common Solutions"),
// 		}},
// 		SolutionID: to.Ptr("sampleSolutionId"),
// 		Title: to.Ptr("RBAC Authentication Common Solutions"),
// 	},
// }
Output:

type SolutionSelfHelpClientGetOptions

type SolutionSelfHelpClientGetOptions struct {
}

SolutionSelfHelpClientGetOptions contains the optional parameters for the SolutionSelfHelpClient.Get method.

type SolutionSelfHelpClientGetResponse

type SolutionSelfHelpClientGetResponse struct {
	// Self Help Solution response.
	SolutionResourceSelfHelp
}

SolutionSelfHelpClientGetResponse contains the response from method SolutionSelfHelpClient.Get.

type SolutionType

type SolutionType string

SolutionType - Solution Type.

const (
	// SolutionTypeDiagnostics - Diagnostics resource type.
	SolutionTypeDiagnostics SolutionType = "Diagnostics"
	// SolutionTypeSelfHelp - SelfHelp resource type.
	SolutionTypeSelfHelp SolutionType = "SelfHelp"
	// SolutionTypeSolutions - Solutions resource type.
	SolutionTypeSolutions SolutionType = "Solutions"
	// SolutionTypeTroubleshooters - Troubleshooters resource type.
	SolutionTypeTroubleshooters SolutionType = "Troubleshooters"
)

func PossibleSolutionTypeValues

func PossibleSolutionTypeValues() []SolutionType

PossibleSolutionTypeValues returns the possible values for the SolutionType const type.

type SolutionWarmUpRequestBody

type SolutionWarmUpRequestBody struct {
	// Dictionary of
	Parameters map[string]*string
}

SolutionWarmUpRequestBody - Solution WarmUpRequest body

func (SolutionWarmUpRequestBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionWarmUpRequestBody.

func (*SolutionWarmUpRequestBody) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionWarmUpRequestBody.

type Solutions

type Solutions struct {
	// List of metadata.
	Solutions []*SolutionMetadataProperties
}

Solutions - List of solutions

func (Solutions) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Solutions.

func (*Solutions) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Solutions.

type SolutionsDiagnostic

type SolutionsDiagnostic struct {
	// Diagnostics estimated completion time in minutes
	EstimatedCompletionTime *string

	// Diagnostic insights
	Insights []*Insight

	// Place holder used in HTML Content replace control with the content
	ReplacementKey *string

	// Required parameters of this item
	RequiredParameters []*string

	// Solution Id to identify single Solutions Diagnostic
	SolutionID *string

	// Denotes the status of the diagnostic resource.
	Status *Status

	// Details of the status
	StatusDetails *string
}

SolutionsDiagnostic - Solutions Diagnostic

func (SolutionsDiagnostic) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionsDiagnostic.

func (*SolutionsDiagnostic) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionsDiagnostic.

type SolutionsResourcePropertiesSelfHelp

type SolutionsResourcePropertiesSelfHelp struct {
	// READ-ONLY; The HTML content that needs to be rendered and shown to customer.
	Content *string

	// READ-ONLY; Solution replacement maps.
	ReplacementMaps *ReplacementMapsSelfHelp

	// READ-ONLY; List of section object.
	Sections []*SectionSelfHelp

	// READ-ONLY; SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api -
	// https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP
	SolutionID *string

	// READ-ONLY; The title.
	Title *string
}

SolutionsResourcePropertiesSelfHelp - Solution result

func (SolutionsResourcePropertiesSelfHelp) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionsResourcePropertiesSelfHelp.

func (*SolutionsResourcePropertiesSelfHelp) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionsResourcePropertiesSelfHelp.

type SolutionsTroubleshooters

type SolutionsTroubleshooters struct {
	// Solution Id to identify single Solutions Troubleshooter
	SolutionID *string

	// Troubleshooter summary
	Summary *string

	// Troubleshooter title
	Title *string
}

SolutionsTroubleshooters - Troubleshooters in Solutions

func (SolutionsTroubleshooters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SolutionsTroubleshooters.

func (*SolutionsTroubleshooters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SolutionsTroubleshooters.

type Status

type Status string

Status - Denotes the status of the diagnostic resource.

const (
	// StatusFailed - Diagnostic creation failed.
	StatusFailed Status = "Failed"
	// StatusMissingInputs - Request is missing required inputs to run.
	StatusMissingInputs Status = "MissingInputs"
	// StatusRunning - Diagnostic is still running.
	StatusRunning Status = "Running"
	// StatusSucceeded - Diagnostic creation succeeded.
	StatusSucceeded Status = "Succeeded"
	// StatusTimeout - Diagnostic was timed out.
	StatusTimeout Status = "Timeout"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type Step

type Step struct {
	// Only for AutomatedStep type
	AutomatedCheckResults *AutomatedCheckResult

	// Step description.
	Description *string

	// The error detail.
	Error *ErrorDetail

	// Status of Troubleshooter Step execution.
	ExecutionStatus *ExecutionStatus

	// This field has more detailed status description of the execution status.
	ExecutionStatusDescription *string

	// Get or sets the Step guidance.
	Guidance *string

	// Unique step id.
	ID       *string
	Inputs   []*StepInput
	Insights []*Insight

	// is this last step of the workflow.
	IsLastStep *bool

	// Step title.
	Title *string

	// Type of Troubleshooting step.
	Type *Type
}

Step - Troubleshooter step

func (Step) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Step.

func (*Step) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Step.

type StepInput

type StepInput struct {
	// User question content.
	QuestionContent *string

	// Default is Text.
	QuestionContentType *QuestionContentType

	// Use Index as QuestionId.
	QuestionID *string

	// Question title
	QuestionTitle *string

	// Type of Question
	QuestionType *QuestionType

	// Result of Automate step.
	RecommendedOption *string

	// Place holder text for response hints.
	ResponseHint    *string
	ResponseOptions []*ResponseOption

	// Troubleshooter step input response validation properties
	ResponseValidationProperties *ResponseValidationProperties

	// Text of response that was selected.
	SelectedOptionValue *string
}

StepInput - Details of step input.

func (StepInput) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StepInput.

func (*StepInput) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StepInput.

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 TriggerCriterion

type TriggerCriterion struct {
	// Trigger criterion name.
	Name *Name

	// Trigger criterion value.
	Value *string
}

TriggerCriterion - Solution request trigger criterion. SolutionId/ProblemClassificationId is the only supported trigger type for Solution PUT request. ReplacementKey is the only supported trigger type for Solution PATCH request.

func (TriggerCriterion) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TriggerCriterion.

func (*TriggerCriterion) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TriggerCriterion.

type TroubleshooterInstanceProperties

type TroubleshooterInstanceProperties struct {
	// Client input parameters to run Troubleshooter Resource
	Parameters map[string]*string

	// Solution Id to identify single troubleshooter.
	SolutionID *string

	// READ-ONLY; Status of troubleshooter provisioning.
	ProvisioningState *TroubleshooterProvisioningState

	// READ-ONLY; List of step object.
	Steps []*Step
}

TroubleshooterInstanceProperties - Troubleshooter Instance properties.

func (TroubleshooterInstanceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TroubleshooterInstanceProperties.

func (*TroubleshooterInstanceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshooterInstanceProperties.

type TroubleshooterProvisioningState

type TroubleshooterProvisioningState string

TroubleshooterProvisioningState - Status of troubleshooter provisioning.

const (
	TroubleshooterProvisioningStateAutoContinue TroubleshooterProvisioningState = "AutoContinue"
	TroubleshooterProvisioningStateCanceled     TroubleshooterProvisioningState = "Canceled"
	TroubleshooterProvisioningStateFailed       TroubleshooterProvisioningState = "Failed"
	TroubleshooterProvisioningStateRunning      TroubleshooterProvisioningState = "Running"
	TroubleshooterProvisioningStateSucceeded    TroubleshooterProvisioningState = "Succeeded"
)

func PossibleTroubleshooterProvisioningStateValues

func PossibleTroubleshooterProvisioningStateValues() []TroubleshooterProvisioningState

PossibleTroubleshooterProvisioningStateValues returns the possible values for the TroubleshooterProvisioningState const type.

type TroubleshooterResource

type TroubleshooterResource struct {
	// Troubleshooter Instance properties.
	Properties *TroubleshooterInstanceProperties

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

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

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

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

TroubleshooterResource - Troubleshooter response.

func (TroubleshooterResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TroubleshooterResource.

func (*TroubleshooterResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshooterResource.

type TroubleshooterResponse

type TroubleshooterResponse struct {
	// id of the question.
	QuestionID *string

	// Type of Question
	QuestionType *QuestionType

	// Response key for SingleInput. For Multi-line test/open ended question it is free form text
	Response *string
}

TroubleshooterResponse - User Response for Troubleshooter continue request

func (TroubleshooterResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TroubleshooterResponse.

func (*TroubleshooterResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshooterResponse.

type TroubleshootersClient

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

TroubleshootersClient contains the methods for the Troubleshooters group. Don't use this type directly, use NewTroubleshootersClient() instead.

func NewTroubleshootersClient

func NewTroubleshootersClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TroubleshootersClient, error)

NewTroubleshootersClient creates a new instance of TroubleshootersClient with the specified values.

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

func (*TroubleshootersClient) Continue

Continue - Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • troubleshooterName - Troubleshooter resource Name.
  • options - TroubleshootersClientContinueOptions contains the optional parameters for the TroubleshootersClient.Continue method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Continue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTroubleshootersClient().Continue(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", &armselfhelp.TroubleshootersClientContinueOptions{ContinueRequestBody: &armselfhelp.ContinueRequestBody{
	StepID: to.Ptr("SampleStepId"),
	Responses: []*armselfhelp.TroubleshooterResponse{
		{
			QuestionID:   to.Ptr("SampleQuestionId"),
			QuestionType: to.Ptr(armselfhelp.QuestionType("Text")),
			Response:     to.Ptr("Connection exception"),
		}},
},
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TroubleshootersClient) Create

func (client *TroubleshootersClient) Create(ctx context.Context, scope string, troubleshooterName string, createTroubleshooterRequestBody TroubleshooterResource, options *TroubleshootersClientCreateOptions) (TroubleshootersClientCreateResponse, error)

Create - Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • troubleshooterName - Troubleshooter resource Name.
  • createTroubleshooterRequestBody - The required request body for this Troubleshooter resource creation.
  • options - TroubleshootersClientCreateOptions contains the optional parameters for the TroubleshootersClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTroubleshootersClient().Create(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", armselfhelp.TroubleshooterResource{
	Properties: &armselfhelp.TroubleshooterInstanceProperties{
		Parameters: map[string]*string{
			"ResourceURI": to.Ptr("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"),
		},
		SolutionID: to.Ptr("SampleTroubleshooterSolutionId"),
	},
}, 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.TroubleshooterResource = armselfhelp.TroubleshooterResource{
// 	Name: to.Ptr("abf168ed-1b54-454a-86f6-e4b62253d3b1"),
// 	Type: to.Ptr("Microsoft.Help/troubleshooters"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/troubleshooter/abf168ed-1b54-454a-86f6-e4b62253d3b1"),
// 	Properties: &armselfhelp.TroubleshooterInstanceProperties{
// 		Parameters: map[string]*string{
// 			"ResourceURI": to.Ptr("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"),
// 		},
// 		ProvisioningState: to.Ptr(armselfhelp.TroubleshooterProvisioningStateSucceeded),
// 		SolutionID: to.Ptr("SampleTroubleshooterSolutionId"),
// 		Steps: []*armselfhelp.Step{
// 			{
// 				Type: to.Ptr(armselfhelp.TypeDecision),
// 				Description: to.Ptr("step description"),
// 				ExecutionStatus: to.Ptr(armselfhelp.ExecutionStatusSuccess),
// 				ExecutionStatusDescription: to.Ptr("Step is success"),
// 				Guidance: to.Ptr("IP address is used to check if the VM would be reachable from the given IP Address. We have prepopulated the IP address from your browser. If the field is left empty, the generic internet address space will be used."),
// 				ID: to.Ptr("SampleStepId"),
// 				Inputs: []*armselfhelp.StepInput{
// 					{
// 						QuestionContent: to.Ptr("Is VPN Connected?"),
// 						QuestionContentType: to.Ptr(armselfhelp.QuestionContentTypeText),
// 						QuestionID: to.Ptr("6cbe3f23-f3c2-41f3-886e-0cfbeee19b24"),
// 						QuestionType: to.Ptr(armselfhelp.QuestionType("MultiChoice")),
// 						ResponseOptions: []*armselfhelp.ResponseOption{
// 							{
// 								Key: to.Ptr("Yes"),
// 								Value: to.Ptr("1"),
// 							},
// 							{
// 								Key: to.Ptr("No"),
// 								Value: to.Ptr("0"),
// 						}},
// 						ResponseValidationProperties: &armselfhelp.ResponseValidationProperties{
// 							IsRequired: to.Ptr(true),
// 							MaxLength: to.Ptr[int64](1),
// 						},
// 				}},
// 				IsLastStep: to.Ptr(true),
// 				Title: to.Ptr("Step title"),
// 		}},
// 	},
// }
Output:

func (*TroubleshootersClient) End

End - Ends the troubleshooter action If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • troubleshooterName - Troubleshooter resource Name.
  • options - TroubleshootersClientEndOptions contains the optional parameters for the TroubleshootersClient.End method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_End.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTroubleshootersClient().End(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TroubleshootersClient) Get

Get - Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed. Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • troubleshooterName - Troubleshooter resource Name.
  • options - TroubleshootersClientGetOptions contains the optional parameters for the TroubleshootersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTroubleshootersClient().Get(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", 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.TroubleshooterResource = armselfhelp.TroubleshooterResource{
// 	Name: to.Ptr("abf168ed-1b54-454a-86f6-e4b62253d3b1"),
// 	Type: to.Ptr("Microsoft.Help/troubleshooters"),
// 	ID: to.Ptr("/subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/troubleshooter/abf168ed-1b54-454a-86f6-e4b62253d3b1"),
// 	Properties: &armselfhelp.TroubleshooterInstanceProperties{
// 		ProvisioningState: to.Ptr(armselfhelp.TroubleshooterProvisioningStateSucceeded),
// 		SolutionID: to.Ptr("SampleTroubleshooterSolutionId"),
// 		Steps: []*armselfhelp.Step{
// 			{
// 				Type: to.Ptr(armselfhelp.TypeDecision),
// 				Description: to.Ptr("step description"),
// 				ExecutionStatus: to.Ptr(armselfhelp.ExecutionStatusSuccess),
// 				ExecutionStatusDescription: to.Ptr("Step is success"),
// 				Guidance: to.Ptr("IP address is used to check if the VM would be reachable from the given IP Address. We have prepopulated the IP address from your browser. If the field is left empty, the generic internet address space will be used."),
// 				ID: to.Ptr("SampleId"),
// 				Inputs: []*armselfhelp.StepInput{
// 					{
// 						QuestionContent: to.Ptr("Is VPN Connected?"),
// 						QuestionContentType: to.Ptr(armselfhelp.QuestionContentTypeText),
// 						QuestionID: to.Ptr("SampleQuestionId"),
// 						QuestionType: to.Ptr(armselfhelp.QuestionType("MultiChoice")),
// 						ResponseOptions: []*armselfhelp.ResponseOption{
// 							{
// 								Key: to.Ptr("Yes"),
// 								Value: to.Ptr("1"),
// 							},
// 							{
// 								Key: to.Ptr("No"),
// 								Value: to.Ptr("0"),
// 						}},
// 						ResponseValidationProperties: &armselfhelp.ResponseValidationProperties{
// 							IsRequired: to.Ptr(true),
// 							MaxLength: to.Ptr[int64](1),
// 						},
// 				}},
// 				IsLastStep: to.Ptr(true),
// 				Title: to.Ptr("Step title"),
// 		}},
// 	},
// }
Output:

func (*TroubleshootersClient) Restart

Restart - Restarts the troubleshooter API using applicable troubleshooter resource name as the input. It returns new resource name which should be used in subsequent request. The old resource name is obsolete after this API is invoked. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-03-01-preview

  • scope - scope = resourceUri of affected resource. For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
  • troubleshooterName - Troubleshooter resource Name.
  • options - TroubleshootersClientRestartOptions contains the optional parameters for the TroubleshootersClient.Restart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c77bbf822be2deaac1b690270c6cd03a52df0e37/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Restart.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTroubleshootersClient().Restart(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", 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.RestartTroubleshooterResponse = armselfhelp.RestartTroubleshooterResponse{
// 	TroubleshooterResourceName: to.Ptr("SampleTroubleshooterResourceName"),
// }
Output:

type TroubleshootersClientContinueOptions

type TroubleshootersClientContinueOptions struct {
	// The required request body for going to next step in Troubleshooter resource.
	ContinueRequestBody *ContinueRequestBody
}

TroubleshootersClientContinueOptions contains the optional parameters for the TroubleshootersClient.Continue method.

type TroubleshootersClientContinueResponse

type TroubleshootersClientContinueResponse struct {
	// Location contains the information returned from the Location header response.
	Location *string
}

TroubleshootersClientContinueResponse contains the response from method TroubleshootersClient.Continue.

type TroubleshootersClientCreateOptions

type TroubleshootersClientCreateOptions struct {
}

TroubleshootersClientCreateOptions contains the optional parameters for the TroubleshootersClient.Create method.

type TroubleshootersClientCreateResponse

type TroubleshootersClientCreateResponse struct {
	// Troubleshooter response.
	TroubleshooterResource
}

TroubleshootersClientCreateResponse contains the response from method TroubleshootersClient.Create.

type TroubleshootersClientEndOptions

type TroubleshootersClientEndOptions struct {
}

TroubleshootersClientEndOptions contains the optional parameters for the TroubleshootersClient.End method.

type TroubleshootersClientEndResponse

type TroubleshootersClientEndResponse struct {
	// Location contains the information returned from the Location header response.
	Location *string
}

TroubleshootersClientEndResponse contains the response from method TroubleshootersClient.End.

type TroubleshootersClientGetOptions

type TroubleshootersClientGetOptions struct {
}

TroubleshootersClientGetOptions contains the optional parameters for the TroubleshootersClient.Get method.

type TroubleshootersClientGetResponse

type TroubleshootersClientGetResponse struct {
	// Troubleshooter response.
	TroubleshooterResource
}

TroubleshootersClientGetResponse contains the response from method TroubleshootersClient.Get.

type TroubleshootersClientRestartOptions

type TroubleshootersClientRestartOptions struct {
}

TroubleshootersClientRestartOptions contains the optional parameters for the TroubleshootersClient.Restart method.

type TroubleshootersClientRestartResponse

type TroubleshootersClientRestartResponse struct {
	// Troubleshooter restart response
	RestartTroubleshooterResponse

	// Location contains the information returned from the Location header response.
	Location *string
}

TroubleshootersClientRestartResponse contains the response from method TroubleshootersClient.Restart.

type Type

type Type string

Type - Type of Troubleshooting step.

const (
	TypeAutomatedCheck Type = "AutomatedCheck"
	TypeDecision       Type = "Decision"
	TypeInput          Type = "Input"
	TypeInsight        Type = "Insight"
	TypeSolution       Type = "Solution"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type ValidationScope

type ValidationScope string

ValidationScope - Validation scope

const (
	ValidationScopeGUIDFormat       ValidationScope = "GuidFormat"
	ValidationScopeIPAddressFormat  ValidationScope = "IpAddressFormat"
	ValidationScopeNone             ValidationScope = "None"
	ValidationScopeNumberOnlyFormat ValidationScope = "NumberOnlyFormat"
	ValidationScopeURLFormat        ValidationScope = "URLFormat"
)

func PossibleValidationScopeValues

func PossibleValidationScopeValues() []ValidationScope

PossibleValidationScopeValues returns the possible values for the ValidationScope const type.

type Video

type Video struct {
	// Place holder used in HTML Content replace control with the insight content
	ReplacementKey *string

	// Link to the video
	Src *string

	// Title of the video
	Title *string
}

Video detail

func (Video) MarshalJSON

func (v Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Video.

func (*Video) UnmarshalJSON

func (v *Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Video.

type VideoGroup

type VideoGroup struct {
	// Place holder used in HTML Content replace control with the insight content
	ReplacementKey *string

	// List of videos will be shown to customers
	Videos []*VideoGroupVideo
}

VideoGroup - Video group detail

func (VideoGroup) MarshalJSON

func (v VideoGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoGroup.

func (*VideoGroup) UnmarshalJSON

func (v *VideoGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoGroup.

type VideoGroupVideo

type VideoGroupVideo struct {
	// Link to the video
	Src *string

	// Title of the video
	Title *string
}

VideoGroupVideo - VideoGroup video detail

func (VideoGroupVideo) MarshalJSON

func (v VideoGroupVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoGroupVideo.

func (*VideoGroupVideo) UnmarshalJSON

func (v *VideoGroupVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoGroupVideo.

type WebResult

type WebResult struct {
	// Place holder used in HTML Content replace control with the content
	ReplacementKey *string

	// AzureKB search results
	SearchResults []*SearchResult
}

WebResult - AzureKB web result

func (WebResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WebResult.

func (*WebResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type WebResult.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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