This API allows you to update the severity level, ticket status, 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.
Changing the ticket status to closed is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}?api-version=2020-04-01
URI Parameters
Name |
In |
Required |
Type |
Description |
subscriptionId
|
path |
True
|
string
|
Azure subscription Id.
|
supportTicketName
|
path |
True
|
string
|
Support ticket name.
|
api-version
|
query |
True
|
string
|
API version.
|
Request Body
Name |
Type |
Description |
contactDetails
|
UpdateContactProfile
|
Contact details to be updated on the support ticket.
|
severity
|
SeverityLevel
|
Severity level.
|
status
|
Status
|
Status to be updated on the ticket.
|
Responses
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
Sample request
PATCH https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-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/2020-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update contact details of a support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void updateContactDetailsOfASupportTicket(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 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_a_support_ticket.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="subid",
)
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/2020-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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateContactDetailsOfASupportTicket() {
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/subid/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// 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}()),
// 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"),
// },
// 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, 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.<br/><br/>Changing the ticket status to _closed_ is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
*
* @summary This API allows you to update the severity level, ticket status, 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.<br/><br/>Changing the ticket status to _closed_ is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json
*/
async function updateContactDetailsOfASupportTicket() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
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 System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support;
using Azure.ResourceManager.Support.Models;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2020-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 SupportTicketResource created on azure
// for more information of creating SupportTicketResource, please refer to the document of SupportTicketResource
string subscriptionId = "subid";
string supportTicketName = "testticket";
ResourceIdentifier supportTicketResourceId = SupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SupportTicketResource supportTicket = client.GetSupportTicketResource(supportTicketResourceId);
// invoke the operation
SupportTicketPatch patch = new SupportTicketPatch()
{
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",
},
};
SupportTicketResource result = await supportTicket.UpdateAsync(patch);
// 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/subid/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,
"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",
"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 support ticket
Sample request
PATCH https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-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/2020-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update severity of a support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void updateSeverityOfASupportTicket(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 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_a_support_ticket.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="subid",
)
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/2020-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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateSeverityOfASupportTicket() {
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/subid/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// 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}()),
// 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"),
// },
// 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, 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.<br/><br/>Changing the ticket status to _closed_ is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
*
* @summary This API allows you to update the severity level, ticket status, 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.<br/><br/>Changing the ticket status to _closed_ is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json
*/
async function updateSeverityOfASupportTicket() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
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 System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support;
using Azure.ResourceManager.Support.Models;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2020-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 SupportTicketResource created on azure
// for more information of creating SupportTicketResource, please refer to the document of SupportTicketResource
string subscriptionId = "subid";
string supportTicketName = "testticket";
ResourceIdentifier supportTicketResourceId = SupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SupportTicketResource supportTicket = client.GetSupportTicketResource(supportTicketResourceId);
// invoke the operation
SupportTicketPatch patch = new SupportTicketPatch()
{
Severity = SupportSeverityLevel.Critical,
};
SupportTicketResource result = await supportTicket.UpdateAsync(patch);
// 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/subid/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,
"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",
"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 support ticket
Sample request
PATCH https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-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/2020-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json
*/
/**
* Sample code: Update status of a support ticket.
*
* @param manager Entry point to SupportManager.
*/
public static void updateStatusOfASupportTicket(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 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_a_support_ticket.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="subid",
)
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/2020-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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json
func ExampleTicketsClient_Update_updateStatusOfASupportTicket() {
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/subid/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("This is a test - please ignore"),
// 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}()),
// 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{
// },
// 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, 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.<br/><br/>Changing the ticket status to _closed_ is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
*
* @summary This API allows you to update the severity level, ticket status, 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.<br/><br/>Changing the ticket status to _closed_ is allowed only on an unassigned case. When an engineer is actively working on the ticket, send your ticket closure request by sending a note to your engineer.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json
*/
async function updateStatusOfASupportTicket() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
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 System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support;
using Azure.ResourceManager.Support.Models;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2020-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 SupportTicketResource created on azure
// for more information of creating SupportTicketResource, please refer to the document of SupportTicketResource
string subscriptionId = "subid";
string supportTicketName = "testticket";
ResourceIdentifier supportTicketResourceId = SupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName);
SupportTicketResource supportTicket = client.GetSupportTicketResource(supportTicketResourceId);
// invoke the operation
SupportTicketPatch patch = new SupportTicketPatch()
{
Status = SupportTicketStatus.Closed,
};
SupportTicketResource result = await supportTicket.UpdateAsync(patch);
// 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/subid/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,
"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",
"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 |
ContactProfile
|
Contact information associated with the support ticket.
|
ExceptionResponse
|
The API error.
|
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.
|
ServiceError
|
The API error details.
|
ServiceErrorDetail
|
The error details.
|
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, and contact details in the support ticket.
|
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.
|
ExceptionResponse
The API error.
Name |
Type |
Description |
error
|
ServiceError
|
The API error details.
|
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.
|
ServiceError
The API error details.
Name |
Type |
Description |
code
|
string
|
The error code.
|
details
|
ServiceErrorDetail[]
|
The list of error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The target of the error.
|
ServiceErrorDetail
The error details.
Name |
Type |
Description |
code
|
string
|
The error code.
|
message
|
string
|
The error message.
|
target
|
string
|
The target of the error.
|
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.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.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.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.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.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, and contact details in the support ticket.
Name |
Type |
Description |
contactDetails
|
UpdateContactProfile
|
Contact details to be updated on the support ticket.
|
severity
|
SeverityLevel
|
Severity level.
|
status
|
Status
|
Status to be updated on the ticket.
|