Met deze API kunt u het ernstniveau, de ticketstatus, de geavanceerde diagnostische toestemming en uw contactgegevens in het ondersteuningsticket bijwerken.
Opmerking: de ernstniveaus kunnen niet worden gewijzigd als een ondersteuningsticket actief wordt uitgevoerd door een Azure-ondersteuningstechnicus. Neem in dat geval contact op met uw ondersteuningstechnicus om ernstupdate aan te vragen door een nieuwe communicatie toe te voegen met behulp van de Communicatie-API.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}?api-version=2024-04-01
URI-parameters
Name |
In |
Vereist |
Type |
Description |
subscriptionId
|
path |
True
|
string
(uuid)
|
De id van het doelabonnement. De waarde moet een UUID zijn.
|
supportTicketName
|
path |
True
|
string
|
Naam van ondersteuningsticket.
|
api-version
|
query |
True
|
string
minLength: 1
|
De API-versie die voor deze bewerking moet worden gebruikt.
|
Aanvraagbody
Name |
Type |
Description |
advancedDiagnosticConsent
|
Consent
|
Geavanceerde diagnostische toestemming om te worden bijgewerkt op het ondersteuningsticket.
|
contactDetails
|
UpdateContactProfile
|
Contactgegevens die moeten worden bijgewerkt op het ondersteuningsticket.
|
secondaryConsent
|
SecondaryConsent[]
|
Deze eigenschap geeft secundaire toestemmingen voor het ondersteuningsticket aan
|
severity
|
SeverityLevel
|
Ernstniveau.
|
status
|
Status
|
De status die moet worden bijgewerkt op het ticket.
|
Antwoorden
Name |
Type |
Description |
200 OK
|
SupportTicketDetails
|
Ondersteuningsticket is bijgewerkt.
|
Other Status Codes
|
ErrorResponse
|
Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.
|
Beveiliging
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
Name |
Description |
user_impersonation
|
Uw gebruikersaccount imiteren
|
Voorbeelden
Update advanced diagnostic consent of a subscription support ticket
Voorbeeldaanvraag
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"advancedDiagnosticConsent": "Yes"
}
import com.azure.resourcemanager.support.models.Consent;
import com.azure.resourcemanager.support.models.SupportTicketDetails;
/**
* Samples for SupportTickets Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update advanced diagnostic consent of a subscription support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void updateAdvancedDiagnosticConsentOfASubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManager manager) {
SupportTicketDetails resource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update().withAdvancedDiagnosticConsent(Consent.YES).apply();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python update_advanced_diagnostic_consent_of_support_ticket_for_subscription.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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.update(
support_ticket_name="testticket",
update_support_ticket={"advancedDiagnosticConsent": "Yes"},
)
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.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/azcore/to"
"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/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateAdvancedDiagnosticConsentOfASubscriptionSupportTicket() {
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)
}
res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
}, 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.TicketDetails = armsupport.TicketDetails{
// Name: to.Ptr("testticket"),
// Type: to.Ptr("Microsoft.Support/supportTickets"),
// ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// ContactDetails: &armsupport.ContactProfile{
// AdditionalEmailAddresses: []*string{
// to.Ptr("tname@contoso.com"),
// to.Ptr("teamtest@contoso.com")},
// Country: to.Ptr("USA"),
// FirstName: to.Ptr("abc"),
// LastName: to.Ptr("xyz"),
// PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
// PreferredSupportLanguage: to.Ptr("en-US"),
// PreferredTimeZone: to.Ptr("Pacific Standard Time"),
// PrimaryEmailAddress: to.Ptr("test.name@contoso.com"),
// },
// CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Subscription management"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid"),
// ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
// ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-21T17:36:18.000Z"); return t}()),
// SLAMinutes: to.Ptr[int32](240),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// },
// Severity: to.Ptr(armsupport.SeverityLevelCritical),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// EmailAddress: to.Ptr("xyz@contoso.com"),
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("118032014183770"),
// Title: to.Ptr("Test - please ignore"),
// },
// }
}
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 This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
*
* @summary This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json
*/
async function updateAdvancedDiagnosticConsentOfASubscriptionSupportTicket() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const updateSupportTicket = {
advancedDiagnosticConsent: "Yes",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.update(supportTicketName, updateSupportTicket);
console.log(result);
}
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.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Update" 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 SubscriptionSupportTicketResource created on azure
// for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource
string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1";
string supportTicketName = "testticket";
ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId);
// invoke the operation
UpdateSupportTicket updateSupportTicket = new UpdateSupportTicket
{
AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes,
};
SubscriptionSupportTicketResource result = await subscriptionSupportTicket.UpdateAsync(updateSupportTicket);
// the variable result 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
SupportTicketData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "118032014183770",
"description": "This is a test - please ignore",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid",
"problemClassificationDisplayName": "Add or Edit VAT, TAX ID, or PO Number",
"severity": "critical",
"require24X7Response": false,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "test.name@contoso.com",
"additionalEmailAddresses": [
"tname@contoso.com",
"teamtest@contoso.com"
],
"preferredTimeZone": "Pacific Standard Time",
"country": "USA",
"preferredSupportLanguage": "en-US"
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": "xyz@contoso.com"
},
"supportPlanType": "Premier",
"supportPlanDisplayName": "Premier",
"title": "Test - please ignore",
"serviceId": "/providers/Microsoft.Support/services/subscription_management_service_guid",
"serviceDisplayName": "Subscription management",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Voorbeeldaanvraag
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"contactDetails": {
"firstName": "first name",
"lastName": "last name",
"preferredContactMethod": "email",
"primaryEmailAddress": "test.name@contoso.com",
"additionalEmailAddresses": [
"tname@contoso.com",
"teamtest@contoso.com"
],
"phoneNumber": "123-456-7890",
"preferredTimeZone": "Pacific Standard Time",
"country": "USA",
"preferredSupportLanguage": "en-US"
}
}
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.SupportTicketDetails;
import com.azure.resourcemanager.support.models.UpdateContactProfile;
import java.util.Arrays;
/**
* Samples for SupportTickets Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* UpdateContactDetailsOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update contact details of a subscription support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void
updateContactDetailsOfASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManager manager) {
SupportTicketDetails resource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update()
.withContactDetails(new UpdateContactProfile().withFirstName("first name").withLastName("last name")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("test.name@contoso.com")
.withAdditionalEmailAddresses(Arrays.asList("tname@contoso.com", "teamtest@contoso.com"))
.withPhoneNumber("123-456-7890").withPreferredTimeZone("Pacific Standard Time").withCountry("USA")
.withPreferredSupportLanguage("en-US"))
.apply();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python update_contact_details_of_support_ticket_for_subscription.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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.update(
support_ticket_name="testticket",
update_support_ticket={
"contactDetails": {
"additionalEmailAddresses": ["tname@contoso.com", "teamtest@contoso.com"],
"country": "USA",
"firstName": "first name",
"lastName": "last name",
"phoneNumber": "123-456-7890",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "test.name@contoso.com",
}
},
)
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.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/azcore/to"
"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/UpdateContactDetailsOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateContactDetailsOfASubscriptionSupportTicket() {
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)
}
res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
ContactDetails: &armsupport.UpdateContactProfile{
AdditionalEmailAddresses: []*string{
to.Ptr("tname@contoso.com"),
to.Ptr("teamtest@contoso.com")},
Country: to.Ptr("USA"),
FirstName: to.Ptr("first name"),
LastName: to.Ptr("last name"),
PhoneNumber: to.Ptr("123-456-7890"),
PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
PreferredSupportLanguage: to.Ptr("en-US"),
PreferredTimeZone: to.Ptr("Pacific Standard Time"),
PrimaryEmailAddress: to.Ptr("test.name@contoso.com"),
},
}, 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.TicketDetails = armsupport.TicketDetails{
// Name: to.Ptr("testticket"),
// Type: to.Ptr("Microsoft.Support/supportTickets"),
// ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
// ContactDetails: &armsupport.ContactProfile{
// AdditionalEmailAddresses: []*string{
// to.Ptr("tname@contoso.com"),
// to.Ptr("teamtest@contoso.com")},
// Country: to.Ptr("USA"),
// FirstName: to.Ptr("first name"),
// LastName: to.Ptr("last name"),
// PhoneNumber: to.Ptr("123-456-7890"),
// PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
// PreferredSupportLanguage: to.Ptr("en-US"),
// PreferredTimeZone: to.Ptr("Pacific Standard Time"),
// PrimaryEmailAddress: to.Ptr("test.name@contoso.com"),
// },
// CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Subscription management"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid"),
// ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
// ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-21T17:36:18.000Z"); return t}()),
// SLAMinutes: to.Ptr[int32](240),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// },
// Severity: to.Ptr(armsupport.SeverityLevelCritical),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// EmailAddress: to.Ptr("xyz@contoso.com"),
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("118032014183770"),
// Title: to.Ptr("Test - please ignore"),
// },
// }
}
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 This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
*
* @summary This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json
*/
async function updateContactDetailsOfASubscriptionSupportTicket() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const updateSupportTicket = {
contactDetails: {
additionalEmailAddresses: ["tname@contoso.com", "teamtest@contoso.com"],
country: "USA",
firstName: "first name",
lastName: "last name",
phoneNumber: "123-456-7890",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "test.name@contoso.com",
},
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.update(supportTicketName, updateSupportTicket);
console.log(result);
}
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.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Update" 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 SubscriptionSupportTicketResource created on azure
// for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource
string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1";
string supportTicketName = "testticket";
ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId);
// invoke the operation
UpdateSupportTicket updateSupportTicket = new UpdateSupportTicket
{
ContactDetails = new SupportContactProfileContent
{
FirstName = "first name",
LastName = "last name",
PreferredContactMethod = PreferredContactMethod.Email,
PrimaryEmailAddress = "test.name@contoso.com",
AdditionalEmailAddresses = { "tname@contoso.com", "teamtest@contoso.com" },
PhoneNumber = "123-456-7890",
PreferredTimeZone = "Pacific Standard Time",
Country = "USA",
PreferredSupportLanguage = "en-US",
},
};
SubscriptionSupportTicketResource result = await subscriptionSupportTicket.UpdateAsync(updateSupportTicket);
// the variable result 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
SupportTicketData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "118032014183770",
"description": "This is a test - please ignore",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid",
"problemClassificationDisplayName": "Add or Edit VAT, TAX ID, or PO Number",
"severity": "critical",
"require24X7Response": false,
"advancedDiagnosticConsent": "No",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"contactDetails": {
"firstName": "first name",
"lastName": "last name",
"preferredContactMethod": "email",
"primaryEmailAddress": "test.name@contoso.com",
"additionalEmailAddresses": [
"tname@contoso.com",
"teamtest@contoso.com"
],
"phoneNumber": "123-456-7890",
"preferredTimeZone": "Pacific Standard Time",
"country": "USA",
"preferredSupportLanguage": "en-US"
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": "xyz@contoso.com"
},
"supportPlanType": "Premier",
"supportPlanDisplayName": "Premier",
"title": "Test - please ignore",
"serviceId": "/providers/Microsoft.Support/services/subscription_management_service_guid",
"serviceDisplayName": "Subscription management",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Update severity of a subscription support ticket
Voorbeeldaanvraag
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"severity": "critical"
}
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.SupportTicketDetails;
/**
* Samples for SupportTickets Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* UpdateSeverityOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update severity of a subscription support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void
updateSeverityOfASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManager manager) {
SupportTicketDetails resource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update().withSeverity(SeverityLevel.CRITICAL).apply();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python update_severity_of_support_ticket_for_subscription.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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.update(
support_ticket_name="testticket",
update_support_ticket={"severity": "critical"},
)
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.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/azcore/to"
"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/UpdateSeverityOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateSeverityOfASubscriptionSupportTicket() {
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)
}
res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
Severity: to.Ptr(armsupport.SeverityLevelCritical),
}, 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.TicketDetails = armsupport.TicketDetails{
// Name: to.Ptr("testticket"),
// Type: to.Ptr("Microsoft.Support/supportTickets"),
// ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
// ContactDetails: &armsupport.ContactProfile{
// AdditionalEmailAddresses: []*string{
// to.Ptr("tname@contoso.com"),
// to.Ptr("teamtest@contoso.com")},
// Country: to.Ptr("USA"),
// FirstName: to.Ptr("abc"),
// LastName: to.Ptr("xyz"),
// PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
// PreferredSupportLanguage: to.Ptr("en-US"),
// PreferredTimeZone: to.Ptr("Pacific Standard Time"),
// PrimaryEmailAddress: to.Ptr("test.name@contoso.com"),
// },
// CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Subscription management"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid"),
// ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
// ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-21T17:36:18.000Z"); return t}()),
// SLAMinutes: to.Ptr[int32](240),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// },
// Severity: to.Ptr(armsupport.SeverityLevelCritical),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// EmailAddress: to.Ptr("xyz@contoso.com"),
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("118032014183770"),
// Title: to.Ptr("Test - please ignore"),
// },
// }
}
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 This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
*
* @summary This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json
*/
async function updateSeverityOfASubscriptionSupportTicket() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const updateSupportTicket = { severity: "critical" };
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.update(supportTicketName, updateSupportTicket);
console.log(result);
}
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.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Update" 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 SubscriptionSupportTicketResource created on azure
// for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource
string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1";
string supportTicketName = "testticket";
ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId);
// invoke the operation
UpdateSupportTicket updateSupportTicket = new UpdateSupportTicket
{
Severity = SupportSeverityLevel.Critical,
};
SubscriptionSupportTicketResource result = await subscriptionSupportTicket.UpdateAsync(updateSupportTicket);
// the variable result 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
SupportTicketData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "118032014183770",
"description": "This is a test - please ignore",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid",
"problemClassificationDisplayName": "Add or Edit VAT, TAX ID, or PO Number",
"severity": "critical",
"require24X7Response": false,
"advancedDiagnosticConsent": "No",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "test.name@contoso.com",
"additionalEmailAddresses": [
"tname@contoso.com",
"teamtest@contoso.com"
],
"preferredTimeZone": "Pacific Standard Time",
"country": "USA",
"preferredSupportLanguage": "en-US"
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": "xyz@contoso.com"
},
"supportPlanType": "Premier",
"supportPlanDisplayName": "Premier",
"title": "Test - please ignore",
"serviceId": "/providers/Microsoft.Support/services/subscription_management_service_guid",
"serviceDisplayName": "Subscription management",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Update status of a subscription support ticket
Voorbeeldaanvraag
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"status": "closed"
}
import com.azure.resourcemanager.support.models.Status;
import com.azure.resourcemanager.support.models.SupportTicketDetails;
/**
* Samples for SupportTickets Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* UpdateStatusOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update status of a subscription support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void
updateStatusOfASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManager manager) {
SupportTicketDetails resource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update().withStatus(Status.CLOSED).apply();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python update_status_of_support_ticket_for_subscription.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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.update(
support_ticket_name="testticket",
update_support_ticket={"status": "closed"},
)
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicketForSubscription.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/azcore/to"
"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/UpdateStatusOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateStatusOfASubscriptionSupportTicket() {
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)
}
res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
Status: to.Ptr(armsupport.StatusClosed),
}, 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.TicketDetails = armsupport.TicketDetails{
// Name: to.Ptr("testticket"),
// Type: to.Ptr("Microsoft.Support/supportTickets"),
// ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
// ContactDetails: &armsupport.ContactProfile{
// AdditionalEmailAddresses: []*string{
// to.Ptr("tname@contoso.com"),
// to.Ptr("teamtest@contoso.com")},
// Country: to.Ptr("USA"),
// FirstName: to.Ptr("abc"),
// LastName: to.Ptr("xyz"),
// PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
// PreferredSupportLanguage: to.Ptr("en-US"),
// PreferredTimeZone: to.Ptr("Pacific Standard Time"),
// PrimaryEmailAddress: to.Ptr("test.name@contoso.com"),
// },
// CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Subscription management"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid"),
// ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
// ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-21T17:36:18.000Z"); return t}()),
// SLAMinutes: to.Ptr[int32](240),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:18.000Z"); return t}()),
// },
// Severity: to.Ptr(armsupport.SeverityLevelCritical),
// Status: to.Ptr("Closed"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("118032014183770"),
// Title: to.Ptr("Test - please ignore"),
// },
// }
}
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 This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
*
* @summary This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json
*/
async function updateStatusOfASubscriptionSupportTicket() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const updateSupportTicket = { status: "closed" };
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.update(supportTicketName, updateSupportTicket);
console.log(result);
}
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.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Update" 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 SubscriptionSupportTicketResource created on azure
// for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource
string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1";
string supportTicketName = "testticket";
ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId);
// invoke the operation
UpdateSupportTicket updateSupportTicket = new UpdateSupportTicket
{
Status = SupportTicketStatus.Closed,
};
SubscriptionSupportTicketResource result = await subscriptionSupportTicket.UpdateAsync(updateSupportTicket);
// the variable result 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
SupportTicketData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "118032014183770",
"description": "This is a test - please ignore",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/problemClassification_guid",
"problemClassificationDisplayName": "Add or Edit VAT, TAX ID, or PO Number",
"severity": "critical",
"require24X7Response": false,
"advancedDiagnosticConsent": "No",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "test.name@contoso.com",
"additionalEmailAddresses": [
"tname@contoso.com",
"teamtest@contoso.com"
],
"preferredTimeZone": "Pacific Standard Time",
"country": "USA",
"preferredSupportLanguage": "en-US"
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"supportPlanDisplayName": "Premier",
"title": "Test - please ignore",
"serviceId": "/providers/Microsoft.Support/services/subscription_management_service_guid",
"serviceDisplayName": "Subscription management",
"status": "Closed",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Definities
Name |
Description |
Consent
|
Geavanceerde diagnostische toestemming om te worden bijgewerkt op het ondersteuningsticket.
|
ContactProfile
|
Contactgegevens die zijn gekoppeld aan het ondersteuningsticket.
|
ErrorAdditionalInfo
|
Aanvullende informatie over de resourcebeheerfout.
|
ErrorDetail
|
De foutdetails.
|
ErrorResponse
|
Foutreactie
|
IsTemporaryTicket
|
Deze eigenschap geeft aan of het ondersteuningsticket een tijdelijk ticket is.
|
PreferredContactMethod
|
Voorkeurscontactmethode.
|
QuotaChangeRequest
|
Deze eigenschap is vereist voor het opgegeven van de regio- en nieuwe quotumlimieten.
|
QuotaTicketDetails
|
Aanvullende set informatie die is vereist voor ondersteuningsticket voor quotumverhoging voor bepaalde quotumtypen, bijvoorbeeld: kernen van virtuele machines. Krijg volledige informatie over de ondersteuningsaanvraag voor quotumladingen, samen met voorbeelden in de ondersteuningsquotumaanvraag.
|
SecondaryConsent
|
Deze eigenschap geeft secundaire toestemming voor het ondersteuningsticket aan.
|
ServiceLevelAgreement
|
Details van serviceovereenkomsten voor een ondersteuningsticket.
|
SeverityLevel
|
Een waarde die de urgentie van de zaak aangeeft, die op zijn beurt de reactietijd bepaalt volgens de serviceovereenkomst van het technische ondersteuningsplan dat u met Azure hebt. Opmerking: 'Hoogste kritieke impact', ook wel bekend als het niveau 'Nood - Ernstige impact' in Azure Portal, is alleen gereserveerd voor onze Premium-klanten.
|
Status
|
De status die moet worden bijgewerkt op het ticket.
|
SupportEngineer
|
Informatie over ondersteuningstechnicus.
|
SupportTicketDetails
|
Object dat ondersteuningsticketdetails-resource vertegenwoordigt.
|
TechnicalTicketDetails
|
Aanvullende informatie voor het ticket voor technische ondersteuning.
|
UpdateContactProfile
|
Contactgegevens die zijn gekoppeld aan het ondersteuningsticket.
|
UpdateSupportTicket
|
Updates ernst, ticketstatus, contactgegevens, geavanceerde diagnostische toestemming en secundaire toestemming in het ondersteuningsticket.
|
UserConsent
|
Opgegeven waarde voor gebruikerstoestemming
|
Consent
Inventarisatie
Geavanceerde diagnostische toestemming om te worden bijgewerkt op het ondersteuningsticket.
Waarde |
Description |
No
|
|
Yes
|
|
Object
Contactgegevens die zijn gekoppeld aan het ondersteuningsticket.
Name |
Type |
Description |
additionalEmailAddresses
|
string[]
|
Extra e-mailadressen die worden vermeld, worden gekopieerd op alle correspondentie over het ondersteuningsticket.
|
country
|
string
|
Land van de gebruiker. Dit is de ISO 3166-1 alfa-3 code.
|
firstName
|
string
|
Voornaam.
|
lastName
|
string
|
Achternaam.
|
phoneNumber
|
string
|
Telefoonnummer. Dit is vereist als de voorkeurscontactmethode telefoon is. Het is ook vereist bij het indienen van 'kritieke' of 'hoogstecriticalimpact'-ernstgevallen.
|
preferredContactMethod
|
PreferredContactMethod
|
Voorkeurscontactmethode.
|
preferredSupportLanguage
|
string
|
Voorkeurstaal voor ondersteuning van Azure. Ondersteuningstalen variëren op basis van de ernst die u kiest voor uw ondersteuningsticket. Meer informatie vindt u op Azure Ernst en reactiesnelheid. Gebruik de standaardtaal-landcode. Geldige waarden zijnen-usvoor Engels, zh-hans voor Chinees,es-esvoor Spaans,fr-frvoor Frans,ja-jpvoor Japans,ko-krvoor Koreaans,ru-ruvoor Russisch,pt-brvoor Portugees,it-it' voor Italiaans, 'zh-tw' voor Chinees en 'de-de' voor Duits.
|
preferredTimeZone
|
string
|
Tijdzone van de gebruiker. Dit is de naam van de tijdzone van Microsoft Time Zone Index Values.
|
primaryEmailAddress
|
string
|
Primair e-mailadres.
|
ErrorAdditionalInfo
Object
Aanvullende informatie over de resourcebeheerfout.
Name |
Type |
Description |
info
|
object
|
De aanvullende informatie.
|
type
|
string
|
Het extra informatietype.
|
ErrorDetail
Object
De foutdetails.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
De fout bevat aanvullende informatie.
|
code
|
string
|
De foutcode.
|
details
|
ErrorDetail[]
|
De foutdetails.
|
message
|
string
|
Het foutbericht.
|
target
|
string
|
Het foutdoel.
|
ErrorResponse
Object
Foutreactie
Name |
Type |
Description |
error
|
ErrorDetail
|
Het foutobject.
|
IsTemporaryTicket
Inventarisatie
Deze eigenschap geeft aan of het ondersteuningsticket een tijdelijk ticket is.
Waarde |
Description |
No
|
|
Yes
|
|
Inventarisatie
Voorkeurscontactmethode.
Waarde |
Description |
email
|
|
phone
|
|
QuotaChangeRequest
Object
Deze eigenschap is vereist voor het opgegeven van de regio- en nieuwe quotumlimieten.
Name |
Type |
Description |
payload
|
string
|
Nettolading van de aanvraag voor quotumverhoging.
|
region
|
string
|
Regio waarvoor de aanvraag voor quotumverhoging wordt ingediend.
|
QuotaTicketDetails
Object
Aanvullende set informatie die is vereist voor ondersteuningsticket voor quotumverhoging voor bepaalde quotumtypen, bijvoorbeeld: kernen van virtuele machines. Krijg volledige informatie over de ondersteuningsaanvraag voor quotumladingen, samen met voorbeelden in de ondersteuningsquotumaanvraag.
Name |
Type |
Description |
quotaChangeRequestSubType
|
string
|
Vereist voor bepaalde quotumtypen wanneer er een subtype is, zoals Batch, waarvoor u een quotumverhoging aanvraagt.
|
quotaChangeRequestVersion
|
string
|
Versie van aanvraag voor quotumwijziging.
|
quotaChangeRequests
|
QuotaChangeRequest[]
|
Deze eigenschap is vereist voor het opgegeven van de regio- en nieuwe quotumlimieten.
|
SecondaryConsent
Object
Deze eigenschap geeft secundaire toestemming voor het ondersteuningsticket aan.
Name |
Type |
Description |
type
|
string
|
De servicenaam waarvoor de secundaire toestemming wordt verstrekt. De waarde moet worden opgehaald uit het antwoord van de API voor probleemclassificatie.
|
userConsent
|
UserConsent
|
Opgegeven waarde voor gebruikerstoestemming
|
ServiceLevelAgreement
Object
Details van serviceovereenkomsten voor een ondersteuningsticket.
Name |
Type |
Description |
expirationTime
|
string
(date-time)
|
Tijd in UTC -indeling (ISO 8601) wanneer de service level agreement verloopt.
|
slaMinutes
|
integer
(int32)
|
Service Level Agreement in enkele minuten.
|
startTime
|
string
(date-time)
|
Tijd in UTC -indeling (ISO 8601) wanneer de service level agreement wordt gestart.
|
SeverityLevel
Inventarisatie
Een waarde die de urgentie van de zaak aangeeft, die op zijn beurt de reactietijd bepaalt volgens de serviceovereenkomst van het technische ondersteuningsplan dat u met Azure hebt. Opmerking: 'Hoogste kritieke impact', ook wel bekend als het niveau 'Nood - Ernstige impact' in Azure Portal, is alleen gereserveerd voor onze Premium-klanten.
Waarde |
Description |
critical
|
|
highestcriticalimpact
|
|
minimal
|
|
moderate
|
|
Status
Inventarisatie
De status die moet worden bijgewerkt op het ticket.
Waarde |
Description |
closed
|
|
open
|
|
SupportEngineer
Object
Informatie over ondersteuningstechnicus.
Name |
Type |
Description |
emailAddress
|
string
|
E-mailadres van de Azure-ondersteuningstechnicus die is toegewezen aan het ondersteuningsticket.
|
SupportTicketDetails
Object
Object dat ondersteuningsticketdetails-resource vertegenwoordigt.
Name |
Type |
Description |
id
|
string
|
Id van de resource.
|
name
|
string
|
Naam van de resource.
|
properties.advancedDiagnosticConsent
|
Consent
|
Geavanceerde diagnostische toestemming om te worden bijgewerkt op het ondersteuningsticket.
|
properties.contactDetails
|
ContactProfile
|
Contactgegevens van de gebruiker die een ondersteuningsticket wil maken.
|
properties.createdDate
|
string
(date-time)
|
Tijd in UTC -indeling (ISO 8601) toen het ondersteuningsticket werd gemaakt.
|
properties.description
|
string
|
Gedetailleerde beschrijving van de vraag of het probleem.
|
properties.enrollmentId
|
string
|
Inschrijvings-id die is gekoppeld aan het ondersteuningsticket.
|
properties.fileWorkspaceName
|
string
|
De naam van de bestandswerkruimte.
|
properties.isTemporaryTicket
|
IsTemporaryTicket
|
Deze eigenschap geeft aan of het ondersteuningsticket een tijdelijk ticket is.
|
properties.modifiedDate
|
string
(date-time)
|
Tijd in UTC-indeling (ISO 8601) toen het ondersteuningsticket voor het laatst is gewijzigd.
|
properties.problemClassificationDisplayName
|
string
|
Gelokaliseerde naam van probleemclassificatie.
|
properties.problemClassificationId
|
string
|
Elke Azure-service heeft een eigen set probleemcategorieën, ook wel probleemclassificatie genoemd. Deze parameter is de unieke id voor het type probleem dat u ondervindt.
|
properties.problemScopingQuestions
|
string
|
Verkennende vragen met betrekking tot het ondersteuningsticket.
|
properties.problemStartTime
|
string
(date-time)
|
Tijd in UTC -indeling (ISO 8601) toen het probleem werd gestart.
|
properties.quotaTicketDetails
|
QuotaTicketDetails
|
Aanvullende ticketgegevens die zijn gekoppeld aan een aanvraag voor quotumondersteuningstickets.
|
properties.require24X7Response
|
boolean
|
Geeft aan of hiervoor een 24x7-antwoord van Azure is vereist.
|
properties.secondaryConsent
|
SecondaryConsent[]
|
Deze eigenschap geeft secundaire toestemmingen voor het ondersteuningsticket aan
|
properties.serviceDisplayName
|
string
|
Gelokaliseerde naam van de Azure-service.
|
properties.serviceId
|
string
|
Dit is de resource-id van de Azure-serviceresource die is gekoppeld aan het ondersteuningsticket.
|
properties.serviceLevelAgreement
|
ServiceLevelAgreement
|
Informatie over serviceovereenkomsten voor dit ondersteuningsticket.
|
properties.severity
|
SeverityLevel
|
Een waarde die de urgentie van de zaak aangeeft, die op zijn beurt de reactietijd bepaalt volgens de serviceovereenkomst van het technische ondersteuningsplan dat u met Azure hebt. Opmerking: 'Hoogste kritieke impact', ook wel bekend als het niveau 'Nood - Ernstige impact' in Azure Portal, is alleen gereserveerd voor onze Premium-klanten.
|
properties.status
|
string
|
Status van het ondersteuningsticket.
|
properties.supportEngineer
|
SupportEngineer
|
Informatie over de ondersteuningstechnicus die aan dit ondersteuningsticket werkt.
|
properties.supportPlanDisplayName
|
string
|
Type ondersteuningsplan dat is gekoppeld aan het ondersteuningsticket.
|
properties.supportPlanId
|
string
|
Id van het ondersteuningsplan dat is gekoppeld aan het ondersteuningsticket.
|
properties.supportPlanType
|
string
|
Type ondersteuningsplan dat is gekoppeld aan het ondersteuningsticket.
|
properties.supportTicketId
|
string
|
Door het systeem gegenereerde ondersteuningsticket-id die uniek is.
|
properties.technicalTicketDetails
|
TechnicalTicketDetails
|
Aanvullende ticketgegevens die zijn gekoppeld aan een aanvraag voor technische ondersteuningstickets.
|
properties.title
|
string
|
Titel van het ondersteuningsticket.
|
type
|
string
|
Type resource 'Microsoft.Support/supportTickets'.
|
TechnicalTicketDetails
Object
Aanvullende informatie voor het ticket voor technische ondersteuning.
Name |
Type |
Description |
resourceId
|
string
|
Dit is de resource-id van de Azure-serviceresource (bijvoorbeeld: een virtuele-machineresource of een HDInsight-resource) waarvoor het ondersteuningsticket wordt gemaakt.
|
Object
Contactgegevens die zijn gekoppeld aan het ondersteuningsticket.
Name |
Type |
Description |
additionalEmailAddresses
|
string[]
|
E-mailadressen die worden vermeld, worden gekopieerd op correspondentie over het ondersteuningsticket.
|
country
|
string
|
Land van de gebruiker. Dit is de ISO 3166-1 alfa-3 code.
|
firstName
|
string
|
Voornaam.
|
lastName
|
string
|
Achternaam.
|
phoneNumber
|
string
|
Telefoonnummer. Dit is vereist als de voorkeurscontactmethode telefoon is. Het is ook vereist bij het indienen van 'kritieke' of 'hoogstecriticalimpact'-ernstgevallen.
|
preferredContactMethod
|
PreferredContactMethod
|
Voorkeurscontactmethode.
|
preferredSupportLanguage
|
string
|
Voorkeurstaal voor ondersteuning van Azure. Ondersteuningstalen variëren op basis van de ernst die u kiest voor uw ondersteuningsticket. Meer informatie vindt u op Azure Ernst en reactiesnelheid. Gebruik de standaardtaal-landcode. Geldige waarden zijnen-usvoor Engels, zh-hans voor Chinees,es-esvoor Spaans,fr-frvoor Frans,ja-jpvoor Japans,ko-krvoor Koreaans,ru-ruvoor Russisch,pt-brvoor Portugees,it-it' voor Italiaans, 'zh-tw' voor Chinees en 'de-de' voor Duits.
|
preferredTimeZone
|
string
|
Tijdzone van de gebruiker. Dit is de naam van de tijdzone van Microsoft Time Zone Index Values.
|
primaryEmailAddress
|
string
|
Primair e-mailadres.
|
UpdateSupportTicket
Object
Updates ernst, ticketstatus, contactgegevens, geavanceerde diagnostische toestemming en secundaire toestemming in het ondersteuningsticket.
Name |
Type |
Description |
advancedDiagnosticConsent
|
Consent
|
Geavanceerde diagnostische toestemming om te worden bijgewerkt op het ondersteuningsticket.
|
contactDetails
|
UpdateContactProfile
|
Contactgegevens die moeten worden bijgewerkt op het ondersteuningsticket.
|
secondaryConsent
|
SecondaryConsent[]
|
Deze eigenschap geeft secundaire toestemmingen voor het ondersteuningsticket aan
|
severity
|
SeverityLevel
|
Ernstniveau.
|
status
|
Status
|
De status die moet worden bijgewerkt op het ticket.
|
UserConsent
Inventarisatie
Opgegeven waarde voor gebruikerstoestemming
Waarde |
Description |
No
|
|
Yes
|
|