Documentation ¶
Index ¶
- type ActionType
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type ClientFactory
- type CreatedByType
- type Diagnostic
- type DiagnosticInvocation
- type DiagnosticResource
- type DiagnosticResourceProperties
- type DiagnosticsClient
- func (client *DiagnosticsClient) BeginCreate(ctx context.Context, scope string, diagnosticsResourceName string, ...) (*runtime.Poller[DiagnosticsClientCreateResponse], error)
- func (client *DiagnosticsClient) CheckNameAvailability(ctx context.Context, scope string, ...) (DiagnosticsClientCheckNameAvailabilityResponse, error)
- func (client *DiagnosticsClient) Get(ctx context.Context, scope string, diagnosticsResourceName string, ...) (DiagnosticsClientGetResponse, error)
- type DiagnosticsClientBeginCreateOptions
- type DiagnosticsClientCheckNameAvailabilityOptions
- type DiagnosticsClientCheckNameAvailabilityResponse
- type DiagnosticsClientCreateResponse
- type DiagnosticsClientGetOptions
- type DiagnosticsClientGetResponse
- type DiscoveryResponse
- type DiscoverySolutionClient
- type DiscoverySolutionClientListOptions
- type DiscoverySolutionClientListResponse
- type Error
- type ImportanceLevel
- type Insight
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
- type SolutionMetadataProperties
- type SolutionMetadataResource
- type Status
- type SystemData
Examples ¶
- DiagnosticsClient.BeginCreate
- DiagnosticsClient.CheckNameAvailability (ExampleWhenNameIsAvailableForADiagnosticResource)
- DiagnosticsClient.CheckNameAvailability (ExampleWhenNameIsNotAvailableForADiagnosticResource)
- DiagnosticsClient.Get
- DiscoverySolutionClient.NewListPager
- OperationsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type 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 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(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) 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) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
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 DiagnosticResource ¶
type DiagnosticResource struct { // Diagnostic Resource properties. Properties *DiagnosticResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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 that can be passed to all solutionIds. 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 *ProvisioningState }
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 - Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once you discover and identify the relevant solution for your Azure issue. You can create diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’ Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-01
- scope - This is an extension resource provider and only resource level extension is supported at the moment.
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CreateDiagnosticForKeyVaultResource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armselfhelp.NewClientFactory(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/mySubscription/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.ProvisioningStateSucceeded), // }, // } }
Output:
func (*DiagnosticsClient) CheckNameAvailability ¶
func (client *DiagnosticsClient) CheckNameAvailability(ctx context.Context, scope string, options *DiagnosticsClientCheckNameAvailabilityOptions) (DiagnosticsClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - This API is used to check the uniqueness of a resource name used for a diagnostic check. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-01
- scope - This is an extension resource provider and only resource level extension is supported at the moment.
- options - DiagnosticsClientCheckNameAvailabilityOptions contains the optional parameters for the DiagnosticsClient.CheckNameAvailability method.
Example (ExampleWhenNameIsAvailableForADiagnosticResource) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armselfhelp.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDiagnosticsClient().CheckNameAvailability(ctx, "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", &armselfhelp.DiagnosticsClientCheckNameAvailabilityOptions{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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armselfhelp.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDiagnosticsClient().CheckNameAvailability(ctx, "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", &armselfhelp.DiagnosticsClientCheckNameAvailabilityOptions{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:
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 2023-06-01
- scope - This is an extension resource provider and only resource level extension is supported at the moment.
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/GetDiagnosticForKeyVaultResource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armselfhelp.NewClientFactory(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/mySubscription/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.ProvisioningStateSucceeded), // }, // } }
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 DiagnosticsClientCheckNameAvailabilityOptions ¶
type DiagnosticsClientCheckNameAvailabilityOptions struct { // The required parameters for availability check. CheckNameAvailabilityRequest *CheckNameAvailabilityRequest }
DiagnosticsClientCheckNameAvailabilityOptions contains the optional parameters for the DiagnosticsClient.CheckNameAvailability method.
type DiagnosticsClientCheckNameAvailabilityResponse ¶
type DiagnosticsClientCheckNameAvailabilityResponse struct { // Response for whether the requested resource name is available or not. CheckNameAvailabilityResponse }
DiagnosticsClientCheckNameAvailabilityResponse contains the response from method DiagnosticsClient.CheckNameAvailability.
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 DiscoveryResponse ¶
type DiscoveryResponse struct { // The link used to get the next page of solution metadata. NextLink *string // The list of solution 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 ¶
func (client *DiscoverySolutionClient) NewListPager(scope string, options *DiscoverySolutionClientListOptions) *runtime.Pager[DiscoverySolutionClientListResponse]
NewListPager - Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue. You can discover solutions using resourceUri OR resourceUri + problemClassificationId. We will do our best in returning relevant diagnostics for your Azure issue. Get the problemClassificationId(s) using this reference [https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP]. Note: ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API.
Generated from API version 2023-06-01
- scope - This is an extension resource provider and only resource level extension is supported at the moment.
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/ListDiscoverySolutionsForKeyVaultResource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armselfhelp.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDiscoverySolutionClient().NewListPager("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", &armselfhelp.DiscoverySolutionClientListOptions{Filter: nil, 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("SampleSolutionId1"), // Type: to.Ptr("Microsoft.Help/discoverySolutions"), // ID: to.Ptr("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/discoverySolutions/SampleSolutionId1"), // Properties: &armselfhelp.SolutionMetadataProperties{ // Description: to.Ptr("This is a diagnostic"), // RequiredParameterSets: [][]*string{ // []*string{ // to.Ptr("ResourceUri")}}, // SolutionID: to.Ptr("SampleSolutionId1"), // SolutionType: to.Ptr("Diagnostics"), // }, // }, // { // Name: to.Ptr("SampleSolutionId2"), // Type: to.Ptr("Microsoft.Help/discoverySolutions"), // ID: to.Ptr("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/discoverySolutions/SampleSolutionId2"), // Properties: &armselfhelp.SolutionMetadataProperties{ // Description: to.Ptr("This is a diagnostic"), // RequiredParameterSets: [][]*string{ // []*string{ // to.Ptr("ResourceUri")}}, // SolutionID: to.Ptr("SampleSolutionId2"), // SolutionType: to.Ptr("Diagnostics"), // }, // }, // { // Name: to.Ptr("SampleSolutionId3"), // Type: to.Ptr("Microsoft.Help/discoverySolutions"), // ID: to.Ptr("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/discoverySolutions/SampleSolutionId3"), // Properties: &armselfhelp.SolutionMetadataProperties{ // Description: to.Ptr("This is a diagnostic"), // RequiredParameterSets: [][]*string{ // []*string{ // to.Ptr("ResourceUri")}}, // SolutionID: to.Ptr("SampleSolutionId3"), // SolutionType: to.Ptr("Diagnostics"), // }, // }}, // } } }
Output:
type DiscoverySolutionClientListOptions ¶
type DiscoverySolutionClientListOptions struct { // Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and 'eq' operators. Example: // $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' // and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'. Filter *string // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skiptoken parameter that // specifies a starting point to use for subsequent calls. 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 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 ¶
MarshalJSON implements the json.Marshaller interface for type Error.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Error.
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 troubleshooter.
func (Insight) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Insight.
func (*Insight) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Insight.
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 ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // 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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Returns list of operations.
Generated from API version 2023-06-01
- 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/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armselfhelp.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = 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"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Status of diagnostic provisioning.
const ( // ProvisioningStateCanceled - When Diagnostic request gets canceled. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateFailed - All Diagnostics failed to run. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStatePartialComplete - Some Diagnostics are still running or failed. ProvisioningStatePartialComplete ProvisioningState = "PartialComplete" // ProvisioningStateSucceeded - All Diagnostics in the Batch succeeded. ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type SolutionMetadataProperties ¶
type SolutionMetadataProperties struct { // A detailed description of solution. Description *string // Required parameters for invoking this particular solution. RequiredParameterSets [][]*string // Solution Id. SolutionID *string // Solution Type. SolutionType *string }
SolutionMetadataProperties - Diagnostic solution metadata.
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 *SolutionMetadataProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
SolutionMetadataResource - Solution 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 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 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.