This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket.
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.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}?api-version=2024-04-01
URI Parameters
Name |
In |
Required |
Type |
Description |
subscriptionId
|
path |
True
|
string
uuid
|
The ID of the target subscription. The value must be an UUID.
|
supportTicketName
|
path |
True
|
string
|
Support ticket name.
|
api-version
|
query |
True
|
string
|
The API version to use for this operation.
|
Request Body
Name |
Type |
Description |
advancedDiagnosticConsent
|
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
contactDetails
|
UpdateContactProfile
|
Contact details to be updated on the support ticket.
|
secondaryConsent
|
SecondaryConsent[]
|
This property indicates secondary consents for the support ticket
|
severity
|
SeverityLevel
|
Severity level.
|
status
|
Status
|
Status to be updated on the ticket.
|
Responses
Name |
Type |
Description |
200 OK
|
SupportTicketDetails
|
Successfully updated support ticket.
|
Other Status Codes
|
ErrorResponse
|
Error response describing why the operation failed.
|
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account
|
Examples
Update advanced diagnostic consent of a subscription support ticket
Sample request
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"advancedDiagnosticConsent": "Yes"
}
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.Resources;
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
import com.azure.resourcemanager.support.models.Consent;
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.Status;
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/
* 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();
}
/*
* 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();
}
/*
* 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();
}
/*
* 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
Sample response
{
"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"
}
}
Sample request
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"
}
}
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.Resources;
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
Sample response
{
"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
Sample request
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"severity": "critical"
}
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.Resources;
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
Sample response
{
"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
Sample request
PATCH https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-04-01
{
"status": "closed"
}
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.Resources;
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
Sample response
{
"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"
}
}
Definitions
Name |
Description |
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
ContactProfile
|
Contact information associated with the support ticket.
|
ErrorAdditionalInfo
|
The resource management error additional info.
|
ErrorDetail
|
The error detail.
|
ErrorResponse
|
Error response
|
IsTemporaryTicket
|
This property indicates if support ticket is a temporary ticket.
|
PreferredContactMethod
|
Preferred contact method.
|
QuotaChangeRequest
|
This property is required for providing the region and new quota limits.
|
QuotaTicketDetails
|
Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request.
|
SecondaryConsent
|
This property indicates secondary consent for the support ticket.
|
ServiceLevelAgreement
|
Service Level Agreement details for a support ticket.
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
Status
|
Status to be updated on the ticket.
|
SupportEngineer
|
Support engineer information.
|
SupportTicketDetails
|
Object that represents SupportTicketDetails resource.
|
TechnicalTicketDetails
|
Additional information for technical support ticket.
|
UpdateContactProfile
|
Contact information associated with the support ticket.
|
UpdateSupportTicket
|
Updates severity, ticket status, contact details, advanced diagnostic consent and secondary consent in the support ticket.
|
UserConsent
|
User consent value provided
|
Consent
Advanced diagnostic consent to be updated on the support ticket.
Name |
Type |
Description |
No
|
string
|
|
Yes
|
string
|
|
Contact information associated with the support ticket.
Name |
Type |
Description |
additionalEmailAddresses
|
string[]
|
Additional email addresses listed will be copied on any correspondence about the support ticket.
|
country
|
string
|
Country of the user. This is the ISO 3166-1 alpha-3 code.
|
firstName
|
string
|
First name.
|
lastName
|
string
|
Last name.
|
phoneNumber
|
string
|
Phone number. This is required if preferred contact method is phone.
|
preferredContactMethod
|
PreferredContactMethod
|
Preferred contact method.
|
preferredSupportLanguage
|
string
|
Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at Azure Severity and responsiveness. Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German.
|
preferredTimeZone
|
string
|
Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values.
|
primaryEmailAddress
|
string
|
Primary email address.
|
ErrorAdditionalInfo
The resource management error additional info.
Name |
Type |
Description |
info
|
object
|
The additional info.
|
type
|
string
|
The additional info type.
|
ErrorDetail
The error detail.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
code
|
string
|
The error code.
|
details
|
ErrorDetail[]
|
The error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The error target.
|
ErrorResponse
Error response
Name |
Type |
Description |
error
|
ErrorDetail
|
The error object.
|
IsTemporaryTicket
This property indicates if support ticket is a temporary ticket.
Name |
Type |
Description |
No
|
string
|
|
Yes
|
string
|
|
Preferred contact method.
Name |
Type |
Description |
email
|
string
|
|
phone
|
string
|
|
QuotaChangeRequest
This property is required for providing the region and new quota limits.
Name |
Type |
Description |
payload
|
string
|
Payload of the quota increase request.
|
region
|
string
|
Region for which the quota increase request is being made.
|
QuotaTicketDetails
Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request.
Name |
Type |
Description |
quotaChangeRequestSubType
|
string
|
Required for certain quota types when there is a sub type, such as Batch, for which you are requesting a quota increase.
|
quotaChangeRequestVersion
|
string
|
Quota change request version.
|
quotaChangeRequests
|
QuotaChangeRequest[]
|
This property is required for providing the region and new quota limits.
|
SecondaryConsent
This property indicates secondary consent for the support ticket.
Name |
Type |
Description |
type
|
string
|
The service name for which the secondary consent is being provided. The value needs to be retrieved from the Problem Classification API response.
|
userConsent
|
UserConsent
|
User consent value provided
|
ServiceLevelAgreement
Service Level Agreement details for a support ticket.
Name |
Type |
Description |
expirationTime
|
string
|
Time in UTC (ISO 8601 format) when the service level agreement expires.
|
slaMinutes
|
integer
|
Service Level Agreement in minutes.
|
startTime
|
string
|
Time in UTC (ISO 8601 format) when the service level agreement starts.
|
SeverityLevel
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
Name |
Type |
Description |
critical
|
string
|
|
highestcriticalimpact
|
string
|
|
minimal
|
string
|
|
moderate
|
string
|
|
Status
Status to be updated on the ticket.
Name |
Type |
Description |
closed
|
string
|
|
open
|
string
|
|
SupportEngineer
Support engineer information.
Name |
Type |
Description |
emailAddress
|
string
|
Email address of the Azure Support engineer assigned to the support ticket.
|
SupportTicketDetails
Object that represents SupportTicketDetails resource.
Name |
Type |
Description |
id
|
string
|
Id of the resource.
|
name
|
string
|
Name of the resource.
|
properties.advancedDiagnosticConsent
|
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
properties.contactDetails
|
ContactProfile
|
Contact information of the user requesting to create a support ticket.
|
properties.createdDate
|
string
|
Time in UTC (ISO 8601 format) when the support ticket was created.
|
properties.description
|
string
|
Detailed description of the question or issue.
|
properties.enrollmentId
|
string
|
Enrollment Id associated with the support ticket.
|
properties.fileWorkspaceName
|
string
|
File workspace name.
|
properties.isTemporaryTicket
|
IsTemporaryTicket
|
This property indicates if support ticket is a temporary ticket.
|
properties.modifiedDate
|
string
|
Time in UTC (ISO 8601 format) when the support ticket was last modified.
|
properties.problemClassificationDisplayName
|
string
|
Localized name of problem classification.
|
properties.problemClassificationId
|
string
|
Each Azure service has its own set of issue categories, also known as problem classification. This parameter is the unique Id for the type of problem you are experiencing.
|
properties.problemScopingQuestions
|
string
|
Problem scoping questions associated with the support ticket.
|
properties.problemStartTime
|
string
|
Time in UTC (ISO 8601 format) when the problem started.
|
properties.quotaTicketDetails
|
QuotaTicketDetails
|
Additional ticket details associated with a quota support ticket request.
|
properties.require24X7Response
|
boolean
|
Indicates if this requires a 24x7 response from Azure.
|
properties.secondaryConsent
|
SecondaryConsent[]
|
This property indicates secondary consents for the support ticket
|
properties.serviceDisplayName
|
string
|
Localized name of the Azure service.
|
properties.serviceId
|
string
|
This is the resource Id of the Azure service resource associated with the support ticket.
|
properties.serviceLevelAgreement
|
ServiceLevelAgreement
|
Service Level Agreement information for this support ticket.
|
properties.severity
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
properties.status
|
string
|
Status of the support ticket.
|
properties.supportEngineer
|
SupportEngineer
|
Information about the support engineer working on this support ticket.
|
properties.supportPlanDisplayName
|
string
|
Support plan type associated with the support ticket.
|
properties.supportPlanId
|
string
|
Support plan id associated with the support ticket.
|
properties.supportPlanType
|
string
|
Support plan type associated with the support ticket.
|
properties.supportTicketId
|
string
|
System generated support ticket Id that is unique.
|
properties.technicalTicketDetails
|
TechnicalTicketDetails
|
Additional ticket details associated with a technical support ticket request.
|
properties.title
|
string
|
Title of the support ticket.
|
type
|
string
|
Type of the resource 'Microsoft.Support/supportTickets'.
|
TechnicalTicketDetails
Additional information for technical support ticket.
Name |
Type |
Description |
resourceId
|
string
|
This is the resource Id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource) for which the support ticket is created.
|
Contact information associated with the support ticket.
Name |
Type |
Description |
additionalEmailAddresses
|
string[]
|
Email addresses listed will be copied on any correspondence about the support ticket.
|
country
|
string
|
Country of the user. This is the ISO 3166-1 alpha-3 code.
|
firstName
|
string
|
First name.
|
lastName
|
string
|
Last name.
|
phoneNumber
|
string
|
Phone number. This is required if preferred contact method is phone.
|
preferredContactMethod
|
PreferredContactMethod
|
Preferred contact method.
|
preferredSupportLanguage
|
string
|
Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at Azure Severity and responsiveness. Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German.
|
preferredTimeZone
|
string
|
Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values.
|
primaryEmailAddress
|
string
|
Primary email address.
|
UpdateSupportTicket
Updates severity, ticket status, contact details, advanced diagnostic consent and secondary consent in the support ticket.
Name |
Type |
Description |
advancedDiagnosticConsent
|
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
contactDetails
|
UpdateContactProfile
|
Contact details to be updated on the support ticket.
|
secondaryConsent
|
SecondaryConsent[]
|
This property indicates secondary consents for the support ticket
|
severity
|
SeverityLevel
|
Severity level.
|
status
|
Status
|
Status to be updated on the ticket.
|
UserConsent
User consent value provided
Name |
Type |
Description |
No
|
string
|
|
Yes
|
string
|
|