Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and Subscription Management issues for the specified subscription. Learn the prerequisites required to create a support ticket.
Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation.
Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the Manage support ticket page in the Azure portal, select the support ticket, and use the file upload control to add a new file.
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.
Creating a support ticket for on-behalf-of: Include x-ms-authorization-auxiliary header to provide an auxiliary token as per documentation. 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.
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}?api-version=2020-04-01
URI Parameters
Name |
In |
Required |
Type |
Description |
subscriptionId
|
path |
True
|
string
|
Azure subscription Id.
|
supportTicketName
|
path |
True
|
string
|
Support ticket name.
|
api-version
|
query |
True
|
string
|
API version.
|
Request Body
Name |
Required |
Type |
Description |
properties.contactDetails
|
True
|
ContactProfile
|
Contact information of the user requesting to create a support ticket.
|
properties.description
|
True
|
string
|
Detailed description of the question or issue.
|
properties.problemClassificationId
|
True
|
string
|
Each Azure service has its own set of issue categories, also known as problem classification. This parameter is the unique Id for the type of problem you are experiencing.
|
properties.serviceId
|
True
|
string
|
This is the resource Id of the Azure service resource associated with the support ticket.
|
properties.severity
|
True
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
properties.title
|
True
|
string
|
Title of the support ticket.
|
properties.problemStartTime
|
|
string
|
Time in UTC (ISO 8601 format) when the problem started.
|
properties.quotaTicketDetails
|
|
QuotaTicketDetails
|
Additional ticket details associated with a quota support ticket request.
|
properties.require24X7Response
|
|
boolean
|
Indicates if this requires a 24x7 response from Azure.
|
properties.serviceLevelAgreement
|
|
ServiceLevelAgreement
|
Service Level Agreement information for this support ticket.
|
properties.supportEngineer
|
|
SupportEngineer
|
Information about the support engineer working on this support ticket.
|
properties.supportTicketId
|
|
string
|
System generated support ticket Id that is unique.
|
properties.technicalTicketDetails
|
|
TechnicalTicketDetails
|
Additional ticket details associated with a technical support ticket request.
|
Responses
Name |
Type |
Description |
200 OK
|
SupportTicketDetails
|
OK - SupportTicket created successfully.
|
202 Accepted
|
|
Accepted, SupportTicket will be created asynchronously.
|
Other Status Codes
|
ExceptionResponse
|
Error response describing why the operation failed.
|
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account
|
Examples
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"
}
}
Definitions
Name |
Description |
ContactProfile
|
Contact information associated with the support ticket.
|
ExceptionResponse
|
The API error.
|
PreferredContactMethod
|
Preferred contact method.
|
QuotaChangeRequest
|
This property is required for providing the region and new quota limits.
|
QuotaTicketDetails
|
Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request.
|
ServiceError
|
The API error details.
|
ServiceErrorDetail
|
The error details.
|
ServiceLevelAgreement
|
Service Level Agreement details for a support ticket.
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
SupportEngineer
|
Support engineer information.
|
SupportTicketDetails
|
Object that represents SupportTicketDetails resource.
|
TechnicalTicketDetails
|
Additional information for technical support ticket.
|
Contact information associated with the support ticket.
Name |
Type |
Description |
additionalEmailAddresses
|
string[]
|
Additional email addresses listed will be copied on any correspondence about the support ticket.
|
country
|
string
|
Country of the user. This is the ISO 3166-1 alpha-3 code.
|
firstName
|
string
|
First name.
|
lastName
|
string
|
Last name.
|
phoneNumber
|
string
|
Phone number. This is required if preferred contact method is phone.
|
preferredContactMethod
|
PreferredContactMethod
|
Preferred contact method.
|
preferredSupportLanguage
|
string
|
Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at Azure Severity and responsiveness. Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German.
|
preferredTimeZone
|
string
|
Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values.
|
primaryEmailAddress
|
string
|
Primary email address.
|
ExceptionResponse
The API error.
Name |
Type |
Description |
error
|
ServiceError
|
The API error details.
|
Preferred contact method.
Name |
Type |
Description |
email
|
string
|
|
phone
|
string
|
|
QuotaChangeRequest
This property is required for providing the region and new quota limits.
Name |
Type |
Description |
payload
|
string
|
Payload of the quota increase request.
|
region
|
string
|
Region for which the quota increase request is being made.
|
QuotaTicketDetails
Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request.
Name |
Type |
Description |
quotaChangeRequestSubType
|
string
|
Required for certain quota types when there is a sub type, such as Batch, for which you are requesting a quota increase.
|
quotaChangeRequestVersion
|
string
|
Quota change request version.
|
quotaChangeRequests
|
QuotaChangeRequest[]
|
This property is required for providing the region and new quota limits.
|
ServiceError
The API error details.
Name |
Type |
Description |
code
|
string
|
The error code.
|
details
|
ServiceErrorDetail[]
|
The list of error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The target of the error.
|
ServiceErrorDetail
The error details.
Name |
Type |
Description |
code
|
string
|
The error code.
|
message
|
string
|
The error message.
|
target
|
string
|
The target of the error.
|
ServiceLevelAgreement
Service Level Agreement details for a support ticket.
Name |
Type |
Description |
expirationTime
|
string
|
Time in UTC (ISO 8601 format) when the service level agreement expires.
|
slaMinutes
|
integer
|
Service Level Agreement in minutes.
|
startTime
|
string
|
Time in UTC (ISO 8601 format) when the service level agreement starts.
|
SeverityLevel
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
Name |
Type |
Description |
critical
|
string
|
|
highestcriticalimpact
|
string
|
|
minimal
|
string
|
|
moderate
|
string
|
|
SupportEngineer
Support engineer information.
Name |
Type |
Description |
emailAddress
|
string
|
Email address of the Azure Support engineer assigned to the support ticket.
|
SupportTicketDetails
Object that represents SupportTicketDetails resource.
Name |
Type |
Description |
id
|
string
|
Id of the resource.
|
name
|
string
|
Name of the resource.
|
properties.contactDetails
|
ContactProfile
|
Contact information of the user requesting to create a support ticket.
|
properties.createdDate
|
string
|
Time in UTC (ISO 8601 format) when the support ticket was created.
|
properties.description
|
string
|
Detailed description of the question or issue.
|
properties.enrollmentId
|
string
|
Enrollment Id associated with the support ticket.
|
properties.modifiedDate
|
string
|
Time in UTC (ISO 8601 format) when the support ticket was last modified.
|
properties.problemClassificationDisplayName
|
string
|
Localized name of problem classification.
|
properties.problemClassificationId
|
string
|
Each Azure service has its own set of issue categories, also known as problem classification. This parameter is the unique Id for the type of problem you are experiencing.
|
properties.problemStartTime
|
string
|
Time in UTC (ISO 8601 format) when the problem started.
|
properties.quotaTicketDetails
|
QuotaTicketDetails
|
Additional ticket details associated with a quota support ticket request.
|
properties.require24X7Response
|
boolean
|
Indicates if this requires a 24x7 response from Azure.
|
properties.serviceDisplayName
|
string
|
Localized name of the Azure service.
|
properties.serviceId
|
string
|
This is the resource Id of the Azure service resource associated with the support ticket.
|
properties.serviceLevelAgreement
|
ServiceLevelAgreement
|
Service Level Agreement information for this support ticket.
|
properties.severity
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
properties.status
|
string
|
Status of the support ticket.
|
properties.supportEngineer
|
SupportEngineer
|
Information about the support engineer working on this support ticket.
|
properties.supportPlanType
|
string
|
Support plan type associated with the support ticket.
|
properties.supportTicketId
|
string
|
System generated support ticket Id that is unique.
|
properties.technicalTicketDetails
|
TechnicalTicketDetails
|
Additional ticket details associated with a technical support ticket request.
|
properties.title
|
string
|
Title of the support ticket.
|
type
|
string
|
Type of the resource 'Microsoft.Support/supportTickets'.
|
TechnicalTicketDetails
Additional information for technical support ticket.
Name |
Type |
Description |
resourceId
|
string
|
This is the resource Id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource) for which the support ticket is created.
|