Crea un nuovo ticket di supporto per i limiti di sottoscrizione e servizio (quota), technical, fatturazione e gestione delle sottoscrizioni per la sottoscrizione specificata. Informazioni sui prerequisiti necessari per creare un ticket di supporto.
Chiamare sempre l'API Services e ProblemClassifications per ottenere il set più recente di servizi e categorie di problemi necessarie per la creazione di ticket di supporto.
L'aggiunta di allegati non è attualmente supportata tramite l'API. Per aggiungere un file a un ticket di supporto esistente, visitare la pagina Gestisci ticket di supporto nella portale di Azure, selezionare il ticket di supporto e usare il controllo caricamento file per aggiungere un nuovo file.
Fornire il consenso per condividere le informazioni di diagnostica con supporto tecnico di Azure attualmente non è supportato tramite l'API. Il tecnico di supporto tecnico di Azure che lavora sul ticket verrà contattato per ottenere il consenso se il problema richiede la raccolta di informazioni di diagnostica dalle risorse di Azure.
Creazione di un ticket di supporto per on-behalf-of: includere l'intestazione x-ms-authorization-ausiliaria per fornire un token ausiliario in base alla documentazione. Il token primario proviene dal tenant per il quale viene generato un ticket di supporto per la sottoscrizione, ad esempio il tenant del provider di soluzioni cloud (CSP). Il token ausiliario proviene dal tenant del partner Cloud Solution Provider (CSP).
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}?api-version=2020-04-01
Parametri dell'URI
Nome |
In |
Necessario |
Tipo |
Descrizione |
subscriptionId
|
path |
True
|
string
|
ID sottoscrizione di Azure.
|
supportTicketName
|
path |
True
|
string
|
Nome del ticket di supporto.
|
api-version
|
query |
True
|
string
|
Versione dell'API.
|
Corpo della richiesta
Nome |
Necessario |
Tipo |
Descrizione |
properties.contactDetails
|
True
|
ContactProfile
|
Informazioni di contatto dell'utente che richiede di creare un ticket di supporto.
|
properties.description
|
True
|
string
|
Descrizione dettagliata della domanda o del problema.
|
properties.problemClassificationId
|
True
|
string
|
Ogni servizio di Azure ha un proprio set di categorie di problemi, note anche come classificazione dei problemi. Questo parametro è l'ID univoco per il tipo di problema riscontrato.
|
properties.serviceId
|
True
|
string
|
Si tratta dell'ID risorsa della risorsa del servizio di Azure associata al ticket di supporto.
|
properties.severity
|
True
|
SeverityLevel
|
Valore che indica l'urgenza del caso, che a sua volta determina il tempo di risposta in base al contratto di servizio del piano di supporto tecnico in uso con Azure. Nota: "Massimo impatto critico", noto anche come livello di "emergenza - Grave impatto" nel portale di Azure è riservato solo ai nostri clienti Premium.
|
properties.title
|
True
|
string
|
Titolo del ticket di supporto.
|
properties.problemStartTime
|
|
string
|
Ora UTC (formato ISO 8601) all'avvio del problema.
|
properties.quotaTicketDetails
|
|
QuotaTicketDetails
|
Dettagli aggiuntivi del ticket associati a una richiesta di ticket di supporto quota.
|
properties.require24X7Response
|
|
boolean
|
Indica se richiede una risposta 24x7 da Azure.
|
properties.serviceLevelAgreement
|
|
ServiceLevelAgreement
|
Informazioni sul contratto di servizio per questo ticket di supporto.
|
properties.supportEngineer
|
|
SupportEngineer
|
Informazioni sul tecnico di supporto che lavora su questo ticket di supporto.
|
properties.supportTicketId
|
|
string
|
ID del ticket di supporto generato dal sistema che è univoco.
|
properties.technicalTicketDetails
|
|
TechnicalTicketDetails
|
Dettagli aggiuntivi sui ticket associati a una richiesta di ticket di supporto tecnico.
|
Risposte
Nome |
Tipo |
Descrizione |
200 OK
|
SupportTicketDetails
|
OK - SupportTicket creato correttamente.
|
202 Accepted
|
|
Accettata, SupportTicket verrà creata in modo asincrono.
|
Other Status Codes
|
ExceptionResponse
|
Risposta di errore che descrive perché l'operazione non è riuscita.
|
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nome |
Descrizione |
user_impersonation
|
rappresentare l'account utente
|
Esempio
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/billing_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_for_billing_related_issues.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
"serviceId": "/providers/Microsoft.Support/services/billing_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.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/CreateBillingSupportTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketForBillingRelatedIssues() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid"),
ServiceID: to.Ptr("/providers/Microsoft.Support/services/billing_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Refund request"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Billing"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/billing_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
async function createATicketForBillingRelatedIssues() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
serviceId: "/providers/Microsoft.Support/services/billing_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateBillingSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/billing_service_guid",
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
"problemClassificationDisplayName": "Refund request",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@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": "my title",
"serviceId": "/providers/Microsoft.Support/services/billing_service_guid",
"serviceDisplayName": "Billing",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/subscription_management_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_for_subscription_management_related_issues.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid",
"serviceId": "/providers/Microsoft.Support/services/subscription_management_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.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/CreateSubMgmtSupportTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketForSubscriptionManagementRelatedIssues() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid"),
ServiceID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Transfer ownership of my subscription"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
async function createATicketForSubscriptionManagementRelatedIssues() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid",
serviceId: "/providers/Microsoft.Support/services/subscription_management_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateSubMgmtSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/subscription_management_service_guid",
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid",
"problemClassificationDisplayName": "Transfer ownership of my subscription",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@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": "my title",
"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
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"technicalTicketDetails": {
"resourceId": "/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_for_technical_issue_related_to_a_specific_resource.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
"serviceId": "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc",
"severity": "moderate",
"technicalTicketDetails": {
"resourceId": "/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"
},
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.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/CreateTechnicalSupportTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketForTechnicalIssueRelatedToASpecificResource() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid"),
ServiceID: to.Ptr("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
TechnicalTicketDetails: &armsupport.TechnicalTicketDetails{
ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"),
},
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Connectivity / Cannot connect to virtual machine by using RDP or SSH"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_running_linux_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// TechnicalTicketDetails: &armsupport.TechnicalTicketDetails{
// ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"),
// },
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
async function createATicketForTechnicalIssueRelatedToASpecificResource() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
serviceId: "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc",
severity: "moderate",
technicalTicketDetails: {
resourceId:
"/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver",
},
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateTechnicalSupportTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc",
TechnicalTicketDetailsResourceId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"),
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
"problemClassificationDisplayName": "Connectivity / Cannot connect to virtual machine by using RDP or SSH",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"technicalTicketDetails": {
"resourceId": "/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid",
"serviceDisplayName": "Virtual Machine running Linux",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Active Jobs and Job Schedules for a Batch account
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_active_jobs_and_job_schedules_for_a_batch_account.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Account",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{"payload": '{"AccountName":"test","NewLimit":200,"Type":"Jobs"}', "region": "EastUS"}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.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/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Account"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Batch"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Account"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json
*/
async function createATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Account",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"AccountName":"test","NewLimit":200,"Type":"Jobs"}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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.ContactProfile;
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.QuotaChangeRequest;
import com.azure.resourcemanager.support.models.QuotaTicketDetails;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import java.util.Arrays;
/** Samples for SupportTickets Create. */
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Active Jobs and Job Schedules for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for services that do not require additional details in the
* quotaTicketDetails object.
*
* @param manager Entry point to SupportManager.
*/
public static void
createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("Increase the maximum throughput per container limit to 10000 for account foo bar")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Azure SQL managed instance.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("SQLMI")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Pools for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for SQL Database.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForSQLDatabase(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Billing related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssues(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResource(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
.withTechnicalTicketDetails(
new TechnicalTicketDetails()
.withResourceId(
"/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Compute VM Cores.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForComputeVMCores(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
.create();
}
}
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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"problemClassificationDisplayName": "Batch",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Azure Lab Services for a subscription
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/als_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"deployment_model\":\"LabPlan_V2\",\"vnetRegion\":\"Yes\",\"QuotaBucket\":\"standardFSv2Family\",\"NewLimit\":157}"
}
]
}
}
}
Sample Response
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/als_problemClassification_guid",
"problemClassificationDisplayName": "Azure Lab Services",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"deployment_model\":\"LabPlan_V2\",\"vnetRegion\":\"No\",\"QuotaBucket\":\"standardFSv2Family\",\"NewLimit\":157}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2023-03-30T21:36:18Z",
"expirationTime": "2023-03-30T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2023-03-30T21:36:18Z",
"modifiedDate": "2023-03-30T21:36:23Z"
}
}
Create a ticket to request Quota increase for Azure SQL managed instance
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "SQLMI",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"
},
{
"region": "EastUS",
"payload": "{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_azure_sql_managed_instance.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "SQLMI",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{"payload": '{"NewLimit":200, "Metadata":null, "Type":"vCore"}', "region": "EastUS"},
{"payload": '{"NewLimit":200, "Metadata":null, "Type":"Subnet"}', "region": "EastUS"},
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.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/CreateSqlManagedInstanceQuotaTicket.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForAzureSqlManagedInstance() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("SQLMI"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
Region: to.Ptr("EastUS"),
},
{
Payload: to.Ptr("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("SQL Database Managed Instance"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("SQLMI"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
// Region: to.Ptr("EastUS"),
// },
// {
// Payload: to.Ptr("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
async function createATicketToRequestQuotaIncreaseForAzureSqlManagedInstance() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "SQLMI",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"NewLimit":200, "Metadata":null, "Type":"vCore"}',
region: "EastUS",
},
{
payload: '{"NewLimit":200, "Metadata":null, "Type":"Subnet"}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateSqlManagedInstanceQuotaTicket.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "SQLMI",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}",
},new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"problemClassificationDisplayName": "SQL Database Managed Instance",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "SQLMI",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"
},
{
"region": "EastUS",
"payload": "{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Batch accounts for a subscription
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Subscription",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200,\"Type\":\"Account\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_batch_accounts_for_a_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="subid",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Subscription",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [{"payload": '{"NewLimit":200,"Type":"Account"}', "region": "EastUS"}],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSubscription.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/CreateBatchQuotaTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForBatchAccountsForASubscription() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Subscription"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"NewLimit\":200,\"Type\":\"Account\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Batch"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Subscription"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"NewLimit\":200,\"Type\":\"Account\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSubscription.json
*/
async function createATicketToRequestQuotaIncreaseForBatchAccountsForASubscription() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Subscription",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [{ payload: '{"NewLimit":200,"Type":"Account"}', region: "EastUS" }],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateBatchQuotaTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Subscription",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200,\"Type\":\"Account\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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.ContactProfile;
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.QuotaChangeRequest;
import com.azure.resourcemanager.support.models.QuotaTicketDetails;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import java.util.Arrays;
/** Samples for SupportTickets Create. */
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSubscription.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Batch accounts for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForBatchAccountsForASubscription(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Subscription")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200,\"Type\":\"Account\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for services that do not require additional details in the
* quotaTicketDetails object.
*
* @param manager Entry point to SupportManager.
*/
public static void
createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("Increase the maximum throughput per container limit to 10000 for account foo bar")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Azure SQL managed instance.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("SQLMI")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Pools for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for SQL Database.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForSQLDatabase(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Billing related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssues(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResource(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
.withTechnicalTicketDetails(
new TechnicalTicketDetails()
.withResourceId(
"/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Compute VM Cores.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForComputeVMCores(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
.create();
}
}
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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"problemClassificationDisplayName": "Batch",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Subscription",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200,\"Type\":\"Account\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Compute VM Cores
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_compute_vm_cores.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [{"payload": '{"SKU":"DSv3 Series","NewLimit":104}', "region": "EastUS"}],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.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/CreateCoresQuotaTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForComputeVmCores() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Compute-VM (cores-vCPUs) subscription limit increases"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"VmFamily\":\"DSv3 Series\",\"NewLimit\":104}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
async function createATicketToRequestQuotaIncreaseForComputeVMCores() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [{ payload: '{"SKU":"DSv3 Series","NewLimit":104}', region: "EastUS" }],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateCoresQuotaTicketForSubscription.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid",
"problemClassificationDisplayName": "Compute-VM (cores-vCPUs) subscription limit increases",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"VmFamily\":\"DSv3 Series\",\"NewLimit\":104}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for DTUs for Azure Synapse Analytics
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "DTUs",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"ServerName\":\"testserver\",\"NewLimit\":54000}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_dt_us_for_azure_synapse_analytics.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "DTUs",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{"payload": '{"ServerName":"testserver","NewLimit":54000}', "region": "EastUS"}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.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/CreateSqlDatawarehouseQuotaTicketForDTUs.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForDtUsForAzureSynapseAnalytics() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("DTUs"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("SQL Data Warehouse"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("DTUs"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json
*/
async function createATicketToRequestQuotaIncreaseForDtUsForAzureSynapseAnalytics() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "DTUs",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"ServerName":"testserver","NewLimit":54000}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateSqlDatawarehouseQuotaTicketForDTUs.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "DTUs",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"ServerName\":\"testserver\",\"NewLimit\":54000}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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.ContactProfile;
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.QuotaChangeRequest;
import com.azure.resourcemanager.support.models.QuotaTicketDetails;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import java.util.Arrays;
/** Samples for SupportTickets Create. */
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json
*/
/**
* Sample code: Create a ticket to request Quota increase for DTUs for Azure Synapse Analytics.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForDTUsForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("DTUs")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for services that do not require additional details in the
* quotaTicketDetails object.
*
* @param manager Entry point to SupportManager.
*/
public static void
createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("Increase the maximum throughput per container limit to 10000 for account foo bar")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Azure SQL managed instance.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("SQLMI")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Pools for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for SQL Database.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForSQLDatabase(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Billing related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssues(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResource(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
.withTechnicalTicketDetails(
new TechnicalTicketDetails()
.withResourceId(
"/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Compute VM Cores.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForComputeVMCores(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
.create();
}
}
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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"problemClassificationDisplayName": "SQL Data Warehouse",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "DTUs",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"ServerName\":\"testserver\",\"NewLimit\":54000}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for DTUs for SQL Database
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "DTUs",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"ServerName\":\"testserver\",\"NewLimit\":54000}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_dt_us_for_sql_database.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "DTUs",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{"payload": '{"ServerName":"testserver","NewLimit":54000}', "region": "EastUS"}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.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/CreateSqlDatabaseQuotaTicketForDTUs.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForDtUsForSqlDatabase() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("DTUs"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("SQL database"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("DTUs"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.json
*/
async function createATicketToRequestQuotaIncreaseForDtUsForSqlDatabase() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "DTUs",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"ServerName":"testserver","NewLimit":54000}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateSqlDatabaseQuotaTicketForDTUs.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "DTUs",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"ServerName\":\"testserver\",\"NewLimit\":54000}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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.ContactProfile;
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.QuotaChangeRequest;
import com.azure.resourcemanager.support.models.QuotaTicketDetails;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import java.util.Arrays;
/** Samples for SupportTickets Create. */
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.json
*/
/**
* Sample code: Create a ticket to request Quota increase for DTUs for SQL Database.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForDTUsForSQLDatabase(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("DTUs")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for services that do not require additional details in the
* quotaTicketDetails object.
*
* @param manager Entry point to SupportManager.
*/
public static void
createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("Increase the maximum throughput per container limit to 10000 for account foo bar")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Azure SQL managed instance.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("SQLMI")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Pools for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for SQL Database.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForSQLDatabase(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Billing related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssues(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResource(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
.withTechnicalTicketDetails(
new TechnicalTicketDetails()
.withResourceId(
"/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Compute VM Cores.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForComputeVMCores(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
.create();
}
}
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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
"problemClassificationDisplayName": "SQL database",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "DTUs",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"ServerName\":\"testserver\",\"NewLimit\":54000}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Low-priority cores for a Batch account
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_lowpriority_cores_for_a_batch_account.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Account",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{"payload": '{"AccountName":"test","NewLimit":200,"Type":"LowPriority"}', "region": "EastUS"}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.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/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Account"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Batch"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Account"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
async function createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Account",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"AccountName":"test","NewLimit":200,"Type":"LowPriority"}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"problemClassificationDisplayName": "Batch",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Low-priority cores for Machine Learning service
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "BatchAml",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200,\"Type\":\"LowPriority\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_lowpriority_cores_for_machine_learning_service.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "BatchAml",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [{"payload": '{"NewLimit":200,"Type":"LowPriority"}', "region": "EastUS"}],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.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/CreateMachineLearningQuotaTicketForLowPriorityCores.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("BatchAml"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"NewLimit\":200,\"Type\":\"LowPriority\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Machine Learning service"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Account"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"NewLimit\":200,\"Type\":\"LowPriority\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json
*/
async function createATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "BatchAml",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [{ payload: '{"NewLimit":200,"Type":"LowPriority"}', region: "EastUS" }],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateMachineLearningQuotaTicketForLowPriorityCores.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "BatchAml",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200,\"Type\":\"LowPriority\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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.ContactProfile;
import com.azure.resourcemanager.support.models.PreferredContactMethod;
import com.azure.resourcemanager.support.models.QuotaChangeRequest;
import com.azure.resourcemanager.support.models.QuotaTicketDetails;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import java.util.Arrays;
/** Samples for SupportTickets Create. */
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Low-priority cores for Machine Learning service.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for services that do not require additional details in the
* quotaTicketDetails object.
*
* @param manager Entry point to SupportManager.
*/
public static void
createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("Increase the maximum throughput per container limit to 10000 for account foo bar")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Azure SQL managed instance.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("SQLMI")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Pools for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for SQL Database.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForSQLDatabase(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Billing related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssues(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResource(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
.withTechnicalTicketDetails(
new TechnicalTicketDetails()
.withResourceId(
"/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
/**
* Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload(
"{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
/**
* Sample code: Create a ticket to request Quota increase for Compute VM Cores.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketToRequestQuotaIncreaseForComputeVMCores(
com.azure.resourcemanager.support.SupportManager manager) {
manager
.supportTickets()
.define("testticket")
.withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withContactDetails(
new ContactProfile()
.withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.withQuotaTicketDetails(
new QuotaTicketDetails()
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays
.asList(
new QuotaChangeRequest()
.withRegion("EastUS")
.withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
.create();
}
}
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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
"problemClassificationDisplayName": "Machine Learning service",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200,\"Type\":\"LowPriority\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Pools for a Batch account
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_pools_for_a_batch_account.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Account",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{"payload": '{"AccountName":"test","NewLimit":200,"Type":"Pools"}', "region": "EastUS"}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.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/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForPoolsForABatchAccount() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Account"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Batch"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Account"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
async function createATicketToRequestQuotaIncreaseForPoolsForABatchAccount() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Account",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"AccountName":"test","NewLimit":200,"Type":"Pools"}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"problemClassificationDisplayName": "Batch",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Servers for Azure Synapse Analytics
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Servers",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_servers_for_azure_synapse_analytics.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Servers",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [{"payload": '{"NewLimit":200}', "region": "EastUS"}],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.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/CreateSqlDatawarehouseQuotaTicketForServers.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Servers"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"NewLimit\":200}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("SQL Data Warehouse"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Servers"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"NewLimit\":200}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
async function createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Servers",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [{ payload: '{"NewLimit":200}', region: "EastUS" }],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateSqlDatawarehouseQuotaTicketForServers.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Servers",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid",
"problemClassificationDisplayName": "SQL Data Warehouse",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Servers",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for Servers for SQL Database
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Servers",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_servers_for_sql_database.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Servers",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [{"payload": '{"NewLimit":200}', "region": "EastUS"}],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.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/CreateSqlDatabaseQuotaTicketForServers.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForServersForSqlDatabase() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Servers"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"NewLimit\":200}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("SQL database"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Servers"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"NewLimit\":200}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
async function createATicketToRequestQuotaIncreaseForServersForSqlDatabase() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Servers",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [{ payload: '{"NewLimit":200}', region: "EastUS" }],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateSqlDatabaseQuotaTicketForServers.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Servers",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid",
"problemClassificationDisplayName": "SQL database",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Servers",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"NewLimit\":200}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for services that do not require additional details in the quotaTicketDetails object
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "Increase the maximum throughput per container limit to 10000 for account foo bar",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_services_that_do_not_require_additional_details_in_the_quota_ticket_details_object.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "Increase the maximum throughput per container limit to 10000 for account foo bar",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.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/CreateGenericQuotaTicket.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("Increase the maximum throughput per container limit to 10000 for account foo bar"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid"),
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("Increase the maximum throughput per container limit to 10000 for account foo bar"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Cosmos DB"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid"),
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
*/
async function createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "Increase the maximum throughput per container limit to 10000 for account foo bar",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid",
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateGenericQuotaTicket.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "Increase the maximum throughput per container limit to 10000 for account foo bar",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "Increase the maximum throughput per container limit to 10000 for account foo bar",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid",
"problemClassificationDisplayName": "Cosmos DB",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@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": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for specific VM family cores for a Batch account
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_specific_vm_family_cores_for_a_batch_account.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "Account",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{
"payload": '{"AccountName":"test","VMFamily":"standardA0_A7Family","NewLimit":200,"Type":"Dedicated"}',
"region": "EastUS",
}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.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/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForSpecificVmFamilyCoresForABatchAccount() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("Account"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Batch"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Account"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
async function createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "Account",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload:
'{"AccountName":"test","VMFamily":"standardA0_A7Family","NewLimit":200,"Type":"Dedicated"}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid",
"problemClassificationDisplayName": "Batch",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Create a ticket to request Quota increase for specific VM family cores for Machine Learning service
Sample Request
PUT https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket?api-version=2020-04-01
{
"properties": {
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"title": "my title",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
"severity": "moderate",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "BatchAml",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"
}
]
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_a_ticket_to_request_quota_increase_for_specific_vm_family_cores_for_machine_learning_service.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.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
"quotaTicketDetails": {
"quotaChangeRequestSubType": "BatchAml",
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequests": [
{
"payload": '{"VMFamily":"standardA0_A7Family","NewLimit":200,"Type":"Dedicated"}',
"region": "EastUS",
}
],
},
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"severity": "moderate",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.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/CreateMachineLearningQuotaTicketForDedicatedCores.json
func ExampleTicketsClient_BeginCreate_createATicketToRequestQuotaIncreaseForSpecificVmFamilyCoresForMachineLearningService() {
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)
}
poller, err := clientFactory.NewTicketsClient().BeginCreate(ctx, "testticket", armsupport.TicketDetails{
Properties: &armsupport.TicketDetailsProperties{
Description: to.Ptr("my description"),
ContactDetails: &armsupport.ContactProfile{
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("abc@contoso.com"),
},
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid"),
QuotaTicketDetails: &armsupport.QuotaTicketDetails{
QuotaChangeRequestSubType: to.Ptr("BatchAml"),
QuotaChangeRequestVersion: to.Ptr("1.0"),
QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
{
Payload: to.Ptr("{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"),
Region: to.Ptr("EastUS"),
}},
},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
Title: to.Ptr("my title"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.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("my description"),
// ContactDetails: &armsupport.ContactProfile{
// 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("abc@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("Machine Learning service"),
// ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid"),
// QuotaTicketDetails: &armsupport.QuotaTicketDetails{
// QuotaChangeRequestSubType: to.Ptr("Account"),
// QuotaChangeRequestVersion: to.Ptr("1.0"),
// QuotaChangeRequests: []*armsupport.QuotaChangeRequest{
// {
// Payload: to.Ptr("{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"),
// Region: to.Ptr("EastUS"),
// }},
// },
// Require24X7Response: to.Ptr(false),
// ServiceDisplayName: to.Ptr("Service and subscription limits (quotas)"),
// ServiceID: to.Ptr("/providers/Microsoft.Support/services/quota_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.SeverityLevelModerate),
// Status: to.Ptr("Open"),
// SupportEngineer: &armsupport.Engineer{
// },
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// Title: to.Ptr("my title"),
// },
// }
}
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 Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
*
* @summary Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.<br/><br/>Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the [Manage support ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) page in the Azure portal, select the support ticket, and use the file upload control to add a new file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). The primary token will be from the tenant for whom a support ticket is being raised against the subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from the Cloud solution provider (CSP) partner tenant.
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
async function createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService() {
const subscriptionId = process.env["SUPPORT_SUBSCRIPTION_ID"] || "subid";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
problemClassificationId:
"/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
quotaTicketDetails: {
quotaChangeRequestSubType: "BatchAml",
quotaChangeRequestVersion: "1.0",
quotaChangeRequests: [
{
payload: '{"VMFamily":"standardA0_A7Family","NewLimit":200,"Type":"Dedicated"}',
region: "EastUS",
},
],
},
serviceId: "/providers/Microsoft.Support/services/quota_service_guid",
severity: "moderate",
title: "my title",
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftSupport(credential, subscriptionId);
const result = await client.supportTickets.beginCreateAndWait(
supportTicketName,
createSupportTicketParameters
);
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;
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/CreateMachineLearningQuotaTicketForDedicatedCores.json
// this example is just showing the usage of "SupportTickets_Create" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SupportTicketResource
SupportTicketCollection collection = subscriptionResource.GetSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData()
{
Description = "my description",
ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
Severity = SupportSeverityLevel.Moderate,
ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"),
Title = "my title",
ServiceId = "/providers/Microsoft.Support/services/quota_service_guid",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "BatchAml",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}",
}
},
},
};
ArmOperation<SupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SupportTicketResource result = lro.Value;
// 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
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationResults/operationid?api-version=2020-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.Support/operationsStatus/operationid?api-version=2020-04-01
{
"id": "/subscriptions/subid/providers/Microsoft.Support/supportTickets/testticket",
"name": "testticket",
"type": "Microsoft.Support/supportTickets",
"properties": {
"supportTicketId": "119120321001170",
"description": "my description",
"problemClassificationId": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid",
"problemClassificationDisplayName": "Machine Learning service",
"severity": "moderate",
"require24X7Response": false,
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"quotaTicketDetails": {
"quotaChangeRequestVersion": "1.0",
"quotaChangeRequestSubType": "Account",
"quotaChangeRequests": [
{
"region": "EastUS",
"payload": "{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"
}
]
},
"serviceLevelAgreement": {
"startTime": "2020-03-20T21:36:18Z",
"expirationTime": "2020-03-21T17:36:18Z",
"slaMinutes": 240
},
"supportEngineer": {
"emailAddress": null
},
"supportPlanType": "Premier",
"title": "my title",
"serviceId": "/providers/Microsoft.Support/services/quota_service_guid",
"serviceDisplayName": "Service and subscription limits (quotas)",
"status": "Open",
"createdDate": "2020-03-20T21:36:18Z",
"modifiedDate": "2020-03-20T21:36:23Z"
}
}
Definizioni
Nome |
Descrizione |
ContactProfile
|
Informazioni di contatto associate al ticket di supporto.
|
ExceptionResponse
|
Errore dell'API.
|
PreferredContactMethod
|
Metodo di contatto preferito.
|
QuotaChangeRequest
|
Questa proprietà è necessaria per fornire l'area e i nuovi limiti di quota.
|
QuotaTicketDetails
|
Set aggiuntivo di informazioni necessarie per aumentare il ticket di supporto per determinati tipi di quota, ad esempio core di macchine virtuali. Ottenere dettagli completi sulla richiesta di supporto del payload quota insieme ad esempi alla richiesta di quota di supporto.
|
ServiceError
|
Dettagli dell'errore dell'API.
|
ServiceErrorDetail
|
Dettagli dell'errore.
|
ServiceLevelAgreement
|
Dettagli del Contratto di servizio per un ticket di supporto.
|
SeverityLevel
|
Valore che indica l'urgenza del caso, che a sua volta determina il tempo di risposta in base al contratto di servizio del piano di supporto tecnico in uso con Azure. Nota: "Massimo impatto critico", noto anche come livello di "emergenza - Grave impatto" nel portale di Azure è riservato solo ai nostri clienti Premium.
|
SupportEngineer
|
Informazioni sul tecnico di supporto.
|
SupportTicketDetails
|
Oggetto che rappresenta la risorsa SupportTicketDetails.
|
TechnicalTicketDetails
|
Informazioni aggiuntive per il ticket di supporto tecnico.
|
Informazioni di contatto associate al ticket di supporto.
Nome |
Tipo |
Descrizione |
additionalEmailAddresses
|
string[]
|
Gli indirizzi di posta elettronica aggiuntivi elencati verranno copiati in qualsiasi corrispondenza relativa al ticket di supporto.
|
country
|
string
|
Paese dell'utente. Si tratta del codice alfa-3166-1 ISO 3.
|
firstName
|
string
|
Nome.
|
lastName
|
string
|
Cognome.
|
phoneNumber
|
string
|
Numero di telefono. Questo è necessario se il metodo di contatto preferito è telefono.
|
preferredContactMethod
|
PreferredContactMethod
|
Metodo di contatto preferito.
|
preferredSupportLanguage
|
string
|
Linguaggio preferito del supporto da Azure. Le lingue di supporto variano in base alla gravità scelta per il ticket di supporto. Altre informazioni su Gravità e velocità di risposta di Azure. Usare il codice del paese di lingua standard. I valori validi sono "en-us" per inglese, 'zh-hans' per cinese, 'es-es' per spagnolo, 'fr-fr' per francese, 'ja-jp' per giapponese, 'ko-kr' per coreano, 'ru-ru' per russo, 'pt-br' per portoghese, 'it-it' per italiano, 'zh-tw' per cinese e 'de-de' per tedesco.
|
preferredTimeZone
|
string
|
Fuso orario dell'utente. Si tratta del nome del fuso orario dai valori di indice del fuso orario microsoft.
|
primaryEmailAddress
|
string
|
Indirizzo di posta elettronica primario.
|
ExceptionResponse
Errore dell'API.
Nome |
Tipo |
Descrizione |
error
|
ServiceError
|
Dettagli dell'errore dell'API.
|
Metodo di contatto preferito.
Nome |
Tipo |
Descrizione |
email
|
string
|
|
phone
|
string
|
|
QuotaChangeRequest
Questa proprietà è necessaria per fornire l'area e i nuovi limiti di quota.
Nome |
Tipo |
Descrizione |
payload
|
string
|
Payload della richiesta di aumento della quota.
|
region
|
string
|
Area per cui viene effettuata la richiesta di aumento della quota.
|
QuotaTicketDetails
Set aggiuntivo di informazioni necessarie per aumentare il ticket di supporto per determinati tipi di quota, ad esempio core di macchine virtuali. Ottenere dettagli completi sulla richiesta di supporto del payload quota insieme ad esempi alla richiesta di quota di supporto.
Nome |
Tipo |
Descrizione |
quotaChangeRequestSubType
|
string
|
Obbligatorio per determinati tipi di quota quando è presente un sottotipo, ad esempio Batch, per il quale si richiede un aumento della quota.
|
quotaChangeRequestVersion
|
string
|
Versione della richiesta di modifica quota.
|
quotaChangeRequests
|
QuotaChangeRequest[]
|
Questa proprietà è necessaria per fornire l'area e i nuovi limiti di quota.
|
ServiceError
Dettagli dell'errore dell'API.
Nome |
Tipo |
Descrizione |
code
|
string
|
Codice di errore.
|
details
|
ServiceErrorDetail[]
|
Elenco dei dettagli dell'errore.
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore.
|
ServiceErrorDetail
Dettagli dell'errore.
Nome |
Tipo |
Descrizione |
code
|
string
|
Codice di errore.
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore.
|
ServiceLevelAgreement
Dettagli del Contratto di servizio per un ticket di supporto.
Nome |
Tipo |
Descrizione |
expirationTime
|
string
|
Ora UTC (formato ISO 8601) alla scadenza del contratto di servizio.
|
slaMinutes
|
integer
|
Contratto di servizio in minuti.
|
startTime
|
string
|
Ora UTC (formato ISO 8601) all'avvio del contratto di servizio.
|
SeverityLevel
Valore che indica l'urgenza del caso, che a sua volta determina il tempo di risposta in base al contratto di servizio del piano di supporto tecnico in uso con Azure. Nota: "Massimo impatto critico", noto anche come livello di "emergenza - Grave impatto" nel portale di Azure è riservato solo ai nostri clienti Premium.
Nome |
Tipo |
Descrizione |
critical
|
string
|
|
highestcriticalimpact
|
string
|
|
minimal
|
string
|
|
moderate
|
string
|
|
SupportEngineer
Informazioni sul tecnico di supporto.
Nome |
Tipo |
Descrizione |
emailAddress
|
string
|
Email indirizzo del tecnico del supporto di Azure assegnato al ticket di supporto.
|
SupportTicketDetails
Oggetto che rappresenta la risorsa SupportTicketDetails.
Nome |
Tipo |
Descrizione |
id
|
string
|
ID della risorsa.
|
name
|
string
|
Nome della risorsa.
|
properties.contactDetails
|
ContactProfile
|
Informazioni di contatto dell'utente che richiede di creare un ticket di supporto.
|
properties.createdDate
|
string
|
Ora UTC (formato ISO 8601) quando è stato creato il ticket di supporto.
|
properties.description
|
string
|
Descrizione dettagliata della domanda o del problema.
|
properties.enrollmentId
|
string
|
ID registrazione associato al ticket di supporto.
|
properties.modifiedDate
|
string
|
Ora UTC (formato ISO 8601) quando il ticket di supporto è stato modificato.
|
properties.problemClassificationDisplayName
|
string
|
Nome localizzato della classificazione dei problemi.
|
properties.problemClassificationId
|
string
|
Ogni servizio di Azure ha un proprio set di categorie di problemi, note anche come classificazione dei problemi. Questo parametro è l'ID univoco per il tipo di problema riscontrato.
|
properties.problemStartTime
|
string
|
Ora UTC (formato ISO 8601) all'avvio del problema.
|
properties.quotaTicketDetails
|
QuotaTicketDetails
|
Dettagli aggiuntivi del ticket associati a una richiesta di ticket di supporto quota.
|
properties.require24X7Response
|
boolean
|
Indica se richiede una risposta 24x7 da Azure.
|
properties.serviceDisplayName
|
string
|
Nome localizzato del servizio di Azure.
|
properties.serviceId
|
string
|
Si tratta dell'ID risorsa della risorsa del servizio di Azure associata al ticket di supporto.
|
properties.serviceLevelAgreement
|
ServiceLevelAgreement
|
Informazioni sul contratto di servizio per questo ticket di supporto.
|
properties.severity
|
SeverityLevel
|
Valore che indica l'urgenza del caso, che a sua volta determina il tempo di risposta in base al contratto di servizio del piano di supporto tecnico in uso con Azure. Nota: "Massimo impatto critico", noto anche come livello di "emergenza - Grave impatto" nel portale di Azure è riservato solo ai nostri clienti Premium.
|
properties.status
|
string
|
Stato del ticket di supporto.
|
properties.supportEngineer
|
SupportEngineer
|
Informazioni sul tecnico di supporto che lavora su questo ticket di supporto.
|
properties.supportPlanType
|
string
|
Tipo di piano di supporto associato al ticket di supporto.
|
properties.supportTicketId
|
string
|
ID del ticket di supporto generato dal sistema che è univoco.
|
properties.technicalTicketDetails
|
TechnicalTicketDetails
|
Dettagli aggiuntivi sui ticket associati a una richiesta di ticket di supporto tecnico.
|
properties.title
|
string
|
Titolo del ticket di supporto.
|
type
|
string
|
Tipo della risorsa 'Microsoft.Support/supportTickets'.
|
TechnicalTicketDetails
Informazioni aggiuntive per il ticket di supporto tecnico.
Nome |
Tipo |
Descrizione |
resourceId
|
string
|
Si tratta dell'ID risorsa della risorsa del servizio di Azure, ad esempio una risorsa macchina virtuale o una risorsa HDInsight, per cui viene creato il ticket di supporto.
|