Az adott Azure-szolgáltatáshoz elérhető összes problémabesorolást (kategóriát) felsorolja. Mindig használja a programozott módon beszerzett szolgáltatás- és problémabesorolásokat. Ez a gyakorlat biztosítja, hogy mindig a legújabb szolgáltatás- és problémabesorolási azonosítókkal rendelkezzen.
GET https://management.azure.com/providers/Microsoft.Support/services/{serviceName}/problemClassifications?api-version=2024-04-01
URI-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
serviceName
|
path |
True
|
string
|
Annak az Azure-szolgáltatásnak a neve, amelyhez le kell kérni a problémabesorolásokat.
|
api-version
|
query |
True
|
string
minLength: 1
|
A művelethez használni kívánt API-verzió.
|
Válaszok
Name |
Típus |
Description |
200 OK
|
ProblemClassificationsListResult
|
Sikeresen lekérte a problémabesorolások listáját a megadott Azure-szolgáltatáshoz.
|
Other Status Codes
|
ErrorResponse
|
Hibaválasz, amely leírja, hogy miért nem sikerült a művelet.
|
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
Name |
Description |
user_impersonation
|
a felhasználói fiók megszemélyesítése
|
Példák
Gets list of problemClassifications for a service for which a support ticket can be created
Mintakérelem
GET https://management.azure.com/providers/Microsoft.Support/services/service_guid/problemClassifications?api-version=2024-04-01
/**
* Samples for ProblemClassifications List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.
* json
*/
/**
* Sample code: Gets list of problemClassifications for a service for which a support ticket can be created.
*
* @param manager Entry point to SupportManager.
*/
public static void getsListOfProblemClassificationsForAServiceForWhichASupportTicketCanBeCreated(
com.azure.resourcemanager.support.SupportManager manager) {
manager.problemClassifications().list("service_guid", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python list_problem_classifications.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.problem_classifications.list(
service_name="service_guid",
)
for item in response:
print(item)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsupport_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json
func ExampleProblemClassificationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsupport.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProblemClassificationsClient().NewListPager("service_guid", 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.ProblemClassificationsListResult = armsupport.ProblemClassificationsListResult{
// Value: []*armsupport.ProblemClassification{
// {
// Name: to.Ptr("problemClassification_guid_1"),
// Type: to.Ptr("Microsoft.Support/problemClassifications"),
// ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_1"),
// Properties: &armsupport.ProblemClassificationProperties{
// DisplayName: to.Ptr("Reservation Management / Exchanges and Refunds"),
// SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
// {
// Type: to.Ptr("DatabricksConsent"),
// Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
// }},
// },
// },
// {
// Name: to.Ptr("problemClassification_guid_2"),
// Type: to.Ptr("Microsoft.Support/problemClassifications"),
// ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_2"),
// Properties: &armsupport.ProblemClassificationProperties{
// DisplayName: to.Ptr("Reservation Management / Request Invoices"),
// SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
// {
// Type: to.Ptr("DatabricksConsent"),
// Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
// }},
// },
// },
// {
// Name: to.Ptr("problemClassification_guid_3"),
// Type: to.Ptr("Microsoft.Support/problemClassifications"),
// ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_3"),
// Properties: &armsupport.ProblemClassificationProperties{
// DisplayName: to.Ptr("Reservation Management / Other Iissues or Requests"),
// SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
// {
// Type: to.Ptr("DatabricksConsent"),
// Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
// }},
// },
// },
// {
// Name: to.Ptr("problemClassification_guid_4"),
// Type: to.Ptr("Microsoft.Support/problemClassifications"),
// ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_4"),
// Properties: &armsupport.ProblemClassificationProperties{
// DisplayName: to.Ptr("Other General Billing Questions"),
// SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
// {
// Type: to.Ptr("DatabricksConsent"),
// Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
// }},
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MicrosoftSupport } = require("@azure/arm-support");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists all the problem classifications (categories) available for a specific Azure service. Always use the service and problem classifications obtained programmatically. This practice ensures that you always have the most recent set of service and problem classification Ids.
*
* @summary Lists all the problem classifications (categories) available for a specific Azure service. Always use the service and problem classifications obtained programmatically. This practice ensures that you always have the most recent set of service and problem classification Ids.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json
*/
async function getsListOfProblemClassificationsForAServiceForWhichASupportTicketCanBeCreated() {
const serviceName = "service_guid";
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential);
const resArray = new Array();
for await (let item of client.problemClassifications.list(serviceName)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json
// this example is just showing the usage of "ProblemClassifications_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SupportAzureServiceResource created on azure
// for more information of creating SupportAzureServiceResource, please refer to the document of SupportAzureServiceResource
string serviceName = "service_guid";
ResourceIdentifier supportAzureServiceResourceId = SupportAzureServiceResource.CreateResourceIdentifier(serviceName);
SupportAzureServiceResource supportAzureService = client.GetSupportAzureServiceResource(supportAzureServiceResourceId);
// get the collection of this ProblemClassificationResource
ProblemClassificationCollection collection = supportAzureService.GetProblemClassifications();
// invoke the operation and iterate over the result
await foreach (ProblemClassificationResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ProblemClassificationData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Mintaválasz
{
"value": [
{
"id": "/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_1",
"name": "problemClassification_guid_1",
"type": "Microsoft.Support/problemClassifications",
"properties": {
"displayName": "Reservation Management / Exchanges and Refunds",
"secondaryConsentEnabled": [
{
"description": "For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy.",
"type": "DatabricksConsent"
}
]
}
},
{
"id": "/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_2",
"name": "problemClassification_guid_2",
"type": "Microsoft.Support/problemClassifications",
"properties": {
"displayName": "Reservation Management / Request Invoices",
"secondaryConsentEnabled": [
{
"description": "For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy.",
"type": "DatabricksConsent"
}
]
}
},
{
"id": "/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_3",
"name": "problemClassification_guid_3",
"type": "Microsoft.Support/problemClassifications",
"properties": {
"displayName": "Reservation Management / Other Iissues or Requests",
"secondaryConsentEnabled": [
{
"description": "For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy.",
"type": "DatabricksConsent"
}
]
}
},
{
"id": "/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_4",
"name": "problemClassification_guid_4",
"type": "Microsoft.Support/problemClassifications",
"properties": {
"displayName": "Other General Billing Questions",
"secondaryConsentEnabled": [
{
"description": "For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy.",
"type": "DatabricksConsent"
}
]
}
}
]
}
Definíciók
ErrorAdditionalInfo
Objektum
Az erőforrás-kezelési hiba további információi.
Name |
Típus |
Description |
info
|
object
|
A további információk.
|
type
|
string
|
A további információtípus.
|
ErrorDetail
Objektum
A hiba részletei.
Name |
Típus |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
A hiba további információi.
|
code
|
string
|
A hibakód.
|
details
|
ErrorDetail[]
|
A hiba részletei.
|
message
|
string
|
A hibaüzenet.
|
target
|
string
|
A hibacél.
|
ErrorResponse
Objektum
Hibaválasz
Name |
Típus |
Description |
error
|
ErrorDetail
|
A hibaobjektum.
|
ProblemClassification
Objektum
ProblemClassification erőforrásobjektum.
Name |
Típus |
Description |
id
|
string
|
Az erőforrás azonosítója.
|
name
|
string
|
Az erőforrás neve.
|
properties.displayName
|
string
|
A problémabesorolás honosított neve.
|
properties.secondaryConsentEnabled
|
SecondaryConsentEnabled[]
|
Ez a tulajdonság azt jelzi, hogy a másodlagos hozzájárulás jelen van-e a probléma besorolásához
|
type
|
string
|
A "Microsoft.Support/problemClassification" erőforrás típusa.
|
ProblemClassificationsListResult
Objektum
ProblemClassification-erőforrások gyűjteménye.
SecondaryConsentEnabled
Objektum
Ez a tulajdonság azt jelzi, hogy a másodlagos hozzájárulás jelen van-e a probléma besorolásához.
Name |
Típus |
Description |
description
|
string
|
Felhasználói hozzájárulás leírása.
|
type
|
string
|
Az Azure szolgáltatás, amelyhez másodlagos hozzájárulás szükséges az eset létrehozásához.
|